I just found out the parameter MaxFarms does not consider Hops Farms so AI that build those farms can exceed this limit. The Ai runs through the Farm slots as usual but they will not add 1 to that counter when building a Hops farm. Examples below.
Marshall
Farm1: DairyFarm
Farm2: HopFarm
Farm3: DairyFarm
Farm4: DairyFarm
Marshall builds one farm per every 5 population and has (one X for every 5 population)
Farm1: DairyFarm XX
Farm2: HopFarm XX
Farm3: DairyFarm X
Farm4: DairyFarm X
4 dairy farms at 30 population as well as 2 hops farms. This continues and at a population of 50 he has
Farm1: DairyFarm XXX
Farm2: HopFarm XXX
Farm3: DairyFarm XX
Farm4: DairyFarm XX
7 dairy farms and 3 hops farms, already exceeding his limit of 9 by 1. This continues until he has a population of 60 where he ran through his slots 3 times resulting in 9 dairy farms and 3 hops farms.
@Sh0wdown for the wiki
I always wondered why the AI would spam those. Especially the Abbot.
Nice find. Wiki is updated.
That's a good thing actually.
how is that a good thing? i mean this means that the ai builds hops farms until it runs out of housing slots as long as there is enough farmland ofc which can lead to the ai not having peasants to recruit an army. if possible this should be limited similar to the ox teather or ox teather and hops farms need to be configurable.
It is limited by "farms per population", but by nothing else.
@Monsterfisch @ByBurton
In case the way I described it wasn't clear I'll do another example how it works. And yes: FarmsPerPopulation is the deciding factor how many farms an AI usually builds, but if you give an AIV 200 Pop with enough work places to have all houses build up, the AI will still not exceed the number of farms and they will also not spam all available farming space with hops.
Example 1:
Comparing the following farming slot schedules:
HopFarm
HopFarm
HopFarm
HopFarm
AppleFarm
vs.
AppleFarm
HopFarm
HopFarm
HopFarm
HopFarm
We set MaxFarms to 2 for both cases but in the first case the AI will build 8 hops farms and 2 apple farms while they will only build 4 hops farms and 2 apple farms in the second case. Why is that so? Because the AI in the second case stops at the second apple farm because they reached their maximum farm count and will not proceed to check any more farming slots.
Example 2:
Comparing these two farming slot schedules:
AppleFarm
DairyFarm
HopFarm
vs.
AppleFarm
DairyFarm
HopFarm
AppleFarm
DairyFarm
We set MaxFarms to 10. In the first case the AI will build 5 apple farms, 5 dairy farms and 4 hops farms. If we switched places from dairy and hop the AI would have build an additional hops farm because the had to check the hops farm's farming slot an additional time before reaching their limit of 10 with the 5th dairy farm.
The second case will result in 5 apple farms and 5 dairy farms but with only 2 hops farms because the AI only checked the HopFarm farming slot 2 times before reaching their max farm count of 10 with the 5th dairy farm.
You can also run the following test:
You will now find the following things happening:
that is still a problem though because when other non hops farms get destroyed the ai rebuilds based on the list and builds new hops farms even though it already has passed the limit of the tax farms and therefore over time filling up all the farm space and exceeding the castles population limit. I guess this can be somewhat limited by balancing ais that use hops by using the pet population value to limit the overall amount of farms instead of relying on the hard maximum of farms value. Essentially rendering the maxfarms value kinda useless for those ais =/
Unless i am still misunderstanding that is
I think we're on the same page on that one.
I think I might have misunderstood ByBurton's comment until now lol.
Unlike Ox Tethers that were spammed indefinitely before, a hops farm spam can be at least somewhat regulated by the PopulationPerFarm parameter.
Yes, that is what I had meant.
This bug, is without a doubt, an SHC-E bug. I was not able to recreate it in SHC HD.
So this bug is still prevalent because destroying other farms causes the Max Farms number to fall to which the AI cntinues with the Farm from where it last left off.
Example)
We set the parameter to:
Apple Farm
Hop Farm
With Max farms set to 3.
And population per farm set to 5.(starting population is 10 without a house)
So a game starts the AI will build
2 apple and 2 Hop Farms because Max farms is 3, it will run through the order twice but be stopped because MaxPopulation per farm is set to 5 and we only have 10 Population.
If we add a Hovel the AI will build 3 Apple and 2 Hop, because once it gets to 3 Max farms, they will stop building them.
However, most AI's(if not all) their raiding units will always attack and destroy apple farms before hop farms. So if one apple farm gets destroyed. The Max Farm count goes down to 2, and because the last entry was a Apple Farm to reach Max Farms the AI will build a Hops Farm(if it has the wood) first because it is the next thing in the que regardless of Max Farm Count and Population per Farm. Therefore if they fully rebuild they will now have 3 Hops farms and 3 apple farms and all the conditions are still met, population by farm and Max Farms.
Continuing the example, lets say the enemy destroys 2 apple farms next. Then when this Ai rebuilds, it will go through the que like this:
Hops(provided they have the wood)
Apple
Hops(provided they have the wood)
Apple
Therefore once they have recovered from the attack they will have:
5 Hops Farm
and
3 Apple
Even though our MaxFarms is 5 and we have 15 Population. And this process can repeat infinatly, thus causing the Hop Farm spam.
A big part of this problem is AI's don't target hops farms in terms of raid priority, they usually go Granary, Quarry, Woodcutters, Food Farms(apples dairy wheat) in terms of there attack priority.
One way I found to Mitigate this a little bit is have a build que like this
Apple
Hops
Apple
Apple
Apple
Apple
Apple
So that more times then not when a Apple Farm gets destroyed they rebuild a Apple Farm 6 out of 7 times. But that is a band-aid fix and not a proper one.
Most helpful comment
that is still a problem though because when other non hops farms get destroyed the ai rebuilds based on the list and builds new hops farms even though it already has passed the limit of the tax farms and therefore over time filling up all the farm space and exceeding the castles population limit. I guess this can be somewhat limited by balancing ais that use hops by using the pet population value to limit the overall amount of farms instead of relying on the hard maximum of farms value. Essentially rendering the maxfarms value kinda useless for those ais =/
Unless i am still misunderstanding that is