Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

TOAWxml Editor

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> The Operational Art of War IV >> Mods and Scenarios >> TOAWxml Editor Page: [1] 2 3 4 5   next >   >>
Login
Message << Older Topic   Newer Topic >>
TOAWxml Editor - 10/30/2018 3:09:45 PM   
76mm


Posts: 3342
Joined: 5/2/2004
From: Washington, DC
Status: offline
I've been playing around to create an editor for TOAW XML (*.gam) files and have come up with the attached file. So far, it basically allows players to revise most Force, Formation, Unit, and Equipment data in the OOBs and various scenario and force settings.

I decided it would be easier to keep updating this post with the latest version of the app. and the manual, so see below for both.
*****************
January 24, 2019
v1.12

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 within Tree: 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 within Tree: 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 within Tree: 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.

Copy Formation, Unit: Right-click, select Copy, or use the key shortcut (Ctrl-C).

Add, Delete, Revise Depots: . Select relevant force, then press the Next button in right panel. Click on the Supply Depots button to open Depots form. Right-click to add or delete depots, or select relevant cell to revise. Depots IDs cannot be revised.

Add, Delete, Revise Objectives: Click on relevant formation in Tree, then see Objective screen in right panel. Objective tracks can be selected via the dropdown box. Right-click to add or delete objectives, or select relevant cell to revise. Objective IDs cannot be revised.

Calendar / Environment Settings: Press the Calend/Environ button on the main form to edit calendar and environment settings. Note that making changes to certain drop-down lists (Turn Length, Map Scale, Climate Area & all Weather Zone 1 drop down boxes) may trigger automatic changes to other items. For instance, Weather Zone 1 is the “base” weather zones, and any changes to made Weather Zone 1 conditions will affect the other Weather Zones, if any. To set conditions for Weather Zones 2 & 3 (if present), simply make any desired changes to the specific condition in the relevant Weather Zone. Note that in this form, changes made via drop down lists are saved automatically, while changes made via manual entry must be saved by pressing the Save Changes button.

Note re Invalid XML Characters: Certain scenarios include invalid XML characters which will prevent them from working with TOAWxml (for some reason, most occurrences of this error seem to be caused by SS unit names). When you load a *.gam file in TOAWxml, it checks the file for such invalid characters, and if it finds them, replaces them with a capital “Z”. If seeing the “5th ZZ Panzer Division” (for example) bothers you, you can go into the gam file in Notepad++ and replace with whatever you want… I should also point out that these characters don't show properly in the game, either, where they are replaced by a small square box (see posts #141 & 142 in this thread).


Attachment (1)

< Message edited by 76mm -- 1/31/2019 8:16:59 PM >
Post #: 1
RE: TOAW XML Editor - 10/30/2018 3:12:33 PM   
76mm


Posts: 3342
Joined: 5/2/2004
From: Washington, DC
Status: offline
Here is a screen shot of the force editor:





Attachment (1)

(in reply to 76mm)
Post #: 2
RE: TOAW XML Editor - 10/30/2018 3:13:10 PM   
76mm


Posts: 3342
Joined: 5/2/2004
From: Washington, DC
Status: offline
Here is screenie of formation editor:





Attachment (1)

(in reply to 76mm)
Post #: 3
RE: TOAW XML Editor - 10/30/2018 3:13:53 PM   
76mm


Posts: 3342
Joined: 5/2/2004
From: Washington, DC
Status: offline
Unit Editor:




Attachment (1)

(in reply to 76mm)
Post #: 4
RE: TOAW XML Editor - 10/30/2018 3:14:54 PM   
76mm


Posts: 3342
Joined: 5/2/2004
From: Washington, DC
Status: offline
Equipment editor:




Attachment (1)

(in reply to 76mm)
Post #: 5
RE: TOAW XML Editor - 10/30/2018 3:16:42 PM   
76mm


Posts: 3342
Joined: 5/2/2004
From: Washington, DC
Status: offline
Scenario Settings:





Attachment (1)

(in reply to 76mm)
Post #: 6
RE: TOAW XML Editor - 10/30/2018 3:20:40 PM   
76mm


