Dos Batch File to Generate Lots of Maps

Dos Batch File to Generate Lots of Maps

Return to topic list

Mon Jul 17 18:19:26 2017   by   CorinaMarie
Hiya, everyone.

I've written a short script to create several random maps so I can easily view them and pick which ones I like. The image size is set relatively small for quicker creation. Once I know which seed number I like I can then re-generate to the real image size I need.

Copy the following and save it as a text file with a .bat extension. It needs to be in the folder where you unpacked the Planet program and source code.


:: Generate lots of small maps Using the Offline Planet Generator created by Torben Æ. Mogensen
:: (This batch file written by CorinaMarie@Simtropolis and is free to the public.)
::
:: Note: Height is set to 512 rather than 513 to avoid the top row white band.
::
:: The specific parameters are set for my own needs to make maps for SimCity 4.
::  Tweak as needed for your own requirements.
:: See http://www.diku.dk/~torbenm/Planet/Manual.txt for switch parameters.
::
:: Adjust the value of MaxMaps for how many you want to generate. Currently set to 100.
:: Run time on my comp is 5 minutes, 25 seconds for 100 maps. Tested on Win 7 Pro.

@echo off & setLocal EnableDelayedExpansion

Set MaxMaps=100

for /L %%a in (1 1 %MaxMaps%) do (
Set /a Seed=!random!*65536+1
Echo !Seed!
Planet.Exe -X -pq -s 0.!Seed! -b -m 2.0 -g 22.5 -G 22.5 -C lefebvre2.col -w 513 -h 512 -o !Seed!Lefebvre2.bmp
)
 
Mon Jul 17 19:50:30 2017   by   CorinaMarie
And this is a follow up Batch File to create several versions of the same seed number. (Adjust that in the Set Seed= part for your desired map.)

@Echo Off

Set Seed=87359489

Echo Seed = %Seed%
Echo.

Echo Creating Lefebvre2 colored map with grid lines:
Planet.Exe -X -pq -s 0.%Seed% -m 2.0 -g 22.5 -G 22.5 -C Lefebvre2.col -w 513 -h 512 -i -0.02 -o 01-%Seed%.bmp
Echo.

Echo Creating Lefebvre2 colored map without grid lines:
Planet.Exe -X -pq -s 0.%Seed% -m 2.0 -C Lefebvre2.col -w 513 -h 512 -i -0.02 -o 02-%Seed%.bmp
Echo.

Echo Creating Lefebvre2 colored map with height land shading:
Planet.Exe -X -pq -s 0.%Seed% -b -m 2.0 -C Lefebvre2.col -w 513 -h 512 -i -0.02 -o 03-%Seed%.bmp
Echo.

Echo Creating Lefebvre2 colored map with contour lines:
Planet.Exe -X -pq -s 0.%Seed% -m 2.0 -E8 -C Lefebvre2.col -w 513 -h 512 -i -0.02 -o 04-%Seed%.bmp
Echo.

Echo Creating Olsen light colored map with grid lines:
Planet.Exe -X -pq -s 0.%Seed% -m 2.0 -g 22.5 -G 22.5 -C OlssonLight.col -w 513 -h 512 -i -0.02 -o 05-%Seed%.bmp
Echo.

Echo Creating Olsen light colored map without grid lines:
Planet.Exe -X -pq -s 0.%Seed% -m 2.0 -C OlssonLight.col -w 513 -h 512 -i -0.02 -o 06-%Seed%.bmp
Echo.

Echo Creating Olsen light colored map with height land shading:
Planet.Exe -X -pq -s 0.%Seed% -b -m 2.0 -C OlssonLight.col -w 513 -h 512 -i -0.02 -o 07-%Seed%.bmp
Echo.

Echo Creating Olsen light colored map with contour lines:
Planet.Exe -X -pq -s 0.%Seed% -m 2.0 -E8 -C OlssonLight.col -w 513 -h 512 -i -0.02 -o 08-%Seed%.bmp
Echo.

Echo Creating Burrows colored map with grid lines:
Planet.Exe -X -pq -s 0.%Seed% -m 2.0 -g 22.5 -G 22.5 -C Burrows.col -w 513 -h 512 -i -0.02 -o 09-%Seed%.bmp
Echo.

Echo Creating Burrows colored map without grid lines:
Planet.Exe -X -pq -s 0.%Seed% -m 2.0 -C Burrows.col -w 513 -h 512 -i -0.02 -o 10-%Seed%.bmp
Echo.

Echo Creating Burrows colored map with height land shading:
Planet.Exe -X -pq -s 0.%Seed% -b -m 2.0 -C Burrows.col -w 513 -h 512 -i -0.02 -o 11-%Seed%.bmp
Echo.

Echo Creating Burrows colored map with contour lines:
Planet.Exe -X -pq -s 0.%Seed% -m 2.0 -E8 -C Burrows.col -w 513 -h 512 -i -0.02 -o 12-%Seed%.bmp
Echo.

Echo Creating Grayscale colored map for tweaking in GIMP:
Planet.Exe -X -pq -s 0.%Seed% -m 2.0 -C greyscale.col -w 513 -h 512 -i -0.053 -o 13-%Seed%.bmp
Echo.
 

Return to topic list



New message:
Topic:
Posted by:

Type the values of the dice shown below:

Return to topic list