AI scripts on maps larger than 224 crash the game

Hey, here’s a problem with AI on Reforged, which occurs on a big custom maps with custom AI scripts:

  • AI script calls SuicideOnPlayer() native function
  • It prepares an attack wave
  • Debug shows the attack wave is sent and SuicideOnPlayer() is called - but no units from its base move
  • After a few seconds the game crashes

What I determined so far:

  • It occurs on Reforged only. On the same map on patch 1.31 it doesn’t occur.
  • It happens when calling SuicideOnPlayer(), SuicideOnPoint() works
  • It is related to map size and pathfinding. It happened on two maps, both are at least 256 in width or height. Cutting the map from 256x192 to 224x192 fixes the issue.

Here I attached test maps on which I reproduced the issue:
hiveworkshop[dot]com/threads/suicideonplayer-crashes-the-game-on-reforged-only-on-some-maps.359199/#post-3661728

2 Likes

Hi, this is really interesting and useful. Can you check which actual native from common.ai causes the crash. CommonSuicideOnPlayer contains SuicidePlayer and SuicidePlayerUnits and AttackMoveXY and LoadZepWave in AttackMoveXYA.

My map is larger than 256 and I have often crashes with AI. I would suspect AttackMoveKill since I use that in my custom AI script.