TOAWxml Editor

Post new mods and scenarios here
User avatar
76mm
Posts: 4766
Joined: Sun May 02, 2004 4:26 am
Location: Washington, DC

RE: TOAW XML Editor

Post by 76mm »

ORIGINAL: rhinobones
Is there a tutorial for this application? XML is basically a foreign language to me.

The “manual” is in the first post of the thread, and is available in a better-formatted pdf in the downloaded version. And the whole point of TOAWxml is that you don't need to know anything about XML to use it, it does everything behind the scenes. You should be able to get a decent idea of what it does by scanning the screenshots in this thread.
User avatar
76mm
Posts: 4766
Joined: Sun May 02, 2004 4:26 am
Location: Washington, DC

RE: TOAW XML Editor

Post by 76mm »

OK, I've uploaded a new version (v2.1). As described above, not really many substantive changes: basically just added the ability to change the release/entry turn for static formations (enabled in the latest TOAW patch) and added an indication of the date when turns are indicated (ie, reinforcements, release of formations, events).

I've also fixed a lot of bugs...before deleting formations could crash TOAW, and deleting units or formations would screw up divided units and events which included formations or units--those should now be fixed.

As usual, use at your own risk: I've done some testing but did not, and cannot, test every scenario and situation. Just in case, please keep backups of all of your pre-TOAWxml work.

I'll post some screenshots in the following posts.
User avatar
76mm
Posts: 4766
Joined: Sun May 02, 2004 4:26 am
Location: Washington, DC

RE: TOAW XML Editor

Post by 76mm »

OK, as mentioned, I've added dates to make it easier to figure out what a turn number means in terms of actual dates. Here is screenshot showing when a reinforcement arrives.



Image
Attachments
ReinfDate.jpg
ReinfDate.jpg (105.77 KiB) Viewed 317 times
User avatar
76mm
Posts: 4766
Joined: Sun May 02, 2004 4:26 am
Location: Washington, DC

RE: TOAW XML Editor

Post by 76mm »

Here is the date for an event triggered by a turn:


Image
Attachments
EventDate.jpg
EventDate.jpg (71.31 KiB) Viewed 317 times
User avatar
76mm
Posts: 4766
Joined: Sun May 02, 2004 4:26 am
Location: Washington, DC

RE: TOAW XML Editor

Post by 76mm »

Finally, here is one showing the entry turn for static formations, along with the relevant date:


Image
Attachments
EntryTurn.jpg
EntryTurn.jpg (94.55 KiB) Viewed 317 times
User avatar
76mm
Posts: 4766
Joined: Sun May 02, 2004 4:26 am
Location: Washington, DC

RE: TOAW XML Editor

Post by 76mm »

Currently I don't plan to add any more features to TOAWxml, although I'm always open to suggestions and might do so if there is a consensus for other features. I'll keep fixing bugs though, so please report those. I will also probably update it so that it works with future patches, if there are any.

Otherwise, I think I'll start working on some other stuff; I will let you know when/if anything interesting emerges from those efforts.
User avatar
76mm
Posts: 4766
Joined: Sun May 02, 2004 4:26 am
Location: Washington, DC

RE: TOAW XML Editor

Post by 76mm »

I just made this open-source on github for anyone that wants to play around with it...
rbeeler81
Posts: 15
Joined: Tue Oct 09, 2018 2:42 pm

RE: TOAW XML Editor

Post by rbeeler81 »

First of all, thank you very much for your time and efforts in creating this tool.

I have encountered an issue that, after searching the board for clues, I have been unable to resolve. I edited the Trotsky's War scenario, and within the in-game editor, the scenario is valid, and unit strengths correlate to equipment. However, when I go to play the scenario, Force 2's units all of offensive strengths of "0", and defensive strengths of "1". This is despite all of the equipment and equipment counts appearing normal. I have tried re-importing the .gam file, re-saving as a scenario, and reloading the game. I have also tried using the in-game editor. Despite these measures, I am still encountering this error. I have included the screen shots below. Has anybody experienced this problem and/or found a workaround?


