× Home Meet the Team Make an AI Blog

Make your own Map

About Peril Maps

The goal of this page is to teach you how to create your very own map and import it into Peril. It is assumed that you have access to a image editor such as photoshop. Peril has been designed with the easy addition of new content in mind.

A peril map file consists of several components. These are:

The normal.png and countries.png must be the same dimensions.

As an example her is the Earth map image files.

normal.png

countries.png

default.txt

Each line of the default.txt file denotes a instrcution type. This type tells Peril how to interpret the line. Instructions of the same type should be grouped together and these groups must be ordered in the following way in order to allow the interpreter to construct the map properly. There should only be spaces in a line if it is in the middle of a name. Misplaces spaces will cause Peril to not interpret the Map.

  1. Unit
  2. Country
  3. Continent
  4. Link
  5. Challenge

Here is a break down of each instruction type and what each of its parameters are. The parameters are displays as "parameter name" , replace this text with the value you wish to pass. Everything else must stay the same.

Unit

Unit,"Unit Name","Unit Strength","UnitIcon".png

Parameter descriptions:

  1. "Unit Name"
    The name of the unit. This must be unique to each unit.
  2. "Unit Strength"
    The strength of the unit relative to the other units. The weakset unit should have a strength of 1.
  3. "Unit Icon"
    The file name of the image that will represent the unit in game. This image should be in /assets/ui/units folder.

Country

Country,"Country Name","RGB Value","Default Unit Name":"Quantity","x_offset","y_offset",-

Parameter descriptions:

  1. "Country Name"
    The name of the country. This must be unique to each country.
  2. "RGB Value"
    The RGB value of the colour that country in the countries.png file. The RGB is in the form RRRGGGBBB where each component is a 0 - 255 value. Example: 223345789
  3. "Default Unit Name"
    The default unit that every country will have to start of with.
  4. "Quantity"
    The number of the default unit you want the country to start with.
  5. "x_offset"
    The horizontal pixel vector from the center of the country that the army will be displayed over the country.
  6. "y_offset"
    The vertical pixel vector from the center of the country that the army will be displayed over the country.

Continent

Continent,"Continent Name","Environmental Hazard Name","List Of Countries In Continent"

Parameter descriptions:

  1. "Continent Name"
    The name of the group countries.
  2. "Environmental Hazard Name"
    The name of the environmental hazard that will occur on the countries in this continent. They are as follows:
    • Hurricane
    • Tornado
    • Tsunami
    • Volcanic Eruption
    You must pick one!
  3. "List Of Countries In Continent"
    A list of all the countries in the continent seperated by a '-'. Every country that is in the game should be in one continent.

ArmySize

ArmySize,"Goal","Reward"

Parameter descriptions:

  1. "Goal"
    The strength of all the countries' armries that a player owns that when combined will trigger this challenge to be completed.
  2. "Reward"
    The number of points that the player will recieve for completing this army size challenge.

CountriesOwned

CountriesOwned,"Goal","Reward"

Parameter descriptions:

  1. "Goal"
    The number of countries that a single player must own to complete this challenge.
  2. "Reward"
    The number of points that the player will recieve for completing this countries owned challenge.

UnitsKilled

UnitsKilled,"Goal","Reward"

Parameter descriptions:

  1. "Goal"
    The number of units that have been killed as a result of this players attacks that is required to trigger this challenge to be completed.
  2. "Reward"
    The number of points that the player will recieve for completing this units killed challenge.

Importing the Map

Place these 3 files in a folder with the name of the map. This folder should then be placed in /assets/maps . Add the map name and dimensions to Maps.txt . These dimensions should be the dimensions of the normal.png image. Once you have followed all these steps your map will now be selectable from the main menu.