TOAWxml Editor

Post new mods and scenarios here
User avatar
joey
Posts: 1529
Joined: Sat May 08, 2004 8:00 pm
Location: Johnstown, PA

RE: TOAW XML Editor

Post by joey »

ORIGINAL: 76mm
ORIGINAL: joey
What are considered invalid characters? I am not sure I follow your meaning.
Invalid characters are those characters which throw an error such as: "System.Xml.XmlException: '', hexadecimal value 0x1F, is an invalid character. Line 1, position 1," which several people have encountered.

See posts #141 and #142 in this thread. That's about all I know about them.

I still get this same error with version 1.12. I could give you the line and position if it would help.
User avatar
76mm
Posts: 4766
Joined: Sun May 02, 2004 4:26 am
Location: Washington, DC

RE: TOAW XML Editor

Post by 76mm »

ORIGINAL: joey
I still get this same error with version 1.12. I could give you the line and position if it would help.
Not sure how that is possible...very frustrating. Please provide line, position, and name of scenario, and I will take a look...
User avatar
joey
Posts: 1529
Joined: Sat May 08, 2004 8:00 pm
Location: Johnstown, PA

RE: TOAW XML Editor

Post by joey »

D21 Line 220284 position 78.
User avatar
76mm
Posts: 4766
Joined: Sun May 02, 2004 4:26 am
Location: Washington, DC

RE: TOAW XML Editor

Post by 76mm »

ORIGINAL: joey
D21 Line 220284 position 78.
Thanks; a couple of things:
1) We seem to have different versions of D21--the last line of mine is 211745, there is no line 220284...are you working on a revised, non-public version?
2) I can open my version of D21 with no problems (although as mentioned, various invalid XML characters are replaced with "Z").
3) The code for checking for invalid XML is triggered when you load a gam file, so if you are just relaunching TOAWxml and D21 was the last scenario loaded under a previous version of TOAWxml, you should "unload" D21 by loading a different gam file, then re-load D21. If you can't load a different gam file because of the error you are getting, remove (or rename, etc.) the D21 file that you are working with, then relaunch TOAWxml--if the last-used file is missing, it will ask you to load another gam file. At that point, load any other scenario, then once it loads, immediately try to load D21...

Pls let me know if any of this works! If I can replicate an error I can usually fix it.
User avatar
76mm
Posts: 4766
Joined: Sun May 02, 2004 4:26 am
Location: Washington, DC

RE: TOAW XML Editor

Post by 76mm »

Note that I've just revised the code so that the program checks for invalid XML every time it launches rather than only when loading a gam file, so this will be in v1.13
User avatar
76mm
Posts: 4766
Joined: Sun May 02, 2004 4:26 am
Location: Washington, DC

RE: TOAW XML Editor

Post by 76mm »

Here's another feature coming up in v1.13: color-coding for the unit hierarchy to show which units are reinforcements, divided unit (parent), and divided unit (subunit). In the screen shot below, green for reinforcements, grey for divided (parent), and blue for divided (subunit):

Image
Attachments
Colors.jpg
Colors.jpg (99.73 KiB) Viewed 318 times
User avatar
Lobster
Posts: 5542
Joined: Thu Aug 08, 2013 2:12 pm
Location: Third rock from the Sun.

RE: TOAW XML Editor

Post by Lobster »

Something to consider. Many times an OOB will have many units that are the same. Also some OOBs are very large so to copy a unit and move it up or down in a formation to add it as a new unit can take a bit of time. Why not make it possible to copy a unit and save it in a file so that when another unit of that type is needed it can be selected from the file where it was saved and simply added to the OOB. In a very large OOB this can save a bunch of time. It could be added by selecting a unit currently in the OOB and adding it so it comes before the selected unit.
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.
Sleazey
Posts: 16
Joined: Wed Dec 19, 2001 10:00 am
Location: Houston, TX, USA

RE: TOAW XML Editor

Post by Sleazey »

Would it be possible to make the left panel even more hierarchical? That is, make subunits be hierarchically displayed under the parent unit.