Image
Attachments
toawunits1.jpg
toawunits1.jpg (227.11 KiB) Viewed 317 times
User avatar
larryfulkerson
Posts: 42549
Joined: Sat Apr 16, 2005 9:06 pm
Location: Tucson, AZ,usa,sol, milkyway
Contact:

RE: TOAW XML Editor

Post by larryfulkerson »

Is there a unit in Force 2 that has a gargantuan offensive or defensive strength? The game engine does some "behind the scenes" adjusting of the combat strengths on the units by making the largest defensive or offensive strength the largest value showing on a unit about 35 or 36 or so and then adjusting all the other unit strengths by the same amount so that they are all proportionally reduced and some of the smaller units can end up with a strength of '1'. [ Is there some kind of proficiency problem in the units? I doubt that that by itself would cause the extent of the problem you have though. ] I've never run into this problem before and I'm curious to know what causes it. Would you please post a copy of the scenario so I can take a look at it?
Naughty Grandma Has the Bank Manager by the Balls… LITERALLY!
https://www.youtube.com/watch?v=fBeUBBeqkhI
rbeeler81
Posts: 15
Joined: Tue Oct 09, 2018 2:42 pm

RE: TOAW XML Editor

Post by rbeeler81 »

Thanks Larry.

I've run into that problem in the past with having one "Gargantuan" unit that shrinks the offensive/defensive strengths of the other units. Funnily enough, in the in-game editor, the offensive and defensive strengths for both Force 1 and 2 correspond perfectly to their size and equipment. It is only when I play the scenario does Force 2 show as "0,1".

Below is the scenario. Interestingly, the file size for my edited scenario is only half the size (~1000kb vs ~500kb) of the original Trotsky's War scenario.
Attachments
TrotskysWar.zip
(782.59 KiB) Downloaded 6 times
rbeeler81
Posts: 15
Joined: Tue Oct 09, 2018 2:42 pm

RE: TOAW XML Editor

Post by rbeeler81 »

My best guess at this point is something was lost importing and exporting the .gam file from the in-game editor to the TOAWXMLeditor, although Force 1 is unscathed. Oddly enough, I've played around with other scenarios and have never run into this problem.
User avatar
76mm
Posts: 4766
Joined: Sun May 02, 2004 4:26 am
Location: Washington, DC

RE: TOAW XML Editor

Post by 76mm »

ORIGINAL: rbeeler81
My best guess at this point is something was lost importing and exporting the .gam file from the in-game editor to the TOAWXMLeditor, although Force 1 is unscathed. Oddly enough, I've played around with other scenarios and have never run into this problem.
I don't understand the exact sequence of what you edited in which editor?

I'm not sure if this is the problem that you're encountering, but there is a problem with the in-game exporter in that it makes all Force 2 units "parents" of themselves--see posts #338-352 on page 12 of this thread for more info. TOAWXML will "fix" this problem when the game file exported by the game is loaded into TOAWXML--but every time you re-export the gam file from the game you need to reload it into TOAWXML.
rbeeler81
Posts: 15
Joined: Tue Oct 09, 2018 2:42 pm

RE: TOAW XML Editor

Post by rbeeler81 »

Apologies if my first post was a bit confusing. I will try to describe it chronologically as best I can.

I opened the scenario in the in-game editor, saved it as a .gam file, and uploaded the .gam file into the TOAWXMLeditor.

I edited Force 2 in the TOAWXMLeditor. The items I edited were names of formations and units, proficiency/readiness/supply (mostly propagated), and unit equipment (added in new equipment items and changed some of the equipment count per unit). I did edit the Force 1 proficiency/readiness/supply in the TOAWXMLeditor, but no equipment changes/counts were made for Force 1.

I then uploaded the .gam file back into the in-game editor, copied and pasted units, deployed them, and saved it as a .sce file. According to the in-game editor, the scenario is valid. I then opened the game, but ran into the issue of Force 2 having 0 strength (even though equipment type and count is correct).

I will re-read the posts you have directed and will try to retrace steps.
User avatar
76mm
Posts: 4766
Joined: Sun May 02, 2004 4:26 am
Location: Washington, DC

RE: TOAW XML Editor

Post by 76mm »

