Conquer Club

[Online] Map XML Wizard

How to make a map. Official Handbook, Guides, Tutorials and more...

Moderator: Cartographers

Forum rules
Please read the Community Guidelines before posting.

Re: UPDATED Map XML Wizard

Postby MrBenn on Thu Apr 01, 2010 1:50 pm

natty_dread wrote:Why isn't this thread stickied?


I'm not a big fan of stickyed threads - too many of them makes the forum difficult to navigate, but I do get where you're coming from. This XML Wizard is a really good tool, and would be better served in the Tools subforum. I was speaking with chipv about it last night, and ended up forgetting to move the thread... I'll do it now ;-)

[Moved]
Image
PB: 2661 | He's blue... If he were green he would die | No mod would be stupid enough to do that
User avatar
Lieutenant MrBenn
 
Posts: 6880
Joined: Wed Nov 21, 2007 9:32 am
Location: Off Duty

Re: UPDATED Map XML Wizard

Postby ender516 on Thu Apr 01, 2010 2:06 pm

Maybe it's time to update this post: Map Making Tools - Updated [24/11/08] The Map XML Wizard could be mentioned and any links to dead tools (I think there may be some) could be culled (or at least flagged).
User avatar
Sergeant 1st Class ender516
 
Posts: 4455
Joined: Wed Dec 17, 2008 6:07 pm
Location: Waterloo, Ontario

Re: UPDATED Map XML Wizard

Postby MrBenn on Thu Apr 01, 2010 2:14 pm

ender516 wrote:Maybe it's time to update this post: Map Making Tools - Updated [24/11/08] The Map XML Wizard could be mentioned and any links to dead tools (I think there may be some) could be culled (or at least flagged).

One step ahead of you - it's already on my to do list!

The date on that thread is actually incorrect as things have been updated to that thread more recently than 24th Nov 2008. It'll be updated in due course :P
Image
PB: 2661 | He's blue... If he were green he would die | No mod would be stupid enough to do that
User avatar
Lieutenant MrBenn
 
Posts: 6880
Joined: Wed Nov 21, 2007 9:32 am
Location: Off Duty

Re: UPDATED Map XML Wizard

Postby oaktown on Sat Apr 10, 2010 1:53 am

just wanted to say that this is a very nice addition to the foundry - thanks chipv.

Question: I used the character reference codes for special characters; eg. á instead of á. I imported my file into the Wizard to check tweak the coordinates, and it spit the new XML back out with the characters instead of the codes. If my memory serves me well, CC is alright with the characters, but BOB freaks out and requires the codes. Anybody have any thoughts in this? Should I go search and replace the codes back in?

thanks.
Image
User avatar
Captain oaktown
 
Posts: 4451
Joined: Sun Dec 03, 2006 9:24 pm
Location: majorcommand

Re: UPDATED Map XML Wizard

Postby chipv on Sat Apr 10, 2010 3:53 am

oaktown wrote:just wanted to say that this is a very nice addition to the foundry - thanks chipv.

Question: I used the character reference codes for special characters; eg. á instead of á. I imported my file into the Wizard to check tweak the coordinates, and it spit the new XML back out with the characters instead of the codes. If my memory serves me well, CC is alright with the characters, but BOB freaks out and requires the codes. Anybody have any thoughts in this? Should I go search and replace the codes back in?

thanks.


Hi Oak, no, the requirement for using the character codes disappeared a while back. So you can retain the characters as they should be displayed but here is the info you need:

viewtopic.php?f=466&t=105494&start=75#p2422101
User avatar
Captain chipv
 
Posts: 2750
Joined: Mon Apr 28, 2008 5:30 pm

Re: UPDATED Map XML Wizard

Postby oaktown on Sat Apr 10, 2010 7:18 pm

thanks chip for answering the same question you had to answer just three months ago. :)
Image
User avatar
Captain oaktown
 
Posts: 4451
Joined: Sun Dec 03, 2006 9:24 pm
Location: majorcommand

Re: UPDATED Map XML Wizard

Postby HtoOh on Mon Apr 12, 2010 2:17 pm

Hello all,
I'd really enjoy creating a map. Where do I get this software?
Thank you in advance for any assistance provided.
Benny
User avatar
Corporal HtoOh
 
