Skip to content

Commit

Permalink
TSG S2: adjust AI settings
Browse files Browse the repository at this point in the history
This follows the earlier commit which unified side 2 and 3.

In the first rounds the AI behaves like former side 3, later like side 2.

This is seemlessly possible, because side 3's AI settings were having practical
effect at the beginning of the game, and side 2's conflicing settings don't come
into action before the recruited troops met the ones of the player.

(bug #3032)

[ci skip]

(cherry-picked from commit ee09bc3)
  • Loading branch information
sevu committed Oct 7, 2018
1 parent db95766 commit fe0613b
Showing 1 changed file with 28 additions and 20 deletions.
48 changes: 28 additions & 20 deletions data/campaigns/The_South_Guard/scenarios/02_Proven_by_the_Sword.cfg
Expand Up @@ -72,19 +72,17 @@
(Footpad,Thug,Thief,Poacher,Trapper)}

[ai]
# macroified the params here because they'll be reused later in the scenario
#define URZA_NALMATH_AI_PARAMS
{ATTACK_DEPTH 2 3 4}
grouping=no
{NO_SCOUTS}
village_value=3
#enddef

{URZA_NALMATH_AI_PARAMS}
grouping=no
{NO_SCOUTS}

{QUANTITY recruitment_pattern (fighter,fighter,scout,fighter)
(fighter,archer,fighter,fighter)
(scout,fighter,archer,fighter,fighter)}

# The units at the beginning should not focus villages:
village_value=0
# scout_village_targeting=0
{MODIFY_AI_DELETE_CANDIDATE_ACTION 2 main_loop villages}
[/ai]
{FLAG_VARIANT6 ragged}

Expand All @@ -107,14 +105,27 @@

#ifdef HARD
{NAMED_GENERIC_UNIT 2 Footpad 34 14 () (_"Criminal")} {VILLAGE_USERS}
# Thief instead of Poacher:
{NAMED_GENERIC_UNIT 2 Thief 18 22 () (_"Criminal")} {VILLAGE_USERS} {GUARDIAN}
{NAMED_GENERIC_UNIT 2 Thief 18 22 () (_"Criminal")} {VILLAGE_USERS} {GUARDIAN} # Thief instead of Poacher
{NAMED_GENERIC_UNIT 2 Thief 22 12 () (_"Criminal")} {VILLAGE_USERS} {GUARDIAN}
#endif
[/side]

{STARTING_VILLAGES 2 21}

[event]
name=turn 6

# Now is the time that the recruited units may have met Deoran's,
# and may have the chance to recapture a village.
[modify_side]
side=2
[ai]
village_value=3
[/ai]
[/modify_side]
{MODIFY_AI_ADD_CANDIDATE_ACTION 2 main_loop {AI_CA_VILLAGES}}
[/event]

[event]
name=prestart

Expand Down Expand Up @@ -269,7 +280,7 @@
{QUANTITY add 31 23 19}
[/modify_turns]

# check if it is Deoran. If not, tell him to go to Westin
# Check if it is Deoran. If not, tell him to go to Westin.
[if]
[have_unit]
x,y=22,16
Expand All @@ -291,7 +302,7 @@
[/if]
[/event]

# Deoran arrives at the citadel
# Deoran arrives at the citadel.

[event]
name=moveto
Expand Down Expand Up @@ -367,14 +378,12 @@
(Skeleton,Skeleton Archer,Vampire Bat,Blood Bat)}
[/set_recruit]

# update the [ai] params so that the recruitment_pattern matches the new
# recruits
# Update the [ai] params so that the recruitment_pattern matches
# the new recruits.
[modify_side]
side=2

[ai]
{URZA_NALMATH_AI_PARAMS}

{QUANTITY recruitment_pattern (fighter)
(fighter,fighter,scout,fighter)
(fighter,archer,fighter,archer,scout)}
Expand Down Expand Up @@ -453,7 +462,7 @@
[/if]
[/event]

# The undead attack
# The undead attack!

[event]
name=prerecruit
Expand Down Expand Up @@ -502,7 +511,7 @@
[/event]
[/event]

# Pillaging and burning the villages near Westin
# Pillaging and burning the villages near Westin.

[event]
name=capture
Expand Down Expand Up @@ -691,4 +700,3 @@
[/scenario]

#undef VILLAGE_USERS
#undef URZA_NALMATH_AI_PARAMS

0 comments on commit fe0613b

Please sign in to comment.