Thanks for the description. Sorry for the hassle, but first thing I would do is start with the original scenario file, export it as a gam file, and re-import it back into TOAW (without editing it in TOAWXML), and then opening as a scenario--just to see if the problem is cause by TOAWXML or the TOAW export/import process.

If I had to guess--although this is only a guess and it could easily be something else--I would say that the problem was caused by you editing the file in TOAWXML, re-importing to TOAW, re-exporting and continuing to work on it in TOAWXML...basically every time you re-export a gam from TOAW you need to open and close TOAWXML, because otherwise it will have weird effects... So you should definitely try to just close TOAWXML, re-open it, save the file in TOAWXML, and then re-import that gam file into TOAW and convert to a scenario.

Anyway, let me know how things work out and we'll try to figure this out...
rbeeler81
Posts: 15
Joined: Tue Oct 09, 2018 2:42 pm

RE: TOAW XML Editor

Post by rbeeler81 »

Thanks for the tip. I am going to keep trying as per your instructions and see what I can come up with. The editing functions and TOAWXMLeditor are phenomenal tools, and I've used them with no issue in the past. For whatever reason this particular scenario file has been giving me fits.

I'll post an update after trying your suggestions.

Thank you again for your feedback.
User avatar
larryfulkerson
Posts: 42549
Joined: Sat Apr 16, 2005 9:06 pm
Location: Tucson, AZ,usa,sol, milkyway
Contact:

RE: TOAW XML Editor

Post by larryfulkerson »

Hey you guys:
I loaded the scenario in the 4.1.0.40 editor and took a look around and didn't find anything unusual except for the high values of offense and defense are higher than those I've seen for units of other scenarios. Then I saved the scenario with a new name and then loaded the new name scenario in the game mode and it looks like the problem went away although I didn't change anything at all. I've posted the new scenario here below.
Attachments
TrotskysWartryII.zip
(330.23 KiB) Downloaded 9 times
Naughty Grandma Has the Bank Manager by the Balls… LITERALLY!
https://www.youtube.com/watch?v=fBeUBBeqkhI
rbeeler81
Posts: 15
Joined: Tue Oct 09, 2018 2:42 pm

RE: TOAW XML Editor

Post by rbeeler81 »

Thank you Larry.

I tried to replicate your methodology, but the problem still persisted.

I'll download your attachment and report back with any findings.
User avatar
larryfulkerson
Posts: 42549
Joined: Sat Apr 16, 2005 9:06 pm
Location: Tucson, AZ,usa,sol, milkyway
Contact:

RE: TOAW XML Editor

Post by larryfulkerson »

You're welcome of course. But I didn't change anything at all. I just went to the edit mode and looked at the events and
the briefings and pulled up the replacements manager to look at the values on the reinforcements and they looked fine so
I didn't change anything and then I remember looking at a formation report on some formation or other but never changed
anything. And then saved the scenario with a new name. So even though nothing was changed while editing the scenario
it turned out fine in the end. By the way I didn't use a custom .eqp file so it's using the default .eqp file now.

May I reccommend the new improved .eqp list. I'm using it on all my modded scenarios. You can find it here:
https://www.matrixgames.com/forums/tm.a ... age=1&key=
Naughty Grandma Has the Bank Manager by the Balls… LITERALLY!
https://www.youtube.com/watch?v=fBeUBBeqkhI
rbeeler81
Posts: 15
Joined: Tue Oct 09, 2018 2:42 pm

RE: TOAW XML Editor

Post by rbeeler81 »

Your attachment works perfectly. My only guess is by toggling back and forth between the in-game editor and XMLeditor, something must have been corrupted. As I mentioned before, this is the first time I have ever experienced this issue (not that I am an expert player, but I have been tinkering with scenarios and OOBs for quite a while).

Thank you also for pointing me to your updated equipment file. Now if I can only figure out how to view the first two categories!
User avatar
76mm
Posts: 4766
Joined: Sun May 02, 2004 4:26 am
Location: Washington, DC

RE: TOAW XML Editor

Post by 76mm »

I've uploaded a new version (1.23) which fixes a few bugs that I've come across; no new functionality in this version, although I'm thinking about adding some things.
Post Reply

Return to “Mods and Scenarios”