Author Topic: [DONE][Suggestion] Unhardcode dollar symbol.  (Read 741 times)

Offline Nord

  • Commander
  • *****
  • Posts: 1736
  • The Gate is open.
    • View Profile
[DONE][Suggestion] Unhardcode dollar symbol.
« on: September 16, 2024, 12:42:34 am »
We can change string for "funding" etc, but can not change "$". Maybe this can be unhardcoded?
« Last Edit: September 17, 2024, 02:27:42 am by Nord »

Offline Ethereal

  • Commander
  • *****
  • Posts: 672
    • View Profile
Re: [Solved] Unhardcode dollar symbol.
« Reply #1 on: September 16, 2024, 05:33:53 am »
We can change string for "funding" etc, but can not change "$". Maybe this can be unhardcoded?

By the way, yes. It would be cool to see "" there.  :D

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11662
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: [Solved] Unhardcode dollar symbol.
« Reply #2 on: September 16, 2024, 10:12:58 am »
You can edit FontBig.png and FontSmall.png to replace $ with something else.

Offline Ethereal

  • Commander
  • *****
  • Posts: 672
    • View Profile
Re: [Solved] Unhardcode dollar symbol.
« Reply #3 on: September 16, 2024, 05:55:39 pm »
You can edit FontBig.png and FontSmall.png to replace $ with something else.

Thank you. :) Happiness all this time was nearby, but we did not notice. :)

Offline Nord

  • Commander
  • *****
  • Posts: 1736
  • The Gate is open.
    • View Profile
Re: [Solved] Unhardcode dollar symbol.
« Reply #4 on: September 16, 2024, 10:39:44 pm »
You can edit FontBig.png and FontSmall.png to replace $ with something else.
And if i want more than one letter?

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8974
    • View Profile
Re: [Solved] Unhardcode dollar symbol.
« Reply #5 on: September 17, 2024, 12:04:47 am »
And if i want more than one letter?

Then you should give an example so that we can see if you want 5 letters, 15 letters or 50 letters.

Also, this thread was opened with prefix Solved... did you mean to use prefix Suggestion?

Online Delian

  • Colonel
  • ****
  • Posts: 413
    • View Profile
Re: [Solved] Unhardcode dollar symbol.
« Reply #6 on: September 17, 2024, 12:53:02 am »
Fonts have over 256 letters. Therefore, you're able to sacrifice at least 200 of them before you start to inconvenience people who want to use weird letters in their unit names.
« Last Edit: September 17, 2024, 12:55:56 am by Delian »

Offline Yankes

  • Commander
  • *****
  • Posts: 3293
    • View Profile
Re: [Solved] Unhardcode dollar symbol.
« Reply #7 on: September 17, 2024, 12:54:55 am »
Fonts have over 256 letters. Therefore, you're able to sacrifice at least 200 of them before you start to inconvenience people who want to use weird letters in their unit names.
Last time I check display text use UTF, this mean number of possible characters is HUGE.

Offline Nord

  • Commander
  • *****
  • Posts: 1736
  • The Gate is open.
    • View Profile
Re: [Solved] Unhardcode dollar symbol.
« Reply #8 on: September 17, 2024, 02:20:39 am »
Then you should give an example so that we can see if you want 5 letters, 15 letters or 50 letters.
I want "kg" for kilograms. Everywhere: in funding, buy/sell etc.
Quote
Also, this thread was opened with prefix Solved... did you mean to use prefix Suggestion?
I was after 20-hours workshift, so maybe. It must be in suggestions section, of course.

Offline Ethereal

  • Commander
  • *****
  • Posts: 672
    • View Profile
Re: [Suggestion] Unhardcode dollar symbol.
« Reply #9 on: September 17, 2024, 04:37:25 am »
Nord, as it turned out, in the 40K modification there are modified “Font” files that replace the “$” sign with another symbol. I don't know if these "Font" files can be used in other modifications, but I like them. You should try them too.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8974
    • View Profile
Re: [Suggestion] Unhardcode dollar symbol.
« Reply #10 on: September 21, 2024, 08:32:10 pm »
I want "kg" for kilograms. Everywhere: in funding, buy/sell etc.

I can do that, but it is a rather "unpleasant" code change.

How likely is this new special mod to happen?
(are you just brainstorming/prototyping, or are you already working on it?)

Offline Nord

  • Commander
  • *****
  • Posts: 1736
  • The Gate is open.
    • View Profile
Re: [Suggestion] Unhardcode dollar symbol.
« Reply #11 on: September 22, 2024, 02:01:14 am »
Global modification, 15% done. Will upload in "work in progress" by the end of month.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8974
    • View Profile
Re: [DONE][Suggestion] Unhardcode dollar symbol.
« Reply #12 on: September 22, 2024, 03:00:37 pm »
Done.

Sample ruleset:

Code: [Select]
constants:
  extendedCurrencySymbol: " kg"

Symbols with one letter (one byte) are used as prefix, symbols with multiple letters are used as suffix.

Offline Nord

  • Commander
  • *****
  • Posts: 1736
  • The Gate is open.
    • View Profile
Re: [DONE][Suggestion] Unhardcode dollar symbol.
« Reply #13 on: September 22, 2024, 03:21:00 pm »
Thank you very much.