Page 26 of 31
RE: TOAW XML Editor
Posted: Wed Dec 09, 2020 11:24 am
by ericdauriac
Hello,
it's TOAWVIEWER and not TOAWXLM in download?
Regards
Eric
RE: TOAW XML Editor
Posted: Wed Dec 09, 2020 8:19 pm
by 76mm
Ooops, let me try to figure out how that happened and fix it.
[EDIT] Sorry too many files around here, I uploaded the wrong one yesterday. Correct file should be in the first post now.
BTW, here what I started working on today:

RE: TOAW XML Editor
Posted: Thu Dec 10, 2020 2:37 pm
by ericdauriac
Hello,
I have a problem.
I want to modify a scenario (39-45).
I can easily modify the quantity of weapons (ex: Squad Rifles 400/400 => 240/400)
But I can't manage to add weapons (Ex: HMG 80/80), these don't appear.
Regards
Eric
RE: TOAW XML Editor
Posted: Thu Dec 10, 2020 2:48 pm
by cathar1244
ORIGINAL: ericdauriac
Hello,
I have a problem.
I want to modify a scenario (39-45).
I can easily modify the quantity of weapons (ex: Squad Rifles 400/400 => 240/400)
But I can't manage to add weapons (Ex: HMG 80/80), these don't appear.
Regards
Eric
Are there already 24 items of equipment in the unit you want to equip with the machine guns? No more than 24 types of equipment in a unit is allowed.
Cheers
RE: TOAW XML Editor
Posted: Thu Dec 10, 2020 2:51 pm
by 76mm
I know that it is possible to add new equipment--I just tested it, and it worked fine. Please provide more information.
The only thing I can think of--and this is only a guess--is that you might not be using the right equipment file...I haven't tested this so am not sure, but doubt that this feature will work if you add equipment from an equipment file other than what the scenario is using.
[EDIT: Cathar's point about number of units is also valid, hadn't thought of that!]
RE: TOAW XML Editor
Posted: Sun Dec 13, 2020 8:08 am
by alexjack
Great to see you still expanding this great mod.
RE: TOAW XML Editor
Posted: Sun Dec 13, 2020 11:04 am
by 76mm
The Edit Saved Game functionality could be kind of cool, if I can figure out how to make it work! So far I've got some ideas. If anyone has experience editing saved games file, let me know what issues you've encountered, and which features would be helpful!
RE: TOAW XML Editor
Posted: Sun Dec 13, 2020 12:06 pm
by larryfulkerson
Back when we had only TOAW III I attempted to put together a simple editor of the type you are contemplating and I took a good hard look at the saved game file and discovered that it's somehow zipped up like a *.zip file. And that I'd have to unzip it in memory and edit THAT. But I could never discover where the zipped up part started in the file. It was so frustrating that I eventually gave up.
Here's some of the code from the beginning of a TOAW IV saved game file:
‹
ìÝ
pi~ß÷Æ? X‚\`{»{IJg ,A,^ù²É%Ù ÈÛÛ»ÛWî?NŽeyÉÑ‚
so I'd have to run the file into a debugger of some sort to see what the code looks like. I'm not detecting any zipped-up-ness in the file so maybe it's no longer zipped up when it's written by the game engine. I'd like to help you with your project in some small capacity. I used to be a professional computer programmer and I still know a thing or two about compilers, debuggers, "make" files, and *.exe files, etc. I assume you're programming in Java or some other simple language. Lemme know.
RE: TOAW XML Editor
Posted: Sun Dec 13, 2020 12:51 pm
by sPzAbt653
Currently, Editing a Saved Game creates a New Scenario. If you could figure out how to actually Edit an actual Saved Game, that could be useful.
RE: TOAW XML Editor
Posted: Sun Dec 13, 2020 12:58 pm
by Zovs
Larry it’s written in C# I have cloned the repo and I was working on a part of it. It’s not too bad it’s like Java.
RE: TOAW XML Editor
Posted: Sun Dec 13, 2020 2:08 pm
by 76mm
As Don says, I've been working in C#. I have no idea how to work with compiled files and expect that it is above my pay grade to figure it out. But we can create new scenarios by taking .sal files, changing the extension to .sce, opening them in TOAW, and then exporting them as .gam files. Whew!
As Don says, technically this creates a new scenario, and I need to do lots of testing to see what is and is not carried over from the old scenario. Currently I envision automatically deleting all of the events which have already occurred, renumbering the turn numbers for upcoming events and reinforcements, etc.
I think I've mentioned that the whole reason I've been working on this is to be able to use TOAW as an operational layer to generate tactical games (in other games), which would require editing the TOAW every time there is a tactical battle to reflect its result. One immediate problem is that editing saved game .gam files does not allow you to save within a turn, so you'll only be able to insert battle results at the end of a turn...but not the end of the world.
If there is some way to edit .sal files directly I'd be very interested in finding out how!
RE: TOAW XML Editor
Posted: Sun Dec 13, 2020 2:37 pm
by cathar1244
As Don says, I've been working in C#. I have no idea how to work with compiled files and expect that it is above my pay grade to figure it out. But we can create new scenarios by taking .sal files, changing the extension to .sce, opening them in TOAW, and then exporting them as .gam files. Whew!
I'm amazed that even works. [:)]
Cheers
RE: TOAW XML Editor
Posted: Sun Dec 13, 2020 4:40 pm
by 76mm
ORIGINAL: cathar1244
I'm amazed that even works. [:)]
The problem is that it doesn't work very well...but I hope to be able to fix that. Fixing events properly could get rather tricky however...
RE: TOAW XML Editor
Posted: Sun Dec 13, 2020 6:11 pm
by larryfulkerson
ORIGINAL: 76mm
As Don says, I've been working in C#. I have no idea how to work with compiled files and expect that it is above my pay grade to figure it out. But we can create new scenarios by taking .sal files, changing the extension to .sce, opening them in TOAW, and then exporting them as .gam files. Whew!
You're a genius. That seems to be the easiest way to do it so far. Kudos.
ORIGINAL: 76mm
As Don says, technically this creates a new scenario, and I need to do lots of testing to see what is and is not carried over from the old scenario. Currently I envision automatically deleting all of the events which have already occurred, renumbering the turn numbers for upcoming events and reinforcements, etc.
I think I've mentioned that the whole reason I've been working on this is to be able to use TOAW as an operational layer to generate tactical games (in other games), which would require editing the TOAW every time there is a tactical battle to reflect its result. One immediate problem is that editing saved game .gam files does not allow you to save within a turn, so you'll only be able to insert battle results at the end of a turn...but not the end of the world.
If there is some way to edit .sal files directly I'd be very interested in finding out how!
I'll see if I can dig up a free debugger from github or somewhere and I'll take a look at the raw *.sal file to see what I can find out.
Meanwhile I seem to not know how to use the "Equipment viewer" button. I get an empty screen every time. Got any hints for me?
RE: TOAW XML Editor
Posted: Sun Dec 13, 2020 6:19 pm
by larryfulkerson
What does a deployment of "disbanded" mean in terms of the game engine placing or not placing the unit on the map when the scenario loads?

RE: TOAW XML Editor
Posted: Sun Dec 13, 2020 6:52 pm
by 76mm
ORIGINAL: larryfulkerson
Meanwhile I seem to not know how to use the "Equipment viewer" button. I get an empty screen every time. Got any hints for me?
Oops, that wasn't supposed to be there in that version...it won't work until the next version--so ignore it for now. Basically it is the same equipment viewer as is available as a separate download now.
ORIGINAL: larryfulkerson
What does a deployment of "disbanded" mean in terms of the game engine placing or not placing the unit on the map when the scenario loads?
hmm, never seen that before. Is the unit indicated as Disbanded in the TOAW Editor as well? If so then it is a problem with the scenario. Otherwise, I might have gotten the "deployment codes" wrong, so that instead of saying Disbanded it should say something else. Which scenario is it?
RE: TOAW XML Editor
Posted: Sun Dec 13, 2020 6:57 pm
by larryfulkerson
I did as you suggested: change the *.sal file to an *.sce file, load it in the TOAW IV scenario editor and write it out as a *.gam file. Use that for input in the TOAW XML program. It's a file from an ongoing game ( approx T3 ) so it's entirely possible that that unit is actually disbanded in the game now. I'll read it ( the edited *.gam file ) back into the TOAW IV editor to see what the game engine says about that particular unit, if anything.
RE: TOAW XML Editor
Posted: Sun Dec 13, 2020 7:17 pm
by larryfulkerson
The TOAW IV scenario editor labels it as "eliminated" in the formation editor.
RE: TOAW XML Editor
Posted: Thu Dec 17, 2020 11:25 am
by dth
76mm, Great Job on this and the Equipment Viewer!
I'm playing around with map editing right now and converting JTS ACW maps over to TOAW. It's working but a bit tricky.
Thanks for all your work and motivation in these projects!!!
BRD!
RE: TOAW XML Editor
Posted: Thu Dec 17, 2020 11:40 am
by 76mm
ORIGINAL: dth
I'm playing around with map editing right now and converting JTS ACW maps over to TOAW. It's working but a bit tricky.
Thanks, I'm glad someone finds it useful.
I wanted to mention that while I have an "Edit Map" option on the menu I posted a few days ago, it will not be a full-on map editor--I have no idea how to render the map graphically... Instead, it will allow limited map editing operations, such as adding airfields, ports, etc. maybe bridges, etc. The main point is to allow for the addition of such facilities during the course of longer "strategic" scenarios which would involve editing saved game files.