Posts: 3342
Joined: 5/2/2004
From: Washington, DC
Status: offline
For many data points, there are tooltips with the applicable ranges and explanation (summarized from manual). The data points which are disabled are generally those that I could not figure out what they were for, so didn't want people messing them them. If anyone can explain any of these mechanics or point out errors in other stuff, please let me know!

(in reply to 76mm)
Post #: 7
RE: TOAW XML Editor - 10/30/2018 4:46:15 PM   
76mm


Posts: 3342
Joined: 5/2/2004
From: Washington, DC
Status: offline
Here's an example of the tooltips:




Attachment (1)

(in reply to 76mm)
Post #: 8
RE: TOAW XML Editor - 10/30/2018 6:16:25 PM   
Oberst_Klink

 

Posts: 3808
Joined: 2/10/2008
From: Germany
Status: offline
+1 Thanks!

Klink, Oberst

_____________________________

My Blog & on Twitter.
Visit CS Legion on Twitter & Facebook for updates.

(in reply to 76mm)
Post #: 9
RE: TOAW XML Editor - 10/30/2018 10:04:24 PM   
Lobster


Posts: 2258
Joined: 8/8/2013
From: Third rock from the Sun.
Status: offline


Creating a Force from scratch would be nice.

< Message edited by Lobster -- 10/30/2018 10:20:42 PM >


_____________________________

http://www.operationbarbarossa.net/

"Getting back to reality...I'll only go as a tourist!"

(in reply to Oberst_Klink)
Post #: 10
RE: TOAW XML Editor - 10/30/2018 10:12:36 PM   
76mm


Posts: 3342
Joined: 5/2/2004
From: Washington, DC
Status: offline
I've just figured out how to drag-and-drop units in the tree to transfer them.

Buhahahah...I've been wanting to do that in TOAW for 20 years... I've got to fix a few more things than will post a revised version.

(in reply to Lobster)
Post #: 11
RE: TOAW XML Editor - 10/30/2018 10:35:44 PM   
76mm


Posts: 3342
Joined: 5/2/2004
From: Washington, DC
Status: offline
quote:

ORIGINAL: Lobster
Creating a Force from scratch would be nice.

Yeah, this is on my list, I think it should be doable. But first I want to wrap up a couple of things related to existing units, such as transferring and deleting them, as well as adding individual units to existing formations and additional equipment to existing units.

Then I can look at creating units from scratch.

< Message edited by 76mm -- 10/31/2018 2:52:30 AM >

(in reply to Lobster)
Post #: 12
RE: TOAW XML Editor - 11/1/2018 6:22:50 AM   
Rosseau

 

Posts: 2309
Joined: 9/13/2009
Status: offline
Sorry but how do you create the xml (.gam) files? I cannot locate anything in my directories currently. Thanks.

(in reply to 76mm)
Post #: 13
RE: TOAW XML Editor - 11/1/2018 8:38:18 AM   
JapLance


Posts: 119
Joined: 11/30/2002
From: Mallorca, Spain
Status: offline

quote:

ORIGINAL: Rosseau

Sorry but how do you create the xml (.gam) files? I cannot locate anything in my directories currently. Thanks.


Loading the Scenario in the Scenario editor, and then selecting Save Game(XML) as from the File menu

_____________________________

Greetings from Spain.

(in reply to Rosseau)
Post #: 14
RE: TOAW XML Editor - 11/1/2018 9:32:52 AM   
winkelried


Posts: 42
Joined: 8/10/2007
Status: offline
Having problems running on my 64bit Windows 10 machine. Already when starting up i keep getting an ".NET Framework unhandled exception" error: "Invalid character in the given encoding. Line 100, position 85". Any idea?

_____________________________

Honneur et Fidélité

(in reply to JapLance)
Post #: 15
RE: TOAW XML Editor - 11/1/2018 10:10:28 AM   
Lobster


Posts: 2258
Joined: 8/8/2013
From: Third rock from the Sun.
Status: offline
quote:

ORIGINAL: 76mm

quote:

ORIGINAL: Lobster
Creating a Force from scratch would be nice.

Yeah, this is on my list, I think it should be doable. But first I want to wrap up a couple of things related to existing units, such as transferring and deleting them, as well as adding individual units to existing formations and additional equipment to existing units.

