Merging maps (Cindini ++)

Got an idea for OpenTTD? Post it here!

Moderator: OpenTTD Developers

Post Reply
User avatar
Whopper
Engineer
Engineer
Posts: 115
Joined: 04 Mar 2007 15:14

Merging maps (Cindini ++)

Post by Whopper »

With the recent increase of max mapsize (4096 x 4096) I was wondering if it would be possible to merge smaller scenario's together to form a new one.
I'm working on the northern part of Cindini which I would very much like to merge with the southern Cindini (currently known as Cindini) and if possible I would like to add empty (water) strokes to shape the outlines of the map.

Both the Southern part and Northern part of Cindini are 2048 x 2048.

This would be the setup of the maps that would be merged:
Merging the map
Merging the map
map-merge.png (228.33 KiB) Viewed 521 times
If only the North and the South could be joined that would be a great start already.
Southern + Northern Cindini combined
Southern + Northern Cindini combined
cindini-large.png (183.49 KiB) Viewed 521 times
In the future I would love to upscale the map to 4096 x 4096 and make the outlines less squery:
Cindini in the future
Cindini in the future
cindini-future.png (233.08 KiB) Viewed 521 times
Really hope someone can help me out with this.
As a reward, Cinidni's highest peak will be named after you!
Image
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Merging maps (Cindini ++)

Post by planetmaker »

Whopper wrote:With the recent increase of max mapsize (4096 x 4096) I was wondering if it would be possible to merge smaller scenario's together to form a new one.
I'm working on the northern part of Cindini which I would very much like to merge with the southern Cindini (currently known as Cindini) and if possible I would like to add empty (water) strokes to shape the outlines of the map.
Merging of maps is not possible.

There's one crude way you might go for, but it still means a lot of extra work: export both maps as height maps. Use an image editor to merge those two height maps in the way you like. Then create a new scenario starting with that merged heightmap.
User avatar
Whopper
Engineer
Engineer
Posts: 115
Joined: 04 Mar 2007 15:14

Re: Merging maps (Cindini ++)

Post by Whopper »

planetmaker wrote:
Whopper wrote:With the recent increase of max mapsize (4096 x 4096) I was wondering if it would be possible to merge smaller scenario's together to form a new one.
I'm working on the northern part of Cindini which I would very much like to merge with the southern Cindini (currently known as Cindini) and if possible I would like to add empty (water) strokes to shape the outlines of the map.
Merging of maps is not possible.

There's one crude way you might go for, but it still means a lot of extra work: export both maps as height maps. Use an image editor to merge those two height maps in the way you like. Then create a new scenario starting with that merged heightmap.
I guess that means the cities won't come with it? Rebuilding those would be an impossible task ....
Image
Eddi
Tycoon
Tycoon
Posts: 8271
Joined: 17 Jan 2007 00:14

Re: Merging maps (Cindini ++)

Post by Eddi »

no, the cities won't go with it. you would need to do a lot of bitfiddling if you wanted to copy those over, with all the houses, etc. this would theoretically be possible, but you need some programming knowledge. either you edit the openttd code directly, or you make a game script that reads out the positions of towns and buildings, writes those through the admin port into a file, and a second script which reads the file through the admin port and tries to recreate the towns (placing buildings by script would probably need another source code patch). you might also be able to do savegame editing, but it would be really tricky to find the right places to edit

there is a proposal for a new scenario format (that nobody currently works on implementing), which would allow copying over of towns (but not their buildings, only the location and the general size, possibly also the road layout)
User avatar
Whopper
Engineer
Engineer
Posts: 115
Joined: 04 Mar 2007 15:14

Re: Merging maps (Cindini ++)

Post by Whopper »

How difficult would it be to just increase the size of the map and fill the empty space with empty water?
Image
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: Merging maps (Cindini ++)

Post by Alberth »

About as difficult as writing an exporter and importer for scenarios from/into OpenTTD.
This project is also known as "the new scenario format".
Currently, only a first spec exists: https://wiki.openttd.org/Terkhen/Scenario_format
Being a retired OpenTTD developer does not mean I know what I am doing.
Eddi
Tycoon
Tycoon
Posts: 8271
Joined: 17 Jan 2007 00:14

Re: Merging maps (Cindini ++)

Post by Eddi »

Whopper wrote:How difficult would it be to just increase the size of the map and fill the empty space with empty water?
difficult. because it doesn't suffice to put a chunk of empty data at the end of the map storage, but you have to shuffle around the existing data, putting empty chunks inbetween existing chunks, to make sure that tiles that were next to each other before the expansion are still next to each other afterwards. and then you have to go through all places that directly reference map coordinates (like towns, signs, whatever) so they match the new location.
User avatar
adf88
Chief Executive
Chief Executive
Posts: 644
Joined: 14 Jan 2008 15:51
Location: PL

