-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmapoptions.lua
More file actions
155 lines (143 loc) · 4.45 KB
/
mapoptions.lua
File metadata and controls
155 lines (143 loc) · 4.45 KB
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
----------------------------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------------------------
-- File: MapOptions.lua
-- Description: Custom MapOptions file that makes possible to set up variable options before game starts, like ModOptions.lua
-- Author: SirArtturi, Lurker, Smoth, jK
----------------------------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------------------------
-- 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 >>>
--
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
local options = {
--// Sections
{
key = 'Atmosphere',
name = 'Atmosphere Settings',
desc = 'Weather and time',
type = 'section',
},
{
key = 'Terrain',
name = 'Terrain Settings',
desc = '',
type = 'section',
},
{
key = 'Economy',
name = 'Economy Settings',
desc = '',
type = 'section',
},
--// Options
--// Atmosphere
{
key = "timeofday",
name = "Time of day",
desc = "Night or day?",
type = "list",
def = "day",
section = 'Atmosphere',
items = {
{ key = "dawn", name = "Dawn", desc = "Day Time" },
{ key = "day", name = "Day", desc = "Day Time" },
{ key = "night", name = "Night", desc = "Night Time" }
},
},
{
key = 'fog',
name = 'Fog',
desc = "covers the map under a gray mist (can be slow on older hardware)",
type = 'bool',
section = 'Atmosphere',
def = true,
},
{
key = "weather",
name = "Weather conditions",
desc = "snowing",
type = "list",
def = "clear",
section = 'Atmosphere',
items = {
{ key = "clear", name = "Clear", desc = "no weather" },
{ key = "snow", name = "Snowing", desc = "snowy day" }
},
},
--// Terrain
{
key = 'inv',
name = 'Inverted Heightmap',
desc = "flip world",
type = 'bool',
section = 'Terrain',
def = false,
},
--// Economy
{
key = 'metal',
name = 'Metal Production',
desc = 'Metal production levels - How much metal is produced per second',
type = 'list',
section = 'Economy',
def = 'normal',
items = {
{ key = 'low', name = "Low", desc = "Low metal density - for smaller teams" },
{ key = 'normal', name = "Normal", desc = "Default metal density" },
{ key = 'high', name = "High", desc = "High metal density - for big teams" },
},
},
{
key = 'wind',
name = 'Wind Speed',
desc = 'How strong wind will blow',
type = 'list',
section = 'Economy',
def = 'normal',
items = {
{ key = 'low', name = "Low", desc = "Weak wind speed - for smaller teams" },
{ key = 'normal', name = "Normal", desc = "Default wind speed" },
{ key = 'high', name = "High", desc = "High wind speed - for big teams" },
},
},
{
key = 'tidal',
name = 'Tidal Strength',
desc = 'Tidal energy levels - How much energy is produced via tidal generators',
type = 'list',
section = 'Economy',
def = 'normal',
items = {
{ key = 'low', name = "Low", desc = "Weak tidals - for smaller teams" },
{ key = 'normal', name = "Normal", desc = "Default tidals" },
{ key = 'high', name = "High", desc = "Strong tidals - for big teams" },
},
},
{
key = 'extractorradius',
name = 'Extractor Radius',
desc = 'Sets the metal extractor radius',
type = 'number',
section = 'Economy',
def = 100,
min = 1,
max = 10000,
step = 1,
},
}
return options