Then I can look at creating units from scratch.


Even as it is this is a wonderful tool. It is a huge p.i.t.a. to do things like set replacement priority or experience and proficiency and supply and readiness. It takes FOREVER especially when you are working with a huge OOB. So keep up the good work. This is a hugely useful tool just as it is because everything is in one place.

< Message edited by Lobster -- 11/1/2018 10:11:43 AM >


_____________________________

http://www.operationbarbarossa.net/

"Getting back to reality...I'll only go as a tourist!"

(in reply to 76mm)
Post #: 16
RE: TOAW XML Editor - 11/1/2018 12:47:56 PM   
joey


Posts: 1012
Joined: 5/8/2004
From: Johnstown, PA
Status: offline
I have been waiting for something like this for a long, long time. Many thanks! j

(in reply to Lobster)
Post #: 17
RE: TOAW XML Editor - 11/1/2018 1:00:57 PM   
76mm


Posts: 3342
Joined: 5/2/2004
From: Washington, DC
Status: offline
quote:

ORIGINAL: winkelried
Having problems running on my 64bit Windows 10 machine. Already when starting up i keep getting an ".NET Framework unhandled exception" error: "Invalid character in the given encoding. Line 100, position 85". Any idea?

That's strange, because I've got a 64 bit Win10 machine, and it works fine. Let me google the error you're getting and I can see if I can identify the problem.

(in reply to winkelried)
Post #: 18
RE: TOAW XML Editor - 11/1/2018 1:03:58 PM   
76mm


Posts: 3342
Joined: 5/2/2004
From: Washington, DC
Status: offline
quote:

ORIGINAL: Lobster
It is a huge p.i.t.a. to do things like set replacement priority or experience and proficiency and supply and readiness. It takes FOREVER especially when you are working with a huge OOB. So keep up the good work. This is a hugely useful tool just as it is because everything is in one place.


I don't think it will be too difficult to add a feature that allows you to apply these settings on a formation or force basis--is that what you have in mind?

(in reply to Lobster)
Post #: 19
RE: TOAW XML Editor - 11/1/2018 1:06:31 PM   
joey


