From: Washington, DC
I've been playing around to create an editor for TOAW XML (*.gam) files and have come up with the attached file. So far, it basically allows players to revise most Force, Formation, Unit, and Equipment data in the OOBs and various scenario and force settings.
I decided it would be easier to keep updating this post with the latest version of the app. and the manual, so see below for both. Note that it is too much of a hassle to format the manual text on this forum, if you want to see a properly-formatted version of the manual, a pdf version is included with the install files):
TOAW XML Editor
June 28, 2019
Revise Force, Formation, and Unit Settings: Change any of the enabled settings. IF YOU CHANGE ANY SETTINGS, BE SURE TO PRESS THE “SAVE CHANGES” BUTTON OR THE CHANGES WILL BE LOST WHEN YOU LEAVE THAT SCREEN!!!
Equipment: The quantity of a unit’s currently assigned equipment is indicated by x (ie, ten units is x10). A unit’s max quantity is indicated in square brackets. Therefore, “Howitzer x5 ” indicates that a unit currently has 5 of a maximum of 10 guns.
Color-Coding: Formations and units are color-coded as follows:
Formations: Formations which are locked are indicated in red.
Units: Divided units are indicated in grey. Divided units’ subunits are indicated in blue. Units which are reinforcements are indicated in green.
Dividing Units: To divide a unit, right-click and select the “Divide Unit” menu option, which will open a screen allowing use to choose whether to create two or three subunits. Once a unit has been divided, it’s name will be indicated in grey, while the divided subunits will be placed directly under the parent and indicated in blue (note that subunits of parent units divided with the in-game editor rather than TOAWxml may not be right below the parent). Units which are already divided, subunits, and sections cannot be divided.
Re-Uniting Units: To re-unite a unit, right-click on the parent unit and select the “Re-Unite Unit” menu option. The subunits will be deleted and the unit will be assigned the location and the deployment of its first subunit.
WARNING!! DO NOT add or delete equipment line items from divided units or their subunits...while you can edit the qty or max number of particular types of equipment, do not add whole new types of equipment, or delete existing equipment (while you can't currently add equipment, it is possible to drag and drop equipment line items from unit to another, but DO NOT DO THIS with divided units or subunits). I also would not reorder equipment within divided units or subunits, although I'm not sure if this would cause any problems.
For the unit division/reunification process to work, the parent and all of the subunits need to have the same number and type of equipment line items (and maybe in the same order, not sure).
Transfer (Drag-and-Drop) Unit within Tree: Select unit in the Treeview, left click on unit and drag to formation to which it should be transferred, release mouse button. It will become the last unit in the selected formation.
Transfer (Drag-and-Drop) Equipment within Tree: Select equipment in the Treeview, left click on equipment and drag to unit to which it should be transferred, release mouse button. It will become the last equipment line in the selected unit.
Change Position of Formation, Unit or Equipment within Tree: Right-click to select Move Up or Move Down, or use the indicated key shortcuts (Ctrl-Up and Ctrl-Down, respectively). Note that in the in-game editor, units are ranked by ID number and so will not be in the same order as in TOAW XML.
Delete Unit: Right-click, select Delete, or use the key shortcut (Ctrl-Del). Confirmation is required for deletion, but there is no “un-do”, so be careful with deletions!
Propagate Settings: Right-click, select Formation Propagation or Unit Propagation, as appropriate. On the form which appears, uncheck any settings which you do not want to propagate.
Copy Formation, Unit: Right-click on formation/unit, select Copy, or use the key shortcut (Ctrl-C).
NOTE: Every now and then I encounter a problem when importing a scenario with a copied formation back into TOAW—the Force Editor does not seem to work. Please save everything before copying formations and let me know if you encounter any problems.
Add New Unit/Formation: Right-click on parent force or formation and select Add New Formation/ Add New Unit, respectively. Player must carefully review and revise any default formation or unit values!
Add New Equipment: Right-click on parent unit and select Add New Equipment, which will open a new form for adding equipment. Equipment can be filtered by category, country, or any of the equipment special capability flags (arranged in general categories). Changing a filter selection will reset any filters “below” the changed filter (although all flag filters are considered to be on the same ”level”, and selecting one will reset the others.
Add, Delete, Revise Depots: . Select relevant force, then press the Next button in right panel. Click on the Supply Depots button to open Depots form. Right-click to add or delete depots, or select relevant cell to revise. Depots IDs cannot be revised.
Add, Delete, Revise Objectives: Click on relevant formation in Tree, then see Objective screen in right panel. Objective tracks can be selected via the dropdown box. Right-click to add or delete objectives, or select relevant cell to revise. Objective IDs cannot be revised.
Calendar / Environment Settings: Press the Calend/Environ button on the main form to edit calendar and environment settings. Note that making changes to certain drop-down lists (Turn Length, Map Scale, Climate Area & all Weather Zone 1 drop down boxes) may trigger automatic changes to other items. For instance, Weather Zone 1 is the “base” weather zones, and any changes to made Weather Zone 1 conditions will affect the other Weather Zones, if any. To set conditions for Weather Zones 2 & 3 (if present), simply make any desired changes to the specific condition in the relevant Weather Zone after setting that condition for Weather Zone 1. Note that in this form, changes made via drop down lists are saved automatically, while changes made via manual entry must be saved by pressing the Save Changes button.
Event Editor: Press the Event Editor button on the main form to access the event editor. The treeview lists the events, in order of Event ID. The list can be filtered by Event Trigger or Event Effect, at which point the treeview will also indicate the Event Effect or Event Trigger, respectively. Events can be edited by changing the data in the right panel and hitting the Save button. Events can be added or deleted by right-clicking on an Event and selecting the appropriate menu option.
Note re Invalid XML Characters: Certain scenarios include invalid XML characters which will prevent them from working with TOAWxml (for some reason, most occurrences of this error seem to be caused by SS unit names). When you load a *.gam file in TOAWxml, it checks the file for such invalid characters, and if it finds them, replaces them with a “$”. If seeing the “5th $$ Panzer Division” (for example) bothers you, you can go into the gam file in Notepad++ and replace with whatever you want… I should also point out that these characters don't show properly in the game, either, where they are replaced by a small square box.
Note re Unknown Values: The XML for units includes two values which are disregarded by TOAWxml at this point: “NEXT” and “CHARACTERISTICS”. As far I can tell after limited testing, both of these values are auto-generated by the TOAW game engine when you load a scenario, so there is no harm done, but at this point I can’t guarantee that no issues/problems are created by ignoring these XML values. In future, I will try to address these values as time and knowledge of the game engine permit.
Note re Invalid XML Exports: When the in-game editor exports XML files, it erroneously makes every unit in Force 2 a divided subunit, with itself as its parent unit. This is obviously incorrect! TOAWxml will fix this problem automatically when you open TOAWxml or when you load a new gam file, but note that this means that you need to restart TOAWxml or reload the gam file every time you export the gam file from the in-game editor.
HOW TO BREAK YOUR SCENARIO USING TOAWxml!!
While I’m trying very hard to validate all data, etc. to minimize the chance of scenario designers breaking their scenarios by entering the wrong data type (letters instead of numbers, etc.) or wrong data values (outside of valid numeric ranges, etc.), there are at least a few things which will take some time to validate, so I wanted to point them out so that designers DON’T DO THESE:
Overstacking: When creating new units/formations, and especially when copying existing units/formations (with the copied units using the same x,y coordinates!), TOAWxml does not do any checking to see if any hexes are overstacked! If a hex is overstacked and you load it into the in-game editor, it will probably crash…
Adding/Deleting Equipment Line Items from Divided Parent or Divided Sub Units: (see Warning! Above) When you try to re-unite divided sub-units, the program adds up all of the equipment quantities for each equipment line item in each of the sub-units and totals them into the parent unit. If a sub-unit or parent have different numbers of equipment line items, bad things will happen. Note that you can revise sub-unit Max and Current Quantities while units are divided, just don’t add new equipment line items. If you had to add an equipment line item to a particular sub-unit, re-unite the unit first, then add the equipment line item and edit the quantities so that the appropriate subunit has what you want…
Leave TOAWxml Open During Exporting gam File from In-Game Editor: See note above re Invalid XML Exports. Be sure to restart TOAWxml or reload the gam file after every time you export a gam file from the in-game editor.
< Message edited by 76mm -- 6/28/2019 3:36:53 PM >