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:
normal.png
The image displayed in-game during gameplay as the map which the countries are overlayed onto.countries.png
The image that ontains solid regions of every individual country on the map.default.txt
This file allows Peril to interpret the image files and build the in-game map.
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
- The regions on
normal.png
where country coulors will be displayed are a blad texture to provide the apperance of terrain. - Each country on
countries.png
must be a specific RGB colour. This will be used by thedefault.txt
to build the countries. - Every country region on
countries.png
should align perfrectly with the gap for it in thenormal.png
for the best appearance.
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.
- Unit
- Country
- Continent
- Link
- 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:
"Unit Name"
The name of the unit. This must be unique to each unit."Unit Strength"
The strength of the unit relative to the other units. The weakset unit should have a strength of1
."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:
"Country Name"
The name of the country. This must be unique to each country."RGB Value"
The RGB value of the colour that country in thecountries.png
file. The RGB is in the form RRRGGGBBB where each component is a 0 - 255 value. Example: 223345789"Default Unit Name"
The default unit that every country will have to start of with."Quantity"
The number of the default unit you want the country to start with."x_offset"
The horizontal pixel vector from the center of the country that the army will be displayed over the country."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:
"Continent Name"
The name of the group countries."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
"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.
Link
Link,"Country Source","Country Destination","Default
State","Current State","Duration"
Links are uni-directional and must be specified in both directions.
Link states are as follows:
Open
Blockade
Parameter descriptions:
"Country Source"
The name of the country that the link is from."Country Destination"
The name of the country that the link is to."Default State"
The link state that this link will return to after any change that has been made to it expires."Current State"
The current state of the link."Duration"
The number of rounds before the link returns back to its default state. If it is in its default state then this should be0
.
ArmySize
ArmySize,"Goal","Reward"
Parameter descriptions:
"Goal"
The strength of all the countries' armries that a player owns that when combined will trigger this challenge to be completed."Reward"
The number of points that the player will recieve for completing this army size challenge.
CountriesOwned
CountriesOwned,"Goal","Reward"
Parameter descriptions:
"Goal"
The number of countries that a single player must own to complete this challenge."Reward"
The number of points that the player will recieve for completing this countries owned challenge.
UnitsKilled
UnitsKilled,"Goal","Reward"
Parameter descriptions:
"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."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.