Posts: 1012
Joined: 5/8/2004
From: Johnstown, PA
Status: offline
It does not appear to work on my machine. I keep getting the below message and the program crashes. Any thoughts?

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.Xml.XmlException: '', hexadecimal value 0x1F, is an invalid character. Line 1, position 1.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
at System.Xml.XmlTextReaderImpl.ThrowInvalidChar(Char[] data, Int32 length, Int32 invCharPos)
at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
at System.Xml.Linq.XDocument.Load(String uri, LoadOptions options)
at System.Xml.Linq.XDocument.Load(String uri)
at TOAWXML.xmlform.xmlform_Load(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2117.0 built by: NET47REL1LAST
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
TOAWXML
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Users/john%20new/Documents/My%20Games/The%20Operational%20Art%20of%20War%20IV/TOAWXML.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2117.0 built by: NET47REL1LAST
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2117.0 built by: NET47REL1LAST
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2117.0 built by: NET47REL1LAST
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2053.0 built by: NET47REL1
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2117.0 built by: NET47REL1LAST
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2117.0 built by: NET47REL1LAST
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Xml.Linq
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2053.0 built by: NET47REL1
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml.Linq/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.Linq.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

(in reply to joey)
Post #: 20
RE: TOAW XML Editor - 11/1/2018 1:09:34 PM   
76mm


Posts: 3342
Joined: 5/2/2004
From: Washington, DC
Status: offline
Aargh, let me look at this error as well. I'm not a programmer in real life, so haven't dealt with these kind of issues before.

(in reply to joey)
Post #: 21
RE: TOAW XML Editor - 11/1/2018 2:06:15 PM   
winkelried


Posts: 42
Joined: 8/10/2007
Status: offline
joey's problems seems to be very similar to mine.

_____________________________

Honneur et Fidélité

(in reply to 76mm)
Post #: 22
RE: TOAW XML Editor - 11/1/2018 2:14:44 PM   
76mm


Posts: 3342
Joined: 5/2/2004
From: Washington, DC
Status: offline
OK, I looked at this and see that I made some rudimentary errors in packaging the file for distribution...I'm not sure that this will fix the problem, but it will be good start!

Give me a couple of days to fix this and finish adding the "transfer unit" functionality--I've already added "drag-and-drop" transfer of units to different formations, but am still figuring out how to reorder units within a formation. I will try to post a revised version in a couple of days.

(in reply to winkelried)
Post #: 23
RE: TOAW XML Editor - 11/1/2018 2:39:56 PM   
Lobster


Posts: 2258
Joined: 8/8/2013
From: Third rock from the Sun.
Status: offline

quote:

ORIGINAL: 76mm

quote:

ORIGINAL: Lobster
It is a huge p.i.t.a. to do things like set replacement priority or experience and proficiency and supply and readiness. It takes FOREVER especially when you are working with a huge OOB. So keep up the good work. This is a hugely useful tool just as it is because everything is in one place.


I don't think it will be too difficult to add a feature that allows you to apply these settings on a formation or force basis--is that what you have in mind?


Oh my. You mean something like setting an entire formations replacement priority instead of one unit at a time? I think giving us the ability of applying things like readiness, supply, proficiency, replacement priority and veteran/untried status globally might get you nominated for sainthood.

_____________________________

http://www.operationbarbarossa.net/

"Getting back to reality...I'll only go as a tourist!"

(in reply to 76mm)
Post #: 24
RE: TOAW XML Editor - 11/1/2018 8:56:41 PM   
John T_MatrixForum

 

Posts: 62
Joined: 8/7/2000
From: Stockholm Sweden
Status: offline
Thanks!

My top priority would be an event editor with graphical chaining so you actually see whats wrong.

Cheers
/John

_____________________________

/John T

(in reply to Lobster)
Post #: 25
RE: TOAW XML Editor - 11/1/2018 9:14:58 PM   
76mm


Posts: 3342
Joined: 5/2/2004
From: Washington, DC
Status: offline
quote:

ORIGINAL: John T_MatrixForum
...an event editor with graphical chaining so you actually see whats wrong.

Sorry, what does "graphical chaining" mean?

(in reply to John T_MatrixForum)
Post #: 26
RE: TOAW XML Editor - 11/1/2018 10:51:55 PM   
jakobscalpel

 

Posts: 34
Joined: 1/17/2007
Status: offline

quote:

ORIGINAL: 76mm

quote:

ORIGINAL: John T_MatrixForum
...an event editor with graphical chaining so you actually see whats wrong.

Sorry, what does "graphical chaining" mean?



My guess is John is describing an event viewer/editor that uses nested conditionals instead of "gotos". If the events could be replayed, like in a debugger, so that the equivalent of unit tests could be run against an event set, that would be amazing too. Just guessing as to John's intention however.

I'm hoping that the event editor in TOAW can one day be converted to a scripting language, or (better yet!) allow for compiled plugins to be shipped with a scenario, with the events populated through a public API or dll.

(in reply to 76mm)
Post #: 27
RE: TOAW XML Editor - 11/1/2018 11:08:06 PM   
76mm


Posts: 3342
Joined: 5/2/2004
From: Washington, DC
Status: offline
OK, it will be a little while before I turn to the event editor, but let me know your ideas, I will see what I can do!

(in reply to jakobscalpel)
Post #: 28
RE: TOAW XML Editor - 11/2/2018 3:51:55 AM   
jakobscalpel

 

Posts: 34
Joined: 1/17/2007
Status: offline
Thanks for all your work on this 76mm. I saw above where you said you are "not a programmer in real life". If you deploy a tool that people can install and use (and like!), the you absolutely are a programmer

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#???

(in reply to 76mm)
Post #: 29
RE: TOAW XML Editor - 11/2/2018 10:42:37 AM   
76mm


Posts: 3342
Joined: 5/2/2004
From: Washington, DC
Status: offline
quote:

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.

(in reply to jakobscalpel)
Post #: 30
Page:   [1] 2 3 4 5   next >   >>
All Forums >> [New Releases from Matrix Games] >> The Operational Art of War IV >> Mods and Scenarios >> TOAWxml Editor Page: [1] 2 3 4 5   next >   >>
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.164