In your example, this would mean that the blue units "1st/III/79 ID", "2nd/III/79 ID", "3rd/III/79 ID" would be nodes under the black III/79 ID.

You are already using a hierarchical display, just use it even more. (Keep the colors you have too).
User avatar
76mm
Posts: 4766
Joined: Sun May 02, 2004 4:26 am
Location: Washington, DC

RE: TOAW XML Editor

Post by 76mm »

ORIGINAL: Sleazey
Would it be possible to make the left panel even more hierarchical? That is, make subunits be hierarchically displayed under the parent unit.

In your example, this would mean that the blue units "1st/III/79 ID", "2nd/III/79 ID", "3rd/III/79 ID" would be nodes under the black III/79 ID.
Well, something like that is the plan for units which are divided using TOAWxml; I'm working on this now and will post v1.13 once it is finished. But for units which were divided in the TOAW editor, you'll have to move the subunits up/down manually with the right-click menu.

Note, however, that "under" in this instance means that they will be the next unit at the same level in the hierarchy, rather than nested under a unit so that you would have to expand the hierarchy to see them (ie, like equipment line items are). This because in TOAW terms but the unit and the divided subunits are still at the same level in the hierarchy, and I can't move the subunits down to a lower level. Hopefully you understand what I'm talking about...

Also, I think I mentioned elsewhere that units which are moved up/down in TOAWxml will not be in the same position in the TOAW editor, because it orders units differently (although they will be in the correct position in the hierarchy.
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 what I was talking about in my previous post; these subunits were moved up manually using the right-click menu:

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

RE: TOAW XML Editor

Post by 76mm »

ORIGINAL: Lobster
Something to consider. Many times an OOB will have many units that are the same. Also some OOBs are very large so to copy a unit and move it up or down in a formation to add it as a new unit can take a bit of time. Why not make it possible to copy a unit and save it in a file so that when another unit of that type is needed it can be selected from the file where it was saved and simply added to the OOB. In a very large OOB this can save a bunch of time. It could be added by selecting a unit currently in the OOB and adding it so it comes before the selected unit.
I'll think about something like this, although I don't think I would save units as file, but rather let you cut them into memory and then allow you to paste them wherever. Although this will be pretty complicated and so probably won't happen for awhile, at least until after I've added the ability to add new equipment, units, etc.
User avatar
Lobster
Posts: 5542
Joined: Thu Aug 08, 2013 2:12 pm
Location: Third rock from the Sun.

RE: TOAW XML Editor

Post by Lobster »

ORIGINAL: 76mm
ORIGINAL: Lobster
Something to consider. Many times an OOB will have many units that are the same. Also some OOBs are very large so to copy a unit and move it up or down in a formation to add it as a new unit can take a bit of time. Why not make it possible to copy a unit and save it in a file so that when another unit of that type is needed it can be selected from the file where it was saved and simply added to the OOB. In a very large OOB this can save a bunch of time. It could be added by selecting a unit currently in the OOB and adding it so it comes before the selected unit.
I'll think about something like this, although I don't think I would save units as file, but rather let you cut them into memory and then allow you to paste them wherever. Although this will be pretty complicated and so probably won't happen for awhile, at least until after I've added the ability to add new equipment, units, etc.

If they are saved into memory once you exit the program your work is gone and everything will have to be resaved next session. [;)]

When you copy a unit it's being put into the clipboard (memory)? Make a paste as file function? There's several third party programs that do this but it's putting it back into the OOB where there may be a problem using a third party program.
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 »

ORIGINAL: Lobster
If they are saved into memory once you exit the program your work is gone and everything will have to be resaved next session.
But I thought you wanted to copy existing units within an OOB? Once a unit exists in TOAW, if you exit TOAWxml you can just copy the same unit next time you open the program, why save it as a separate file?

It seems like the only reason for saving it as a file would be if you wanted to use the same unit in different scenarios/gam files, but even then a scenario developer would only need to create the unit one time for each scenario, which seems like it would be much quicker/easier than for me to code this function to save units to file?
User avatar
larryfulkerson
Posts: 42791
Joined: Sat Apr 16, 2005 9:06 pm
Location: Tucson, AZ,usa,sol, milkyway
Contact:

