Reproducible map generation

OpenTTD is a fully open-sourced reimplementation of TTD, written in C++, boasting improved gameplay and many new features.

Moderator: OpenTTD Developers

User avatar
aDe
Engineer
Engineer
Posts: 66
Joined: 07 Jan 2003 15:59
Skype: ade.se
Location: SE
Contact:

Re: Reproducible map generation

Post by aDe »

Oh right, I guess there's not an easy way to do that right now. I could add support for it in my town tool though, just have to do some math and rotate the points.

User avatar
Ben1338
Traffic Manager
Traffic Manager
Posts: 165
Joined: 17 Nov 2007 17:23
Skype: ben313371

Re: Reproducible map generation

Post by Ben1338 »

What would be your guide on how to use this tool for map generation without any special tools?

User avatar
aDe
Engineer
Engineer
Posts: 66
Joined: 07 Jan 2003 15:59
Skype: ade.se
Location: SE
Contact:

Re: Reproducible map generation

Post by aDe »

Ben1338 wrote:What would be your guide on how to use this tool for map generation without any special tools?
I wish I could give you one but I don't really know of any easy way, but check this thread if you have not already:
viewtopic.php?f=29&t=69007

User avatar
Ben1338
Traffic Manager
Traffic Manager
Posts: 165
Joined: 17 Nov 2007 17:23
Skype: ben313371

Re: Reproducible map generation

Post by Ben1338 »

Yeah, thanks for the link, but I can't seem to be able to obtain MICRODEM, are there alternate programs?

User avatar
aDe
Engineer
Engineer
Posts: 66
Joined: 07 Jan 2003 15:59
Skype: ade.se
Location: SE
Contact:

Re: Reproducible map generation

Post by aDe »

I don't know, I used MicroDEM. There are others I'm pretty sure. It's available here: https://www.usna.edu/Users/oceano/pguth ... emdown.htm

Or can you not use that version?

User avatar
aDe
Engineer
Engineer
Posts: 66
Joined: 07 Jan 2003 15:59
Skype: ade.se
Location: SE
Contact:

Re: Reproducible map generation

Post by aDe »

I've been thinking about making an open-ttd specific tool to create heightmaps from any given coordinates, I found some software the other day that could download and convert data to bitmaps so I'd just need to adjust it slightly to output the right format. Then if I could wrap it in a web service it would be truly useful...

User avatar
aDe
Engineer
Engineer
Posts: 66
Joined: 07 Jan 2003 15:59
Skype: ade.se
Location: SE
Contact:

Re: Reproducible map generation

Post by aDe »


User avatar
Ben1338
Traffic Manager
Traffic Manager
Posts: 165
Joined: 17 Nov 2007 17:23
Skype: ben313371

Re: Reproducible map generation

Post by Ben1338 »

Hey, sorry about the lack of replies, It's just IRl stuff is hectic.

I don't think I can use MicroDEM has I feel it's incompatible with my version of windows. It does run, but it's packed full of errors and bugs which makes it unusable on my computer.

As for the computer to create heightmaps, it's not really a bad idea, but it should also work with fictional heightmaps too like the Isle of Sodor.

As for that map, that's a pretty neat way to quickly obtain realistic heightmaps which would actually work REALLY WELL on OTTD, it's a shame that it doesn't have boundaries.

User avatar
Quast65
Tycoon
Tycoon
Posts: 1684
Joined: 09 Oct 2011 13:51
Location: The Netherlands

Re: Reproducible map generation

Post by Quast65 »

Hiya!
Is it also possible to extract towninformation (name & location on map) from a scenario?
Projects: http://www.tt-forums.net/viewtopic.php?f=26&t=57266
Screenshots: http://www.tt-forums.net/viewtopic.php?f=47&t=56959

Winner of the following screenshot competitions:
sep 2012, jan 2013, apr 2013, aug 2013, mar 2014, mar 2016
All my work is released under GPL-license (either V2 or V3), if not clearly stated otherwise.

McZapkie
Tycoon
Tycoon
Posts: 1182
Joined: 18 Jan 2014 18:10

Re: Reproducible map generation

Post by McZapkie »

Quast65 wrote:Hiya!
Is it also possible to extract towninformation (name & location on map) from a scenario?
Sorry, this option is not yet implemented, only import.

User avatar
Quast65
Tycoon
Tycoon
Posts: 1684
Joined: 09 Oct 2011 13:51
Location: The Netherlands

Re: Reproducible map generation

Post by Quast65 »

Too bad.... Have to extract that information by hand then...
Handy tool by the way to import that data!! :bow:
Projects: http://www.tt-forums.net/viewtopic.php?f=26&t=57266
Screenshots: http://www.tt-forums.net/viewtopic.php?f=47&t=56959

