Quick update to anyone following along,
I managed to get it working by intercepting the map travel event manually and substituting my own destination using the WorldMapStartTravelling() function - for example, WorldMapStartTravelling("random_area", "start_waypoint"). To make the player resume travel properly, you can use the WorldMapCompleteRandomEncounter() function. If you save the player's previous destination, it will automatically continue on without any fuss.
I set up plot flags to check whether or not the player should go to a random encounter (defined flags work fine, and are good because you can try multiple conditions with them, including whether the encounter is complete or not). I also used a plot flag to check if the player is on a random encounter - set to false and the player travels between areas normally, set to true and it instead triggers WorldMapCompleteRandomEncounter() to leave the random encounter location. You can reset it any time after the player is back in a "regular" location, maybe with an area script or something else.
I'm not 100% sure but it seems like using M2DAs for terrain types etc. are bugged. You can pretty easily set up your own random encounter system simply by using plot flags, but doing it using BioWare's own system seems out of the question because I couldn't get it to reliably take my M2DA info, and also couldn't figure out how to actually trigger a random encounter from the M2DAs. However, if you simply want a few preset plot encounters on the map, my approach works totally fine.
Modifié par sea-, 19 juin 2012 - 08:48 .