Event Engine Unit Value (Full Version)

All Forums >> [New Releases from Matrix Games] >> The Operational Art of War IV



Message


Lobster -> Event Engine Unit Value (12/13/2021 12:46:09 PM)

When a scenario is saved as an XML file (File/Save Game(XML) As...) units are addressed as values. The value is what is used to enable the game to undertake the process asked of it. For instance, unit withdrawal. Where can those unit values be found? In the XML file they are not a part of the XML file. An example of a withdraw Event:

[image]local://upfiles/45799/D052B0F93DD641FBBF6EEF1B8853A0B2.jpg[/image]

Where is the unit's value found? It's not in the XML file except where the withdraw event takes place.

Perhaps it's in the order the unit's were created? Still, it would be helpful to be able to see these values.




76mm -> RE: Event Engine Unit Value (12/13/2021 1:02:24 PM)

I had to figure this out when coding TOAWxml. The note below refers to formations rather than units, I would guess it would be the same for units...

Value = Formation ID - 1, prefix of 2 for Force 2 (eg, Formation 1 of Force 2 = 2000; Formation 2 of Force 1 = 1; No XML for Formation1 of Force 1




Lobster -> RE: Event Engine Unit Value (12/13/2021 2:26:38 PM)

Right. I had already found that using your XML editor I can insert the unit name and save, then the proper unit ID is inserted into an event for instance for a unit withdrawal.

I had wondered if, using the unit ID, a person could create a utility that allowed units to be passed in and out of formations in some way simply by changing the appropriate number. Would have to involve converting .sal to a .sce and back again. Probably also would have to be able to convert the turn counter to the proper turn after going from .sal to .sce and back again. All speculation of course. [;)]




76mm -> RE: Event Engine Unit Value (12/13/2021 3:10:01 PM)

You can already transfer units between formations in TOAWxml. I've actually finished coding a new module that allows the modification of saved games, including changing the turn to the proper turn, removing completed events, etc. It's pretty cool, although has not been tested other than by me.

Now I'm working on converting data from the gam files to a "tactical file" which includes additional data from the resolution of tactical level battles--you can convert both ways, so TOAW data from the gam file into a "tac" file, then resolve the tactical battle, but the data into the "tac" file, and send it back to the gam file. I've been working on this for several months, it is, um, rather complicated!




golden delicious -> RE: Event Engine Unit Value (12/13/2021 5:09:32 PM)


quote:

ORIGINAL: Lobster

I had wondered if, using the unit ID, a person could create a utility that allowed units to be passed in and out of formations in some way simply by changing the appropriate number. Would have to involve converting .sal to a .sce and back again. Probably also would have to be able to convert the turn counter to the proper turn after going from .sal to .sce and back again. All speculation of course. [;)]


As soon as you're playing around with modding the scenario between saves, I would suggest you can make the whole experience a lot cleaner by simply doing away with any and all uses of the turn counter:
1) no turn-based events
2) no turn-based reinforcements
3) no turn-based replacements changes

Instead, you can handle all these things when you crack open the scenario to make your other changes. This is the way I handled things for my Grand Strategy projects; the strategic ruleset would output whatever units, replacements, force supply etc. etc. at the start of the strategic turn and that would be input into the scenario. The scenario has a fixed duration of 1-3 months and at the end of it you go back into the editor and add these factors back in again. The only thing you need to do with regard to the turn count is increment the start date for the new scenario.




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.8115234