Winner of the following screenshot competitions:
sep 2012, jan 2013, apr 2013, aug 2013, mar 2014, mar 2016
All my work is released under GPL-license (either V2 or V3), if not clearly stated otherwise.

J R
Engineer
Engineer
Posts: 5
Joined: 07 Jul 2013 00:00

Re: Reproducible map generation

Post by J R »

Could you recompile using version 1.7.0 or later as a base so that FIRS 3 could be included when importing data into a scenario? It is only possible to create scenarios that include FIRS 2 using the compiled game that you have saved (OpenTTD v1.5.1).

Thanks,
JR
JR

"You can have ANY THING you want, but you can't have EVERY THING.
Choose carefully." Anonymous

McZapkie
Tycoon
Tycoon
Posts: 1182
Joined: 18 Jan 2014 18:10

Re: Reproducible map generation

Post by McZapkie »

J R wrote:Could you recompile using version 1.7.0 or later ...
JR
Sorry, currently I have no Windows neither Window compiler. I can provide linux binaries if you want.
My experimental openTTD server: 149.156.194.203:3979 non-standard client, now testing: JGRPP http://tiny.pl/ggnch
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, preindustrial houses, wired, ECS industry extension, V4 CEE train set.
Addicted to freeciv longturn.

ian9113
Engineer
Engineer
Posts: 5
Joined: 24 Feb 2017 18:27

Re: Reproducible map generation

Post by ian9113 »

Hey all, not sure if this is too late or anyone can help me out, but I'm having problems getting the import_land command to work. I'm using the compiled version posted earlier. I have a .txt file in the game's scenario directory, but no matter where I put the file, the command returns a "could not open file" error. Any help? I've attached the txt file for reference. Thanks!

Edit: Also realized the water tiles are in TTD coordinates, not lat/long. After deleting the water and just trying to import the towns, I still had the same result..
Attachments
chicago.txt
(1.6 MiB) Downloaded 57 times

McZapkie
Tycoon
Tycoon
Posts: 1182
Joined: 18 Jan 2014 18:10

Re: Reproducible map generation

Post by McZapkie »

Maybe it is issue with localization? Check decimal and separator symbol on your system.

ian9113
Engineer
Engineer
Posts: 5
Joined: 24 Feb 2017 18:27

Re: Reproducible map generation

Post by ian9113 »

Hmm, I'm unable to get it to open any file, even some of those posted here.. maybe it's because the compiled version is windows 32, and I run 64?

speeder
Engineer
Engineer
Posts: 25
Joined: 16 Jul 2014 05:57

Re: Reproducible map generation

Post by speeder »

I am trying to use this but found a rather annoying error...

if I export a in-game heightmap, select my riverbed in a image editor, and use that on Ade website to create a river txt file, the end result does NOT fit inside the riverbed, seemly the coordinates are all 1 or 2 tiles off.

EDIT: made a simple test, added to my file, the following three lines:

,W,1,-1,-2,0
,W,1,-5,-5,0
,W,1,-11,-11,0

instead of creating 3 tiles, it created 3 squares that are 2x2 in size.

EDIT 2: so, figured out the "1" create 2x2 lakes, so I instead started testing using single-tile mode, that create waterfalls...

And found out or Ade has an error, or the patch changed, Ade attempts to create a file that has as boundary 0 to 2048, but the game instead is 1 to 2046... fiddling with the boundary setting indeed made my rivers move, but I couldn't figure out the correct setting to make them stay where I want, I assume the river coordinates are wrong in first place (since they start at zero anyway, and this is invalid).

speeder
Engineer
Engineer
Posts: 25
Joined: 16 Jul 2014 05:57

Re: Reproducible map generation

Post by speeder »

I made a python script that does same thing as the website does for water, but with the bugs corrected, now water import works fine :D it isn't the patch fault, it is the weird way OpenTTD handle coordinates.

speeder
Engineer
Engineer
Posts: 25
Joined: 16 Jul 2014 05:57

Re: Reproducible map generation

Post by speeder »

So can you post the source for this? I got my compiler working on Windows but the only cpp file I found is lacking all other files it references it seems. (for example it has a bunch of .h s that the current version of OpenTTD doesn't have)

McZapkie
Tycoon
Tycoon
Posts: 1182
Joined: 18 Jan 2014 18:10

Re: Reproducible map generation

Post by McZapkie »

Source for patch? It is in first post, but very amateurish (just a whole file instead of real patch)

Post Reply

Return to “General OpenTTD”

Who is online

Users browsing this forum: No registered users and 9 guests