Re: Merging maps (Cindini ++)

Post by adf88 »

Eddi wrote:difficult. because it doesn't suffice to put a chunk of empty data at the end of the map storage, but you have to shuffle around the existing data, putting empty chunks inbetween existing chunks, to make sure that tiles that were next to each other before the expansion are still next to each other afterwards. and then you have to go through all places that directly reference map coordinates (like towns, signs, whatever) so they match the new location.
Theoretically you could add some water on the SE border of the map without invalidating tile indices. But still, there could be some places where stored information is related to the size of the map and you would need to update this information. I can't give a direct example but imagine that some rectangle of tiles was cut at map borders and stored this way, since there is no border here any more the rectangle would have to be re-extended... This kind of information is usually not stored inside a savegame file but recomputed during loading a savegame (various caches) so there is a chance that extending a map toward SE direction won't break the game.
:] don't worry, be happy and checkout my patches
User avatar
kamnet
Moderator
Moderator
Posts: 8586
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: Merging maps (Cindini ++)

Post by kamnet »

Perhaps with all the new features that OpenTTD incorporates that it's time to leave Cindini 3 behind and recreate it from scratch? Rivers and increased height levels represent new challenges and opportunities.
User avatar
Whopper
Engineer
Engineer
Posts: 115
Joined: 04 Mar 2007 15:14

Re: Merging maps (Cindini ++)

Post by Whopper »

Thanks for the explanation guys!
I think I'll finnish up my last WIP on the Cindini map with higher mountains and after that start a new map.

What would be really helpfull would be an option to custom place buildings in towns. Cindini was made entirely with deleting and expanding cities, quite a monkish work....
Frostregen made a patch for 0.7 once: viewtopic.php?f=32&t=35468&start=20 but that's a really old version of the game / editor.

I don't think he's still around, do you guys know anyone else who did a simular project?
Image
User avatar
adf88
Chief Executive
Chief Executive
Posts: 644
Joined: 14 Jan 2008 15:51
Location: PL

Re: Merging maps (Cindini ++)

Post by adf88 »

:] don't worry, be happy and checkout my patches
oberhümer
Tycoon
Tycoon
Posts: 1283
Joined: 23 Oct 2009 19:35
Location: Here and there, sometime or another

Re: Merging maps (Cindini ++)

Post by oberhümer »

Compiled this, applied to r27356. The MinGW version doesn't have LZO2 or ICU because of cross-compiling issues.
Attachments
bundle_mingw32_noicu_nolzo.7z
(5.14 MiB) Downloaded 79 times
bundle_linux64.7z
(4.44 MiB) Downloaded 70 times
--- Licenses: GNU LGPL, version 2 or newer, code and graphics. CC-By-SA, graphics, alternatively. If you're using any, I'd like to hear about it --- Call them "track types" ---
--- Mostly inactive developer for: NuTracks - Central European Train Set --- Running/compiling for: Linux (x86) - Android - Windows (32/64 bit) ---

--- Need a file packer? 7-Zip --- BOINC - use your computing power to benefit science --- Block trackers, not ads --- Unix in dispersible pellets, the formula for the future. ---
User avatar
Whopper
Engineer
Engineer
Posts: 115
Joined: 04 Mar 2007 15:14

Re: Merging maps (Cindini ++)

Post by Whopper »

Great, thanx a lot Oberhumer & adf88! :D

If I could make a very bold request.... How hard would it be to make placing buildings more flexible? I can't start a really ambitious town from scratch now, I need to expand it house by house before I can edit and alter it bit for bit.
I can imagine it will be harder to figure out in that case to determine to which city the building should belong. In frostregen's patch he solved this by letting you select a city first (pick a building from that city) before you could place the buildings.

And I wouldn't really mind if it was possible to place buildings from other landscape (tropical / sub-artcitc / temperate).... :mrgreen:
Image
Eddi
Tycoon
Tycoon
Posts: 8271
Joined: 17 Jan 2007 00:14

Re: Merging maps (Cindini ++)

Post by Eddi »

Whopper wrote:And I wouldn't really mind if it was possible to place buildings from other landscape (tropical / sub-artcitc / temperate).... :mrgreen:
Just use a NewGRF.
User avatar
romazoon
Tycoon
Tycoon
Posts: 1291
Joined: 20 Jun 2010 23:16

Re: Merging maps (Cindini ++)

Post by romazoon »

