OpenXcom Forum

OpenXcom Forks => OpenXcom Extended (OXCE) => OXCE Suggestions DONE => Topic started by: Nord on September 16, 2024, 12:42:34 am

Title: [DONE][Suggestion] Unhardcode dollar symbol.
Post by: Nord on September 16, 2024, 12:42:34 am
We can change string for "funding" etc, but can not change "$". Maybe this can be unhardcoded?
Title: Re: [Solved] Unhardcode dollar symbol.
Post by: Ethereal 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
Title: Re: [Solved] Unhardcode dollar symbol.
Post by: Solarius Scorch on September 16, 2024, 10:12:58 am
You can edit FontBig.png and FontSmall.png to replace $ with something else.
Title: Re: [Solved] Unhardcode dollar symbol.
Post by: Ethereal 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. :)
Title: Re: [Solved] Unhardcode dollar symbol.
Post by: Nord 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?
Title: Re: [Solved] Unhardcode dollar symbol.
Post by: Meridian 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?
Title: Re: [Solved] Unhardcode dollar symbol.
Post by: Delian 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.
Title: Re: [Solved] Unhardcode dollar symbol.
Post by: Yankes 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.
Title: Re: [Solved] Unhardcode dollar symbol.
Post by: Nord 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.
Title: Re: [Suggestion] Unhardcode dollar symbol.
Post by: Ethereal 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.
Title: Re: [Suggestion] Unhardcode dollar symbol.
Post by: Meridian 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?)
Title: Re: [Suggestion] Unhardcode dollar symbol.
Post by: Nord on September 22, 2024, 02:01:14 am
Global modification, 15% done. Will upload in "work in progress" by the end of month.
Title: Re: [DONE][Suggestion] Unhardcode dollar symbol.
Post by: Meridian 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.
Title: Re: [DONE][Suggestion] Unhardcode dollar symbol.
Post by: Nord on September 22, 2024, 03:21:00 pm
Thank you very much.