/
game_parameters.cfg
637 lines (535 loc) · 15.3 KB
/
game_parameters.cfg
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
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
#textdomain wesnoth-Wild_Frontiers
# Many game parameters are stored here for easy access.
# The funny-looking format is required to avoid horrendous-looking line breaks
# in message and errors elsewhere, and I will eventually need to tell wmllint
# to ignore it.
# AI parameters are stored in enemies.cfg
# ----- General Parameters -----------------------------------------------
# Season length in turns (must be multiple of 6 to avoid time jumps)
#define SEASON_LENGTH
36#enddef
# How much gold per village
#define LUMP_VILLAGE
9#enddef
# How much gold per kill for level 0 units
#define LUMP_KILL
3#enddef
# How much gold when removing artifact
#define LUMP_RELIC
30#enddef
#define STARTING_GOLD
{QUANTITY amount 600 550 500}
#enddef
#define STARTING_BONUS
{QUANTITY value 4 3 3}
#enddef
#define WINNING_GOLD
20000#enddef
# 7 relics in total
#define NUM_RELICS
7#enddef
#define MAP_WIDTH
66#enddef
#define MAP_HEIGHT
66#enddef
# Outlaws and undead (and probably others) will appear within this distance
# of the map edge
#define BORDER
5#enddef
# The rates at which the probability of outlaw/orc occurrences rise
# Higher = more predictable
# Setting this to 1 affects the 1..100 random chance.
# They will take longer to spawn
#define ENEMY_STEP
2#enddef
#define ENEMY_INCOME
-2#enddef
# The number of seasons an enemy unit is allowed to carryover into.
#define ENEMY_SEASONS
3#enddef
# Fraction of outlaws that are killed off at the beginning of the spring
#define OUTLAW_THINNING
{QUANTITY value 0.80 0.70 0.60}
#enddef
#define SETUP_GAME_VARIABLES
# This is called every season to reset the values. Should be overwritten
# These are all approximate number of turns before a group of enemies re-
# appears in each scenario
[set_variables]
name=jumps
mode=replace
[value]
spring_outlaws= "$(ceil( ({SEASON_LENGTH}/6.0 ) * {ENEMY_STEP} ))"
spring_raids= "$(ceil( ({SEASON_LENGTH}/3.0 ) * {ENEMY_STEP} ))"
summer_outlaws= "$(ceil( ({SEASON_LENGTH}/6.0 ) * {ENEMY_STEP} ))"
summer_raids= "$(ceil( ({SEASON_LENGTH}/3.0 ) * {ENEMY_STEP} ))"
autumn_outlaws= "$(ceil( ({SEASON_LENGTH}/6.0 ) * {ENEMY_STEP} ))"
autumn_raids= "$(ceil( ({SEASON_LENGTH}/3.0 ) * {ENEMY_STEP} ))"
winter_outlaws= "$(ceil( ({SEASON_LENGTH}/6.0 ) * {ENEMY_STEP} ))"
winter_raids= "$(ceil( ({SEASON_LENGTH}/3.0 ) * {ENEMY_STEP} ))"
[/value]
[/set_variables]
# Number of initial/equilibrium animals and number of outlaws per generated
# group of outlaws. Also the increase in gold and income orcs/necros get.
# Set as variables instead of macros to avoid some random errors,
# allowing tweaking of num_outlaws, etc. and keeping everything together.
[set_variables]
name=enemy
mode=replace
[value]
{QUANTITY blob_limit 14 14 14} # Upper limit to how big the enemy blob spawn can be
{QUANTITY min_spawn 14 14 14} # Minimum limit to enemy HAVE_COUNT
{QUANTITY min_guardian_spawn 7 7 7} # Minimum limit to guardian HAVE_COUNT
{QUANTITY min_ally_spawn 14 14 14} # Minimum limit to allies HAVE_COUNT
{QUANTITY num_animals 30 30 30} # fewer animals => more foes reach you
{QUANTITY num_calamity 12 12 12} # Calamity henchmen blob size
{QUANTITY num_outlaws 6 6 6} # Enemy side initial size
{QUANTITY num_allies 4 4 4} # Number of Diplomacy Allies and mercs
{QUANTITY raid_mult 0.75 1.0 1.25}
{QUANTITY raid_base_gold 25 25 25} # gold = raid_mult * ( base + gold_mult*num_villages)
{QUANTITY raid_gold_mult 1.25 1.5 1.75} # Keep in mind raid units have no upkeep
{QUANTITY calamity_mult 0.75 1.0 1.25} # gold = calamity_mult * (raid_mult * ( base + gold_mult*num_villages))
# For 100 farms, the enemy recruiting gold will be:
# Easy Gold: 113 = 0.75 * ( 25 + 1.25 * 100)
# Normal Gold: 175 = 1.0 * ( 25 + 1.5 * 100)
# Hard Gold: 250 = 1.25 * ( 25 + 1.75 * 100)
[/value]
[/set_variables]
# Income per village per turn in each season
[set_variables]
name=farm_income
mode=replace
[value]
{QUANTITY spring 1 0 0}
{QUANTITY summer 1 0 0}
{QUANTITY autumn 1 0 0}
{QUANTITY winter 0 0 0}
[/value]
[/set_variables]
# Unit support per village in each season
[set_variables]
name=farm_support
mode=replace
[value]
{QUANTITY spring 1 1 1}
{QUANTITY summer 1 1 1}
{QUANTITY autumn 1 1 1}
{QUANTITY winter 1 1 1}
[/value]
[/set_variables]
[set_variable]
name=wf_vars.drought #Drought in the summer, autumn
value=no
[/set_variable]
[set_variable]
name=wf_vars.training_level
value=1
[/set_variable]
[set_variable]
name=wf_vars.gold_cost
value=250
[/set_variable]
### These values should not reset. They should not be overwritten
### [set_variable]
{VAR_IF_NULL wf_vars.economy no} # if yes, farms won't produce any income per turn
{VAR_IF_NULL wf_vars.already_won no}
{VAR_IF_NULL wf_vars.Peasant_advance no}
{VAR_IF_NULL wf_vars.Woodsman_advance no}
{VAR_IF_NULL wf_vars.Ruffian_advance no}
{VAR_IF_NULL wf_vars.expand_cost 250}
{VAR_IF_NULL wf_vars.expand_cost_add 250}
{VAR_IF_NULL wf_vars.expand_rank 1}
{VAR_IF_NULL wf_vars.extra_guardian 0}
{VAR_IF_NULL wf_vars.fungi_book 0}
{VAR_IF_NULL wf_vars.king_troops no}
{VAR_IF_NULL wf_vars.tavern_closed no}
{VAR_IF_NULL wf_vars.law_book 0}
{VAR_IF_NULL wf_vars.prisoner_bonus 0}
{VAR_IF_NULL wf_vars.town_name "Town Center"}
{VAR_IF_NULL wf_vars.enable_training yes}
{VAR_IF_NULL wf_vars.village_limit 48}
{VAR_IF_NULL wf_vars.eating_cost 5}
{VAR_IF_NULL wf_maps ""}
### These variables should not reset. They should not be overwritten
### [set_variables]
# Initial "relations" reflect how likely each group is to attack the player
# Negative = unlikely (negative ~ friendly)
# Positive = probability of spawning
{VARS_IF_NULL relations (
[value]
king="$(ceil(-1*{ENEMY_STEP} * ({SEASON_LENGTH}/2.0)))" #Allies
trees={ON_DIFFICULTY -40 -30 -20} # Cut/plant trees
hills={ON_DIFFICULTY -40 -30 -20} # Flatten/Pile hills and mountains
outlaws="$(ceil(-1*{ENEMY_STEP} * ({SEASON_LENGTH}/3.0)))"
bandits="$(ceil(-1*{ENEMY_STEP} * ({SEASON_LENGTH}/1.0)))" # spawn in season 2
orc_raids=0
undead_raids=0
calamity_type="skip"
bandit_factions="custom_cotf,custom_cotf,custom_cotf,custom,custom,custom"
guardian_factions="custom,custom_tuskers,custom_ogres,custom_cotf,custom,custom_tuskers,custom_ogres,custom_cotf"
fief_factions="custom_orcs,custom_orcs,custom_cotf,custom_cotf,custom_trolls,custom_trolls"
orc_factions="Trolls,Orcs,Goblins,Hordes,Custom"
undead_factions="Necromancers,Skeletons,Zombies,Custom"
[/value]
)}
# Diplomacy variables
{VARS_IF_NULL diplomacy (
[value]
ally="loyalists" # Default ally
faction="none" # Name of faction: elves, dwarves, etc.
required=0 # Required obligation, planting trees, killing etc.
current=0 # current standing in regards to obligation
fee=0 # Fee to pay on completion of obligation
turns=0 # Wait turns target after paying fee
# Relations counters. Used in missions.
outlaws=0
dwarves=0
undead=0
drakes=0
orcs=0
loyalists=0
elves=0
dunefolk=0
# Required action mission. 1 to 5
outlaws_mission=1
dwarves_mission=1
undead_mission=1
drakes_mission=1
orcs_mission=1
loyalists_mission=1
elves_mission=1
dunefolk_mission=1
# Alliance state. How happy they are of us.
# For actions outside the scope of a mission
outlaws_state=0
dwarves_state=0
undead_state=0
drakes_state=0
orcs_state=0
loyalists_state=0
elves_state=0
dunefolk_state=0
outlaws_bonus=no
dwarves_bonus=no
undead_bonus=no
drakes_bonus=no
orcs_bonus=no
loyalists_bonus=no
elves_bonus=no
dunefolk_bonus=no
outlaws_recruit=no
dwarves_recruit=no
undead_recruit=no
drakes_recruit=no
orcs_recruit=no
loyalists_recruit=no
elves_recruit=no
dunefolk_recruit=no
[/value]
)}
# Set up building variables to determine when to allow recruits
#{VARS_IF_NULL buildings (
# [value]
# blacksmiths=0
# bowyers=0
# stables=0
# libraries=0
# armorers=0
# [/value]
# # add more as I add more buildings
#)}
# Create "queue" variable for buildings and landscaping.
# I'm not entirely sure this is necessary, but it doesn't hurt
{VARS_IF_NULL projects.proj_list ()}
# Variable in which to store map labels
{VARS_IF_NULL labels.map_labels ()}
# Variable in which to store recruit array
{VARS_IF_NULL recruit_array.list ()}
{VARS_IF_NULL proj_costs (
[value]
{COST_NO_DISCOUNT}
[/value]
)}
{VARS_IF_NULL proj_turns (
[value]
{SLOW_TURNS}
[/value]
)}
#enddef
# REPEAT_b LIMIT
#define BLOB_LIMIT
$enemy.blob_limit|#enddef
#define COST_NO_DISCOUNT
altar=60
armorer=60
bowyer=40
bridge=5
castle=30
farm=30
forest=5
forge=50
fort=5
hill=10
keep=100
king=100
library=50
lighthouse=40
mushroom=15
road=2
rune=5
stable=30
stream=10
swamp=5
tavern=40
tunnel=40
village=20
well=60
windmill=40
yield=15
#enddef
# cost * 0.8
#define COST_DISCOUNT
altar=48
armorer=48
bowyer=32
bridge=4
castle=24
farm=24
forest=4
forge=40
fort=4
hill=8
keep=80
king=100
library=40
lighthouse=32
mushroom=12
road=1
rune=4
stable=24
stream=8
swamp=4
tavern=32
tunnel=32
village=16
well=48
windmill=32
yield=12
#enddef
# cost * 0.9 for starting bonus
#define COST_BONUS
altar=54
armorer=54
bowyer=36
bridge=4
castle=27
farm=27
forest=4
forge=45
fort=4
hill=9
keep=90
king=100
library=45
lighthouse=36
mushroom=13
road=2
rune=4
stable=27
stream=9
swamp=4
tavern=36
tunnel=36
village=18
well=54
windmill=36
yield=13
#enddef
#define SLOW_TURNS
altar=4
armorer=6
bowyer=4
bridge=2
castle=3
farm=3
forest=2
forge=5
fort=2
hill=2
keep=10
king=0
library=5
lighthouse=3
mushroom=2
road=1
rune=1
stable=3
stream=1
swamp=2
tavern=4
tunnel=4
village=3
well=4
windmill=4
yield=2
#enddef
#define FAST_TURNS
altar=2
armorer=3
bowyer=2
bridge=1
castle=2
farm=2
forest=1
forge=3
fort=1
hill=1
keep=5
king=0
library=3
lighthouse=2
mushroom=1
road=1
rune=1
stable=2
stream=1
swamp=1
tavern=2
tunnel=2
village=2
well=2
windmill=2
yield=1
#enddef
#define SETUP_SEASON_VARIABLES SEASON SEASON_STR
# What season # is it? Enemies get stronger and other effects occur
# as the years go on. Starts at zero.
# S S A W Y
# 0 1 2 3 0 # A new beginning. Year Zero!
# 4 5 6 7 1 # Calamity on NORMAL and HARD starts season 5. Winter Calamity 7
# 8 9 0 1 2 # Calamity on EASY starts season 9. Winter Calamity 11
# 2 3 4 5 3
# 6 7 8 9 4
# First season is 0
{VAR_IF_NULL wf_vars.season -1}
{VARIABLE_OP wf_vars.season add 1}
{VARIABLE wf_vars.season_str {SEASON}}
{VARIABLE year $wf_vars.season}
{VARIABLE_OP year divide 4}
{VARIABLE_OP year round floor}
{VARIABLE wf_vars.year $year}
{VARIABLE_OP year add 800}
{VARIABLE wf_vars.year_str ({SEASON_STR} + _", $year| YW")}
{CLEAR_VARIABLE year}
#enddef
# -----Building Parameters -----------------------------------------------
# Building parameters are defined up to ensure ease of adjusting. I moved
# Them out of the game_parameters file to improved modularity and because
# they seem fairly settled at this point.
#define BUILDABLE_TERRAIN
!,*^F*,*^V*,*^Gvs,*^Y*,Y*,!,G*,G*^E*,R*,R*^E*,Ds,Ds^E*,Uu,Uu^E*,Uue,Uue^E*,Ur,Ur^E*#enddef
#define FORGE_COST
$proj_costs.forge|#enddef
#define FORGE_TURNS
$proj_turns.forge|#enddef
#define BOWYER_COST
$proj_costs.bowyer|#enddef
#define BOWYER_TURNS
$proj_turns.bowyer|#enddef
#define STABLE_COST
$proj_costs.stable|#enddef
#define STABLE_TURNS
$proj_turns.stable|#enddef
#define LIBRARY_COST
$proj_costs.library|#enddef
#define LIBRARY_TURNS
$proj_turns.library|#enddef
#define ARMORER_COST
$proj_costs.armorer|#enddef
#define ARMORER_TURNS
$proj_turns.armorer|#enddef
#define FORT_COST
$proj_costs.fort|#enddef
#define FORT_TURNS
$proj_turns.fort|#enddef
#define CASTLE_COST
$proj_costs.castle|#enddef
#define CASTLE_TURNS
$proj_turns.castle|#enddef
#define KEEP_COST
$proj_costs.keep|#enddef
#define KEEP_TURNS
$proj_turns.keep|#enddef
#define FARM_COST
$proj_costs.farm|#enddef
#define FARM_TURNS
$proj_turns.farm|#enddef
#define FARM_RADIUS
1#enddef
# ----- Landscaping parameters -------------------------------------------
#define FOREST_COST
$proj_costs.forest|#enddef
#define FOREST_TURNS
$proj_turns.forest|#enddef
#define HILL_COST
$proj_costs.hill|#enddef
#define HILL_TURNS
$proj_turns.hill|#enddef
#define SWAMP_COST
$proj_costs.swamp|#enddef
#define SWAMP_TURNS
$proj_turns.swamp|#enddef
#define PAVED_COST
$proj_costs.road|#enddef
#define PAVED_TURNS
$proj_turns.road|#enddef
#define RUNE_COST
$proj_costs.rune|#enddef
#define RUNE_TURNS
$proj_turns.rune|#enddef
#define STREAM_COST
$proj_costs.stream|#enddef
#define STREAM_TURNS
$proj_turns.stream|#enddef
#define BRIDGE_COST
$proj_costs.bridge|#enddef
#define BRIDGE_TURNS
$proj_turns.bridge|#enddef
#define LIGHTHOUSE_COST
$proj_costs.lighthouse|#enddef
#define LIGHTHOUSE_TURNS
$proj_turns.lighthouse|#enddef
#define WINDMILL_COST
$proj_costs.windmill|#enddef
#define WINDMILL_TURNS
$proj_turns.windmill|#enddef
#define WELL_COST
$proj_costs.well|#enddef
#define WELL_TURNS
$proj_turns.well|#enddef
#define ALTAR_COST
$proj_costs.altar|#enddef
#define ALTAR_TURNS
$proj_turns.altar|#enddef
#define YIELD_COST
$proj_costs.yield|#enddef
#define YIELD_TURNS
$proj_turns.yield|#enddef
#define VILLAGE_COST
$proj_costs.village|#enddef
#define VILLAGE_TURNS
$proj_turns.village|#enddef
#define MUSHROOM_COST
$proj_costs.mushroom|#enddef
#define MUSHROOM_TURNS
$proj_turns.mushroom|#enddef
#define TAVERN_COST
$proj_costs.tavern|#enddef
#define TAVERN_TURNS
$proj_turns.tavern|#enddef
#define TUNNEL_COST
$proj_costs.tunnel|#enddef
#define TUNNEL_TURNS
$proj_turns.tunnel|#enddef
#define KING_COST
$proj_costs.king|#enddef