TOAWxml Editor

Post new mods and scenarios here
ericdauriac
Posts: 98
Joined: Wed Sep 14, 2016 7:53 am
Location: Limoges

RE: TOAW XML Editor

Post by ericdauriac »

Hello,

it's TOAWVIEWER and not TOAWXLM in download?

Regards

Eric
User avatar
76mm
Posts: 4695
Joined: Sun May 02, 2004 4:26 am
Location: Washington, DC

RE: TOAW XML Editor

Post 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:


Image
Attachments
menu.jpg
menu.jpg (18.38 KiB) Viewed 15 times
ericdauriac
Posts: 98
Joined: Wed Sep 14, 2016 7:53 am
Location: Limoges

RE: TOAW XML Editor

Post 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
cathar1244
Posts: 1030
Joined: Sat Sep 05, 2009 2:16 am

RE: TOAW XML Editor

Post 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
User avatar
76mm
Posts: 4695
Joined: Sun May 02, 2004 4:26 am
Location: Washington, DC

RE: TOAW XML Editor

Post 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!]
alexjack
Posts: 15
Joined: Wed Dec 26, 2018 7:21 am

RE: TOAW XML Editor

Post by alexjack »

Great to see you still expanding this great mod.
User avatar
76mm
Posts: 4695
Joined: Sun May 02, 2004 4:26 am
Location: Washington, DC

RE: TOAW XML Editor

Post 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!
User avatar
larryfulkerson
Posts: 40241
Joined: Sat Apr 16, 2005 9:06 pm
Location: Tucson, AZ
Contact:

RE: TOAW XML Editor

Post 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.
When you're dead you aren't aware of the pain of those around you. The same thing happens when you're stupid.
User avatar
sPzAbt653
Posts: 9625
Joined: Thu May 03, 2007 7:11 am
Location: east coast, usa

RE: TOAW XML Editor

Post 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.
User avatar
Zovs
Posts: 7077
Joined: Sun Feb 22, 2009 11:02 pm
Location: United States

RE: TOAW XML Editor

Post 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.
Image
Beta Tester for: War in the East 1 & 2, WarPlan & WarPlan Pacific, Valor & Victory, Flashpoint Campaigns: Sudden Storm, Computer War In Europe 2
SPWW2 & SPMBT scenario creator
User avatar
76mm
Posts: 4695
Joined: Sun May 02, 2004 4:26 am
Location: Washington, DC

RE: TOAW XML Editor

Post 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!
cathar1244
Posts: 1030
Joined: Sat Sep 05, 2009 2:16 am

RE: TOAW XML Editor

Post 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
User avatar
76mm
Posts: 4695
Joined: Sun May 02, 2004 4:26 am
Location: Washington, DC

RE: TOAW XML Editor

Post 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...
User avatar
larryfulkerson
Posts: 40241
Joined: Sat Apr 16, 2005 9:06 pm
Location: Tucson, AZ
Contact:

RE: TOAW XML Editor

Post 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?
When you're dead you aren't aware of the pain of those around you. The same thing happens when you're stupid.
User avatar
larryfulkerson
Posts: 40241
Joined: Sat Apr 16, 2005 9:06 pm
Location: Tucson, AZ
Contact:

RE: TOAW XML Editor

Post 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?
Image
Attachments
temp.jpg
temp.jpg (108.59 KiB) Viewed 15 times
When you're dead you aren't aware of the pain of those around you. The same thing happens when you're stupid.
User avatar
76mm
Posts: 4695
Joined: Sun May 02, 2004 4:26 am
Location: Washington, DC

RE: TOAW XML Editor

Post 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?
User avatar
larryfulkerson
Posts: 40241
Joined: Sat Apr 16, 2005 9:06 pm
Location: Tucson, AZ
Contact:

RE: TOAW XML Editor

Post 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.
When you're dead you aren't aware of the pain of those around you. The same thing happens when you're stupid.
User avatar
larryfulkerson
Posts: 40241
Joined: Sat Apr 16, 2005 9:06 pm
Location: Tucson, AZ
Contact:

RE: TOAW XML Editor

Post by larryfulkerson »

The TOAW IV scenario editor labels it as "eliminated" in the formation editor.
When you're dead you aren't aware of the pain of those around you. The same thing happens when you're stupid.
dth
Posts: 45
Joined: Sun Jun 11, 2006 2:37 pm
Location: United States

RE: TOAW XML Editor

Post 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!
User avatar
76mm
Posts: 4695
Joined: Sun May 02, 2004 4:26 am
Location: Washington, DC

RE: TOAW XML Editor

Post 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.
Post Reply

Return to “Mods and Scenarios”