RE: TOAW XML Editor

Post by larryfulkerson »

ORIGINAL: 76mm
ORIGINAL: Lobster
If they are saved into memory once you exit the program your work is gone and everything will have to be resaved next session.
But I thought you wanted to copy existing units within an OOB? Once a unit exists in TOAW, if you exit TOAWxml you can just copy the same unit next time you open the program, why save it as a separate file?

It seems like the only reason for saving it as a file would be if you wanted to use the same unit in different scenarios/gam files, but even then a scenario developer would only need to create the unit one time for each scenario, which seems like it would be much quicker/easier than for me to code this function to save units to file?

Sorry 76mm dude but I can see some utility for saving it as a file also. The idea is to have each separate kind of unit, LCU, aircraft, major naval, etc. so that reading in the appropriate files can create the OOB / TOE of the scenario much faster than doing it by hand. Hopefully, some day the program can read a list of the files that creates the OOB as a file, one for Americans, one for the British, one for the Germans, several for Axis Minors, etc.
ORIGINAL: Lobster
Something to consider. Many times an OOB will have many units that are the same. Also some OOBs are very large so to copy a unit and move it up or down in a formation to add it as a new unit can take a bit of time. Why not make it possible to copy a unit and save it in a file so that when another unit of that type is needed it can be selected from the file where it was saved and simply added to the OOB. In a very large OOB this can save a bunch of time. It could be added by selecting a unit currently in the OOB and adding it so it comes before the selected unit.
+1
Russia’s 41st Army COLLAPSED in Pokrovsk — 25,000 Soldiers KILLED After a RIDICULOUS Russian Assault
https://www.youtube.com/watch?v=T_CtW3GqPQg
User avatar
76mm
Posts: 4766
Joined: Sun May 02, 2004 4:26 am
Location: Washington, DC

RE: TOAW XML Editor

Post by 76mm »

ORIGINAL: larryfulkerson
Sorry 76mm dude but I can see some utility for saving it as a file also. The idea is to have each separate kind of unit, LCU, aircraft, major naval, etc. so that reading in the appropriate files can create the OOB / TOE of the scenario much faster than doing it by hand. Hopefully, some day the program can read a list of the files that creates the OOB as a file, one for Americans, one for the British, one for the Germans, several for Axis Minors, etc.
Guys, not trying to be argumentative, but I don't really understand what you are trying to achieve...if you are looking for a function that will automatically create an OOB by reading a bunch of sub-OOB files, I wouldn't say that's impossible but it will be pretty far down the road, after new units/equipment and probably after events as well.
ORIGINAL: Lobster
Many times an OOB will have many units that are the same. Also some OOBs are very large so to copy a unit and move it up or down in a formation to add it as a new unit can take a bit of time. Why not make it possible to copy a unit and save it in a file so that when another unit of that type is needed it can be selected from the file where it was saved and simply added to the OOB.
Again, maybe I'm missing something, but I'm still not seeing how saving units as a separate file would be easier/quicker/better than right-clicking, loading an existing unit into memory, and then pasting elsewhere in the OOB??
User avatar
larryfulkerson
Posts: 42791
Joined: Sat Apr 16, 2005 9:06 pm
Location: Tucson, AZ,usa,sol, milkyway
Contact:

RE: TOAW XML Editor

Post by larryfulkerson »

Again, maybe I'm missing something, but I'm still not seeing how saving units as a separate file would be easier/quicker/better than right-clicking, loading an existing unit into memory, and then pasting elsewhere in the OOB??


