Hi,
i created a patch for loading heightmaps via console. This patch is closely derived from the "newgame" console command with only small deviations.
It accepts bitmaps or pngs in the heightmap folder.
You can use the command like
a) newheightmapgame Test.bmp
this loads the heightmap from $OpenttdFolder/scenario/heightmap/Test.bmp
b) newheightmapgame
It works also on servers: rcon pw "newheightmapgame Test.bmp"
this starts a new game with a new seed with the previous loaded heightmap.
Please feel free to contribute code to improve the patch!
Best wishes,
Der_Herr
I wanted to attach the patch file and an example but there was some error in the server, therefore i provide 2 Dropbox Links:
The patch file
An annular example bitmap
EDIT 1: Added code better sticking to the coding style guidelines.
Patch for #2155 - Heightmaps for dedicated servers
Moderator: OpenTTD Developers
Patch for #2155 - Heightmaps for dedicated servers
- Attachments
-
- Heightmap_Console_command.patch
- (4.07 KiB) Downloaded 205 times
-
- Engineer
- Posts: 91
- Joined: 12 Jun 2014 14:24
Re: Patch for #2155 - Heightmaps for dedicated servers
Does this patch still work against current revision? And would it be able to work with something like autopilot? Assuming something with Args = ./openttd xxxx in the config file?
Mhh..
Mhh..
Who is online
Users browsing this forum: No registered users and 16 guests