Jump to content
Nibelung44

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

Recommended Posts

I mean Paris in Germany, Cairo in the desert, etc. Come on people, you can do better with geography, even if you hated it at school :P

Seriously, Paris almost a thousand kms off seems rather weird to me.

Share this post


Link to post
Share on other sites

Yeah, it's prob not a good idea to put Frenchies in Germany. They'd be beating each other with bratwurst and crosissants

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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

Share this post


Link to post
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...

Share this post


Link to post
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 must have had family visiting from out of town.

Share this post


Link to post
Share on other sites

Bomber's are coded with a static value that they kill per attack, whether it's Middle of Nowhere Kansas, or NYC.

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites
Maybe the aliens dropped off some of their abduction victims before the bombardment?

So they drop live people onto the targets before bombing them?! The fiends!!! D:<

Share this post


Link to post
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.

Share this post


Link to post
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?

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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

If anyone wants to use the modified version just drop it into the assets folder.

Share this post


Link to post
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 =)

Share this post


Link to post
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.

Share this post


Link to post
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 =)

Share this post


Link to post
Share on other sites

Very nice.

Some options in there I hadn't even considered.

The tileset mask coordinates should make life easier for anyone wanting to add their own city and specify the proper tileset.

Good work.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×