Setting Suffix/unit of measurement

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
Seth0x113
Manual Inserter
Manual Inserter
Posts: 2
Joined: Wed May 04, 2016 7:53 am
Contact:

Setting Suffix/unit of measurement

Post by Seth0x113 »

Hey there,

a mod setting currently doesn't have any option to indicate what its unit of measurement is. This leads to the somewhat awkward user experience of needing to express its unit of measurement either in the name itself or in its description or making a number based setting a string. The latter has a whole lot of problems attached to it. It would be nice to have an option to indicate the unit of measurement of a setting in some way and have it displayed as a suffix for a setting.

As an example take a setting that lets you define a timer in seconds. With the listed options it would probably look one of these ways:
settings.png
settings.png (16.42 KiB) Viewed 343 times

It would be very nice if it could look similar to this instead:
settings-suffix.png
settings-suffix.png (8.91 KiB) Viewed 343 times

An alternative might be to still use the regular box and make it work like the fields in interface settings. You click the field, edit the value and the suffix is automatically added/removed. This might mean there already is code for that.

I realize that this probably isn't that easy as there is a number of things that might make it difficult to implement. Like what happens if someone sets a super long unit name and making it work well with the different platforms. Being able to indicate that a field is kW or MW, minutes or seconds, a percentage and so on would be nice though.

Going with the idea of having it as regular text field that automatically removes the suffix a further idea would be the option to indicate boundaries for units of measurement and a "display conversion". Values between 0-999 should be displayed with the suffix watts, 1000-999999 value/1000 kW or 0-59 as seconds, 60-unlimited as value/60 minutes. I guess this would be kind of its own thing though and focusing on a single thing at a time just having the option at all would be nice.

Post Reply

Return to “Modding interface requests”