Posts: 7
Joined: Fri Apr 02, 2010 4:50 pm
Location: Toronto, Ontario

Re: UPDATED Map XML Wizard

Postby natty dread on Mon Apr 12, 2010 2:26 pm

You don't download the XML wizard, it's browser-based.

But you will need a graphics software first. Draw the map and don't worry about XML, the XML comes later.
Image
User avatar
Sergeant 1st Class natty dread
 
Posts: 12877
Joined: Fri Feb 08, 2008 8:58 pm
Location: just plain fucked

Re: UPDATED Map XML Wizard

Postby chipv on Sat Apr 17, 2010 9:35 pm

Added support for new XML feature to allow continents within objectives.

Details of changes:

1. Read and display continents within objectives
2. Allow adding and deleting of continents to/from objectives (click on grey cell first)
3. Hover over objective also highlights its continents
4. Deleting a continent (using delete button) will also remove it from any continents or objectives.
5. Gameplay allows for continents within objectives
6. Validation includes latest changes to XML schema check used in Mapmaker
7. Added checks
  • Error: Objective X has component Y which does not exist as a continent
    Action: Component Y is removed from component list of Objective X.
  • Error: Objective X has multiple component entries for Y
    Action: Duplicate instances of Component Y are removed from component list of Objective X.
The multiple components now include multiple identical continents
User avatar
Captain chipv
 
Posts: 2750
Joined: Mon Apr 28, 2008 5:30 pm

Re: UPDATED Map XML Wizard

Postby ender516 on Sun Apr 18, 2010 12:55 am

Glad to know you are keeping this tool right up to date. I have just started using it in something other than a testing mode: I am doing the XML for Napoleonic Europe 1812. I have so far only added the territories: just names at locations on the small map, no borders, or neutrals, or continents, or anything. I was a little bothered by one thing. I had created a file with the name of each territory on a line by itself and had that open in a window. I got a nice rhythm going: select a line (one territory name), copy to clipboard, click location on map in Wizard window (which creates a new territory and places the text cursor in the name field), paste from clipboard, click yellow cell to add new territory, repeat as necessary. My problem was that there was no keystroke equivalent to clicking the yellow cell. I prefer not to go back and forth between keyboard and mouse. If I could have pressed, say, Enter to signal that I was satisfied with the name and wanted to add the territory, I could then use Alt-Tab to return to the editor window with the territory names, selected and copied the next name via the keyboard, and then clicked with the mouse cursor (still over the map) to start another new point. The mouse would stay over the map where it belongs, and I would be even more productive.
User avatar
Sergeant 1st Class ender516
 
Posts: 4455
Joined: Wed Dec 17, 2008 6:07 pm
Location: Waterloo, Ontario

Re: UPDATED Map XML Wizard

Postby chipv on Sun Apr 18, 2010 6:19 am

ender516 wrote:Glad to know you are keeping this tool right up to date. I have just started using it in something other than a testing mode: I am doing the XML for Napoleonic Europe 1812. I have so far only added the territories: just names at locations on the small map, no borders, or neutrals, or continents, or anything. I was a little bothered by one thing. I had created a file with the name of each territory on a line by itself and had that open in a window. I got a nice rhythm going: select a line (one territory name), copy to clipboard, click location on map in Wizard window (which creates a new territory and places the text cursor in the name field), paste from clipboard, click yellow cell to add new territory, repeat as necessary. My problem was that there was no keystroke equivalent to clicking the yellow cell. I prefer not to go back and forth between keyboard and mouse. If I could have pressed, say, Enter to signal that I was satisfied with the name and wanted to add the territory, I could then use Alt-Tab to return to the editor window with the territory names, selected and copied the next name via the keyboard, and then clicked with the mouse cursor (still over the map) to start another new point. The mouse would stay over the map where it belongs, and I would be even more productive.


Are you wanting to click the yellow cell for the territory you just added in order to add borders?

Yes, I can put in automatic switch to yellow on ENTER specifically on territory names.
User avatar
Captain chipv
 
Posts: 2750
Joined: Mon Apr 28, 2008 5:30 pm

Re: UPDATED Map XML Wizard

