Resource icon

Detailed Tech Civic Progress 1.0.3

wltk

Chieftain
Joined
Feb 10, 2025
Messages
53
Show detailed tech and civic progress/cost in cards and tooltips.
Not 100% sure if I calculated all cases correctly though. Feel free to report issues.
Download: https://forums.civfanatics.com/resources/detailed-tech-civic-progress.31924/


20250215171416_1.jpg
 
Ah I see you took the approach of calculating the main/mastery amounts yourself when tackling the problem of the tech/civic's reported node cost.

It's worth noting that the main/mastery modifier is actually 100/133 (there's a global parameter that governs this, though I'm not sure where it's actually defined) which is very close to 75% but not quite there, so the displayed cost values will probably be off very slightly.
 
Ah I see you took the approach of calculating the main/mastery amounts yourself when tackling the problem of the tech/civic's reported node cost.

It's worth noting that the main/mastery modifier is actually 100/133 (there's a global parameter that governs this, though I'm not sure where it's actually defined) which is very close to 75% but not quite there, so the displayed cost values will probably be off very slightly.
Good to know! Where did you find that modifier? I'm debating whether to change or continue using 0.75 as the ratio. It would be nice if I can find some official references.
 
Known bug. Seems like the value is off when there's science attribute that increase mastery research efficiency. i.e. if you have efficiencies, the cost of un-researched mastery and the cost of research-complete non-mastery will be wrong.
 
Last edited:
Good to know! Where did you find that modifier? I'm debating whether to change or continue using 0.75 as the ratio. It would be nice if I can find some official references.
The parameter in question is called PROGRESSION_TREE_NODE_DEPTH_COST_SCALAR in the GlobalParameters table in the database, and its value is 33, which makes sense given how the math works out.

For a practical example to verify this, when I was working on this feature for my mod I noticed that one of the techs I was looking at had a cost of 1170 but its mastery cost was 879. If the mastery was exactly 1/3rd cheaper as it seemed the cost of the mastery would be 877 (1170 / (4/3) = 1170 * 3/4 = 877.5). The math works out exactly using 33 instead (1170 / (133/100) = 1170 * (100/133) = 879.6).

For best compatibility it's probably worth simply fetching that particular parameter from the database directly in the code and working from there.
 
The parameter in question is called PROGRESSION_TREE_NODE_DEPTH_COST_SCALAR in the GlobalParameters table in the database, and its value is 33, which makes sense given how the math works out.

For a practical example to verify this, when I was working on this feature for my mod I noticed that one of the techs I was looking at had a cost of 1170 but its mastery cost was 879. If the mastery was exactly 1/3rd cheaper as it seemed the cost of the mastery would be 877 (1170 / (4/3) = 1170 * 3/4 = 877.5). The math works out exactly using 33 instead (1170 / (133/100) = 1170 * (100/133) = 879.6).

For best compatibility it's probably worth simply fetching that particular parameter from the database directly in the code and working from there.
Thank you! I’ll take a look at it as well as the efficiency problem I mentioned above.
 
Thank you! I’ll take a look at it as well as the efficiency problem I mentioned above.
Briefly thinking about it, with an efficiency of 25% for masteries, the cost of mastery for the first column tech in second age is 411, which is exactly 650 * (100/(100+33+25)). Now the challenge is reading these modifiers in. Gonna take a look tomorrow. Thanks for your help!
 
new version is good!

i see there are some small rounding errors on finished techs. for example, first tier Exploration techs cost 500, but the rounding errors in dividing and multiplying by 1.33 end up at 499 instead. i thought maybe you could fudge this by rounding to the nearest multiple of 5, but unfortunately there are techs that don't cost a multiple of 5, like Agriculture (1) and Mathematics (738). i then tried a few other methods that failed for at least one case, haha. luckily it's not that important if some of the costs are off by one for finished techs
 
Back
Top Bottom