Move tech/building values to a single macro file
Posted: Tue Aug 14, 2018 6:53 am
The effects of buildings and non-theoretical techs are scripted in their respective building or tech FOCS file, with some values (user-defined constants) included from extern files and some others only defined in the own file. E.g., the boost from Algorithmic Elegance is calculated as Target.Population * 0.5 * [[RESEARCH_PER_POP]], where 0.5 is defined only in that file and RESEARCH_PER_POP is included from /scripting/common/base_prod.macros.
I've been fiddling with research/production techs/buildings to mitigate the snowball effect. The changes in a (say) tech file will not be reflected on the pedia (documentation) unless you also edit the corresponding descriptions on all the stringtable files (one for each language), and to be sure to cover everything related to a given meter you have to review many files in different folders.
I'm suggesting here to move all those 0.5, 1, 2.5, etc. constant values used in the tech/building files to a macro file in the common folder to be referenced from stringtables (can this be done?) and FOCS files.
Advantages:
- Group all values relevant to a given meter (e.g. research) in a single file, which eases any rebalancing and is less prone to buggy omissions.
- Immediate updating of documentation when some values are changed for rebalance.
If developers see this as an improvement, and since this only implies FOCS changes, I could try to make a PR for this (after proper discussion/guidance).
I've been fiddling with research/production techs/buildings to mitigate the snowball effect. The changes in a (say) tech file will not be reflected on the pedia (documentation) unless you also edit the corresponding descriptions on all the stringtable files (one for each language), and to be sure to cover everything related to a given meter you have to review many files in different folders.
I'm suggesting here to move all those 0.5, 1, 2.5, etc. constant values used in the tech/building files to a macro file in the common folder to be referenced from stringtables (can this be done?) and FOCS files.
Advantages:
- Group all values relevant to a given meter (e.g. research) in a single file, which eases any rebalancing and is less prone to buggy omissions.
- Immediate updating of documentation when some values are changed for rebalance.
If developers see this as an improvement, and since this only implies FOCS changes, I could try to make a PR for this (after proper discussion/guidance).