Conquer Club

XML Questions

Topics that are not maps. Discuss general map making concepts, techniques, contests, etc, here.

Moderator: Cartographers

Forum rules
Please read the Community Guidelines before posting.

XML Questions

Postby e_i_pi on Tue May 26, 2009 6:04 am

Do the continents have to be in alphabetical order?

Do the territories have to be in alphabetical order?

Where are the co-ordinates measured from? Top left, or centre centre?
User avatar
Captain e_i_pi
 
Posts: 1775
Joined: Tue Feb 12, 2008 2:19 pm
Location: Corruption Capital of the world

Re: XML Questions

Postby MrBenn on Tue May 26, 2009 6:23 am

Q. Do the continents have to be in alphabetical order?
A. No

Q. Do the territories have to be in alphabetical order?
A. No

Q. Where are the co-ordinates measured from? Top left, or centre centre?
A. The top-left is 0,0 - although I seem to recall that there is a bit of a miscellaneous offset. I'm not entirely sure which part of the '88' the coordinate refers to either :-k
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: XML Questions

Postby yeti_c on Tue May 26, 2009 6:51 am

BTW :

Any continent that uses a sub continent can only be defined AFTER (i.e. below) it's child element.

RE: Ordering of territories I like alphabetical - however - I tend to order based on top left first - running right then down... and group by continent.

C.
Image
Highest score : 2297
User avatar
Lieutenant yeti_c
 
Posts: 9624
Joined: Thu Jan 04, 2007 9:02 am

Re: XML Questions

Postby TaCktiX on Tue May 26, 2009 6:55 am

The coordinate refers to the exact center location of the 88. So if you've got a set of 88's handy and pick out the center, that's where the coordinate should go. At least, that's what I figured when I did The Citadel's XML using Jota's Map Assistant (the map already had 88's on it).
User avatar
Corporal 1st Class TaCktiX
 
Posts: 2392
Joined: Mon Dec 17, 2007 8:24 pm
Location: Rapid City, SD

Re: XML Questions

Postby e_i_pi on Tue May 26, 2009 7:09 am

Cheers guys. I'll endeavour to get the XML done over the next week, but unfortunately I don't have PS at work, and afaik, I can't easily find coordinate values using MS Paint or Photo/Fax Viewer


EDIT: I'll just write some JavaScript that calls clientX and clientY, problem solved :P
User avatar
Captain e_i_pi
 
Posts: 1775
Joined: Tue Feb 12, 2008 2:19 pm
Location: Corruption Capital of the world

Re: XML Questions

Postby MrBenn on Tue May 26, 2009 7:16 am

e_i_pi wrote:Cheers guys. I'll endeavour to get the XML done over the next week, but unfortunately I don't have PS at work, and afaik, I can't easily find coordinate values using MS Paint or Photo/Fax Viewer


EDIT: I'll just write some JavaScript that calls clientX and clientY, problem solved :P

Jota's map assistant is great for sorting the coordinates, and if you're using a PC, then you can use my 88 cursor for perfect centring first time ;-)

Links for both should be in the MapMaking tools topic.
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: XML Questions

Postby chipv on Tue May 26, 2009 7:16 am

e_i_pi wrote:Cheers guys. I'll endeavour to get the XML done over the next week, but unfortunately I don't have PS at work, and afaik, I can't easily find coordinate values using MS Paint or Photo/Fax Viewer


EDIT: I'll just write some JavaScript that calls clientX and clientY, problem solved :P


Just to help avoid a headache, you will still need to apply an offset:

viewtopic.php?f=127&t=74525&start=0&hilit=offset
User avatar
Major chipv
Head Tech
Head Tech
 
Posts: 2816
Joined: Mon Apr 28, 2008 5:30 pm

Re: XML Questions

Postby e_i_pi on Tue May 26, 2009 7:35 am

Code required for the webpage to do co-ords, in case anyone is in a situation like mine where you can't install software at work, but you have access to your own site... yes, I lead a complicated life...

Code: Select all
<html>
<head>
<script type="text/javascript">
var xoffset=0;
var yoffset=0;

function show_coords(event)
{
  x=event.clientX - xoffset;
  y=event.clientY - yoffset;
  document.getElementById("xc").innerHTML = 'X: ';
  document.getElementById("xc").innerHTML += x;
  document.getElementById("yc").innerHTML = 'Y: ';
  document.getElementById("yc").innerHTML += y;
}

function setzero(event)
{
  xoffset=event.clientX;
  yoffset=event.clientY;
}
</script>
</head>

<body onmousemove="show_coords(event)" onmousedown="setzero(event);">

<img src="http://www.mysite.com/myimage.jpg" /><br />

<span id="xc">X</span><br />
<span id="yc">Y</span><br />
<p>Click on the top left pixel of the image in order to centre your (0,0) co-ordinate there</p>

</body>
</html>
User avatar
Captain e_i_pi
 
Posts: 1775
Joined: Tue Feb 12, 2008 2:19 pm
Location: Corruption Capital of the world

Re: XML Questions

Postby MrBenn on Tue May 26, 2009 7:46 am

Nice job. You'll probably still have to tweak the army coordinates a little (1-2px shuffles are fairly common). Did you definitely take the offset into consideration?
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: XML Questions

Postby e_i_pi on Tue May 26, 2009 7:49 am

MrBenn wrote:Nice job. You'll probably still have to tweak the army coordinates a little (1-2px shuffles are fairly common). Did you definitely take the offset into consideration?

Nope, I definitely didn't take it into consideration, I coudln't find it in that thread... it was long and I have like 10 minutes before I finish work :lol:
User avatar
Captain e_i_pi
 
Posts: 1775
Joined: Tue Feb 12, 2008 2:19 pm
Location: Corruption Capital of the world

Re: XML Questions

Postby MrBenn on Tue May 26, 2009 7:50 am

Wait until you're home and download Jota's Map Assistant and my 88 cursor - It'll save plenty of time ;-)
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: XML Questions

Postby e_i_pi on Tue May 26, 2009 7:52 am

MrBenn wrote:Wait until you're home and download Jota's Map Assistant and my 88 cursor - It'll save plenty of time ;-)

Kind of defeats the purpose - I can do it at home anyway with PS, I need something to do it at work with :P
User avatar
Captain e_i_pi
 
Posts: 1775
Joined: Tue Feb 12, 2008 2:19 pm
Location: Corruption Capital of the world

Re: XML Questions

Postby chipv on Tue May 26, 2009 7:54 am

e_i_pi wrote:
MrBenn wrote:Nice job. You'll probably still have to tweak the army coordinates a little (1-2px shuffles are fairly common). Did you definitely take the offset into consideration?

Nope, I definitely didn't take it into consideration, I coudln't find it in that thread... it was long and I have like 10 minutes before I finish work :lol:


viewtopic.php?f=127&t=74525&hilit=offset&start=15#p1789760

Your code is Firefox-specific, but not really a big deal, it's all good!
User avatar
Major chipv
Head Tech
Head Tech
 
Posts: 2816
Joined: Mon Apr 28, 2008 5:30 pm

Re: XML Questions

Postby oaktown on Tue May 26, 2009 8:23 am

e_i_pi wrote:
MrBenn wrote:Wait until you're home and download Jota's Map Assistant and my 88 cursor - It'll save plenty of time ;-)

Kind of defeats the purpose - I can do it at home anyway with PS, I need something to do it at work with :P

If you're doing the coordinates in photoshop, the shift is +22 pixels for Y coordinates and -4 for X. And don't ask why - nobody has ever figured that out. ;)
Image
User avatar
Captain oaktown
 
Posts: 4451
Joined: Sun Dec 03, 2006 9:24 pm
Location: majorcommand

Re: XML Questions

Postby e_i_pi on Tue May 26, 2009 8:29 am

chipv wrote:
e_i_pi wrote:
MrBenn wrote:Nice job. You'll probably still have to tweak the army coordinates a little (1-2px shuffles are fairly common). Did you definitely take the offset into consideration?

Nope, I definitely didn't take it into consideration, I coudln't find it in that thread... it was long and I have like 10 minutes before I finish work :lol:


viewtopic.php?f=127&t=74525&hilit=offset&start=15#p1789760

Your code is Firefox-specific, but not really a big deal, it's all good!

I was checking it in IE, that's all we have at work. Government employers don't trust the wily Firefox it seems hehe
User avatar
Captain e_i_pi
 
Posts: 1775
Joined: Tue Feb 12, 2008 2:19 pm
Location: Corruption Capital of the world

Re: XML Questions

Postby chipv on Tue May 26, 2009 8:49 am

e_i_pi wrote:I was checking it in IE, that's all we have at work. Government employers don't trust the wily Firefox it seems hehe


Hehe same everywhere I think, I launch Firefox when no-one else is looking... except other Firefox subversives... which is just about everyone. So anyway when you get offsets use those numbers to compensate.
User avatar
Major chipv
Head Tech
Head Tech
 
Posts: 2816
Joined: Mon Apr 28, 2008 5:30 pm


Return to Foundry Discussions

Who is online

Users browsing this forum: No registered users