war1gus icon indicating copy to clipboard operation
war1gus copied to clipboard

Game Freezes due to AI Scripting issues

Open Zombie-Ryushu opened this issue 9 years ago • 12 comments

It seems Stratagus freezes when it tries to issue orders to computer controlled units it logically can't. Stratagus behaves this way often./

Zombie-Ryushu avatar Dec 15 '15 21:12 Zombie-Ryushu

This has been a peristent problem, where something with the AI Scripting causes Stratagus to engage in behavior that uses 100% of a core and hangs the game.

Zombie-Ryushu avatar Dec 15 '15 21:12 Zombie-Ryushu

Yes, I havent spent enough time with the ai. The issue is usually that the ai tries to build something (like a farm) and cannot find a building place (because not enough roads are available or something like that). Unfortunately these conditions are hard to check from the lua scripts.

timfel avatar Dec 15 '15 22:12 timfel

I need some larger maps (128x128) to stress the A/I and to observe the behavior of Cross Race forces. Do you have some?

Zombie-Ryushu avatar Dec 16 '15 06:12 Zombie-Ryushu

I don't, unfortunately

timfel avatar Dec 16 '15 08:12 timfel

Can you compose one? I've noticed some strange behaviours with forces containing Human Peasants in Orc Forces. I'd also like to see if we can't do an update to allow Campaign forces to be more agressive.

Zombie-Ryushu avatar Dec 16 '15 08:12 Zombie-Ryushu

Oh, yes, the AI cannot deal with such mixes - the AI scripts check what race the AI should have, and then only considers upgrades, buildings, and units from that race. If you give a peasant to an orc AI, I don't know what would happen.

timfel avatar Dec 16 '15 08:12 timfel

He made farms but nothing else, but thats not the only situation I have seen, I've also seen the AI "surrender" cease and desist agressive actions. Reverting to only gathering resources.

Zombie-Ryushu avatar Dec 16 '15 09:12 Zombie-Ryushu

Yes, that makes sense. Farms are not explicitly requested in the Ai script, but rather the AI just goes and checks if it has any units that can build buildings that increase supply - for that, it would use the peasant, but for nothing else. Also, the AI would not use any other opposite-race units for attacking, if you give 100 footmen to an orc AI, they will just stand there and do nothing unless attacked.

timfel avatar Dec 16 '15 09:12 timfel

ne of the bugs is that Farms do not correctly display Resource consumption. They always say 5 and 0. There have been a few instances where I have made Warcraft II Maps with dual race forces by making two forces the same color.

Zombie-Ryushu avatar Dec 16 '15 09:12 Zombie-Ryushu

Would it be possible to make Cross Race scripts that would not damage single race scripts?

Zombie-Ryushu avatar Dec 16 '15 15:12 Zombie-Ryushu

Possible, just quite some work ;)

timfel avatar Dec 16 '15 15:12 timfel

What about a Switch that would allow Campaign levels to act like Solo levels and have the computer act more aggressive and expand?

Zombie-Ryushu avatar Dec 16 '15 22:12 Zombie-Ryushu