[OTTD] Southern Norway
Posted: 11 Oct 2020 10:20
My wife, who is Norwegian, recently got hooked on OpenTTD... man I love that woman
. I thought it would be fun to play a map of Norway, but unfortunately I could only find a heightmap of West Norway. I wanted a larger piece of Norway on the map with a more recognisable coastline, and of course cities, lakes etc. So I went down the scenario creation rabbit hole, spent way too many hours on it, and this is what I have so far:


I still have the following things in mind:
. Please keep in mind that I want to do as little manual work as possible, scripting is the way to go for me 


- Southern part of Norway. I roughly took the "Oslo - Trondheim - Bergen" triangle and base the map around that.
- "Temperate-with-snow" climate. Basically sub-arctic with a number of NewGRFs to get the temperate trains and industries back. The snow line varies with the seasons.
- Found an extensive list of cities/towns online. I then created a python script to fetch their GPS coordinates. I manually drew Oslo, Trondheim and Bergen on the map, noted their tile positions + GPS coordinates, and used those to triangulate the positions of all other towns. This allows me to batch process the town creation.
- Towns with city status are generated as cities, the others just as towns. The real world population is taken into account to determine the town size.
- Created a lake map which is used to generate any inland water. Low altitude lakes are lowered to sea level (looks better), high altitude lakes are created using river tiles.
- Created another script which combines the height map and lake data, and filters out some noise, i.e. 1x1 tile islands that clog up the map.
- Modified/h4ck3d the OpenTTD code a bit so I could import all of this stuff. Everything is just read line by line from .txt files, nothing too fancy.
- Industries are generated using the "Many random industries" feature in the scenario editor (clicked it twice)

I still have the following things in mind:
- The heightmap I used only contains Norway, but there should be a small piece of Sweden on the right side of the map. I'm already working on this.
- A nicer / smarter way to generate industries. I might mess around with the source code to prevent industries above a certain altitude.
- Placing signs at key landmarks, i.e. lakes and fjords.

