Skip to content

Commit

Permalink
LoW The Chief Must Die: replace Formula AI with Micro AI
Browse files Browse the repository at this point in the history
Formula AI is not maintained any more and will be removed in the future.  This replaces the Patrol FAI use in this scenario with a Patrol Micro AI.

Note that the FAI guard_radius=3 is equivalent to the MAI attack_range=4 as the former is the distance to the hex from which the patrol attacks, while the latter is the distance to the enemy.
  • Loading branch information
mattsc committed Mar 21, 2021
1 parent 4fe45bf commit af86d00
Showing 1 changed file with 74 additions and 50 deletions.
Expand Up @@ -247,8 +247,8 @@
faction=Custom
[ai]
[stage]
engine=fai
name=unit_formulas
id=main_loop
name=ai_default_rca::candidate_action_evaluation_loop
[/stage]
[/ai]
[/side]
Expand Down Expand Up @@ -279,95 +279,119 @@
name=_ "Odrun"
side=7
x,y=25,4
[ai]
loop_formula="{ai/formula/patrol.fai}"
[vars]
guard_radius=3
waypoints=[ loc(25,4) -> loc(14,2), loc(14,2) -> loc(9,12), loc(9,12) -> loc(6,19), loc(6,19) -> loc(25,4) ]
next_step="loc(25,4)"
[/vars]
[/ai]
[/unit]
[micro_ai]
side=7
ai_type=patrol
action=add
[filter]
id=Odrun
[/filter]
waypoint_x=14,9,6,25
waypoint_y=2,12,19,4
attack_range=4
attack_invisible_enemies=yes
[/micro_ai]

[unit]
type=Goblin Pillager
id=Kardur
name=_ "Kardur"
side=7
x,y=10,20
[ai]
loop_formula="{ai/formula/patrol.fai}"
[vars]
guard_radius=3
waypoints=[ loc(10,20) -> loc(18,24), loc(18,24) -> loc(21,19), loc(21,19) -> loc(18,11), loc(18,11) -> loc(10,20) ]
next_step="loc(10,20)"
[/vars]
[/ai]
[/unit]
[micro_ai]
side=7
ai_type=patrol
action=add
[filter]
id=Kardur
[/filter]
waypoint_x=18,21,18,10
waypoint_y=24,19,11,20
attack_range=4
attack_invisible_enemies=yes
[/micro_ai]

[unit]
type=Goblin Pillager
id=Kartrog
name=_ "Kartrog"
side=7
x,y=22,27
[ai]
loop_formula="{ai/formula/patrol.fai}"
[vars]
guard_radius=3
waypoints=[ loc(22,27) -> loc(27,24), loc(27,24) -> loc(21,16),loc(21,16) -> loc(22,27), loc(22,27) -> loc(6,24), loc(6,24)-> loc(22,27)]
next_step="loc(22,27)"
[/vars]
[/ai]
[/unit]
[micro_ai]
side=7
ai_type=patrol
action=add
[filter]
id=Kartrog
[/filter]
waypoint_x=27,21,22,6,22
waypoint_y=24,16,27,24,27
attack_range=4
attack_invisible_enemies=yes
[/micro_ai]

[unit]
type=Goblin Knight
id=Sdrul
name=_ "Sdrul"
side=7
x,y=13,19
[ai]
loop_formula="{ai/formula/patrol.fai}"
[vars]
guard_radius=3
waypoints=[ loc(13,19) -> loc(16,15), loc(16,15) -> loc(25,4), loc(25,4) -> loc(13,19) ]
next_step="loc(13,19)"
[/vars]
[/ai]
[/unit]
[micro_ai]
side=7
ai_type=patrol
action=add
[filter]
id=Sdrul
[/filter]
waypoint_x=16,25,13
waypoint_y=15,4,19
attack_range=4
attack_invisible_enemies=yes
[/micro_ai]

[unit]
type=Direwolf Rider
id=Utrub
name=_ "Utrub"
side=7
x,y=29,24
[ai]
loop_formula="{ai/formula/patrol.fai}"
[vars]
guard_radius=3
waypoints=[ loc(29,24) -> loc(16,15), loc(16,15) -> loc(29,24) ]
next_step="loc(29,24)"
[/vars]
[/ai]
[/unit]
[micro_ai]
side=7
ai_type=patrol
action=add
[filter]
id=Utrub
[/filter]
waypoint_x=16,29
waypoint_y=15,24
attack_range=4
attack_invisible_enemies=yes
[/micro_ai]

[unit]
type=Goblin Knight
id=Uhmit
name=_ "Uhmit"
side=7
x,y=17,8
[ai]
loop_formula="{ai/formula/patrol.fai}"
[vars]
guard_radius=3
waypoints=[ loc(25,4) -> loc(16,15), loc(16,15) -> loc(25,4) ]
next_step="loc(17,8)"
[/vars]
[/ai]
[/unit]
[micro_ai]
side=7
ai_type=patrol
action=add
[filter]
id=Uhmit
[/filter]
waypoint_x=25,16,17
waypoint_y=4,15,8
attack_range=4
attack_invisible_enemies=yes
[/micro_ai]

#### end of wolves ####

Expand Down

0 comments on commit af86d00

Please sign in to comment.