Because if the units can be represented by files, then it is possible to make a text file that is a list of the files that are needed to create an entire OOB for a scenario. Some scenarios ( FITE2 ) that are so large that reading in one file at a time would be mega time consuming whereas reading in the OOB file and processing it's contents would take only a relatively short time. I'm guessing that the idea is to be able to create a scenario from separate parts represented by files: the map, the events, the OOB's for each side, the environment, and the AI files for either or both sides. And these parts can be listed in a file, to be read by TOAW XML Editor, whereupon an SCE file would be written as output.
Russia’s 41st Army COLLAPSED in Pokrovsk — 25,000 Soldiers KILLED After a RIDICULOUS Russian Assault
https://www.youtube.com/watch?v=T_CtW3GqPQg
User avatar
76mm
Posts: 4766
Joined: Sun May 02, 2004 4:26 am
Location: Washington, DC

RE: TOAW XML Editor

Post by 76mm »

ORIGINAL: larryfulkerson
Because if the units can be represented by files, then it is possible to make a text file that is a list of the files that are needed to create an entire OOB for a scenario. Some scenarios ( FITE2 ) that are so large that reading in one file at a time would be mega time consuming whereas reading in the OOB file and processing it's contents would take only a relatively short time. I'm guessing that the idea is to be able to create a scenario from separate parts represented by files: the map, the events, the OOB's for each side, the environment, and the AI files for either or both sides.
So you're talking about being able to save the entire OOB separately from the rest of the gam file, rather than making up an OOB by reading a list of sub-OOB files (ie, one for each type of division/regiment, etc.)?

I would also like to add functionality to do some simple map editing, such as removing mud/snow, maybe adding/removing bridges to/from particular locations, etc. Let me know if you have ideas for map stuff that would not involved a full-scale map editor.
User avatar
joey
Posts: 1529
Joined: Sat May 08, 2004 8:00 pm
Location: Johnstown, PA

RE: TOAW XML Editor

Post by joey »

ORIGINAL: 76mm
ORIGINAL: joey
D21 Line 220284 position 78.
Thanks; a couple of things:
1) We seem to have different versions of D21--the last line of mine is 211745, there is no line 220284...are you working on a revised, non-public version?
2) I can open my version of D21 with no problems (although as mentioned, various invalid XML characters are replaced with "Z").
3) The code for checking for invalid XML is triggered when you load a gam file, so if you are just relaunching TOAWxml and D21 was the last scenario loaded under a previous version of TOAWxml, you should "unload" D21 by loading a different gam file, then re-load D21. If you can't load a different gam file because of the error you are getting, remove (or rename, etc.) the D21 file that you are working with, then relaunch TOAWxml--if the last-used file is missing, it will ask you to load another gam file. At that point, load any other scenario, then once it loads, immediately try to load D21...

Pls let me know if any of this works! If I can replicate an error I can usually fix it.


I did your number 3 above. It now works. Thanks!
User avatar
76mm
Posts: 4766
Joined: Sun May 02, 2004 4:26 am
Location: Washington, DC

RE: TOAW XML Editor

Post by 76mm »

ORIGINAL: joey
I did your number 3 above. It now works. Thanks!
Great, good to hear. Let me know if you encounter any other issues or have other comments/suggestions...
User avatar
Lobster
Posts: 5542
Joined: Thu Aug 08, 2013 2:12 pm
Location: Third rock from the Sun.

RE: TOAW XML Editor

Post by Lobster »

Consider this.

You have a Soviet OOB for Barbarossa. You are going to make the entire OOB from border guards to convoy escorts to dirt diggers to mech units and everything in between. If there are a multitude of border guards and a multitude of armies each with border guards assigned wouldn't it be easier to select a border guard unit from a file and insert it each time you need one rather than try to copy, scroll down 20 armies and the insert it?

I can personally tell you it is magnitudes easier to get an existing unit template from a file and paste it in where you need it. So you multiply one unit by over a hundred and that's what you are dealing with. TOAW does not have Save unit as and Open unit functions just because. They are there because it makes building an OOB so much easier. Can you imagine having to copy a unit in the force editor, scroll down and then paste then scroll up again and doing it all over again a thousand times or more? If you are going to make a tool to make building an OOB easier then you have to make it so building an OOB is easier. Anyway, that's my two cents worth.

BTW, thanks for taking the time you've taken to get as far as you have. Well 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.
Post Reply

Return to “Mods and Scenarios”