UnofficialCrusaderPatch / UnofficialCrusaderPatch2

Unofficial balancing patch installer for Stronghold Crusader 1
MIT License
430 stars 59 forks source link

AI building their AIV incorrectly (due to inaccessable terrain?) #499

Open Truetobi91 opened 4 years ago

Truetobi91 commented 4 years ago

Ok so we were playing a few games of SHC multiplayer with patch, my own aiv and everything when we ran over the following bug:

This Emir aiv has a small area for bakeries outside his main castle that is enclosed by moat and connected to the main castle by a small gate, but also has a second small gate as path to go outside.

The Bug: Now we played the game on the vanilla map ""Grüner Gürtel" aka "Green Belt" that has natural generated rocks as inaccessable terrain that prevents buildings from being placed. Now that didn't quite happen as the AI slighty moved the gate between the center and the bakery area by one block so that it still could build it, which caused the gate to be blocked by a different building (well) and become useless. [Due to the terrain there were bigger issues e.g. an inaccessable granary but I wanted to talk about that bug anyway].

AIV_bug1

AIV_bug2

AIV_bug3

AIV_bug4

This bug is reproducable.

J-T-de commented 4 years ago

Just for completeness, you also checked this behavior on another map, when there is no obstacle (i.e. you are 100% sure that you did not accidentally used an old version of your aiv)?

This behavior is known only for siege equipment, where the tent can be moved by one tile in all directions if there is a obstacle.

Krarilotus commented 4 years ago

This is very interesting behaviour. it might come to you as a bug. But this seems to me, as if the developers have foreseen to have an option for placing buildings adaptive to the current state of a game.

We could now abuse this 'glitch' to make real adaptive castles out of aiv files. What do you think about this: We could then describe how a castle should look like roughly in an aiv, andthe cahracter would adapt it acording to the terrain. That would change everything.

With that we should also look into the bug, that AI's dont check for the edge of the map as unbuildable terrain.

But yeah, i think this 'bug' is definitly an opportunity!

Monsterfisch commented 4 years ago

the ai also mistakes sloped terrain for buildable terrain which can cause issues with productionsbuildings/towers etc when chooseing their design, not just the mapborder which is also fairly annoying when making more hilly maps with more natural buildareas

Truetobi91 commented 4 years ago

@J-T-de I double checked that the AIV was updated by going into the game, reporducing the bug, then loading the AIV file into the AIV-Editor and checked it their. The AIV is fine and the bug did not occure on maps without obstacles.

@Monsterfisch Yes I also encountered that with a few custom maps where especially Iron Mines and Stone Quarries were placed on steep hills by the AI when Iron/Stone was placed their for cosmetic appeal and Players could not build on it themselves.

Krarilotus commented 4 years ago

The AI can overbuild stones with theri ressource buildings. You will see this, if you use thze active sepctator mode on maps. Where you can control the red AI player to a certain degree with building and recruiting stuff.