Without Named values, if a modder changes the value in the tech file, s/he also needs to update the corresponding entry in the English stringtable, and the traductors have to update the other stringtables too; or if one changes the default RESEARCH_PER_POP, the values in the stringtable file will be wrong until updates, and when getting back to default values the stringtable would be incorrect again.
With Named values you just change the number in the FOCS file (the macro or the tech bonus) and everything will be correct.
Surprisingly, the Named values require unique names. The minimum is calling them with (most of) the tech (policy/building/...) name, plus something else to differentiate from the tech itself. For example adding "_EFFECT":
BLD_AUTO_HISTORY_ANALYSER -> BLD_AUTO_HISTORY_ANALYSER_EFFECT
What if the source has more than one bonus?
Easy, indicate also the affected meter:
LRN_SOME_TECH -> LRN_SOME_TECH_RESEARCH_EFFECT and LRN_SOME_TECH_TWERK_EFFECT
Differentiating by Target/Max and Current meters?
Of course:
LRN_SOME_TECH -> LRN_SOME_TECH_TARGET_RESEARCH_EFFECT and LRN_SOME_TECH_MAXTWERK_EFFECT
What about bonus per population, flat and scaling?
Ah, sure, indicate those too:
LRN_SOME_TECH -> LRN_SOME_TECH_TARGET_RESEARCH_PERPOP_EFFECT and LRN_SOME_TECH_MAXTWERK_FLAT_EFFECT
What if it is a malus instead of a bonus?
Right, change EFFECT for MALUS/BONUS:
LRN_SOME_TECH -> LRN_SOME_TECH_TARGET_RESEARCH_PERPOP_BONUS and LRN_SOME_TECH_MAXTWERK_FLAT_MALUS
Cool, let's see how it fits in the FOCS files. Without Named values:
Code: Select all
SetTargetResearch = Value + Target.Population * 5 * [[RESEARCH_PER_POP]])
Code: Select all
SetTargetResearch = Value + Target.Population * (NamedReal name = "LRN_SOME_TECH_TARGET_RESEARCH_PERPOP_BONUS" value = (5 * [[RESEARCH_PER_POP]])
...
More seriously now, we could stablish some naming conventions for this kind of things. Words like TARGET_RESEARCH could be abbreviated to TARRES (TARIND, TARINF, TARPOP, MAXDEF, MAXTRP, MAXSHL).
Even... the techs and buildings could be given a naming convention: e.g. BLD_XX_AUTO_HISTORY_ANALYSER, so that the XX part is brief, unique and informative of tech tree location and level/tier, and the rest (_AUTO_HISTORY_ANALYSER) can be stripped from things like accounting labels, named values, etc. to get something like BLD_CON1_TARRES_FLAT_PRESCL_BONUS.
Or, we let this kind of labels be named however the contributor introducing it feels like, longer or shorter, more informative or less, judging by the circumstances.
Or we choose minimalism in naming and ask for the shortest possible label that includes the source name.
Thoughts?