You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e01acf4
Browse filesBrowse the repository at this point in the historyBrowse files
You can have a look into the already existing original Settlers 2 campaigns in the subfolders `RTTR/campaigns/roman` and `RTTR/campaigns/continent` for an example.
9
+
You can take a look into the already existing original Settlers 2 campaigns in the subfolders `RTTR/campaigns/roman` and `RTTR/campaigns/continent` for an example.
10
10
We will now create an example campaign `garden`.
11
11
12
12
## Location for adding a new campaign
@@ -41,18 +41,20 @@ campaign = {
41
41
name=_"name",
42
42
shortDescription=_"shortDescription",
43
43
longDescription=_"longDescription",
44
-
image="<RTTR_RTTR>/campaigns/garden/garden.bmp",
44
+
image="<RTTR_RTTR>/campaigns/garden/garden.bmp",-- Same as: image = "garden.bmp",
@@ -75,7 +77,7 @@ The Lua campaign interface is versioned using a major version. Every time a feat
75
77
76
78
Every map script must have 1 function:
77
79
`getRequiredLuaVersion()`
78
-
You need to implement this and return the version your script works with. If it does not match the current version an error will be shown and the script will not be used.
80
+
You need to implement this and return the version your script works with. If it is higher than the current version an error will be shown and the script will not be used.
79
81
80
82
### Explanation of the campaign table fields
81
83
@@ -86,7 +88,7 @@ If you want a field to be translated you have to add the translation as describe
86
88
3.`name`: The name of the campaign
87
89
4.`shortDescription`: Short description of the campaign (like a headline to get a rough imagination of the campaign)
88
90
5.`longDescription`: Extended description describing the campaign in detail. Will be shown in the campaign selection screen, when the campaign is selected.
89
-
6.`image`: Path to an image displayed in the campaign selection screen. You can omit this if you do no want to provide an image.
91
+
6.`image`: Path to an image displayed in the campaign selection screen. Can be any "archive" with an image, e.g. `.bmp`, `.lbm`. You can omit this if you do no want to provide an image.
90
92
7.`maxHumanPlayers`: For now this is always 1 until we support multiplayer campaigns
91
93
8.`difficulty`: Difficulty of the campaign. Should be one of the values easy, medium or hard.
92
94
9.`mapFolder` and `luaFolder`: Path to the folder containing the campaign maps and associated Lua files. Usually your campaign folder or a subfolder of it.
@@ -95,7 +97,7 @@ If you want a field to be translated you have to add the translation as describe
95
97
96
98
Hints:
97
99
98
-
- To work on case-sensitive OS (like Linux) the file name of the Lua file must have the same case as the map file name. This applies to the map names in the campaign.lua file too.
100
+
- To work on case-sensitive OS (like Linux) the file name of the Lua file must have the same case as the map file name. This applies to the map names in the `campaign.lua` file too.
99
101
For example: `MISS01.WLD, MISS01.lua` is correct and `MISS01.WLD, miss01.lua` will not work on Linux
100
102
- The Lua file of a map must have the same name as the map itself but with the extension `.lua` to be found.
101
103
- The Lua and the map file don't need to be in the same folder because the path can be specified separately.
@@ -107,7 +109,7 @@ For example: `MISS01.WLD, MISS01.lua` is correct and `MISS01.WLD, miss01.lua` wi
This parameter is optional and can be omitted in the Lua campaign file. If this parameter is specified the selection screen for the missions of a campaign is replaced by a selection map. Like the one used in the original settlers 2 world campaign.
112
+
This parameter is optional and can be omitted in the Lua campaign file. If this parameter is specified the selection screen for the missions of a campaign is replaced by a selection map. Like the one used in the original Settlers 2 world campaign.
111
113
112
114
We have the following parameters:
113
115
@@ -124,6 +126,11 @@ Hint:
124
126
All the images are described by the path to the image file and an index parameter. Usually the index parameter is zero.
125
127
For special image formats containing multiple images in an archive this is the index of the image to use.
126
128
129
+
### Image paths
130
+
131
+
The paths to the campaign image and selection map images can be relative to the campaign folder and at most inside a single subfolder.
132
+
E.g. `images/garden.bmp` and `mapscreen/conquered.bmp` work, but `images/mapscreen/conquered.bmp` does not.
133
+
127
134
## Final view of the example garden campaign folder
0 commit comments