TOAWxml Editor

Post new mods and scenarios here
User avatar
Lobster
Posts: 5499
Joined: Thu Aug 08, 2013 2:12 pm
Location: Third rock from the Sun.

RE: TOAW XML Editor

Post by Lobster »

Looks to me like TOAWxml does it all at once instead of having to play around with one item at a time. Kind of like one stop shopping and with the units displayed in a nice hierarchy format.
ne nothi tere te deorsum (don't let the bastards grind you down)

If duct tape doesn't fix it then you are not using enough duct tape.

Two things are infinite: the universe and human stupidity and I’m not sure about the universe-Einstein.
biddrafter2
Posts: 74
Joined: Wed Jan 17, 2007 9:54 pm

RE: TOAW XML Editor

Post by biddrafter2 »

ORIGINAL: Curtis Lemay

Kudos to you for creating this. However, be aware that the .gam file format is not set in stone. Its format changes each time the game gets any expansion of any kind, and this editor will have to adjust accordingly. I don't think the 4.0.1.23 format is even the same as the 4.1.0.6 format, for example, since there were a couple of game options and a game parameter added between them.

Furthermore, there is very little, if any, TOAW4 backwards compatibility for the xml files (including the .gam file). So, designers using this should regularly convert their .gam files back into .sce files via the TOAW4 editor ASAP.

The Header tag in the .gam XML has a version attribute that has not changed since TOAW III (according to my tests). Perhaps this could be changed to reflect the version of TOAW that produced the XML save? This would allow 76mm to prevent corruption upfront and not require an XML load test to detect changes.
biddrafter2
Posts: 74
Joined: Wed Jan 17, 2007 9:54 pm

RE: TOAW XML Editor

Post by biddrafter2 »

ORIGINAL: 76mm
ORIGINAL: jakobscalpel
BTW, I've been a programmer for a long time and since you are using .NET I could help out with your project down the road if you'd like. Hopefully C#???
Yes, C#, generally using Linq to XML. It would be great if you're interested in helping out, if nothing else with tips on stuff I'm having trouble with (ahem, deployment...).

One stand-alone piece is the event editor, let me know if you have any ideas about how to set that up.

I'd be happy to take a look. Send me a PM if you'd like to get in touch via e-mail or Slack.
User avatar
76mm
Posts: 4766
Joined: Sun May 02, 2004 4:26 am
Location: Washington, DC

RE: TOAW XML Editor

Post by 76mm »

ORIGINAL: jakobscalpel
The Header tag in the .gam XML has a version attribute that has not changed since TOAW III (according to my tests). Perhaps this could be changed to reflect the version of TOAW that produced the XML save? This would allow 76mm to prevent corruption upfront and not require an XML load test to detect changes.
That would probably be an easy enough change, as long as it wouldn't break the *.gam files so that they couldn't work in the game... Do you want to give it a try?!
User avatar
76mm
Posts: 4766
Joined: Sun May 02, 2004 4:26 am
Location: Washington, DC

RE: TOAW XML Editor

Post by 76mm »

I thought I'd upload the latest version (attached). Here are the current features:

Current Features:

--Revise Force, Formation, and Unit Settings
: Change any of the enabled settings. Be careful, because I have not yet added any data validation, so if you enter data in the incorrect format, etc., it will probably break your *.gam file. IF YOU CHANGE ANY SETTINGS, BE SURE TO PRESS THE “SAVE CHANGES” BUTTON OR THE CHANGES WILL BE LOST WHEN YOU LEAVE THAT SCREEN!!!

--Transfer (Drag-and-Drop) Unit: Select unit in 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: Select equipment in 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: 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 index 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.

If you haven't figured this out already, you guys are the beta testers, so please let me know if you encounter any problems. I encountered one strange problem when I moved from the Debug version to the Release version: units were showing blank deployment and location settings, even though these settings worked fine in the Debug version--let me know if you encounter this problem, or any others...

Next up:
I need to clean up some things with existing units, such as Reinforcements, Air Unit missions, also copying of existing units, and fixing any bugs that come up. After that I'll move on to creating new units, formations, etc.

[EDIT] See first post for latest version.
User avatar
Lobster
Posts: 5499
Joined: Thu Aug 08, 2013 2:12 pm
Location: Third rock from the Sun.

RE: TOAW XML Editor

Post by Lobster »

Thanks for what you've done. [;)]
ne nothi tere te deorsum (don't let the bastards grind you down)

If duct tape doesn't fix it then you are not using enough duct tape.

Two things are infinite: the universe and human stupidity and I’m not sure about the universe-Einstein.
User avatar
76mm
Posts: 4766
Joined: Sun May 02, 2004 4:26 am
Location: Washington, DC

RE: TOAW XML Editor

Post by 76mm »

@Lobster, is everything working for you?
User avatar
76mm
Posts: 4766
Joined: Sun May 02, 2004 4:26 am
Location: Washington, DC

RE: TOAW XML Editor

Post by 76mm »

Guys, I came across a problem with transferring equipment between units, so pls don't transfer equipment until the next version. Transferring units between formations seems to work OK...
User avatar
Lobster
Posts: 5499
Joined: Thu Aug 08, 2013 2:12 pm
Location: Third rock from the Sun.

RE: TOAW XML Editor

Post by Lobster »

ORIGINAL: 76mm

@Lobster, is everything working for you?

Going to change a bunch of settings in 2k units tomorrow. Let you know how it goes. [;)]

Probably not going to do anything with equipment or moving units around.
ne nothi tere te deorsum (don't let the bastards grind you down)

If duct tape doesn't fix it then you are not using enough duct tape.

Two things are infinite: the universe and human stupidity and I’m not sure about the universe-Einstein.
User avatar
Lobster
Posts: 5499
Joined: Thu Aug 08, 2013 2:12 pm
Location: Third rock from the Sun.

RE: TOAW XML Editor

Post by Lobster »

Not sure if this is possible but...When editing the highlight goes from the current item being worked on (formation/unit/etc.) to the field being edited, in this example loss tolerance. Could the current item be highlighted in some way, say a grey background or something similar? It's just a very small thing but makes it easier to relocate where you are in a long list of items. Also, when going to a different item is it possible to have a button to choose between auto saving edits or manually saving an edit?



Image
Attachments
ScreenHunt..0508.14.jpg
ScreenHunt..0508.14.jpg (70.27 KiB) Viewed 647 times
ne nothi tere te deorsum (don't let the bastards grind you down)

If duct tape doesn't fix it then you are not using enough duct tape.

Two things are infinite: the universe and human stupidity and I’m not sure about the universe-Einstein.
User avatar
76mm
Posts: 4766
Joined: Sun May 02, 2004 4:26 am
Location: Washington, DC

RE: TOAW XML Editor

Post by 76mm »

It should work now so that when you save changes made in the right panel, it goes back to highlight the unit you just changed in the unit tree. Does that work?

Autosaves are certainly possible, but I'll probably add a bit more functionality first.
User avatar
Lobster
Posts: 5499
Joined: Thu Aug 08, 2013 2:12 pm
Location: Third rock from the Sun.

RE: TOAW XML Editor

Post by Lobster »

Bah...working with the wrong TOAW executable. I have to download the right one. I must have overwritten it. [8|]
ne nothi tere te deorsum (don't let the bastards grind you down)

If duct tape doesn't fix it then you are not using enough duct tape.

Two things are infinite: the universe and human stupidity and I’m not sure about the universe-Einstein.
User avatar
76mm
Posts: 4766
Joined: Sun May 02, 2004 4:26 am
Location: Washington, DC

RE: TOAW XML Editor

Post by 76mm »

I'll try to add version numbers to the next one, couldn't figure out how to do it last time.

Also, jakobscalpel has signed up to help with the event editor. He's a real programmer, so that's great news, although he's a busy guy so don't expect anything really quickly...
User avatar
Lobster
Posts: 5499
Joined: Thu Aug 08, 2013 2:12 pm
Location: Third rock from the Sun.

RE: TOAW XML Editor

Post by Lobster »

When working with a .gam file in TOAWxml tool that has a deployment field that is completely empty (just a white field) this exception happens. The TOAWxml tool has to be able to handle completely empty fields since when editing this will be fairly common.

Edit: In many cases TOAW adds a default value. I guess in the deployment and Location fields this isn't true. Even if you fill the fields after opening the .gam file in TOAWxml tool you still get the exception. I got this when testing the tool with FitE2.



Image
Attachments
ScreenHunt..0510.37.jpg
ScreenHunt..0510.37.jpg (51.56 KiB) Viewed 641 times
ne nothi tere te deorsum (don't let the bastards grind you down)

If duct tape doesn't fix it then you are not using enough duct tape.

Two things are infinite: the universe and human stupidity and I’m not sure about the universe-Einstein.
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 report (and sorry about that!), but a couple of questions:
1) Was the deployment box empty because the unit was a reinforcement, or because it had just never been set? I've already made a change to show when a unit is reinforcement.
2) Generally I don't think that data fields should be empty--they should be filled with default values upon unit creation, and can then be changed as necessary.
3) But of course the program should not crash if a data field is empty. This is a bigger pain than it sounds like but I should be able to figure it out.

Keep the comments coming! I want to straighten out all of these issues before adding any more features.
rbeeler81
Posts: 15
Joined: Tue Oct 09, 2018 2:42 pm

RE: TOAW XML Editor

Post by rbeeler81 »

First of all, thank you for creating this program. I spend hours with the built-in editor, however this tool should save time and allow for more gameplay.

I too receive the same error as Lobster. I am using the latest updated version of TOAWIV as well as your editor.
User avatar
76mm
Posts: 4766
Joined: Sun May 02, 2004 4:26 am
Location: Washington, DC

RE: TOAW XML Editor

Post by 76mm »

OK, but it would be helpful to understand if the deployment box is supposed to be full, but is empty, or is actually still empty at this point in scenario development?

rbeeler81
Posts: 15
Joined: Tue Oct 09, 2018 2:42 pm

RE: TOAW XML Editor

Post by rbeeler81 »

The deployment box should be full. I have found that some .gam files work, while others do not. The scenario where the .gam file is empty is the TWW_Third_World_War series. However, other .gam files show the units as normal.
User avatar
Lobster
Posts: 5499
Joined: Thu Aug 08, 2013 2:12 pm
Location: Third rock from the Sun.

RE: TOAW XML Editor

Post by Lobster »

ORIGINAL: 76mm

OK, but it would be helpful to understand if the deployment box is supposed to be full, but is empty, or is actually still empty at this point in scenario development?


Using FitE2:

The German 270th Inf Div is set as a reinforcement:



Image
Attachments
ScreenHunt..0516.10.jpg
ScreenHunt..0516.10.jpg (83 KiB) Viewed 640 times
ne nothi tere te deorsum (don't let the bastards grind you down)

If duct tape doesn't fix it then you are not using enough duct tape.

Two things are infinite: the universe and human stupidity and I’m not sure about the universe-Einstein.
User avatar
Lobster
Posts: 5499
Joined: Thu Aug 08, 2013 2:12 pm
Location: Third rock from the Sun.

RE: TOAW XML Editor

Post by Lobster »

And here it is in TOAWxml. Deployment is a turn (88) and not a mode.



Image
Attachments
ScreenHunt..0516.12.jpg
ScreenHunt..0516.12.jpg (65.65 KiB) Viewed 640 times
ne nothi tere te deorsum (don't let the bastards grind you down)

If duct tape doesn't fix it then you are not using enough duct tape.

Two things are infinite: the universe and human stupidity and I’m not sure about the universe-Einstein.
Post Reply

Return to “Mods and Scenarios”