UnofficialCrusaderPatch / UnofficialCrusaderPatch2

Unofficial balancing patch installer for Stronghold Crusader 1
MIT License
429 stars 60 forks source link

AI sometimes not placing iron mines #447

Open ByBurton opened 5 years ago

ByBurton commented 5 years ago

As you all probably know the AI places the iron mines in a weird grid like way, so that each mine is guarantied to be accessible. Now me and others have encountered cases in which there was more than enough iron - even with this grid like behaviour - for all the iron mines the AI would build, but the AI builds only a few of them. Udwin also encountered this bug with the Vanilla Wolf AI in one of his AI only matches. Link to a picture showcasing my Saruman AI, which theoretically builds up to 30 iron mines, but the AI bugging out and only building a few. Link to a picture of the same match on the same map, but with one of the Saruman's placing a lot more of the iron mines. All that is different is the placement of course. My settings in the aic file for iron mines: PopulationPerFarm = 5 PopulationPerWoodcutter = 4 PopulationPerQuarry = 10 PopulationPerIronmine = 2 PopulationPerPitchrig = 35 MaxQuarries = 3 MaxIronmines = 35 MaxWoodcutters = 10 MaxPitchrigs = 4 MaxFarms = 10 Download of the map. (AI top left builds all iron mines, others not)

Krarilotus commented 4 years ago

It seems after i conducted a couple tests for this, that placing iron mines gets buggy, when iron is directly at the edge of the map. My theory is, that the AI recognizes 'placeable' spots and trys to place their iron mines on them, when they are actually not placeable and so the iron mines will never get build.