#Variables in unit descriptions

1 messages · Page 1 of 1 (latest)

finite wasp
#

Improve string generation with access to unit values.

Reasoning
Shouldn't we avoid hardcoded values, that in reality, could be replaced to variables?

units.descriptions.armgmm
current
Safe Geothermal Powerplant, produces 750 Energy
new
Safe Geothermal Powerplant, produces %{energymake} Energy
otherwise, as soon as you make balance changes, or tweaks come into effect, descriptions become pointless

if you allow to use any of units defined values inside descriptions, then they become fully moddable and dynamic, to solve something like

units.descriptions.armmmkr
current
Converts 600 energy into 10.3 metal per sec
new
Converts %{customparams.energyconv_capacity} energy into %{round(customparams.energyconv_capacity * customparams.energyconv_efficiency, 1)} metal per sec
well, maybe math should not be inside descriptions, but then, we have to think on more prettier solution

chilly isle
#

You cannot add or change which variables are in translations, so for now it remains hardcoded. There is a UI redesign in the works that will remove the need to have this information in the unit description.

finite wasp
#

Please, link to said UI redesign docs/roadmap/anything

chilly isle
#

Currently it is internal-only, but you can view some of the past work on it here: #926040195667738625

finite wasp
#

Then tell me, at least, how pointless is a translation effort right now? :)

chilly isle
#

It allows playing in a different language without having to wait for the redesign to be complete, and the other part of the description translation will remain

finite wasp
#

So, is it known how many, or at least a ratio from the whole amount, strings will be affected, added, deleted, or changed?