Thanks. It gave me an idea and I was able to solve it.
To clarify, we are using 30 factions for custom battles with modified faction selection screen to allow that (could be 31 but rebels have far too many units). Removing all custom battlefields did NOT work and the battle still crashed at the start of loading. However when I copied over the pre-determined battlefields (grassy plain) files from vanilla to the mod I started to see ONLY this battlefield instead of all vanilla ones. Yet it still crashed on loading of battle. So I poked around the battle script and to my surprise there is a MAP REFERENCE coordinates!
Obviously the coordinates were not valid and simply changing them to valid ones fixed the problem. So it is NOT only the custom battlefields but also the default battlefield scripts that need changing of map coordinates to make them work with custom maps in mods. No idea why it is so but thanks for pointing me to the right direction!
To anyone reading this having similar custom battle CTD. Make sure the coordinates in scripts of default battlefields (Arsuf, Grassy Plains etc.) are valid for your custom map. Making custom locations valid is NOT enough!
Sample:
Code:
; Custom battle script generated by Romans Battle Editor
battle GRASSY_PLAIN
playable
end
nonplayable
end
start_date 500 summer
end_date 500 summer
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; >>>> start of factions section <<<<
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; >>>> start of battle section <<<<
battle 118, 289 ;default was 101, 151 which are invalid coordinates on my map and gave me crash upon this battlefield load in custom battles
battle_time 12.00 345.00
weather clear
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; >>>> start of objectives scripting section <<<<
objectives