-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathModOptions.lua
233 lines (217 loc) · 6.33 KB
/
ModOptions.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
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
-- $Id: ModOptions.lua 4642 2009-05-22 05:32:36Z carrepairer $
-- 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 ('list','string','number','bool')
-- 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
-- section: so lobbies can order options in categories/panels
-- scope: 'all', 'player', 'team', 'allyteam' <<< not supported yet >>>
--
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--
-- Example ModOptions.lua
--
local options = {
-- do deployment and tactics even work?
{
key = 'gamemode',
name = 'Game Mode Configuration',
desc = 'Configure game settings.',
type = 'section',
},
{
key = 'startconds',
name = 'Start',
desc = 'Start condition settings.',
type = 'section',
},
{
key = 'mapsettings',
name = 'Map',
desc = 'Map settings.',
type = 'section',
},
{
key = "disabledunits",
name = "Disable units",
desc = "Prevents specified units from being built ingame. Specify multiple units by using + ",
section = 'startconds',
type = "string",
def = "",
},
{ -- Might cause desync, check if they occur.
key = 'unitfactor',
name = 'Size of City',
desc = 'How much buildings the city contains. 1.0 = 150',
type = 'number',
section= 'mapsettings',
def = 0.7,
min = 0.1,
max = 10.0,
step = 0.1,
},
{
key = 'culture',
name = 'Culture of the area',
desc = 'Sets the regional background of the game (ínternational/western/asian/arabic)',
type = 'list',
section= 'gamemode',
def = 'arabic',
items =
{
{
key = 'international',
name = 'International',
desc = 'All the games cultures mixed and happily coexisting',
},
{
key = 'western',
name = 'Western Cultural Sphere',
desc = 'Western cultural sphere',
},
{
key = 'asian',
name = 'Asian Cultural Sphere',
desc = 'SEA area and china sphere',
},
{
key = 'arabic',
name = 'Arabic cultural sphere',
desc = 'Arabic cultural sphere',
},
},
},
{
key = 'globallos',
name = 'Full visibility',
desc = 'No fog of war, everyone can see the entire map.',
type = 'bool',
section = 'startconds',
def = false,
},
{
key='allowUserWidgets',
name='Disable Local Widgets',
desc='Disable loading of local widget.',
type='bool',
section= 'experimental',
def=true,
},
{
key = "pathfinder",
name = "Pathfinder type",
desc = "Sets the pathfinding system used by units.",
type = "list",
def = "standard",
section = "experimental",
items = {
{
key = 'standard',
name = 'Standard',
desc = 'Standard pathfinder',
},
{
key = 'qtpfs',
name = 'QTPFS',
desc = 'New Quadtree Pathfinding System (experimental)',
},
},
},
{
key = "shuffle",
name = "Start Boxes",
desc = "Start box settings.",
type = "list",
section= 'startconds',
def = "auto",
items = {
{
key = "off",
name = "Fixed",
desc = "Startboxes have a fixed correspondence to teams.",
},
{
key = "shuffle",
name = "Shuffle",
desc = "Shuffle among boxes that would be used.",
},
{
key = "allshuffle",
name = "All Shuffle",
desc = "Shuffle all present boxes.",
},
{
key = "auto",
name = "Autodetect",
desc = "Shuffle if FFA.",
},
{
key = "disable",
name = "Start Anywhere",
desc = "Allow to place anywhere. Boxes are still drawn for reference but are not obligatory.",
},
},
},
{
key='setaispawns',
name='Set AI Spawns',
desc='Allow players to set the start positions of AIs.',
type='bool',
section= 'startconds',
def=true,
},
{ -- Might cause desync, check if they occur.
key = 'waterlevel',
name = 'Manual Water Level',
desc = 'How much to raise water level, in elmos.',
type = 'number',
section= 'mapsettings',
def = 0,
min = -2000,
max = 2000,
step = 1,
},
{
key = 'waterpreset',
name = 'Water Level',
desc = 'Adjusts the water level of the map',
type = "list",
section= 'mapsettings',
def = 'manual',
items = {
{
key = "manual",
name = "Manual",
desc = "Input height manually",
},
{
key = "dry",
name = "Dry",
desc = "Drain the map of water",
},
{
key = "flooded",
name = "Flooded",
desc = "Cover half the map area with water",
},
},
},
}
--// add key-name to the description (so you can easier manage modoptions in springie)
for i=1,#options do
local opt = options[i]
opt.desc = opt.desc .. '\nkey: ' .. opt.key
end
return options