Posted: Fri May 26, 2023 8:53 am Post subject:
MISTEST - a script to test mission map code, and check map objects for errors
Subject description: (also tests multiplayer map scripting and effects)
Mission Tester is designed primarily to help troubleshoot mission maps, but is useful for quickly resolving trigger or object placement errors on mutiplayer maps as well. It will warn of errors like objects outside of the map bounds, often caused by resizing maps, it will find errors like missing waypoints for actions, or even non-existent sounds being played.
Unlike most of the error checking scripts, this one is operated by dragging a map onto the batchfile. MISTEST will then analyze the map, both internally and in relation to the game inis, then spit out the results in mission.log for reading. The log will have severity notes for everything discovered, though some might be a higher severity than actually needed in every case, because sometimes that error is in fact more serious, but it can't determine when it isn't.
The script will be very useful to anyone converting/porting maps from one mod to another, exposing things that aren't available, or improperly selected because the declaration lists don't match. It will notify you of ambiguous errors like a trigger creating teams with units that don't belong to the same country, or point out that some map scripting or objects are never actually used.
The most common errors errors are typically to do with pre-placed buildings or units overlapping, or infantry in sub-cell locations where FA2 traditionally (erroneously) doesn't display them. Also common is when editing actions, sometimes the very last text field entered isn't recorded by FA2, resulting in a null value that's only apparent when re-visiting that action again. As such it can be a useful test to run on any map that has been completed.
As always the mistest.tcl will have to be edited to set the important flienames and path. Further options allow the recording of unused objects/code, and whether to limit it to the original RA2 without YR expansion limitations.
Ok, so not every action was thoroughly tested for validity before, specifically a number of actions regarding the assigning or changing of a house status, so those are now included, along with a couple more action waypoint tests. Additionally, the action to play VoxelAnims now makes sure they are valid too, to match the existing Animation test.
Big update this time, focused on the actions/events inside triggers.
Previous versions had broken many of the errors into their own custom messages, but had otherwise identical conditions, so they have been merged into common tests with generic errors to simplify things.
The high Trigger actions that aren't available in RA2 are now all tested, with one of these requiring changes to the rules.ini parser to record Superweapons, and should now be feature-complete for YR. Additionally the reserved player house IDs for multiplayer maps in YR is now handled correctly.
With the completed YR support, the strictra2 flag in the .tcl applies more thoroughly, although I realize this is a non-issue for most modders.
Some other small changes include adding coordinates to "X not defined" error messages to be consistent with other errors for the same objects.
A complicated fix for a small thing, YR events 60 and 61 don't follow the standard 3-field lists, but stupidly add a fourth, which was creating a kind of phantom error where the 4th field created errors in a non-existant event.
Secondly the multiplayer vs singleplayer map detection has been improved for YR, which mainly effects how houses are loaded, and whether the <Player @ A> houses/indexes are available.
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum