Jump to content

Why some cities are so badly placed on the geoscape map?


Recommended Posts

The cities were added all in one go quite a while back so that terror missions had somewhere to attack.

I think they were placed with with expediency rather than accuracy in mind and I seem to recall Chris asking for people to report misplaced cities and if possible the correct co-ordinates.

The mask image that determines which missions spawn in a location is also not perfect but if there are any glaring problems with it then you can always post those up as well.

It might actually be easier to just look at the image in assets/earth/continentmasks to spot inconsistencies though rather than waiting for a ground mission in the proper location.

Link to comment
Share on other sites

For anyone interested in fixing coordinates or placing new cities:

- minimum coordinates are 0000,0000 (x/y)

- maximum are 8192,3415

- and x-coord 0000 is 180th meridian by the looks of it.

Got these numbers via some fiddling with 'cities.xml' where all city-related info is stored.

Also of note:

- x-coord can go further then 8192, but it cycles around, i.e. visually x8193=x0000

- there can be no cities with the same name even if it is different in 'cities.xml' but same in strings, game will use only last defined one

Edited by Lt_Parsons
typos
Link to comment
Share on other sites

Maybe the aliens dropped off some of their abduction victims before the bombardment?

For anyone interested in fixing coordinates or placing new cities:

- minimum coordinates are 0000,0000 (x/y)

- maximum are 8192,3415

- and x-coord 0000 is 180th meridian by the looks of it.

Got these numbers via some fiddling with 'cities.xml' where all city-related info is stored.

Also of note:

- x-coord can go further then 8192, but it cycles around, i.e. visually x8193=x0000

- there can be no cities with the same name even if it is different in 'cities.xml' but same in strings, game will use only last defined one

The co-ordinates of your cursor are also shown on the geoscape screen.

You could just point where you think it should go then write down the x,y values.

Link to comment
Share on other sites

The co-ordinates of your cursor are also shown on the geoscape screen.

You could just point where you think it should go then write down the x,y values.

... And i missed the most obvious thing. Thanks, i guess =)

Only thing i got slightly wrong then is that max_y is 3418.

Also, it looks that geoscape map uses this projection - http://en.wikipedia.org/wiki/Equirectangular_projection

Which means that we can with a few simple calculations just lift lat/long coords from Wikipedia and convert them to Xen geoscape numbers.

I'm curious how to automate these calculations now.

Edited by Lt_Parsons
Link to comment
Share on other sites

I did the thing - Xenonauts geographic coordinates converter

It can convert lat/long coordinates to geoscape x/y used in 'cities.xml'.

Tested it with locations of London, Edinburgh, Dublin, Wellington, Christchurch and Auckland - GB and NZ, two big isles on almost opposite sides of the globe.

And these cities landed up in 10 dots radius from their ingame x/y and it looks like they are where they should be, at least as i can tell with quick glance over google maps =)

So converter quite possibly works, i hope.

Now anyone willing to check up if their town haven't somehow been towed to another country by aliens can now do so.

Link to comment
Share on other sites

On the topic of cities, a very remote city in Northern Russia was getting bombed by aliens, it suffered 20,000 dead, the thing is, I looked it up and it only had a population of 5,000...

They bombed a secret Gulag of course. The aliens with their class based society dislike communism maybe?

Link to comment
Share on other sites

Maybe it took into account the alien dead as well?

Those Russians can be a feisty lot if you annoy them, say by bombing their vodka stores. ;)

I did the thing - Xenonauts geographic coordinates converter

It can convert lat/long coordinates to geoscape x/y used in 'cities.xml'.

Nice work, wish it had occurred to me to do that.

Got a little suggestion if you want to take it a step further though.

If you also had spaces for the city and country names (plus maybe a checkbox for zoom level it should appear at) you could output the information formatted for strings.xml and cities.xml so people could just paste up their cities to be easily added.

For cities.xml population is no longer used so the placeholder number can be hard coded.

Pop up distance has three possible values, 0.4 for the capitals, 0.5 for major cities, 0.6 for smaller cities.

Detail distance is always 0.7, although this also doesn't seem to be used any more.

*edit* Just ran a few cities through it myself and it looks to be pretty much spot on.

I tried cities as far north and south as I could along with a couple along the equator and they seemed accurate according to google maps.

Edited by Gauddlike
Link to comment
Share on other sites

Nice work, wish it had occurred to me to do that.

Got a little suggestion if you want to take it a step further though.

If you also had spaces for the city and country names (plus maybe a checkbox for zoom level it should appear at) you could output the information formatted for strings.xml and cities.xml so people could just paste up their cities to be easily added.

Thanks! Will try to do that a little later.

Right now it as much barebones as i could make - needed to be proven working after all.

OK so I have just sat down and ran through cities.xml changing the values to match those I found online.

A quick browse through seems to have them in proper positions.

http://www.filedropper.com/cities

And thanks for the complete file =)

Link to comment
Share on other sites

My concern is that some of the coastal cities may be slightly off the edge of the land masses in the continent masks.

The city positions are likely correct but the coast may have moved when the edges were tidied up in the same way some islands are missing.

I don't know if this could stop terror missions happening in some cases as the masks determine which terror mission tileset is used.

Only way to find out is testing though.

Link to comment
Share on other sites

I don't know if this could stop terror missions happening in some cases as the masks determine which terror mission tileset is used.

Terror mission tileset info is in 'aseets\earth\continentmasks\townmask.png', correct?

If so, i can just add one more conversion to pixel coords from mission/terrorsite masks.

Also, i'm feeling stupid again, because i looked on the geoscape map files and total size of the map in pixels is 8192x3420 - i could have easily saved an hour of work earlier =)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...