-
Notifications
You must be signed in to change notification settings - Fork 15
Map Generation
Included with the files to run this simulation is a tool allowing anyone to create procedurally generated world for the simulation to run within.
It can be found within the root directory of the project, in a folder called 'world_gen', and can be run by executing the file called 'GenerateMap.py'.
In order to run the map generator you need to have the following installed on your computer:
- Python 3.7 or newer
- Pillow library for python
However in future builds a compiled copy of this generator will be included removing the need for installing other python libraries in order to use this tool.
This is the basic generator screen that will appear when you first start the tool:

The right side of the window contains boxes that will display information about the currently generated map. When the tool is first started these will all be blank as no map has been generated yet.
At the top of the window you will see two tabs labeled 'Basic' and 'Advanced'. Currently the basic tab is selected, this tab is used for simple generation from presets.
If you click on the advanced tab it will look like this:

In order to generate a map you first need to select the parameters that you want to determine the different properties of the map. This can either be done using the large slider on the basic tab for a straight forward setup to one of the recommended presets or using the advanced tab to choose each option manually. When you move the basic slider it will move all the advanced sliders to match the value for that selected difficulty.
In order to change an individual difficulty property you must first check the box in the top corner to allow it to be edited (this is to prevent acccidental changes), then adjust the slider as you wish. If the check boxes are off it does not mean that it will not add that element to the generation, just that you can't edit that option at the moment.
It is currently not recommended to add dynamic obstacles to maps as they dramatically impact performance and are not complete yet; they will be working in a future version.
If you want to add activities to the map you need to go to the advanced tab and select up to six manually from the drop downs. Currently no activities are generated with the basic difficulty slider alone but they are not reset when it is moved either.
Once you are happy with the settings you have selected for the map you can press the 'Generate Map' button in the bottom right. This will run a generation process with the current settings and a plan of the map, number of each item and map information will appear on the right side as shown below.

As you can see, the 'Save Map' button has lit up now and, if you are happy with the generated map, you can press it and a file explorer dialogue will appear allowing you to save the map file to a location on your computer.
If you would like to get a different generation or tweak the settings you can change the sliders and press 'Generate Map' again as many times as you wish.