TOAWxml Editor

Post new mods and scenarios here
User avatar
76mm
Posts: 4766
Joined: Sun May 02, 2004 4:26 am
Location: Washington, DC

RE: TOAWxml Editor

Post by 76mm »

Guys, sorry...although I've checked the box to alert me to posts on this thread...I don't get the alerts. I'll respond to your points in subsequent posts.
User avatar
76mm
Posts: 4766
Joined: Sun May 02, 2004 4:26 am
Location: Washington, DC

RE: TOAWxml Editor - Spreadsheet

Post by 76mm »

Any chance that in the future you can format the application as a spreadsheet? Specifically, the force editor function. There are certainly things we can do in your application which are far easier than in the TOAW editor, but while editing forces we still need to go unit by unit. Tedious and time consuming.

I could probably do an import/export to spreadsheet, but frankly it is not near the top of my list. A few things though:
1) Depending on what you're trying to do, it might be easier to work directly with the XML files, using Notepad++ or another program. XML is quite easy to read, and Notepad++ provides full search/replace functionality.
2) I'm working on any updated version of this which would basically show all of a formation's subunits (and their data) when you select a formation in the tree view; I think that this would also make it easier to work with units.
User avatar
76mm
Posts: 4766
Joined: Sun May 02, 2004 4:26 am
Location: Washington, DC

RE: TOAWxml Editor

Post by 76mm »

ORIGINAL: Lobster
Regarding the Calendar editor. I changed the turn length from 12 hours to 24 hours. So I had to change the number of turns from 400 to 200. I got an out of bounds error message. No idea as to why. [;)]
Let me look at this, I don't know why either!
User avatar
76mm
Posts: 4766
Joined: Sun May 02, 2004 4:26 am
Location: Washington, DC

RE: TOAWxml Editor

Post by 76mm »

ORIGINAL: Lobster
I'm at the point where I'm going to use your program a lot. Are there any bugs you are aware of that I should know about? I know the cautionary notes, thanks for those. [;)]
There is at least one thing I need to fix, although not sure if it is a bug (since it is working as designed) and not a "poor design decision." The issue is that if you import an XML file with invalid XML characters (not uncommon with older TOAW scenarios), TOAWxml automatically replaces these invalid characters with something easily identifiable and valid (IIRC a $ sign) and saves the XML file with the new characters--I need to change this so that it is not saved until you hit the Save button. The problem is that this import function also changes the names of any equipment that uses invalid characters, but the equipment file is not changed, so you get a mismatch between the equipment names in the scenario and the equipment file, which IIRC causes it to crash (or at least lead to a message about using the wrong equipment file).

Anyway, let me know if you encounter more issues.

I'll try to post some screenshots of other features I've been working on, which mainly involve facilitating use of a tactical layer with TOAW.
User avatar
76mm
Posts: 4766
Joined: Sun May 02, 2004 4:26 am
Location: Washington, DC

RE: TOAWxml Editor

Post by 76mm »

ORIGINAL: Lobster
Regarding the Calendar editor. I changed the turn length from 12 hours to 24 hours. So I had to change the number of turns from 400 to 200. I got an out of bounds error message. No idea as to why. [;)]
I've looked at this, but can't replicate it...pls let me now if it happens again. IIRC you can't send your scenario file, but at least a couple of screen shots might help diagnose.
User avatar
76mm
Posts: 4766
Joined: Sun May 02, 2004 4:26 am
Location: Washington, DC

RE: TOAWxml Editor

Post by 76mm »

I'm looking at adding a search function to the XML editor, but am struggling to figure out how it should work graphically...just highlighting something in the tree might not be very helpful if the tree is large--you might have to scroll forever to find something, and finding multiple items could be tricky. Perhaps creating a separate list of search results, but then I'm not sure how you'd navigate to them in the tree...

Also, what should be searchable...I was thinking about just names, but maybe being able to search by unit icon, or unit orders, etc. would also be helpful? But not sure how to display search results for that kind of thing either.

Anybody have any ideas?
User avatar
larryfulkerson
Posts: 42599
Joined: Sat Apr 16, 2005 9:06 pm
Location: Tucson, AZ,usa,sol, milkyway
Contact:

RE: TOAWxml Editor

Post by larryfulkerson »

ORIGINAL: 76mm
I'm looking at adding a search function to the XML editor, but am struggling to figure out how it should work graphically...just highlighting something in the tree might not be very helpful if the tree is large--you might have to scroll forever to find something, and finding multiple items could be tricky. Perhaps creating a separate list of search results, but then I'm not sure how you'd navigate to them in the tree...

Also, what should be searchable...I was thinking about just names, but maybe being able to search by unit icon, or unit orders, etc. would also be helpful? But not sure how to display search results for that kind of thing either.

Anybody have any ideas?
IIRC regedit.exe [ the registry editor ] has a search function with several options [ case sensitive, etc. ] and once you've found the first occurance of the word/phrase you can dismiss the search dialog and just press F3 to go to the next occurance of the word/phrase. And the "replace all" function is fantastic.

Other good ideas might be found by playing around with other editors. Notepad++ comes to mind. I'm sure you'll figure it out. Thank you very much for all your efforts by the way. You're worth your weight in gold.
I'd rather be dead than put up with MAGA one more day. America has gone down the tubes already imho.
User avatar
76mm
Posts: 4766
Joined: Sun May 02, 2004 4:26 am
Location: Washington, DC

