Awesome!! Glad to hear itMcZapkie wrote: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
Reproducible map generation
Moderator: OpenTTD Developers
Re: Reproducible map generation
- kyosuke1989
- Transport Coordinator
- Posts: 273
- Joined: 24 Mar 2008 13:04
- Location: Finland
Re: Reproducible map generation
Thumbs up! Maybe this will help in generating a proper Finnish scenario
Projects in progress: Finnish Trainset (DevZone)| Finnish Rail Infrastructure and Stations Set (DevZone)
Re: Reproducible map generation
I can build standard object (antenna, lighthouse) via
where x is 0 or 1 respectively.
But how to build newgrf object?
Code: Select all
DoCommandP(tile, x, 0, CMD_BUILD_OBJECT, NULL, buf);
But how to build newgrf object?
Re: Reproducible map generation
I wish we could get this in master
I've been playing with OpenStreetMap and Osmosis and maanged to pull some data (see attachment), but it will be probably faster to just figure out how to build the SCN from Java than trying to get OpenTTD to compile with this patch.
Thanks for the inspiration anyway.
I've been playing with OpenStreetMap and Osmosis and maanged to pull some data (see attachment), but it will be probably faster to just figure out how to build the SCN from Java than trying to get OpenTTD to compile with this patch.
Thanks for the inspiration anyway.
- Attachments
-
- Prague.png
- (348.99 KiB) Downloaded 8 times
Re: Reproducible map generation
Last edited by planetmaker on 07 Mar 2015 10:34, edited 1 time in total.
Reason: please don't inline images larger than 800x600
Reason: please don't inline images larger than 800x600
Re: Reproducible map generation
Cool. Did you add support for roads...?minexew wrote:Oh boy, was I wrong...
Re: Reproducible map generation
Roads and rivers (specified as a series of line segments) and lakes/ponds (as polygons) for now.aDe wrote:Cool. Did you add support for roads...?
The way I generate this data is far from ideal - see the attachment; unlike most people playing around with heightmaps, I'm not trying to create a map for the entire country, but rather just the capital in as big of a scale as possible, so that you can replicate realistic metro systems etc. while still being financially viable (as you all know, in OTTD bigger distance equals larger income)
Of course I can publish the updated patch if anybody cares.
- Attachments
-
- Screenshot 2015-03-07 09.29.21.png
- (482.82 KiB) Downloaded 6 times
Re: Reproducible map generation
Could you attach this road patched console_cmds?
I have a crazy idea of revitalizing old maps.
There is already "minimap" patch for console command dumping non-isometric minimap to the bitmap (this feature is also implemented in Spring Patch Pack).
You can save, tile to pixel, all roads, bridge and tunnel heads, forests, rivers, industries and objects:
If aDe can kindly improve his water converter, we would be able to import such minimap bitmap to txt file, manually correct industry and object Id's and finally create brand new map based on the old buggy one.
I have a crazy idea of revitalizing old maps.
There is already "minimap" patch for console command dumping non-isometric minimap to the bitmap (this feature is also implemented in Spring Patch Pack).
You can save, tile to pixel, all roads, bridge and tunnel heads, forests, rivers, industries and objects:
If aDe can kindly improve his water converter, we would be able to import such minimap bitmap to txt file, manually correct industry and object Id's and finally create brand new map based on the old buggy one.
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
Looks like you're implementing the new scenario file format
Being a retired OpenTTD developer does not mean I know what I am doing.
Re: Reproducible map generation
It is not a strictly scenario file format, because reproduced map does not exactly looks like an original one - cities looks different, industries have random chosen layouts, etc. It is not for making identical scenario, but a very similar one.
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: Reproducible map generation
Did you look at the wiki page for the suggested scenario file format? If not, I strongly suggest toMcZapkie wrote:It is not a strictly scenario file format, because reproduced map does not exactly looks like an original one - cities looks different, industries have random chosen layouts, etc. It is not for making identical scenario, but a very similar one.
Given the plethora of NewGRs etc, it is rather generic and sounds very much similar to what you suggest here: city placement, maybe size, industry type (independent of NewGRF), ... it is only on hiatus due to developer time. Thus if you want to pick that up... very much: please do!
The approach to treat the single things in layers or separate images is simple: easier editable. Differeing things only by colour allows for much more ambiguity and is difficult when things cross (like rail and road or road and water). Also layers or separate images for the different things make for greater modularity Thus a height map is not overprinted by what's built on top etc
https://wiki.openttd.org/Terkhen/Scenario_format
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
Re: Reproducible map generation
That would fit too, I think.
The extreme form of a scenario is literal storage of everything you built, ie almost a save game. At the other end, we have completely random games. I think there is a lot of room for something in-between. Heightmaps are a one form of it, but I can see it would be useful to have other things defined to some degree as well.
The extreme form of a scenario is literal storage of everything you built, ie almost a save game. At the other end, we have completely random games. I think there is a lot of room for something in-between. Heightmaps are a one form of it, but I can see it would be useful to have other things defined to some degree as well.
Being a retired OpenTTD developer does not mean I know what I am doing.
Re: Reproducible map generation
My patch is far from complete, there is no documentation yet and it's actually missing some features from McZapkie's version right now.
Originally I intended to add GUI ala Load Heightmap, but quickly gave up after I realized how insanely convoluted OpenTTD's GUI code is.
Nevertheless, you can find the current version here.
Rather than trying to explain what's changed and what's new, check out the attached example CSV (and its accompanying height map).
I'm going to try with another city now; any suggestions?
http://i.imgur.com/fZRcWwy.png
Originally I intended to add GUI ala Load Heightmap, but quickly gave up after I realized how insanely convoluted OpenTTD's GUI code is.
Nevertheless, you can find the current version here.
Rather than trying to explain what's changed and what's new, check out the attached example CSV (and its accompanying height map).
I'm going to try with another city now; any suggestions?
http://i.imgur.com/fZRcWwy.png
- Attachments
-
- Prague.png
- (212.76 KiB) Downloaded 5 times
-
- Prague.csv.gz
- (135.45 KiB) Downloaded 152 times
Re: Reproducible map generation
minexew, interesting approach, especially for roads, which cannot be presented properly using plain bitmap, but rather as vector object.
However, I will rather stick with previous data, because on the other hand, some objects can be more easily acquired from bitmaps.
The best solution would be of course hybrid one.
planetmaker, my basic programming skills, especially lack of knowledge of object programming, are not sufficient to cope with project like Therken scenario interpreter.
Meanwhile, I updated console_cmds.cpp with two additional commands: industry_list and object_list,
which enlist industry and objects IDs.
If additionall 'all' parameter is added, more detailed information is printed, including newgrf file name and GrfID.
However, I will rather stick with previous data, because on the other hand, some objects can be more easily acquired from bitmaps.
The best solution would be of course hybrid one.
planetmaker, my basic programming skills, especially lack of knowledge of object programming, are not sufficient to cope with project like Therken scenario interpreter.
Meanwhile, I updated console_cmds.cpp with two additional commands: industry_list and object_list,
which enlist industry and objects IDs.
If additionall 'all' parameter is added, more detailed information is printed, including newgrf file name and GrfID.
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.
-
- Engineer
- Posts: 2
- Joined: 18 Oct 2014 21:45
Re: Reproducible map generation
Is there any chance that this patch would work with the latest release?
Re: Reproducible map generation
Yes, you can just replace console_cmds.cpp by attached one and compile - it works with 1.5.1.
By the way, I added new command:
expand_towns <minimalsize>
which attempt to expand any town which size is below <minimalsize> value.
For example
expand_towns 20
would expand all towns smaller than 20 inhabitants.
By the way, I added new command:
expand_towns <minimalsize>
which attempt to expand any town which size is below <minimalsize> value.
For example
expand_towns 20
would expand all towns smaller than 20 inhabitants.
- Attachments
-
- console_cmds.cpp
- console commands 7.6.2015
- (78.13 KiB) Downloaded 463 times
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
Compiled version for win32 is located here:McZapkie wrote:I added new command:
expand_towns <minimalsize>
which attempt to expand any town which size is below <minimalsize> value.
http://149.156.194.203/~mczapkie/Train/ ... load/rmgp/
I edited first post, deleted some outdated info about rivers and added summary and above link.
Unfortunately I cannot edit second post.
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
Hey, this is a great feature, but there's a problem.
Is there a way to alter the orientation of how the towns are generated? The reaosn I say this is because they're currently htey're being generated anticlockwise, but it would be nice to generate them anticlockwise.
Is there a way to achive this?
P.S. sorry for the bump.
Is there a way to alter the orientation of how the towns are generated? The reaosn I say this is because they're currently htey're being generated anticlockwise, but it would be nice to generate them anticlockwise.
Is there a way to achive this?
P.S. sorry for the bump.
Re: Reproducible map generation
What do you mean? Not sure I understand what the problem isBen1338 wrote:Hey, this is a great feature, but there's a problem.
Is there a way to alter the orientation of how the towns are generated? The reaosn I say this is because they're currently htey're being generated anticlockwise, but it would be nice to generate them anticlockwise.
Is there a way to achive this?
P.S. sorry for the bump.
Re: Reproducible map generation
The problem lies in the heightmap orientation, for example: I'm used to generating heightmaps clockwise http://i.imgur.com/xS0AIYU.png
But this generates maps quite strangely, for example: http://i.imgur.com/LepnmYu.png this is the rotation that I prefer to generate heightmaps in OTTD.
But strangely enough http://i.imgur.com/bOmVkDf.png The cities don't really generate right.
I notice some of the towns are in the wrong place too, so I try to generate it the other way http://i.imgur.com/o6SPghA.png http://i.imgur.com/tYDpBRe.png And it generates better.
http://i.imgur.com/No5Eghh.png but not perfectly (At the time, I wasn't exactly sure how to do the coordinate settings, I just got them off google earth by overlapping the height maps over the actual UK map https://i.imgur.com/QC1TB5K.png and checked the properties to get the coordinates).
Would there be a way of setting which way the map is rotated in?
But this generates maps quite strangely, for example: http://i.imgur.com/LepnmYu.png this is the rotation that I prefer to generate heightmaps in OTTD.
But strangely enough http://i.imgur.com/bOmVkDf.png The cities don't really generate right.
I notice some of the towns are in the wrong place too, so I try to generate it the other way http://i.imgur.com/o6SPghA.png http://i.imgur.com/tYDpBRe.png And it generates better.
http://i.imgur.com/No5Eghh.png but not perfectly (At the time, I wasn't exactly sure how to do the coordinate settings, I just got them off google earth by overlapping the height maps over the actual UK map https://i.imgur.com/QC1TB5K.png and checked the properties to get the coordinates).
Would there be a way of setting which way the map is rotated in?
Who is online
Users browsing this forum: Bing [Bot] and 9 guests