HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

melee AI only crashes in v1.23 multiplayer

07-25-2009, 02:39 AM#1
daPanda
I've written my own melee AI using vjass. It works fine in single/multi player in v1.21. I just upgraded to v1.23. The melee AI works fine in single player mode, but crashes in multiplayer mode as the map is about 90% loaded.

Does anyone know what might have changed in the underlying WC3 code between 1.21 and 1.23 that would cause such a crash only in multiplayer mode?

I checked the noted updates in the patch.txt from v1.21 but nothing that hints to what might be the cause.
07-25-2009, 02:51 AM#2
Pyrogasm
Are you sure its the AI causing a crash? Try saving the map without the AI and playing it in multiplayer.
07-25-2009, 03:31 AM#3
daPanda
Yeah, I'm sure. as soon as I delete my AI files from the Scripts folder, it runs fine with Blizzard's AI files there.

actually, after doing more testing, it seems it only happens when I have random hero selected. Very odd. That would lead me to believe Blizzard may have changed the time at which it chooses a random hero (or that process in general). my AI fixes the Blizzard Random Hero bug where the game has already selected a random hero for random hero mode, then the Blizzard AI would select a different hero and thus be referencing (and leveling up) a different hero than selected by the game (and the AI cannot do anything with the hero because it is using a incorrect reference).
07-25-2009, 03:43 AM#4
moyack
That's common when you check replays of AI testing games (test an AI made with AI editor, save the replay and playt the replay).

There's a chance that in the replay, the AI selects other hero instead the right one, and it will crash when a unit dies when it shouldn't via an ability, for example.
07-25-2009, 04:07 AM#5
daPanda
Quote:
Originally Posted by moyack
That's common when you check replays of AI testing games (test an AI made with AI editor, save the replay and playt the replay).

There's a chance that in the replay, the AI selects other hero instead the right one, and it will crash when a unit dies when it shouldn't via an ability, for example.
Yes, but that is my point that my AI fixes this issue. It works perfectly in all prior versions to ensure that the correct hero is always chosen. There was never a crash before and we've been playing with my melee AI for over 6 months.

However, after more testing I realize the AI doesn't even work properly even in single player. If all the races are the same for each player it works, but if the races are different it crashes. :/

I don't know what they changed internally, but it really messed up my AI.

EDIT: It seems to be that you can no longer call things like GetPlayerColor(), GetPlayerName(), GetLocalPlayer(), etc during AI initialization. Not sure why Blizzard would change this behavior but it means I have to rewrite my AI and leave out some code. :/