Page 4 of 8

Re: NEW Map XML Wizard

Posted: Mon Jan 25, 2010 7:24 pm
by natty dread
the.killing.44 wrote:
natty_dread wrote:Oh, and another small thing: when territory or continent names have non-standard characters, like ä, ö and such, that require to be coded with &-codes in the XML, they are not however... They appear in the XML as they are. Could it be made so that they automatically get encoded into those &xxx codes?

(also when you load an XML file, and it has special characters, they show up as those weird blocks with hex numbers in the XML wizard).

They don't need to be &xxx codes.


Really? Didn't they used to need to be, though?

If that's the case however, then disregard this suggestion - except the part that when reloading an XML file the characters are shown wrong in the wizard.

Re: NEW Map XML Wizard

Posted: Mon Jan 25, 2010 7:45 pm
by the.killing.44
natty_dread wrote:
the.killing.44 wrote:
natty_dread wrote:Oh, and another small thing: when territory or continent names have non-standard characters, like ä, ö and such, that require to be coded with &-codes in the XML, they are not however... They appear in the XML as they are. Could it be made so that they automatically get encoded into those &xxx codes?

(also when you load an XML file, and it has special characters, they show up as those weird blocks with hex numbers in the XML wizard).

They don't need to be &xxx codes.


Really? Didn't they used to need to be, though?

If that's the case however, then disregard this suggestion - except the part that when reloading an XML file the characters are shown wrong in the wizard.

Nah, going back to Berlin 1961 and Iceland, the XML's show ø, ü, ß, etc.

Re: NEW Map XML Wizard

Posted: Tue Jan 26, 2010 3:22 am
by chipv
cairnswk wrote:I haven't read the thread, so please forgive.

Would it be possible to use the bottom frame of the page to generate the xml, so that we can see each step as we add it, to know what we have done is correct.
For me, without this is, it's like writing in the dark. i like to be able to see what is being generated automatically.
Also, for the text that is generated, there are no indents. Is this possible to add?



Not much room to play with on big maps but I do have a solution for you, maybe do it this evening.

Re: NEW Map XML Wizard

Posted: Tue Jan 26, 2010 4:55 am
by natty dread
the.killing.44 wrote:Nah, going back to Berlin 1961 and Iceland, the XML's show ø, ü, ß, etc.


Doesn't work on my xml.

Re: NEW Map XML Wizard

Posted: Tue Jan 26, 2010 9:08 am
by ender516
natty_dread wrote:
the.killing.44 wrote:Nah, going back to Berlin 1961 and Iceland, the XML's show ø, ü, ß, etc.


Doesn't work on my xml.

I wonder if adding the encoding="UTF-8" information to the first line of the XML would help things? It's used by the Greenland XML, which doesn't use the & codes, and not used by the Wales XML, which does. Since the site has gone to this encoding, it seems like a good standard to apply.

Re: NEW Map XML Wizard

Posted: Tue Jan 26, 2010 2:14 pm
by yeti_c
the.killing.44 wrote:Nah, going back to Berlin 1961 and Iceland, the XML's show ø, ü, ß, etc.


You need to load your XML in a text editor - and not a browser?!

C.

Re: NEW Map XML Wizard

Posted: Tue Jan 26, 2010 4:34 pm
by the.killing.44
yeti_c wrote:
the.killing.44 wrote:Nah, going back to Berlin 1961 and Iceland, the XML's show ø, ü, ß, etc.


You need to load your XML in a text editor - and not a browser?!

C.

Well I wrote the thing using ø's, soooo…

ender has a very good point—I think that's the source of it. UTF-8 is the thing that recognizes special characters.

Re: NEW Map XML Wizard

Posted: Tue Jan 26, 2010 5:07 pm
by chipv
natty_dread wrote:
the.killing.44 wrote:Nah, going back to Berlin 1961 and Iceland, the XML's show ø, ü, ß, etc.


Doesn't work on my xml.


I have corrected your xml and uploaded it for you

http://www.fileden.com/files/2008/5/8/1902058/natty.xml

The old system used HTML special & characters but much easier is the current method.

You have to do 2 things:

1. Specify UTF-8 character set (see your XML source) but this is not enough

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>

2. You actually have to SAVE your XML as UTF-8 (you can do this in notepad by using Save As) otherwise it's in the wrong format.

If you view your XML, and it has the right encoding, but garbage characters then it's probably saved in the wrong format.

The Wizard shows Greenland, Iceland, your new XML whatever correctly.

Re: NEW Map XML Wizard

Posted: Tue Jan 26, 2010 7:00 pm
by ender516
Would it make sense for the Wizard to put in the encoding="UTF-8" on new XML it creates? Right now, I think it does not. (Maybe there should be a button, or a place to type in the encoding you want to use.)

Re: NEW Map XML Wizard

Posted: Tue Jan 26, 2010 7:05 pm
by chipv
ender516 wrote:Would it make sense for the Wizard to put in the encoding="UTF-8" on new XML it creates? Right now, I think it does not. (Maybe there should be a button, or a place to type in the encoding you want to use.)


