Archer30, looks like BU:O doesn't work properly in !?FU(OnSetupBattlefield);
Other than walls, common obstacles like rocks are also not detected.
The same is SoD function 0x004695F0 (SN:E4625904).
I would suggest using !?FU(OnBattlefieldVisible) or later triggers.
I also suggest making one change to the !?FU(wss_IfHexIsFree);
string
change to
This is due to the fact that ordinary (non-magical) obstacles can have one "magic" cell, which is available and does not affect the course of the battle, but is treated by BU:O as a magical obstacle (obstacle flag 1).