Postby ender516 on Sun Apr 18, 2010 6:21 pm

chipv wrote:
ender516 wrote:Glad to know you are keeping this tool right up to date. I have just started using it in something other than a testing mode: I am doing the XML for Napoleonic Europe 1812. I have so far only added the territories: just names at locations on the small map, no borders, or neutrals, or continents, or anything. I was a little bothered by one thing. I had created a file with the name of each territory on a line by itself and had that open in a window. I got a nice rhythm going: select a line (one territory name), copy to clipboard, click location on map in Wizard window (which creates a new territory and places the text cursor in the name field), paste from clipboard, click yellow cell to add new territory, repeat as necessary. My problem was that there was no keystroke equivalent to clicking the yellow cell. I prefer not to go back and forth between keyboard and mouse. If I could have pressed, say, Enter to signal that I was satisfied with the name and wanted to add the territory, I could then use Alt-Tab to return to the editor window with the territory names, selected and copied the next name via the keyboard, and then clicked with the mouse cursor (still over the map) to start another new point. The mouse would stay over the map where it belongs, and I would be even more productive.


Are you wanting to click the yellow cell for the territory you just added in order to add borders?

Yes, I can put in automatic switch to yellow on ENTER specifically on territory names.

All I wanted to do was add all the territories in one go: no borders or anything else at that point. Then I could save the XML (and a few hours' work). Next I would add something else (like continents, perhaps) and save that, and so on. Save early and save often is my motto.
Am I right in thinking that if I click a location to create a territory, then type in the name, I have to do something (like click the yellow cell next to the name) before I can go back to the map and click to create another territory?
User avatar
Sergeant 1st Class ender516
 
Posts: 4455
Joined: Wed Dec 17, 2008 6:07 pm
Location: Waterloo, Ontario

Re: UPDATED Map XML Wizard

Postby chipv on Sun Apr 18, 2010 6:58 pm

ender516 wrote:All I wanted to do was add all the territories in one go: no borders or anything else at that point. Then I could save the XML (and a few hours' work). Next I would add something else (like continents, perhaps) and save that, and so on. Save early and save often is my motto.
Am I right in thinking that if I click a location to create a territory, then type in the name, I have to do something (like click the yellow cell next to the name) before I can go back to the map and click to create another territory?


No, you can keep going.

Click to create,type name, click to create, type name...

The mouse stays where it is.
User avatar
Captain chipv
 
Posts: 2750
Joined: Mon Apr 28, 2008 5:30 pm

Re: UPDATED Map XML Wizard

Postby ender516 on Sun Apr 18, 2010 7:53 pm

chipv wrote:
ender516 wrote:All I wanted to do was add all the territories in one go: no borders or anything else at that point. Then I could save the XML (and a few hours' work). Next I would add something else (like continents, perhaps) and save that, and so on. Save early and save often is my motto.
Am I right in thinking that if I click a location to create a territory, then type in the name, I have to do something (like click the yellow cell next to the name) before I can go back to the map and click to create another territory?


No, you can keep going.

Click to create,type name, click to create, type name...

The mouse stays where it is.

Okay, I thought that when I tried that, I ended up altering the location of the same territory. Trying it again now, it seems okay. Pilot error, I suppose.

Three new issues:
  1. I don't like the fact that reloading code that the Wizard generated can result in errors. For example, I used the Wizard to generate this code which I saved in short.xml:
    Code: Select all
    <?xml version="1.0" encoding="UTF-8"?>
    <map>
    <territory>
       <name>Aboukir</name>
       <coordinates>
          <smallx>548</smallx>
          <smally>500</smally>
          <largex>732</largex>
          <largey>659</largey>
       </coordinates>
    </territory>
    <territory>
       <name>Anatolia</name>
       <coordinates>
          <smallx>569</smallx>
          <smally>407</smally>
          <largex>760</largex>
          <largey>535</largey>
       </coordinates>
    </territory>
    <territory>
       <name>Andalucia</name>
       <coordinates>
          <smallx>82</smallx>
          <smally>401</smally>
          <largex>111</largex>
          <largey>527</largey>
       </coordinates>
    </territory>
    </map>

    When I loaded it back in, I got the following:
    Code: Select all
    Loading File short.xml ...


    Error: Line 5 - Did not expect element coordinates there
    Error: Line 14 - Did not expect element coordinates there
    Error: Line 23 - Did not expect element coordinates there
    Warning: No continents found.
    Warning: Aboukir cannot be attacked.
    Warning: Aboukir cannot attack.
    Warning: Anatolia cannot be attacked.
    Warning: Anatolia cannot attack.
    Warning: Andalucia cannot be attacked.
    Warning: Andalucia cannot attack.
    XML Load Complete 7 warnings and 3 errors found. Click Close to close this window.

    The warnings are quite reasonable, but I don't like the errors. If a <borders> component is mandatory, why not generate an empty one? When I work with other code generators in RL, if I choose to save at a point where a completely valid file (i.e., one that will load without errors) cannot be created, I get a warning and I can force the issue, but usually the system will find a way of generating something that it can cope with upon reloading.
  2. I entered a name "Baden & Berg (Ulm, October 1805)" and when I reloaded it, I got an error which basically meant it had found a naked ampersand. Would it be possible for you to escape the weird characters (less than, greater than, ampersand, apostrophe, and quotation mark)?
  3. Any chance you could work things so that the images could be loaded from local files rather than a file sharing site? It could be handy to work completely on local files. (I tried using the file:// trick, but no luck.)
User avatar
Sergeant 1st Class ender516
 
Posts: 4455
Joined: Wed Dec 17, 2008 6:07 pm
Location: Waterloo, Ontario

Re: UPDATED Map XML Wizard

Postby natty dread on Sun Apr 18, 2010 8:28 pm

Would it be possible for you to escape the weird characters (less than, greater than, ampersand, apostrophe, and quotation mark)?


Second this! I had to manually change all ampersands every time I edited my XML on nordic... was kinda annoying.

Also, has the postioning of the numbers been fixed yet?
Image
User avatar
Sergeant 1st Class natty dread
 
Posts: 12877
Joined: Fri Feb 08, 2008 8:58 pm
Location: just plain fucked

Re: UPDATED Map XML Wizard

Postby MrBenn on Mon Apr 19, 2010 12:49 pm

ender516 wrote:If a <borders> component is mandatory, why not generate an empty one?
Empty tags are equally invalid; and technically, multiple entries with the same item (even if it's an empty <border> tag) would be referring to the same thing, which would cause more problems... Empty and absent are not the same thing ;-)
Image
PB: 2661 | He's blue... If he were green he would die | No mod would be stupid enough to do that
User avatar
Lieutenant MrBenn
 
Posts: 6880
Joined: Wed Nov 21, 2007 9:32 am
Location: Off Duty

Re: UPDATED Map XML Wizard

Postby ender516 on Mon Apr 19, 2010 2:35 pm

MrBenn wrote:
ender516 wrote:If a <borders> component is mandatory, why not generate an empty one?
Empty tags are equally invalid; and technically, multiple entries with the same item (even if it's an empty <border> tag) would be referring to the same thing, which would cause more problems... Empty and absent are not the same thing ;-)

If a territory has no borders, then it cannot attack, which I am warned about later, so the reporting is redundant. I presume (but cannot check right now) that the insertion of

Code: Select all
<borders>
</borders>


would satisfy the system enough that the <coordinates> element would not be unexpected. I am not suggesting the generation of anything like:

Code: Select all
<borders>
<border></border>
</borders>

which as you say would cause more problems.
User avatar
Sergeant 1st Class ender516
 
Posts: 4455
Joined: Wed Dec 17, 2008 6:07 pm
Location: Waterloo, Ontario

Re: UPDATED Map XML Wizard

Postby chipv on Sat Apr 24, 2010 4:45 pm

ender516 wrote:
chipv wrote:Click to create,type name, click to create, type name...

The mouse stays where it is.


Okay, I thought that when I tried that, I ended up altering the location of the same territory. Trying it again now, it seems okay. Pilot error, I suppose.


It has always been this way

ender516 wrote:Three new issues:
  1. I don't like the fact that reloading code that the Wizard generated can result in errors. For example, I used the Wizard to generate this code which I saved in short.xml:
    Code: Select all
    <?xml version="1.0" encoding="UTF-8"?>
    <map>
    <territory>
       <name>Aboukir</name>
       <coordinates>
          <smallx>548</smallx>
          <smally>500</smally>
          <largex>732</largex>
          <largey>659</largey>
       </coordinates>
    </territory>
    </map>

    When I loaded it back in, I got the following:
    Code: Select all
    Loading File short.xml ...

    Error: Line 5 - Did not expect element coordinates there
    XML Load Complete 7 warnings and 3 errors found. Click Close to close this window.


    The warnings are quite reasonable, but I don't like the errors. If a <borders> component is mandatory, why not generate an empty one? When I work with other code generators in RL, if I choose to save at a point where a completely valid file (i.e., one that will load without errors) cannot be created, I get a warning and I can force the issue, but usually the system will find a way of generating something that it can cope with upon reloading.
  2. I entered a name "Baden & Berg (Ulm, October 1805)" and when I reloaded it, I got an error which basically meant it had found a naked ampersand. Would it be possible for you to escape the weird characters (less than, greater than, ampersand, apostrophe, and quotation mark)?
  3. Any chance you could work things so that the images could be loaded from local files rather than a file sharing site? It could be handy to work completely on local files. (I tried using the file:// trick, but no luck.)


1. This is done, an excellent spot, thanks.
2. This is invalid XML. There is no map on CC with a naked ampersand, so the XML Wizard should enforce this correction, not actually do it.
The Wizard and any XML parser will (and should) expect valid XML. If you simply load your XML with naked ampersands in any browser you will see an error. The 2 mandatory escaped characters are & and < - if these are not escaped, then the XML is invalid.
Basically if you cannot load your XML in a browser without errors, then you can expect the same from the XML Wizard.
3. I don't think I'm going to do this, purely because I do not expect the image to change several times during a session whereas I do agree that the XML is always changing which is why you can do the XML locally.

So I have done 1 for you, but unfortunately will politely reject the other 2.

natty_dread wrote:
Would it be possible for you to escape the weird characters (less than, greater than, ampersand, apostrophe, and quotation mark)?


Second this! I had to manually change all ampersands every time I edited my XML on nordic... was kinda annoying.

Also, has the postioning of the numbers been fixed yet?


For the ampersand please see above, I will write or ask MrB to write a piece on special characters on XML for everyone.

I am somewhat nervous about changing the positioning especially since you corrected your inital assessment, so I
am looking for a small consensus on the amount of adjustment - if we get enough people stating the same amount on the same objects then I will do it (the fix is trivial)
User avatar
Captain chipv
 
Posts: 2750
Joined: Mon Apr 28, 2008 5:30 pm

Re: UPDATED Map XML Wizard

Postby natty dread on Sat Apr 24, 2010 5:33 pm

The problem with the ampersands is, that I had ampersands correctly escaped with &amp; but when I loaded the map into wizard, then saved it again with the wizard, the wizard changed them back to plain ampersands, and I had to change them again manually. I'm not sure if this has been fixed already, but that's how it was when I worked on the nordic xml.

As for the coordinates, I was mistaken first because I thought that the normal 88:s were correct but when I checked the XML with the mapmaker tools it turned out that only the 3:s that were shown on the game test were correct, the white & red 88:s were incorrect.
Image
User avatar
Sergeant 1st Class natty dread
 
Posts: 12877
Joined: Fri Feb 08, 2008 8:58 pm
Location: just plain fucked

Re: UPDATED Map XML Wizard

Postby cairnswk on Sat Apr 24, 2010 6:29 pm

chipv
loading das schloss xml into your tool brings up error message, possibly because several territories have no borders as they cannot be attacked but can be bombarded.
http://h1.ripway.com/cairnswk/das_schloss_120310.xml
can you check this out please.
it still loads the file so i can adjust the coordinates for centering, but produces that error message.
Thanks :)

There is also issues in this xml with (Alt+0223) ß
and ä (Alt+0228)
your program places a black diamond on the xml and then copies that as a ? into the xml code.
Image
* Pearl Harbour * Waterloo * Forbidden City * Jamaica * Pot Mosbi
User avatar
Private cairnswk
 
Posts: 11510
Joined: Sat Feb 03, 2007 8:32 pm
Location: Australia

Re: UPDATED Map XML Wizard

Postby chipv on Sat Apr 24, 2010 6:50 pm

cairnswk wrote:chipv
loading das schloss xml into your tool brings up error message, possibly because several territories have no borders as they cannot be attacked but can be bombarded.
http://h1.ripway.com/cairnswk/das_schloss_120310.xml
can you check this out please.
it still loads the file so i can adjust the coordinates for centering, but produces that error message.
Thanks :)


Those are just warnings, no need to worry. I don't see any errors.

What I have been considering is improving that warning to only show up if a territory cannot attack or bombard.
Alcatraz in San Francisco would flag up a warning.

If any territory can either attack or bombard then I could remove those types of warnings for territories that can only bombard.

Currently these type of warnings are:

Warning: Territory X cannot be attacked
Warning: Territory X cannot attack
Warning: Territory X attacks Territory Y but not vice versa

The last one will flag any one way attacks just in case this is a mistake.

The first 2 could be modified to

Warning: Territory X cannot be attacked or bombarded
Warning: Territory X cannot attack or bombard
User avatar
Captain chipv
 
Posts: 2750
Joined: Mon Apr 28, 2008 5:30 pm

Re: UPDATED Map XML Wizard

Postby chipv on Sat Apr 24, 2010 7:01 pm

cairnswk wrote:
There is also issues in this xml with (Alt+0223) ß
and ä (Alt+0228)
your program places a black diamond on the xml and then copies that as a ? into the xml code.


I am going to post a quick guide to XML special characters including my earlier post but you need to follow these instructions:

viewtopic.php?f=466&t=105494&start=75#p2422101
User avatar
Captain chipv
 
Posts: 2750
Joined: Mon Apr 28, 2008 5:30 pm

Re: UPDATED Map XML Wizard

Postby chipv on Sat Apr 24, 2010 7:03 pm

natty_dread wrote:The problem with the ampersands is, that I had ampersands correctly escaped with &amp; but when I loaded the map into wizard, then saved it again with the wizard, the wizard changed them back to plain ampersands, and I had to change them again manually. I'm not sure if this has been fixed already, but that's how it was when I worked on the nordic xml.



This needs fixing and would have stayed broken had you not given such a clear description of the problem, thanks!
User avatar
Captain chipv
 
Posts: 2750
Joined: Mon Apr 28, 2008 5:30 pm

Re: UPDATED Map XML Wizard

Postby cairnswk on Sat Apr 24, 2010 8:00 pm

chipv wrote:
cairnswk wrote:
There is also issues in this xml with (Alt+0223) ß
and ä (Alt+0228)
your program places a black diamond on the xml and then copies that as a ? into the xml code.


I am going to post a quick guide to XML special characters including my earlier post but you need to follow these instructions:

viewtopic.php?f=466&t=105494&start=75#p2422101



Thanks chipv. all cool now. no loss of special characters now. :)
Image
* Pearl Harbour * Waterloo * Forbidden City * Jamaica * Pot Mosbi
User avatar
Private cairnswk
 
Posts: 11510
Joined: Sat Feb 03, 2007 8:32 pm
Location: Australia

Re: UPDATED Map XML Wizard

Postby cairnswk on Sat Apr 24, 2010 9:23 pm

OK chipv.
Here are two images that i tried to centre in your tool which i swear i did successfully.

However, in the XML mapmakers checker the coordinates show up as being one pixel too high.

Is this an issue with your wizard?

I checked the xml Wizard page, and it looks to me as though there is a one pixel space between the image when loaded and the top of the white space. However, i don't know what is cotributing to this issue!

Image

Click image to enlarge.
image
Last edited by cairnswk on Sun Apr 25, 2010 12:04 am, edited 1 time in total.
Image
* Pearl Harbour * Waterloo * Forbidden City * Jamaica * Pot Mosbi
User avatar
Private cairnswk
 
Posts: 11510
Joined: Sat Feb 03, 2007 8:32 pm
Location: Australia

PreviousNext

Return to Tools & Guides

Who is online

Users browsing this forum: No registered users