Yes, I am doing that , but people have to save it in the right format for it to display correctly after load as described above.

I suspect lack goes ahead and does this step anyway, I'll ask him.

Re: NEW Map XML Wizard

Posted: Tue Jan 26, 2010 7:45 pm
by chipv
cairnswk wrote:You have the window divided into two sections now....left fo map and right for input.

Would it be possible to use the bottom frame of the page to generate the xml, so that we can see each step as we add it, to know what we have done is correct.
For me, without this is, it's like writing in the dark. i like to be able to see what is being generated automatically.
Also, for the text that is generated, there are no indents. Is this possible to add?



Text indents will definitely be added.
You can click on Show XML button anytime to see what you've done.
Problem with always displaying the xml is that it would have to be recalculated on any user event on the screen
which will probably slow everything down somewhat. I was considering adding a tab but then thought maybe clicking on
Show XML is ok since it can be clicked anytime?

If not, I will have to see how the recalcs slow events down.

Re: NEW Map XML Wizard

Posted: Thu Jan 28, 2010 4:43 pm
by chipv
XML is now indented. Also empty tags are automatically stripped (as it will fail the XML check)

Re: NEW Map XML Wizard

Posted: Tue Feb 02, 2010 4:22 pm
by chipv
Two useful additions:

Official CC schema check added

Validation is exactly the same as the CC validation. If your XML passes this check, it will pass the Final Forge check.

Local Files

You can load local files now. Same validation is done and the XML is auto loaded.

Re: NEW Map XML Wizard

Posted: Tue Feb 02, 2010 5:07 pm
by natty dread
chipv wrote:Local Files

You can load local files now. Same validation is done and the XML is auto loaded.


That's great. It would go well with an option of downloading the XML straight to your harddrive. It would save the trouble of copying the XML to a text editor and saving it...

Re: UPDATED Map XML Wizard

Posted: Fri Feb 05, 2010 8:18 pm
by chipv
Just fixed a problem in IE, but also makes other browsers smoother for local file load.

Re: UPDATED Map XML Wizard

Posted: Tue Mar 02, 2010 5:07 pm
by chipv
New feature.

Army Numbers added.

When playing a game, instead of the coloured 88s you now get the real army numbers instead.

This now looks exactly like the CC game.
Thanks to lackattack for providing me with the dropshadow code - that now makes the Wizard armies look the same as CC's.

So far I have implemented killer neutrals and autodeploys (the army numbers change automatically as in the game).
Use this to see exactly what the initial drop will look like in terms of numbers of armies.

Starting positions and everything is calculated as you would expect and Map Inspect reflects the number of armies on that territory too.

Re: UPDATED Map XML Wizard

Posted: Tue Mar 02, 2010 5:46 pm
by natty dread
Nice! I'll have to try that out...

Re: UPDATED Map XML Wizard

Posted: Wed Mar 10, 2010 12:16 pm
by natty dread
Not sure if this has been reported, but the coordinates (the 88:s) seem to be in different positions when red or white. When they're red they're 1 pixel to the left, when white they move 1 pixel to the right...

Re: UPDATED Map XML Wizard

Posted: Wed Mar 10, 2010 12:23 pm
by chipv
natty_dread wrote:Not sure if this has been reported, but the coordinates (the 88:s) seem to be in different positions when red or white. When they're red they're 1 pixel to the left, when white they move 1 pixel to the right...


Dead easy to fix.

Can you let me know by colour what the pixel offsets are please?

(e.g. Red incorrect 1px to left)

Re: UPDATED Map XML Wizard

Posted: Wed Mar 10, 2010 1:35 pm
by natty dread
Well, the red 88 seems to be in correct position actually.

White 88 is one to the right.

The coloured 3:s seem to be one pixel up.

Re: UPDATED Map XML Wizard

Posted: Wed Mar 10, 2010 1:37 pm
by natty dread
Also I seem to have problems loading my XML file to the wizard...

here's my XML:

http://www.fileden.com/files/2010/2/7/2 ... _xml_1.xml


edit: never mind I think I found the problem... & signs

Re: UPDATED Map XML Wizard

Posted: Wed Mar 10, 2010 1:52 pm
by natty dread
Actually... it seems to be the other way around, the coloured 3:s are in the right position, while red and white numbers are 1 pixel too low... sorry ;)

Re: UPDATED Map XML Wizard

Posted: Wed Mar 10, 2010 5:48 pm
by OliverFA
You are a Master, Sir. Thanks so much for your good job! :)

Re: UPDATED Map XML Wizard

Posted: Fri Mar 26, 2010 11:41 am
by natty dread
Why isn't this thread stickied?

Re: UPDATED Map XML Wizard

Posted: Thu Apr 01, 2010 12:40 pm
by Evil DIMwit
On top of what's been said already, i just got a warning that said "Warning: Territory A attacks Territory B but not vice vera." Should be "vice versa."