forked from PicassoCT/Journeywar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
EngineOptions.lua
211 lines (196 loc) · 5.57 KB
/
EngineOptions.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
-- $Id$
-- Custom Options Definition Table format
-- NOTES:
-- - using an enumerated table lets you specify the options order
--
-- These keywords must be lowercase for LuaParser to read them.
--
-- key: the string used in the script.txt
-- name: the displayed name
-- desc: the description (could be used as a tooltip)
-- type: the option type
-- def: the default value
-- min: minimum value for number options
-- max: maximum value for number options
-- step: quantization step, aligned to the def value
-- maxlen: the maximum string length for string options
-- items: array of item strings for list options
-- scope: 'all', 'player', 'team', 'allyteam' <<< not supported yet >>>
--
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--
-- Example EngineOptions.lua
--
local options =
{
{
key = 'startconds',
name = 'Starting Conditions',
desc = 'Set the starting conditions.',
type = 'section',
},
{
key = 'modifiers',
name = 'In-Game Conditions',
desc = 'Set up ingame conditions.',
type = 'section',
},
{
key = 'GameMode',
name = 'Game end condition',
desc = 'Determines what condition triggers the defeat of a player',
type = 'list',
section= 'modifiers',
def = '0',
items =
{
{
key = '0',
name = 'Kill everything',
desc = 'The player will lose when all his units have died',
},
{
key = '1',
name = 'ComEnder ends',
desc = 'The player will lose when his commander dies',
},
},
},
{
key = "minimission",
name = "Minimissions mode",
desc = "Activates In-Game Minimissions with objectives to fullfill during a Multiplayer/Bot-Game",
section = 'modifiers',
type = "bool",
def = false,
},
{
key = "boneyard",
name = "Boneyard mode",
desc = "Dead Units Remains accumulate - terraforming the Terrain",
section = 'modifiers',
type = "bool",
def = false,
},
{
key = "gameofthrones",
name = "Game of Thrones mode",
desc = "Killing the enemy ComEnder or Abyss results in getting all his troops",
section = 'modifiers',
type = "bool",
def = false,
},
{
key = 'StartMetal',
name = 'Starting metal',
desc = 'Determines amount of metal and metal storage that each player will start with',
type = 'number',
section= 'startconds',
def = 1000,
min = 0,
max = 10000,
step = 10, -- quantization is aligned to the def value
-- (step <= 0) means that there is no quantization
},
{
key = 'StartEnergy',
name = 'Starting energy',
desc = 'Determines amount of metal and metal storage that each player will start with',
type = 'number',
section= 'StartingResources',
def = 1000,
min = 0,
max = 10000,
step = 10, -- quantization is aligned to the def value
-- (step <= 0) means that there is no quantization
},
--]]
{
key = 'MaxUnits',
name = 'Max units',
desc = 'Determines the ceiling of how many units and buildings a player is allowed to own at the same time (limited by spring to 10000 / (#commanders + 1))',
type = 'number',
section= 'modifiers',
def = 1500,
min = 10,
max = 3000,
step = 10, -- quantization is aligned to the def value
-- (step <= 0) means that there is no quantization
},
{
key = 'diplomacy',
name = 'Diplomacy Settings',
desc = 'Configure diplomacy settings.',
type = 'section',
},
{
key = 'FixedAllies',
name = 'Fixed ingame alliances',
desc = 'Disables the use of the /ally command for ingame ceasefires. \nkey: fixedallies',
type = 'bool',
section = 'diplomacy',
def = false,
},
{
key = 'MinSpeed',
name = 'Minimum game speed',
desc = 'Sets the minimum speed that the players will be allowed to change to',
type = 'number',
section= 'modifiers',
def = 0.5,
min = 0.1,
max = 10,
step = 0.1, -- quantization is aligned to the def value
-- (step <= 0) means that there is no quantization
},
{
key = 'MaxSpeed',
name = 'Maximum game speed',
desc = 'Sets the maximum speed that the players will be allowed to change to',
type = 'number',
section= 'modifiers',
def = 2,
min = 0.1,
max = 10,
step = 0.1, -- quantization is aligned to the def value
-- (step <= 0) means that there is no quantization
},
{
key = 'mapsettings',
name = 'Map Related Settings',
desc = 'Configure map related settings.',
type = 'section',
},
{
key = 'LuaRules',
name = 'Enable LuaRules',
desc = 'Enable mod usage of luarules',
type = 'bool',
def = true,
}
--[[ {
key = 'DisableMapDamage',
name = 'Disable Map Deformations',
desc = 'Prevents the map shape from being changed by weapons and terraforming',
type = 'bool',
section= 'mapsettings',
def = false,
}, ]]
--[[ {
key = 'LuaGaia',
name = 'Enables gaia',
desc = 'Enables gaia player',
type = 'bool',
def = false,
},
{
key = 'NoHelperAIs',
name = 'Disable helper AIs',
desc = 'Disables luaui and group ai usage for all players',
type = 'bool',
def = false,
},
, ]]
}
return options