Easier Manual City Generation June 20, 2009, 04:54:54 pm This idea is mostly for custom maps.Instead of using random city generation, you would be able to read the city name, x and y coordinates, and population from a text file.So, if you load up, say, Germany.ppm as a height map, the game would look for, say, Germany.city in the same folder.Germany.city would look like:Berlin,(xcoord),(ycoord),(population)Hamburg,(xcoord),(ycoord),(population)München,(xcoord),(ycoord),(population)etc, where the xcoord and ycoord are the coordinates of the city hall, and the population is the city population.This would allow users to play on "realistic" maps without having to add any of the cities manually while maintaining a random yet consistent flavor every time they start a new game.Further thought: If (x,y) is under water, the city is ignored. Quote Selected
Re: Easier Manual City Generation Reply #1 – June 20, 2009, 05:08:39 pm Would be a good extension request for scenario files.. Quote Selected
Re: Easier Manual City Generation Reply #2 – June 20, 2009, 05:22:15 pm And it would indeed be a very useful extensions in combination with heightmaps. It's one if have often thought about. Quote Selected
Re: Easier Manual City Generation Reply #3 – June 20, 2009, 05:32:04 pm I haven't looked at the code since I am not at all proficient in C++, but in theory, this shouldn't be too hard to implement, should it? Anyone with knowledge of world generation? Quote Selected
Re: Easier Manual City Generation Reply #4 – June 20, 2009, 06:01:56 pm PPM files could work as PAK's do.To make a pak file you need: 1) A PNG image file; 2) A DAT text file.Then, PPM file: 1) A BMP image file for heights; 2) A TXT text file for data: object, coord x/y, population etc. Quote Selected
Re: Easier Manual City Generation Reply #5 – June 20, 2009, 06:51:04 pm I thought it would be impossible, but PPM could be extended exactly as you describe. If the other information comes after the picture. Quote Selected
Re: Easier Manual City Generation Reply #6 – June 20, 2009, 07:37:02 pm Since BMP is the preferred image format for maps (since it is, at least RLE encoded, much smaller as PPM), the imformations should be rather independent of the image format. Quote Selected
Re: Easier Manual City Generation Reply #8 – July 24, 2010, 09:23:12 pm Quote from: jap train fan – on July 23, 2010, 11:26:09 ami like itAnd? Anything else to add to the discussion?I would ask you to post in an old topic only messages that are useful. Bumping pointlessly an old topic is considered spam.Please read this: http://forum.simutrans.com/index.php?topic=4529.0 Quote Selected Last Edit: July 25, 2010, 01:16:37 am by IgorTekton
Re: Easier Manual City Generation Reply #9 – July 25, 2010, 12:53:54 am And to clarify, jap train fan, please consider this an official mod warning. We are glad to have you on the forum, but this bumping of old topics to not add anything useful is getting to be too much. Quote Selected