Question about tech upkeep

Various topics about the game, the website, or anything else Freeciv related that doesn't fit elsewhere.
User avatar
Corbeau
Elite
Posts: 1039
Joined: Mon Jan 13, 2014 11:13 pm

Question about tech upkeep

Postby Corbeau » Thu Dec 20, 2018 11:01 am

Tech upkeep is calculated with:

<Cost of technology> / tech_upkeep_divider - tech_upkeep_free

We are playing with techleak activated. So, in this case, what exactly is <Cost of technology>? Is it:

1. The current cost of all tehnologies that I have discovered (that is basically decreasing as more nations discover them)
2. The amount of bulbs that *I* spent in discovering those techs (meaning that, if someone is behind and discovers techs late, he will be paying less upkeep while being equally advanced as someone who discovered them first)
or
3. The base cost of techs, remaining unchanged for the whole game?

I assume (and hope) it is #3 because it would be most logical. But if anyone has more information, can you please clarify?

Akechi
Posts: 33
Joined: Thu Dec 07, 2017 12:17 pm

Re: Question about tech upkeep

Postby Akechi » Sat Dec 22, 2018 4:55 am

Base cost of technology:
https://github.com/freeciv/freeciv/blob/S2_6/common/tech.c#L240
Line 232, 240 and 249 (depends on tech_cost_style in game.ruleset)
If tech_cost_style is "Classic+" or "Experimental+" then base cost of technology relies on each technology's cost in techs.ruleset.

Tech upkeep:
https://github.com/freeciv/freeciv/blob/S2_6/common/research.c#L904
Line 895 and 904 (depends on tech_cost_style in game.ruleset)

I think <Cost of technology> is your #3.
However, variable "total_research_factor" and "members" affect tech upkeep, so tech upkeep is modified from game.ruleset comment's formula. (maybe relates to team pooled research)
e.g. if you have technology Ceremonial Burial at 10 bulbs, rulesets' tech_upkeep_style = "Basic", tech_upkeep_divider = 1, Tech_Cost_Factor effect is 1, no Tech_Upkeep_Free effect, server option's sciencebox = 100 then your tech upkeep is 20 bulbs. (because "total_research_factor" is 2 and "members" is 1 I think)

User avatar
Corbeau
Elite
Posts: 1039
Joined: Mon Jan 13, 2014 11:13 pm

Re: Question about tech upkeep

Postby Corbeau » Sun Dec 23, 2018 7:35 am

Thanks. So, basically, working as intended.