Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Trivial but useful: Commas for numbers.  (Read 1634 times)

Sabin Stargem

  • Bay Watcher
    • View Profile
Trivial but useful: Commas for numbers.
« on: April 21, 2020, 05:59:47 pm »

Just as it said on the tin.   Having the various stats in the game use commas would make them more readable.

Created Wealth:  918275772

VS

Created Wealth:  918,275,772
Logged

Kiloku

  • Bay Watcher
    • View Profile
Re: Trivial but useful: Commas for numbers.
« Reply #1 on: April 22, 2020, 08:15:00 am »

If implemented, this should be moddable for the benefit of translation packs. Different languages use different number place separators.
Logged

MaxTheFox

  • Bay Watcher
  • Лишь одна дорожка да на всей земле
    • View Profile
Re: Trivial but useful: Commas for numbers.
« Reply #2 on: April 22, 2020, 08:26:25 am »

If implemented, this should be moddable for the benefit of translation packs. Different languages use different number place separators.
How about in init.txt? [NUMBER_PLACE_SEPARATOR:<character code>] or something like that.

Anyways, +1.
Logged
Woe to those who make unjust laws, to those who issue oppressive decrees, to deprive the poor of their rights and withhold justice from the oppressed of my people, making widows their prey and robbing the fatherless. What will you do on the day of reckoning, when disaster comes from afar?

voliol

  • Bay Watcher
    • View Profile
    • Website
Re: Trivial but useful: Commas for numbers.
« Reply #3 on: April 22, 2020, 08:35:22 am »

If implemented, this should be moddable for the benefit of translation packs. Different languages use different number place separators.
How about in init.txt? [NUMBER_PLACE_SEPARATOR:<character code>] or something like that.

Anyways, +1.
+1

nystemy

  • Escaped Lunatic
    • View Profile
Re: Trivial but useful: Commas for numbers.
« Reply #4 on: August 01, 2020, 01:37:55 pm »

A thousand divider would indeed be a wonderful addition.
A comma works rather fine. I myself prefer using a blank space. (Mainly since I am from Sweden and it's the national standard here.)
So having it configurable in the init file would be wonderful.
Logged

Thunderforge

  • Bay Watcher
    • View Profile
Re: Trivial but useful: Commas for numbers.
« Reply #5 on: August 12, 2020, 05:09:11 pm »

Yes, I’ll raise a tankard to this idea, anything that helps me to easier understand the game’s information is a great idea. And if customisable even better!
Large numbers can become quite meaningless to me if I can’t easily tell the magnitude. (Is that the created wealth or has the broker just left a contact number...?)
Logged
Klinka Na Karaz : Grung A Na Grungron : Az A Na Ankor
A Pick for the Earth : A Hammer for the Anvil : An Axe for everything else

bloop_bleep

  • Bay Watcher
    • View Profile
Re: Trivial but useful: Commas for numbers.
« Reply #6 on: August 12, 2020, 05:22:59 pm »

If implemented, this should be moddable for the benefit of translation packs. Different languages use different number place separators.
How about in init.txt? [NUMBER_PLACE_SEPARATOR:<character code>] or something like that.

Anyways, +1.
+1

Actually in C and C++ languages, which DF is written in, you can query the system locale's number digit separators already, without needing an option in an init file.

Code: [Select]
setlocale(LC_NUMERIC, "");
lconv* lc = localeconv();
char* sep = lc->thousands_sep;
« Last Edit: August 12, 2020, 05:26:05 pm by bloop_bleep »
Logged
Quote from: KittyTac
The closest thing Bay12 has to a flamewar is an argument over philosophy that slowly transitioned to an argument about quantum mechanics.
Quote from: thefriendlyhacker
The trick is to only make predictions semi-seriously.  That way, I don't have a 98% failure rate. I have a 98% sarcasm rate.

voliol

  • Bay Watcher
    • View Profile
    • Website
Re: Trivial but useful: Commas for numbers.
« Reply #7 on: August 13, 2020, 03:41:01 am »

@bloop_bleep So you could do it already with DFhack (or similar utilities)? I don’t really get you, to be homest, but it seems overly complicated and inaccessible for the common user. Well, init files are as well, but I think we can safely assume they are getting integrated with the UI rework already.

Shonai_Dweller

  • Bay Watcher
    • View Profile
Re: Trivial but useful: Commas for numbers.
« Reply #8 on: August 13, 2020, 04:05:36 am »

Yeah. Normal people need a normal menu option. Commas on or off (or other forms of number writing for international users). They won't want to program it themselves...
Logged

Bumber

  • Bay Watcher
  • REMOVE KOBOLD
    • View Profile
Re: Trivial but useful: Commas for numbers.
« Reply #9 on: August 13, 2020, 05:44:55 pm »

@voliol, @Shonai_Dweller
I think the point was that DF could do it automatically based on your computer's settings.
Logged
Reading his name would trigger it. Thinking of him would trigger it. No other circumstances would trigger it- it was strictly related to the concept of Bill Clinton entering the conscious mind.

THE xTROLL FUR SOCKx RUSE WAS A........... DISTACTION        the carp HAVE the wagon

A wizard has turned you into a wagon. This was inevitable (Y/y)?

Shonai_Dweller

  • Bay Watcher
    • View Profile
Re: Trivial but useful: Commas for numbers.
« Reply #10 on: August 13, 2020, 06:47:19 pm »

@voliol, @Shonai_Dweller
I think the point was that DF could do it automatically based on your computer's settings.
Well that's good. Are there any other reasons people would prefer it to be optional?
Logged

voliol

  • Bay Watcher
    • View Profile
    • Website
Re: Trivial but useful: Commas for numbers.
« Reply #11 on: August 14, 2020, 03:51:58 am »

@voliol, @Shonai_Dweller
I think the point was that DF could do it automatically based on your computer's settings.
Well that's good. Are there any other reasons people would prefer it to be optional?
Because you live in a country/have your computer set to a language with different separators than the ones you prefer? In-game settings are generally less finnicky than computer settings, I see no reason why DF shouldn’t fall into that pattern by using computer settings as its in-game settings.
Having the option initially set to whatever your computer uses is sound though.

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: Trivial but useful: Commas for numbers.
« Reply #12 on: August 14, 2020, 10:49:47 am »

Because you live in a country/have your computer set to a language with different separators than the ones you prefer?
If you're using Windows or macOS, you can set the digit grouping symbol to whatever you want, regardless of your locale - picking "French (France)" might change it to be a space, but there's nothing stopping you from changing it back to a comma afterwards. On Linux, however, this would probably be a lot more complicated (i.e. creating a new locale).

The only reason to make it configurable in-game would be if you wanted it to be one way in the OS and a different way in-game, or if you somehow didn't have permission to change it in the OS (and if that's the case, should you really be playing DF on such a machine?).
« Last Edit: August 14, 2020, 10:52:58 am by Quietust »
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.