Eddi wrote:Just use a NewGRF.
Or more than one ! (to have a pletorous choice of building style)
User avatar
Whopper
Engineer
Engineer
Posts: 115
Joined: 04 Mar 2007 15:14

Re: Merging maps (Cindini ++)

Post by Whopper »

romazoon wrote:
Eddi wrote:Just use a NewGRF.
Or more than one ! (to have a pletorous choice of building style)
Which NewGRF do you recommend Romazoon?
Image
User avatar
romazoon
Tycoon
Tycoon
Posts: 1291
Joined: 20 Jun 2010 23:16

Re: Merging maps (Cindini ++)

Post by romazoon »

i would recommand the latest version of those :

the swedish set (old and modern era buildings, snow aware, no big skycrapper, but there is IKEA !)

the japanese set (old wooden houses and buildings pre 1900, snow aware, and some very nice parameters are available to make sure no skycrapper get built in some "cities" unless player destroy "the shrine" (a small building looking like a temple built automatically when town are funded). This skycrapper prohibition is only active for the japanese buildings of course, other newgrf remain unaffected.

TAI -> Town and Industry UK house ( Low density buildings, great for making village, or cities with not a huge amount of passengers, it features also different size limit for towns and cities depending on the dates, but that would be overiden if you mix some other newgrf set with TAI). (the only thing though is that buildings are not snow aware)

Uk town set, if you want even more OGFX and UK stylish building


ECS House (giving some nice buildings : Hotels, Post Office, Tribunal)


Also you will probably want to allow (per parameter from some of the house set) the original buildings, if you want to mix them with the newgrf sets ( otherwise the orginal building willl remain locked)


And given the way you build towns, you should also give a look to some of the Newgrf objects : "City object" by flogeza, gives some nice big building, VAST will gives you a lots of park/path tiles, the beach new objects , and many others ( marico, ISR/DWE newobjects, infra green, etc ).

Hope you ll find some to your likings ;)

Edit :I forgot to mention the polish building set wich is nice too ( and i probably forgot more nice newgrf set)
User avatar
kamnet
Moderator
Moderator
Posts: 8586
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: Merging maps (Cindini ++)

Post by kamnet »

The big issue with that is that many sets are only coded to provide buildings in temperate. Cindini is based in tropical, so this makes it a little more difficult. Still, somebody could easily, at the very least, take OpenGFX's buildings and recode them for all climates in a NewGRF.
User avatar
Whopper
Engineer
Engineer
Posts: 115
Joined: 04 Mar 2007 15:14

Re: Merging maps (Cindini ++)

Post by Whopper »

romazoon wrote:i would recommand the latest version of those :

the swedish set (old and modern era buildings, snow aware, no big skycrapper, but there is IKEA !)

the japanese set (old wooden houses and buildings pre 1900, snow aware, and some very nice parameters are available to make sure no skycrapper get built in some "cities" unless player destroy "the shrine" (a small building looking like a temple built automatically when town are funded). This skycrapper prohibition is only active for the japanese buildings of course, other newgrf remain unaffected.

TAI -> Town and Industry UK house ( Low density buildings, great for making village, or cities with not a huge amount of passengers, it features also different size limit for towns and cities depending on the dates, but that would be overiden if you mix some other newgrf set with TAI). (the only thing though is that buildings are not snow aware)

Uk town set, if you want even more OGFX and UK stylish building


ECS House (giving some nice buildings : Hotels, Post Office, Tribunal)


Also you will probably want to allow (per parameter from some of the house set) the original buildings, if you want to mix them with the newgrf sets ( otherwise the orginal building willl remain locked)


And given the way you build towns, you should also give a look to some of the Newgrf objects : "City object" by flogeza, gives some nice big building, VAST will gives you a lots of park/path tiles, the beach new objects , and many others ( marico, ISR/DWE newobjects, infra green, etc ).

Hope you ll find some to your likings ;)

Edit :I forgot to mention the polish building set wich is nice too ( and i probably forgot more nice newgrf set)
Thanx Romazoon, I'll give it a go!
How does it work for people that want to download the map in bananas? Will the right packages be installed automatically or are they included in the download? (srry ... pretty new to newgrf )
Image
Eddi
Tycoon
Tycoon
Posts: 8271
Joined: 17 Jan 2007 00:14

Re: Merging maps (Cindini ++)

Post by Eddi »

you can set the NewGRFs as dependency to your scenario, then they will automatically be downloaded, and also, on the start scenario screen, the player can download missing NewGRFs easily.
Post Reply

Return to “OpenTTD Suggestions”

Who is online

Users browsing this forum: No registered users and 8 guests