-
-
Notifications
You must be signed in to change notification settings - Fork 988
/
scenario_micro_ai.cfg
663 lines (581 loc) · 20.8 KB
/
scenario_micro_ai.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
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
#textdomain wesnoth-ai
[test]
id=micro_ai_test
name= _ "Micro AI Tests"
next_scenario=null
map_data="{multiplayer/maps/Dark_Forecast_basic.map}"
{DEFAULT_SCHEDULE}
turns=-1
victory_when_enemies_defeated=no
[side]
side=1
controller=human
id=Grnk
name= _ "Grnk the Frail"
gender=male
unrenamable=yes
type=Goblin Spearman
max_moves=99
x,y=13,15
team_name=Grnk
user_team_name= _ "team_name^Grnk"
persistent=yes
save_id=Grnk
[modifications]
{TRAIT_QUICK}
[/modifications]
village_gold=0
{GOLD 24 22 19}
income=-2 # No income whatsoever
[/side]
# The labels and signposts to go on to the next scenario
[event]
name=prestart
{PLACE_IMAGE "scenery/signpost.png" 9 13}
{SET_LABEL 9 13 _"Animals"}
{PLACE_IMAGE "scenery/signpost.png" 10 12}
{SET_LABEL 10 12 _"Wolves"}
{PLACE_IMAGE "scenery/signpost.png" 11 12}
{SET_LABEL 11 12 _"Swarm"}
{PLACE_IMAGE "scenery/signpost.png" 12 11}
{SET_LABEL 12 11 _"Dragon"}
{PLACE_IMAGE "scenery/signpost.png" 13 11}
{SET_LABEL 13 11 _"Guardians"}
{PLACE_IMAGE "scenery/signpost.png" 14 10}
{SET_LABEL 14 10 _"Lurkers"}
{PLACE_IMAGE "scenery/signpost.png" 8 13}
{SET_LABEL 8 13 _"Protect Unit"}
{PLACE_IMAGE "scenery/signpost.png" 8 14}
{SET_LABEL 8 14 _"HttT: The Elves Besieged"}
{PLACE_IMAGE "scenery/signpost.png" 8 15}
{SET_LABEL 8 15 _"Bottleneck"}
{PLACE_IMAGE "scenery/signpost.png" 8 16}
{SET_LABEL 8 16 _"Messenger"}
{PLACE_IMAGE "scenery/signpost.png" 9 17}
{SET_LABEL 9 17 _"Patrols"}
{PLACE_IMAGE "scenery/signpost.png" 10 17}
{SET_LABEL 10 17 _"Recruiting"}
{PLACE_IMAGE "scenery/signpost.png" 11 18}
{SET_LABEL 11 18 _"Healers"}
{PLACE_IMAGE "scenery/signpost.png" 12 18}
{SET_LABEL 12 18 _"Goto"}
{PLACE_IMAGE "scenery/signpost.png" 13 19}
{SET_LABEL 13 19 _"Hang Out and Messenger"}
{PLACE_IMAGE "scenery/signpost.png" 14 19}
{SET_LABEL 14 19 _"Simple Attack"}
{PLACE_IMAGE "scenery/signpost.png" 15 20}
{SET_LABEL 15 20 _"Fast AI"}
{VARIABLE scenario_name micro_ai_test}
# Menu items explaining the different scenarios
[set_menu_item]
id=m01_menu_bottleneck_defense
description= _ "Bottleneck Defense Micro AI demo"
image=units/human-loyalists/lieutenant.png~CROP(16,7,36,36)~SCALE(24,24)
[filter_location]
x,y=8,15
[/filter_location]
[show_if]
{VARIABLE_CONDITIONAL scenario_name equals micro_ai_test}
[/show_if]
[command]
{MESSAGE Grnk "" _"Bottleneck Defense Micro AI Demo" _"In the Bottleneck Defense Micro AI scenario, a small group of human soldiers is instructed to hold a pass against a large horde of orcs. You can either watch them fight it out against the standard RCA AI or take over the orc side."}
[/command]
[/set_menu_item]
[set_menu_item]
id=m02_swamp_lurkers
description= _ "Swamp Lurker Micro AI demo"
image=units/monsters/wolf.png~CROP(40,29,24,24)
[filter_location]
x,y=14,10
[/filter_location]
[show_if]
{VARIABLE_CONDITIONAL scenario_name equals micro_ai_test}
[/show_if]
[command]
{MESSAGE Grnk "" _"Swamp Lurker Micro AI demo" _"Swamp lurkers are dumb, impulse-driven creatures which can move across most terrain, but only stop on swamp. They move individually without any strategy and always attack the weakest enemy within their reach. If no enemy is in reach, the lurker does a random move instead."}
[/command]
[/set_menu_item]
[set_menu_item]
id=m03_guardians
description= _ "Guardian Micro AI demo"
image=items/buckler.png~CROP(24,24,24,24)
[filter_location]
x,y=13,11
[/filter_location]
[show_if]
{VARIABLE_CONDITIONAL scenario_name equals micro_ai_test}
[/show_if]
[command]
{MESSAGE Grnk "" _"Guardian Micro AI demo" _"In 'Guardians', several variations of the standard Wesnoth guardian are shown, including a ""coward"" unit that runs away from any approaching unit (an ""inverse guardian"", in a way)."}
[/command]
[/set_menu_item]
[set_menu_item]
id=m04_patrol
description= _ "Patrol Micro AI demo"
image=units/goblins/wolf-rider.png~CROP(22,11,42,42)~SCALE(24,24)
[filter_location]
x,y=9,17
[/filter_location]
[show_if]
{VARIABLE_CONDITIONAL scenario_name equals micro_ai_test}
[/show_if]
[command]
{MESSAGE Grnk "" _"Patrol Micro AI demo" _"'Patrols' contains AI modifications for units following patrol routes."}
[/command]
[/set_menu_item]
[set_menu_item]
id=m05_recruiting
description= _ "Recruiting Tests Micro AI demo"
image=units/human-loyalists/lieutenant.png~CROP(16,7,36,36)~SCALE(24,24)
[filter_location]
x,y=10,17
[/filter_location]
[show_if]
{VARIABLE_CONDITIONAL scenario_name equals micro_ai_test}
[/show_if]
[command]
{MESSAGE Grnk "" _"Recruiting Tests Micro AI demo" _"A simple scenario set up for the sole purpose of testing different recruiting patterns."}
[/command]
[/set_menu_item]
[set_menu_item]
id=m06_protect
description= _ "Protect Unit Micro AI demo"
image=units/human-magi/red-mage.png~CROP(22,12,24,24)
[filter_location]
x,y=8,13
[/filter_location]
[show_if]
{VARIABLE_CONDITIONAL scenario_name equals micro_ai_test}
[/show_if]
[command]
{MESSAGE Grnk "" _"Protect Unit Micro AI Demo" _"This scenario demonstrates one side protecting a wizard while moving him to a goal location. At the same time, the other side is modified to do priority attacks on the wizard, even if a better target (by the default AI criteria) is available. You can watch the two AIs fight it out, or take control of either side to explore how the opposing AI behaves."}
[/command]
[/set_menu_item]
[set_menu_item]
id=m06a_protect
# wmllint: local spellings HttT
description= _ "HttT: The Elves Besieged Micro AI demo"
image=units/human-magi/red-mage.png~CROP(22,12,24,24)
[filter_location]
x,y=8,14
[/filter_location]
[show_if]
{VARIABLE_CONDITIONAL scenario_name equals micro_ai_test}
[/show_if]
[command]
{MESSAGE Grnk "" _"HttT: The Elves Besieged Micro AI demo" _"This is a reenactment of scenario ""The Elves Besieged"" of the mainline campaign ""Heir to the Throne"", just that the AI is playing Konrad's side here. The same algorithm as for scenario ""Protect Unit"" is used."}
[/command]
[/set_menu_item]
[set_menu_item]
id=m07_messenger
description= _ "Messenger Escort Micro AI demo"
image=units/human-loyalists/cavalryman/cavalryman.png~CROP(33,27,24,24)
[filter_location]
x,y=8,16
[/filter_location]
[show_if]
{VARIABLE_CONDITIONAL scenario_name equals micro_ai_test}
[/show_if]
[command]
{MESSAGE Grnk "" _"Messenger Escort Micro AI demo" _"'Messenger Escort' has the AI actively protect a messenger while he makes his way to the edge of the map. The escort will also try to open the path for the messenger if there are enemies in the way."}
[/command]
[/set_menu_item]
[set_menu_item]
id=m08_animals
description= _ "Animals Micro AI demo"
image=units/monsters/wolf.png~CROP(40,29,24,24)
[filter_location]
x,y=9,13
[/filter_location]
[show_if]
{VARIABLE_CONDITIONAL scenario_name equals micro_ai_test}
[/show_if]
[command]
{MESSAGE Grnk "" _"Animals Micro AI demo" _"This scenario demonstrates a number of different animals following customized AI behavior, including wolves hunting deer in packs; dogs herding sheep; bears, spiders, yetis, boar and rabbits wandering and hunting/avoiding each other."}
[/command]
[/set_menu_item]
[set_menu_item]
id=m09_wolves
description= _ "Wolves Micro AI demo"
image=units/monsters/wolf.png~CROP(40,29,24,24)
[filter_location]
x,y=10,12
[/filter_location]
[show_if]
{VARIABLE_CONDITIONAL scenario_name equals micro_ai_test}
[/show_if]
[command]
{MESSAGE Grnk "" _"Wolves Micro AI demo" _"Another demonstration of wolves wandering and attacking in packs, with a different behavior from that in 'Animals'."}
[/command]
[/set_menu_item]
[set_menu_item]
id=m10_swarm
description= _ "Swarm Micro AI demo"
image=units/undead/bat-se-4.png~CROP(24,16,24,24)
[filter_location]
x,y=11,12
[/filter_location]
[show_if]
{VARIABLE_CONDITIONAL scenario_name equals micro_ai_test}
[/show_if]
[command]
{MESSAGE Grnk "" _"Swarm Micro AI demo" _"This scenario features bats moving around semi-randomly in a swarm."}
[/command]
[/set_menu_item]
[set_menu_item]
id=m11_dragon
description= _ "Dragon Micro AI demo"
image=units/monsters/fire-dragon.png~CROP(102,60,48,48)~SCALE(24,24)
[filter_location]
x,y=12,11
[/filter_location]
[show_if]
{VARIABLE_CONDITIONAL scenario_name equals micro_ai_test}
[/show_if]
[command]
{MESSAGE Grnk "" _"Dragon Micro AI demo" _"This scenario features a fire dragon displaying a hunt-and-rest behavior."}
[/command]
[/set_menu_item]
[set_menu_item]
id=m12_healer_support
description= _ "Healer support Micro AI demo"
image=units/elves-wood/shaman.png~CROP(26,19,24,24)
[filter_location]
x,y=11,18
[/filter_location]
[show_if]
{VARIABLE_CONDITIONAL scenario_name equals micro_ai_test}
[/show_if]
[command]
{MESSAGE Grnk "" _"Healer Support Micro AI demo" _"This scenario contains a simple demonstration of setting up the Healer Support Micro AI, which uses the healers of a side to back up injured or threatened units rather than having them participate in combat under all circumstances."}
[/command]
[/set_menu_item]
[set_menu_item]
id=m13_goto
description= _ "Goto Micro AI demo"
image=units/human-loyalists/spearman.png~CROP(21,16,24,24)
[filter_location]
x,y=12,18
[/filter_location]
[show_if]
{VARIABLE_CONDITIONAL scenario_name equals micro_ai_test}
[/show_if]
[command]
{MESSAGE Grnk "" _"Goto Micro AI demo" _"This scenario contains several example usages of the Goto Micro AI, which is a highly configurable method of sending a unit (or units) to a location or set of locations. The units to be moved are defined using a Standard Unit Filter, while the goto locations are given in a Standard Location Filter."}
[/command]
[/set_menu_item]
[set_menu_item]
id=m14_hangout
description= _ "Hang Out Micro AI demo"
image=units/human-outlaws/bandit.png~CROP(22,14,24,24)
[filter_location]
x,y=13,19
[/filter_location]
[show_if]
{VARIABLE_CONDITIONAL scenario_name equals micro_ai_test}
[/show_if]
[command]
{MESSAGE Grnk "" _"Combined Hang Out and Messenger Escort Micro AI demo" _"This scenario is a demonstration of the Hang Out Micro AI which keeps units around a (customizable) location until a (customizable) condition is met. After that the units are released to follow other AI behavior. The scenario also shows how to combine two Micro AIs on the same side by having the Messenger Escort Micro AI take over at that point."}
[/command]
[/set_menu_item]
[set_menu_item]
id=m15_simple_attack
description= _ "Simple Attack Micro AI demo"
image=units/undead/soulless.png~CROP(27,14,24,24)
[filter_location]
x,y=14,19
[/filter_location]
[show_if]
{VARIABLE_CONDITIONAL scenario_name equals micro_ai_test}
[/show_if]
[command]
{MESSAGE Grnk "" _"Simple Attack Micro AI demo" _"This scenario demonstrates how certain attacks can be executed with higher priority than the standard Wesnoth attacks and how the AI can be forced to do attacks that it would otherwise avoid."}
[/command]
[/set_menu_item]
[set_menu_item]
id=m16_fast
description= _ "Fast Micro AI demo"
image=units/orcs/grunt.png~CROP(24,12,24,24)
[filter_location]
x,y=15,20
[/filter_location]
[show_if]
{VARIABLE_CONDITIONAL scenario_name equals micro_ai_test}
[/show_if]
[command]
{MESSAGE Grnk "" _"Fast Micro AI demo" _"A simple demonstration of the calculation time advantage of the Fast Micro AI over the default AI in scenarios with many units."}
[/command]
[/set_menu_item]
[/event]
[event]
name=start
{SCROLL_TO 13 18}
{MESSAGE Grnk "" "" _"Move me to any of the signposts to go to a Micro AI demonstration.
Information about each demonstration can be accessed by right-clicking on the respective signpost."}
[objectives]
[objective]
description= _ "Move Grnk to one of the signposts"
condition=win
[/objective]
[note]
description= _ "Right-click on a signpost to get information about the scenario"
[/note]
[/objectives]
[/event]
# Events for going on to next scenarios, when Grnk goes to a signpost
[event]
name=moveto
[filter]
x,y=8,15
[/filter]
[endlevel]
result=victory
next_scenario=bottleneck_defense
bonus=no
carryover_percentage=0
carryover_report=no
linger_mode=no
replay_save=no
[/endlevel]
[/event]
[event]
name=moveto
[filter]
x,y=14,10
[/filter]
[endlevel]
result=victory
next_scenario=lurkers
bonus=no
carryover_percentage=0
carryover_report=no
linger_mode=no
replay_save=no
[/endlevel]
[/event]
[event]
name=moveto
[filter]
x,y=9,13
[/filter]
[endlevel]
result=victory
next_scenario=animals
bonus=no
carryover_percentage=0
carryover_report=no
linger_mode=no
replay_save=no
[/endlevel]
[/event]
[event]
name=moveto
[filter]
x,y=10,12
[/filter]
[endlevel]
result=victory
next_scenario=wolves
bonus=no
carryover_percentage=0
carryover_report=no
linger_mode=no
replay_save=no
[/endlevel]
[/event]
[event]
name=moveto
[filter]
x,y=11,12
[/filter]
[endlevel]
result=victory
next_scenario=swarm
bonus=no
carryover_percentage=0
carryover_report=no
linger_mode=no
replay_save=no
[/endlevel]
[/event]
[event]
name=moveto
[filter]
x,y=12,11
[/filter]
[endlevel]
result=victory
next_scenario=dragon
bonus=no
carryover_percentage=0
carryover_report=no
linger_mode=no
replay_save=no
[/endlevel]
[/event]
[event]
name=moveto
[filter]
x,y=13,11
[/filter]
[endlevel]
result=victory
next_scenario=guardians
bonus=no
carryover_percentage=0
carryover_report=no
linger_mode=no
replay_save=no
[/endlevel]
[/event]
[event]
name=moveto
[filter]
x,y=9,17
[/filter]
[endlevel]
result=victory
next_scenario=patrols
bonus=no
carryover_percentage=0
carryover_report=no
linger_mode=no
replay_save=no
[/endlevel]
[/event]
[event]
name=moveto
[filter]
x,y=10,17
[/filter]
[endlevel]
result=victory
next_scenario=recruiting
bonus=no
carryover_percentage=0
carryover_report=no
linger_mode=no
replay_save=no
[/endlevel]
[/event]
[event]
name=moveto
[filter]
x,y=8,13
[/filter]
[endlevel]
result=victory
next_scenario=protect_unit
bonus=no
carryover_percentage=0
carryover_report=no
linger_mode=no
replay_save=no
[/endlevel]
[/event]
[event]
name=moveto
[filter]
x,y=8,14
[/filter]
[endlevel]
result=victory
next_scenario=The_Elves_Besieged
bonus=no
carryover_percentage=0
carryover_report=no
linger_mode=no
replay_save=no
[/endlevel]
[/event]
[event]
name=moveto
[filter]
x,y=8,16
[/filter]
[endlevel]
result=victory
next_scenario=messenger_escort
bonus=no
carryover_percentage=0
carryover_report=no
linger_mode=no
replay_save=no
[/endlevel]
[/event]
[event]
name=moveto
[filter]
x,y=11,18
[/filter]
[endlevel]
result=victory
next_scenario=healer_support
bonus=no
carryover_percentage=0
carryover_report=no
linger_mode=no
replay_save=no
[/endlevel]
[/event]
[event]
name=moveto
[filter]
x,y=12,18
[/filter]
[endlevel]
result=victory
next_scenario=goto
bonus=no
carryover_percentage=0
carryover_report=no
linger_mode=no
replay_save=no
[/endlevel]
[/event]
[event]
name=moveto
[filter]
x,y=13,19
[/filter]
[endlevel]
result=victory
next_scenario=hang_out
bonus=no
carryover_percentage=0
carryover_report=no
linger_mode=no
replay_save=no
[/endlevel]
[/event]
[event]
name=moveto
[filter]
x,y=14,19
[/filter]
[endlevel]
result=victory
next_scenario=simple_attack
bonus=no
carryover_percentage=0
carryover_report=no
linger_mode=no
replay_save=no
[/endlevel]
[/event]
[event]
name=moveto
[filter]
x,y=15,20
[/filter]
[endlevel]
result=victory
next_scenario=fast
bonus=no
carryover_percentage=0
carryover_report=no
linger_mode=no
replay_save=no
[/endlevel]
[/event]
[/test]