RE: TOAWxml Editor

Post by 76mm »

Yeah, it's not so much how to do the searches that's the problem, but how to display the results. For instance, the XML data is hierarchical, so search results could be formations, units, equipment, etc. How to display hierarchical search results? Displaying search results in text files is easy, but harder with the GUI I've got. I suppose it could highlight/select each sequential result in the tree? Or I could allow search only within one level; ie, search formations, or units, or equipment, and then display the results in a "flat" (non-hierarchical) screen.
User avatar
76mm
Posts: 4766
Joined: Sun May 02, 2004 4:26 am
Location: Washington, DC

RE: TOAWxml Editor

Post by 76mm »

the same kind of search function could easily lend itself to finding all units with a particular type of equipment, a certain type of order, veteran/untried, etc. As with much of programming, the hard part is figuring out a proper/useful interface rather than the programming.
User avatar
Lobster
Posts: 5451
Joined: Thu Aug 08, 2013 2:12 pm
Location: Third rock from the Sun.

RE: TOAWxml Editor

Post by Lobster »

The first thing to consider is how much time you have on your hands. [;)] If you have a lot of time then you could display the results in two or three different ways depending on what the user wants. Like you said, it isn't so much the searching as getting the results in a useable format that makes sense to the end user.

Some of the things I usually look for are formations and where they are located in the Force list. Deployed and not deployed units. Unit types (air, ground, artillery, etc.), counter colors...things that are related to editing a scenario. Locations of supply points, list of city names and their locations, the list can become taxing. Like I said, how much time do you have. [:D]
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: TOAWxml Editor

Post by 76mm »

Well, let me put it like this: I've probably got enough time to create a search function, but not enough time to create an infinitely-configurable search function! [8D] I do think I'll be able to create something useful, though.

Most of your suggestions are "doable"--the search function itself will be able to search for anything in the XML, since all of it is just text, so the GUI is really the main challenge. Let me start thinking about this more; no promises that it will get done very soon (or, this being TOAW-land, ever!), but will start thinking about it...I might post back here with some ideas/feedback requests.
User avatar
76mm
Posts: 4766
Joined: Sun May 02, 2004 4:26 am
Location: Washington, DC

RE: TOAWxml Editor

Post by 76mm »

ORIGINAL: Lobster
Some of the things I usually look for are formations and where they are located in the Force list. Deployed and not deployed units. Unit types (air, ground, artillery, etc.), counter colors...things that are related to editing a scenario.
it seems like most of these searches would best be shown in the tree? in other words, it doesn't do you any good just to know that a certain formation is somewhere under the relevant force--you already know that--you want the formation to be selected/highlighted in the tree, correct?

Same for unit types, etc? In other words, I'm not sure how useful a simple list of search results would be, unless you can select the unit in the tree by clicking on the list...
User avatar
76mm
Posts: 4766
Joined: Sun May 02, 2004 4:26 am
Location: Washington, DC

RE: TOAWxml Editor

Post by 76mm »

So how does this look for a search interface so far:


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

RE: TOAWxml Editor

Post by 76mm »

search options:

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

RE: TOAWxml Editor

Post by 76mm »

I think I'll start with these options, unless someone has a better suggestion; can always change/add later if it turns out this isn't particularly useful.
User avatar
Lobster
Posts: 5451
Joined: Thu Aug 08, 2013 2:12 pm
Location: Third rock from the Sun.

RE: TOAWxml Editor

Post by Lobster »

So far so good. The hardest part is always formating the output. Pain in the butt. One of my least liked chores in programming.
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: TOAWxml Editor

Post by 76mm »

I've been mentioning that I'm working on a "tactical" layer for TOAW, so wanted to post some screen shots of that as well. Basically the concept is that you use TOAW for the "operational level" in a game, and resolve battles (or some of the battles, as you wish) in a different tactical level game (take your pick). So basically you need to store additional info relevant for the tactical layer but which is not in the TOAW XML export. Main thing I've done so far is add formation/unit commanders and formation dates (I like to track how units/commanders do at the tactical level) and also more detail for individual equipment items (ie, each squad/vehicle), including kills, whether it is a casualty to not, commander, etc. Also, there is a new GUI for formations/units: if you select a formation/unit in the tree, its details are at the top of the right pane (blue box), whereas all subordinates are shown in the right pane. New "tac-layer" data is highlighted in yellow boxes. Note that these commanders are completely independent of the planned TOAW commanders and are used solely at the tac layer; when/if TOAW commander are ever implemented it should be pretty easy to just use those commanders/ratings instead of these commanders (German/Soviet names are selected randomly from an XML file). Here is a selected formation:

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

RE: TOAWxml Editor

Post by 76mm »

Here is a unit selected, showing its component equipment items:

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

RE: TOAWxml Editor

Post by 76mm »

Still working out several issues on how this will all work, but I think it should be possible to come up with something usable. Pretty difficult coding, however, for me at least, so it's been a slog. I suspect that I might be the only person to use something like this, but that's OK...
User avatar
Lobster
Posts: 5451
Joined: Thu Aug 08, 2013 2:12 pm
Location: Third rock from the Sun.

RE: TOAWxml Editor

Post by Lobster »

Eventually information will be swapped back and forth between the tactical and operational?
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”