-
Notifications
You must be signed in to change notification settings - Fork 16
/
info.nut
280 lines (251 loc) · 11.2 KB
/
info.nut
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
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
/*
* This file is part of Renewed Village Growth, a GameScript for OpenTTD.
* Credits keoz (Renewed City Growth), Sylf (City Growth Limiter)
*
* It's free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the
* Free Software Foundation, version 2 of the License.
*
*/
require("version.nut");
class MainClass extends GSInfo
{
function GetAuthor() { return "Firrel"; }
function GetName() { return "Renewed Village Growth"; }
function GetShortName() { return "REVI"; }
function GetDescription() { return "Towns require various cargo deliveries to grow. Required cargos can be randomized. Town growth is limited by percentage of transported specific cargos. Supporting most Industry NewGRF sets."; }
function GetURL() { return "https://www.tt-forums.net/viewtopic.php?f=65&t=87052"; }
function GetVersion() { return SELF_VERSION; }
function GetDate() { return SELF_DATE; }
function GetAPIVersion() { return "14"; }
function MinVersionToLoad() { return SELF_MINLOADVERSION; }
function CreateInstance() { return "MainClass"; }
function GetSettings() {
AddSetting({ name = "town_info_mode",
description = "Town info display mode",
easy_value = 1,
medium_value = 1,
hard_value = 1,
custom_value = 1,
flags = CONFIG_INGAME, min_value = 1, max_value = 5 });
AddLabels("town_info_mode", {
_1 = "Automatic",
_2 = "Category deliveries",
_3 = "Cargo list",
_4 = "Combined",
_5 = "Full cargo list" });
AddSetting({ name = "goal_scale_factor",
description = "Difficulty level (easy = 60, normal = 100, hard = 140)",
easy_value = 60,
medium_value = 100,
hard_value = 140,
custom_value = 100,
flags = CONFIG_INGAME, min_value = 1, max_value = 50000, step_size = 20 });
AddSetting({ name = "use_town_sign",
description = "Show growth rate text under town names",
easy_value = 1,
medium_value = 1,
hard_value = 1,
custom_value = 1,
flags = CONFIG_BOOLEAN | CONFIG_INGAME });
AddSetting({ name = "eternal_love",
description = "Eternal love from towns",
easy_value = 1,
medium_value = 3,
hard_value = 0,
custom_value = 0,
flags = CONFIG_INGAME, min_value = 0, max_value = 3 });
AddLabels("eternal_love", { _0 = "Off",
_1 = "Outstanding",
_2 = "Good",
_3 = "Poor" });
AddSetting({
name = "cargo_6_category",
description = "Cargo: Use 6 cargo categories for supported economies",
easy_value = 1,
medium_value = 1,
hard_value = 1,
custom_value = 1,
flags = CONFIG_BOOLEAN | CONFIG_INGAME });
AddSetting({ name = "cargo_randomization",
description = "Randomization: Type",
easy_value = 1,
medium_value = 7,
hard_value = 10,
custom_value = 10,
flags = CONFIG_INGAME, min_value = 1, max_value = 15 });
AddLabels("cargo_randomization", {
_1 = "None",
_2 = "Industry descending",
_3 = "Industry ascending",
_4 = "1 per category",
_5 = "2 per category",
_6 = "3 per category",
_7 = "5 per category",
_8 = "7 per category",
_9 = "1-2 per category",
_10 = "1-3 per category",
_11 = "2-3 per category",
_12 = "3-5 per category",
_13 = "3-7 per category",
_14 = "Descending",
_15 = "Ascending" });
AddSetting({ name = "near_cargo_probability",
description = "Randomization: Probability to use nearby cargo types [%]",
easy_value = 100,
medium_value = 50,
hard_value = 0,
custom_value = 50,
flags = CONFIG_INGAME, min_value = 0, max_value = 100, step_size = 10});
AddSetting({ name = "display_cargo",
description = "Randomization: Show town cargos from start",
easy_value = 1,
medium_value = 0,
hard_value = 0,
custom_value = 0,
flags = CONFIG_BOOLEAN | CONFIG_INGAME});
AddSetting({ name = "raw_industry_density",
description = "Industry stabilizer: Raw industry density",
easy_value = 0,
medium_value = 0,
hard_value = 0,
custom_value = 0,
flags = CONFIG_INGAME, min_value = 0, max_value = 5});
AddLabels("raw_industry_density", {
_0 = "Funding only",
_1 = "Minimal",
_2 = "Very Low",
_3 = "Low",
_4 = "Normal",
_5 = "High" });
AddSetting({
name = "limit_min_transport",
description = "Limit Growth: Minimum percentage of transported cargo from town",
easy_value = 40,
medium_value = 50,
hard_value = 65,
custom_value = 50,
flags = CONFIG_INGAME, min_value = 0, max_value = 100, step_size = 5});
AddSetting({
name = "town_size_threshold",
description = "Limit Growth: Minimum size of town before the limit rules kicks in",
easy_value = 800,
medium_value = 550,
hard_value = 350,
custom_value = 350,
flags = CONFIG_INGAME, min_value = 0, max_value = 50000, step_size = 25});
AddSetting({
name = "limiter_delay",
description = "Limit Growth: Stop growth after set amount of months",
easy_value = 3,
medium_value = 1,
hard_value = 0,
custom_value = 1,
flags = CONFIG_INGAME, min_value = 0, max_value = 12, step_size = 1});
AddSetting({
name = "subsidies_type",
description = "Subsidies: Create subsidies for contributed towns",
easy_value = 1,
medium_value = 1,
hard_value = 1,
custom_value = 1,
flags = CONFIG_INGAME, min_value = 0, max_value = 3});
AddLabels("subsidies_type", {
_0 = "None",
_1 = "All",
_2 = "Passenger",
_3 = "Cargo"});
AddSetting({
name = "category_1_min_pop",
description = "Category 1: Minimum population demand (-1 = default)",
easy_value = -1,
medium_value = -1,
hard_value = -1,
custom_value = -1,
flags = CONFIG_INGAME, min_value = -1, max_value = 100000, step_size = 100});
AddSetting({
name = "category_2_min_pop",
description = "Category 2: Minimum population demand (-1 = default)",
easy_value = -1,
medium_value = -1,
hard_value = -1,
custom_value = -1,
flags = CONFIG_INGAME, min_value = -1, max_value = 100000, step_size = 100});
AddSetting({
name = "category_3_min_pop",
description = "Category 3: Minimum population demand (-1 = default)",
easy_value = -1,
medium_value = -1,
hard_value = -1,
custom_value = -1,
flags = CONFIG_INGAME, min_value = -1, max_value = 100000, step_size = 100});
AddSetting({
name = "category_4_min_pop",
description = "Category 4: Minimum population demand (-1 = default)",
easy_value = -1,
medium_value = -1,
hard_value = -1,
custom_value = -1,
flags = CONFIG_INGAME, min_value = -1, max_value = 100000, step_size = 100});
AddSetting({
name = "category_5_min_pop",
description = "Category 5: Minimum population demand (-1 = default)",
easy_value = -1,
medium_value = -1,
hard_value = -1,
custom_value = -1,
flags = CONFIG_INGAME, min_value = -1, max_value = 100000, step_size = 100});
AddSetting({
name = "category_6_min_pop",
description = "Category 6: Minimum population demand (-1 = default)",
easy_value = -1,
medium_value = -1,
hard_value = -1,
custom_value = -1,
flags = CONFIG_INGAME, min_value = -1, max_value = 100000, step_size = 100});
AddSetting({ name = "town_growth_factor",
description = "Expert: town growth factor",
easy_value = 50,
medium_value = 100,
hard_value = 200,
custom_value = 100,
flags = CONFIG_INGAME, min_value = 20, max_value = 50000, step_size = 20 });
AddSetting({ name = "supply_impacting_part",
description = "Expert: minimum fulfilled percentage for TGR growth",
easy_value = 30,
medium_value = 50,
hard_value = 70,
custom_value = 50,
flags = CONFIG_INGAME, min_value = 0, max_value = 100, step_size = 5 });
AddSetting({ name = "exponentiality_factor",
description = "Expert: TGR growth exponentiality factor",
easy_value = 3,
medium_value = 3,
hard_value = 3,
custom_value = 3,
flags = CONFIG_INGAME, min_value = 1, max_value = 5 });
AddSetting({ name = "lowest_town_growth_rate",
description = "Expert: slowest TGR if requirements are not met",
easy_value = 365,
medium_value = 550,
hard_value = 880,
custom_value = 550,
flags = CONFIG_INGAME, min_value = 0, max_value = 880, step_size = 10 });
AddSetting({ name = "allow_0_days_growth",
description = "Expert: allow 0 days growth",
easy_value = 0,
medium_value = 0,
hard_value = 0,
custom_value = 0,
flags = CONFIG_BOOLEAN | CONFIG_INGAME});
AddSetting({ name = "log_level",
description = "Debug: Log level (higher = print more)",
easy_value = 1,
medium_value = 1,
hard_value = 1,
custom_value = 1,
flags = CONFIG_INGAME, min_value = 1, max_value = 3 });
AddLabels("log_level", { _1 = "1: Info", _2 = "2: Cargo", _3 = "3: Debug" });
}
}
RegisterGS(MainClass());