Species trait: Meter bonus/malus

Creation, discussion, and balancing of game content such as techs, buildings, ship parts.

Moderators: Oberlus, Committer

Message
Author
User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: Species trait: Meter bonus/malus

#16 Post by Dilvish »

pheonixstorm wrote:Ok, so I watched one world between turns....The population jumped by 13 points!
Really? Just what was it? I see you describing the situation for one turn, but not for the next. If it really did jump from 26.7 up to 39.7 when the target was only 28, then you must have made a mistake in your scripting.
I ran the calculations you showed me and got .61 w/o my changes. With my changes (if I followed your second calculation correctly) the change should have been .83

Let me know if this is correct
26.7 x (28 + 1 - 26.7)/100 which would be 61.41/100
26.7 + 0.2 + (26.7 + .0.2) x (28 + 1 - (26.7 + 0.2))/100 which would give me 26.7 + 0.2 + 56.49/100 not 83.39/100
How do you say in one sentence that the change should have been .83 when in the next sentence you show a calculation that comes out to a change of ~ 0.76 ?
But.. none of it really makes sense since the actual change isn't .83 or 27.4 unless I'm missing something or not doing it right...
I'm afraid I have to go with "missing something or not doing it right"-- as I noted, you left out some critical info and what you've said seems inconsistent.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

pheonixstorm
Space Squid
Posts: 74
Joined: Fri Sep 06, 2013 10:46 am

Re: Species trait: Meter bonus/malus

#17 Post by pheonixstorm »

I changed up the code to the following and so far (turn 5 in a new test game) everything is working correctly.

Code: Select all

EffectsGroup
            scope = And [
                PopulationCenter
                Source
                Population high = RootCandidate.TargetPopulation - 1.2
            ]
            activation = Planet
            effects = SetPopulation value = Value + .2
Turn 3
This Turn - 1.10
Predicted next - 1.2
Change - .11
Target - 10.0
Actual Change - NA

Turn 4
This Turn - 1.42
Predicted next - 1.56
Change - .14
Target - 10.0
Actual Change - +0.32

Turn 5
This Turn - 1.77
Predicted next - 1.94
Change - .16
Target - 10.0
Actual Change - +0.35

Will track until it hits its target. Lets hope it holds steady once it hits a larger population count. So far looks promising though :D

Post Reply