Need to apply negative science - anyone know how?

Pazyryk

Deity
Joined
Jun 13, 2008
Messages
3,584
I need to deduct a certain amount of science from a player. GetScience() gets me a player's science this turn, but unfortunately I can't change this directly with a SetScience() function (because there isn't one).

Does anyone have any tips for deducting research points from a player? It could be as a set number of research points or a percent of total. I don't care how kludgy it is: via building, policy, whatever. My understanding is that negative yields (from buildings or tiles) don't work. (Even if the later statement is true for initial table values, do folks know for sure that city:SetBuildingYieldChange can't subsequently apply a negative modifier?)

One idea I had is to use Policy_YieldModifiers, with policies that apply -10, -20, etc. (percent?) to science yield. However, this table isn't used in base so I don't know if it works. Or if it does, it probably doesn't deduct from global yield as I am trying to do here.
 
I need to deduct a certain amount of science from a player. GetScience() gets me a player's science this turn, but unfortunately I can't change this directly with a SetScience() function (because there isn't one).

Actually, there is. It's under the TeamTech structure, called ChangeResearchProgress. So find out what Team the player is on, extract the appropriate TeamTechs function, and go from there. The catch is that ChangeResearchProgress is BY TECH, so first you need to find which tech the player is currently researching.
 
Thanks! I looked under player and team but forgot about teamTechs.

I also found out that Policy_YieldModifiers works with negative values for research. It will display large negative values (as Misc Player Modifier %) and can bring city research down to zero.
 
Back
Top Bottom