Reproducible map generation
Moderator: OpenTTD Developers
Re: Reproducible map generation
Thanks a lot
All fully working now and it looks great!
I had assumed where it said "none" in the table about signs that it meant no value, I substituted all of those for 0 and with a few errors to tweak it worked perfectly!
All fully working now and it looks great!
I had assumed where it said "none" in the table about signs that it meant no value, I substituted all of those for 0 and with a few errors to tweak it worked perfectly!
The TT forums trivia tournament! Come along and join in the fun
http://www.funtrivia.com/private/main.cfm?tid=90722
http://www.funtrivia.com/private/main.cfm?tid=90722
Re: Reproducible map generation
I'm trying to create a new North American map. How do I convert the GIS data to bitmap? I couldn't find a way to open what I downloaded from that websiteMcZapkie wrote: If you are creating real based map, you can use GIS date for inland water, it can be found for example here:
http://www.diva-gis.org/gdata
Now we can use GIS data, if converted into bitmap, to apply as mask layer and decrease slightly brightness of the original heightmap.
Raw data of combined rivers and inland reservoirs, converted to bitmap, looks like that:
http://149.156.194.203/~mczapkie/Train/ ... lwater.png
Re: Reproducible map generation
I don't remember exactly, but probably I just used software from that website:Lechuza wrote: I'm trying to create a new North American map. How do I convert the GIS data to bitmap? I couldn't find a way to open what I downloaded from that website
http://www.diva-gis.org/download
Formerly known as: McZapkie
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, wired, ECS industry extension, V4 CEE train set, HotHut.
Another favorite games: freeciv longturn, OHOL/2HOL.
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, wired, ECS industry extension, V4 CEE train set, HotHut.
Another favorite games: freeciv longturn, OHOL/2HOL.
Re: Reproducible map generation
Excellent work!!!
I have created a small tool to make this even more useful.
You can automatically download towns based on latitude and longitude and export right down to the exact format needed for this patch.
There's also a tool to convert a water map to a format that works with this patch.
It's a very early prototype so it might break but please feel free to toy with it. You may need to use Chrome for it to work right.
http://ade.se/ttd/scenario-import-tool/
EDIT: If it doesnt work at all, try refreshing the page. There is some kind of load timing issue sometimes.
Let me know how it goes!
I have created a small tool to make this even more useful.
You can automatically download towns based on latitude and longitude and export right down to the exact format needed for this patch.
There's also a tool to convert a water map to a format that works with this patch.
It's a very early prototype so it might break but please feel free to toy with it. You may need to use Chrome for it to work right.
http://ade.se/ttd/scenario-import-tool/
EDIT: If it doesnt work at all, try refreshing the page. There is some kind of load timing issue sometimes.
Let me know how it goes!
Last edited by aDe on 01 Dec 2014 17:07, edited 1 time in total.
Re: Reproducible map generation
Interesting!
So it is importing cities from internet server, from a given area?
What API is stand for?
Thanks for water import, seems to be very useful,
however it hangs up when attached file is converted:
So it is importing cities from internet server, from a given area?
What API is stand for?
Thanks for water import, seems to be very useful,
however it hangs up when attached file is converted:
Re: Reproducible map generation
Yes, exactly. It's from GeoNamesMcZapkie wrote:Interesting!
So it is importing cities from internet server, from a given area?
It's the server/adress it uses to get the towns. I found two that are useful, both from GeoNames. The "full" one gives the most results.McZapkie wrote: What API is stand for?
I think it's because of the white background, try inverting the colors, and it should be better. It may be too much data, I will try it and see if I can get it to work.McZapkie wrote: Thanks for water import, seems to be very useful,
however it hangs up when attached file is converted:
Re: Reproducible map generation
It works for me after inverting the colors, here is the output:
- Attachments
-
- water-data.zip
- Water data text file
- (563.24 KiB) Downloaded 178 times
Re: Reproducible map generation
Any chance of a fork/rework of this to account for More Height Levels now available?
Do you like drones, quadcopters & flying toys? Check out Drone Strike Force!
Base Music Sets: OpenMSX | Scott Joplin Anthology | Traditional Winter Holiday Music | Modern Motion Music
Other Projects: 2CC Trams | Modern Waypoints | Sprite Sandbox & NewGRF Releases | Ideabox | Town Names | Isle of Sodor Scenario | Random Sprite Repository
Misc Topics: My Screenshots | Forgotten NewGRFs | Unfinished Graphics Sets | Stats Shack | GarryG's Auz Sets
Base Music Sets: OpenMSX | Scott Joplin Anthology | Traditional Winter Holiday Music | Modern Motion Music
Other Projects: 2CC Trams | Modern Waypoints | Sprite Sandbox & NewGRF Releases | Ideabox | Town Names | Isle of Sodor Scenario | Random Sprite Repository
Misc Topics: My Screenshots | Forgotten NewGRFs | Unfinished Graphics Sets | Stats Shack | GarryG's Auz Sets
Re: Reproducible map generation
Who are encouraged to put cities on this map of europe of 496x4906?
thanks !
thanks !
- Attachments
-
- Europe_4096_x_4096-4.tar
- (6.85 MiB) Downloaded 173 times
Re: Reproducible map generation
"Blueprint" image works perfectly.aDe wrote: I think it's because of the white background, try inverting the colors, and it should be better.
I just misunderstood sentence about ignored alpha.
I will rework, when height levels would appear in official version, because map created with trunk/newer version cannot be opened with standard one (personally I'm using it usually for map generation for my multiplayer server)Any chance of a fork/rework of this to account for More Height Levels now available?
But code is free to modify/fork/rework - probably some string mallocs should be corrected to be compatible with trunk.
Re: Reproducible map generation
Great!McZapkie wrote: "Blueprint" image works perfectly.
I just misunderstood sentence about ignored alpha.
The only issue for me right now is all the "Sign" signs being printed whenever there is a sloped tile and water cannot be placed. Is there any way to turn that off? Or to delete all signs somehow?
Re: Reproducible map generation
I will turn signs off if they are empty.aDe wrote: The only issue for me right now is all the "Sign" signs being printed whenever there is a sloped tile and water cannot be placed. Is there any way to turn that off? Or to delete all signs somehow?
But I cannot provide windows binary, because my windows start to produce "This application has requested the Runtime to terminate it in an unusual way." Microsoft patch claimed as problem solver doesn't works.
PS. console_cmds.cpp source is attached, compiled with 1.4.1 version, no signs if line begin with empty ,W
Re: Reproducible map generation
Thank you! I'll see when I can get a compile going, don't have the environment set up right now.
What are you compiling for? I have a mac aswell...
What are you compiling for? I have a mac aswell...
Re: Reproducible map generation
I can compile only for linux Ubuntu (my MinGW is broken, or windows are).
Formerly known as: McZapkie
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, wired, ECS industry extension, V4 CEE train set, HotHut.
Another favorite games: freeciv longturn, OHOL/2HOL.
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, wired, ECS industry extension, V4 CEE train set, HotHut.
Another favorite games: freeciv longturn, OHOL/2HOL.
Re: Reproducible map generation
Updated version of console_cmds.cpp, working with 1.5.0beta witch MHL patch, is attached below:
Note, it is not a diff patch, original file must to be overwrited, therefore I recommend to compile separate instance of openttd.
1. water converter:
instead of, better is
Both make one water tile, but W,0 make it regardless of flat or slope tile, W,1 is a 1x1 lake and can be only placed on flat.
Because heightmap is usually rough, valleys are not perfectly fitted to rivers, W,0 would make many unwanted "waterfall artefacts".
With W,1 you must only find real waterfalls (easy to spot) and change 1 to 0.
2. city extractor:
a) map edges coordinates are north, east, south, west, would you set similar order in your import tool?
b) There is bug, if small city threshold is above 0, cities below this threshold are listed without any size identify letter, for example:
It can be easily improved, because my patch support very small cities with letter "V" and probability of occurrence (these three 1,1,1)
therefore export should produce:
If somebody want to import for example half of them, he can change probabilities to 0.5, 0.5, 1.
Note, it is not a diff patch, original file must to be overwrited, therefore I recommend to compile separate instance of openttd.
Would you be so kind and make some improvements?aDe wrote: I have created a small tool to make this even more useful.
1. water converter:
instead of
Code: Select all
,W,0,
Code: Select all
,W,1,
Because heightmap is usually rough, valleys are not perfectly fitted to rivers, W,0 would make many unwanted "waterfall artefacts".
With W,1 you must only find real waterfalls (easy to spot) and change 1 to 0.
2. city extractor:
a) map edges coordinates are north, east, south, west, would you set similar order in your import tool?
b) There is bug, if small city threshold is above 0, cities below this threshold are listed without any size identify letter, for example:
Code: Select all
Parczew,S,0,51.64021,22.90057,1 #above small cities limit
Ozimek,,0,50.67944,18.2137,1 #below small cities limit
therefore export should produce:
By default, very small cities and villages are exported to txt, but not imported to openttd.#small cities probability
0,0,1
#dummy entries for unused settings
1,1,1,1,1,1,1,1,1,1
Ozimek,V,0,50.67944,18.2137,1 #below small cities limit
If somebody want to import for example half of them, he can change probabilities to 0.5, 0.5, 1.
Formerly known as: McZapkie
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, wired, ECS industry extension, V4 CEE train set, HotHut.
Another favorite games: freeciv longturn, OHOL/2HOL.
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, wired, ECS industry extension, V4 CEE train set, HotHut.
Another favorite games: freeciv longturn, OHOL/2HOL.
Re: Reproducible map generation
Thanks McZapkie, I have fixed the issues you mentioned.
The water placement parameter is now an option checkbox.
The villages changes have been added and the smaller than small city bug fixed.
The water placement parameter is now an option checkbox.
The villages changes have been added and the smaller than small city bug fixed.
Re: Reproducible map generation
Thank you very much for fixes.
Is it possible to fix coordinates order (north, east, south, west) too?
Is it possible to fix coordinates order (north, east, south, west) too?
Formerly known as: McZapkie
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, wired, ECS industry extension, V4 CEE train set, HotHut.
Another favorite games: freeciv longturn, OHOL/2HOL.
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, wired, ECS industry extension, V4 CEE train set, HotHut.
Another favorite games: freeciv longturn, OHOL/2HOL.
Re: Reproducible map generation
Did you mean the order of the text boxes for input? I changed those now.McZapkie wrote:Thank you very much for fixes.
Is it possible to fix coordinates order (north, east, south, west) too?
Re: Reproducible map generation
I see still old version online. Refresh does not work.
EDIT: now I see new version, but unfortunately there is empty output instead of these Swedish cities.
EDIT: now I see new version, but unfortunately there is empty output instead of these Swedish cities.
Re: Reproducible map generation
aDe, your converter works now pretty well.
It helped me much witch generating of new version of Poland 2048x2048 for MHL patch:
149.156.194.203/~mczapkie/Train/tmp/tt/ss/pl-experimental/Poland-TatraMHL.png
It helped me much witch generating of new version of Poland 2048x2048 for MHL patch:
149.156.194.203/~mczapkie/Train/tmp/tt/ss/pl-experimental/Poland-TatraMHL.png
Formerly known as: McZapkie
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, wired, ECS industry extension, V4 CEE train set, HotHut.
Another favorite games: freeciv longturn, OHOL/2HOL.
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, wired, ECS industry extension, V4 CEE train set, HotHut.
Another favorite games: freeciv longturn, OHOL/2HOL.
Who is online
Users browsing this forum: Google [Bot] and 12 guests