Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plains give +1500 growth and can be considered "op" #62

Closed
tyggerr opened this issue Oct 31, 2016 · 1 comment
Closed

Plains give +1500 growth and can be considered "op" #62

tyggerr opened this issue Oct 31, 2016 · 1 comment

Comments

@tyggerr
Copy link

tyggerr commented Oct 31, 2016

In the structure.yml farms have a 15 bonus growth on plain, but plains give 1500 bonus growth instead.
That's because in FarmChunk you have (Line 241 and 251 respectively) :

effectiveGrowthRate = (double)this.town.getGrowth().total / (double)100;
effectiveGrowthRate += ab.getValue(); ///// + 15

So you take your town growth, let's say 1000, you divide it by 100 and end up with 10. However, if you are in a plain you add 15. So 15 is like 1500 town's growth, which means having a plain in a 1 growth town is like getting +1500 growth directly.

@ataranlen
Copy link
Owner

ataranlen commented Dec 26, 2016

Just to clarify the growth rate is a little wonky in its calculation.
A farm has 252 possible grown spaces.
The farm.grows_per_tick is 6.

If a town has a growth rate of 1000 base(Really high), it will grow 60 spaces per growth tick.
With a plains, that becomes 150 per growth tick.

int crops_per_growth_tick = (int)CivSettings.getIntegerStructure("farm.grows_per_tick");
int numberOfCropsToGrow = (int)(effectiveGrowthRate * crops_per_growth_tick); //Since this is a double, 1.0 means 100% so int cast is # of crops
int chanceForLast = (int) (this.town.getGrowth().total % 100);

ataranlen added a commit that referenced this issue Dec 26, 2016
Changes the flat 15 bonus to a 1.5 modifier.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants