Skip to content

Commit

Permalink
move loyal overlays to the loyal trait
Browse files Browse the repository at this point in the history
since the recent changes to overlays= in particular 1a7724e,
e710333 and b2cd1cf [unit]overlays= is no longer the
recommended way to add an overlay and the use of the
apply_to=overlay effect is reccomended instead, so adding it
to the [trait] is the most natural option here.

this in particular fixes #4058 . Also people simply forgetting the
IS_LOYAL macro was a not-so-uncommon cause of bugs.

In some cases people want to give the LOYAL trait without giving the
loyal overlays for those cases i added a optional OVERLAY parameter to
the {TRAIT_LOYAL} macro, also heroes should now use {TRAIT_LOYAL_HERO}
instead which uses the hero overlay. The IS_LOYAL and IS_HERO macros are
no longer needed in combination with those traits.
  • Loading branch information
gfgtdf committed Aug 25, 2019
1 parent 26c2f94 commit 5cb9369
Show file tree
Hide file tree
Showing 102 changed files with 122 additions and 414 deletions.
3 changes: 1 addition & 2 deletions data/ai/micro_ais/scenarios/The_Elves_Besieged.cfg
Expand Up @@ -52,9 +52,8 @@
side=1
x=19
y=23
{IS_HERO}
[modifications]
{TRAIT_LOYAL}
{TRAIT_LOYAL_HERO}
{TRAIT_INTELLIGENT}
[/modifications]
[/unit]
Expand Down
Expand Up @@ -72,7 +72,7 @@
{TRAIT_LOYAL}
{TRAIT_RESILIENT}
[/modifications]
{IS_LOYAL}

facing=ne
[/unit]
[/side]
Expand Down
5 changes: 0 additions & 5 deletions data/campaigns/An_Orcish_Incursion/scenarios/07_Showdown.cfg
Expand Up @@ -115,7 +115,6 @@
{TRAIT_LOYAL}
{TRAIT_RESILIENT}
[/modifications]
{IS_LOYAL}
facing=sw
[/unit]

Expand All @@ -135,7 +134,6 @@
[modifications]
{TRAIT_LOYAL}
[/modifications]
{IS_LOYAL}
facing=sw
[/unit]

Expand All @@ -155,7 +153,6 @@
[modifications]
{TRAIT_LOYAL}
[/modifications]
{IS_LOYAL}
facing=sw
[/unit]

Expand All @@ -175,7 +172,6 @@
[modifications]
{TRAIT_LOYAL}
[/modifications]
{IS_LOYAL}
facing=sw
[/unit]

Expand All @@ -195,7 +191,6 @@
[modifications]
{TRAIT_LOYAL}
[/modifications]
{IS_LOYAL}
facing=sw
[/unit]

Expand Down
4 changes: 1 addition & 3 deletions data/campaigns/Dead_Water/scenarios/01_Invasion.cfg
Expand Up @@ -221,7 +221,7 @@
[unit]
type=Mermaid Priestess
[modifications]
{TRAIT_LOYAL}
{TRAIT_LOYAL_HERO}
{TRAIT_RESILIENT}
[/modifications]
id=Cylanna
Expand All @@ -230,7 +230,6 @@
side=1
x=21
y=9
{IS_HERO}
unrenamable=yes
[/unit]

Expand Down Expand Up @@ -312,7 +311,6 @@
[/modifications]
facing=se
animate=yes
{IS_LOYAL}
profile=portraits/gwabbo.png
[/unit]

Expand Down
3 changes: 0 additions & 3 deletions data/campaigns/Dead_Water/scenarios/02_Flight.cfg
Expand Up @@ -463,7 +463,6 @@ _f, _f, _f, _f, _f, _f, _f
side=1
x=$x1
y=$y1
{IS_LOYAL}
[/unit]

[if]
Expand Down Expand Up @@ -590,7 +589,6 @@ _f, _f, _f, _f, _f, _f, _f
side=1
x=$x1
y=$y1
{IS_LOYAL}
[/unit]

[if]
Expand Down Expand Up @@ -733,7 +731,6 @@ _f, _f, _f, _f, _f, _f, _f
side=1
x=$x1
y=$y1
{IS_LOYAL}
[/unit]

[if]
Expand Down
3 changes: 0 additions & 3 deletions data/campaigns/Dead_Water/scenarios/04_Slavers.cfg
Expand Up @@ -335,7 +335,6 @@
{TRAIT_LOYAL}
{TRAIT_RESILIENT}
[/modifications]
{IS_LOYAL}
[/unit]

[message]
Expand Down Expand Up @@ -627,7 +626,6 @@
{TRAIT_LOYAL}
{TRAIT_INTELLIGENT}
[/modifications]
{IS_LOYAL}
[/unit]

[message]
Expand Down Expand Up @@ -691,7 +689,6 @@
{TRAIT_LOYAL}
{TRAIT_RESILIENT}
[/modifications]
{IS_LOYAL}
[/unit]

[if]
Expand Down
2 changes: 1 addition & 1 deletion data/campaigns/Dead_Water/scenarios/05_Tirigaz.cfg
Expand Up @@ -182,7 +182,7 @@
x={X}
y={Y}
[modifications]
{TRAIT_LOYAL}
{TRAIT_LOYAL OVERLAY=""}
{TRAIT_FEARLESS}
[/modifications]
moves=0
Expand Down
Expand Up @@ -280,7 +280,6 @@
{TRAIT_LOYAL}
{TRAIT_HEALTHY}
[/modifications]
{IS_LOYAL}
animate=yes
[/unit]
[message]
Expand Down
3 changes: 1 addition & 2 deletions data/campaigns/Dead_Water/scenarios/09_The_Mage.cfg
Expand Up @@ -383,10 +383,9 @@
name= _ "Caladon"
unrenamable=yes
[modifications]
{TRAIT_LOYAL}
{TRAIT_LOYAL_HERO}
{TRAIT_QUICK}
[/modifications]
{IS_HERO}
profile=portraits/caladon.png
[/unit]

Expand Down
3 changes: 0 additions & 3 deletions data/campaigns/Dead_Water/scenarios/10_The_Flaming_Sword.cfg
Expand Up @@ -451,7 +451,6 @@
{TRAIT_LOYAL}
{TRAIT_DEXTROUS}
[/modifications]
{IS_LOYAL}
[/unit]
[unit]
type=Thug
Expand All @@ -464,7 +463,6 @@
{TRAIT_LOYAL}
{TRAIT_RESILIENT}
[/modifications]
{IS_LOYAL}
[/unit]
[unit]
type=Thug
Expand All @@ -477,7 +475,6 @@
{TRAIT_LOYAL}
{TRAIT_QUICK}
[/modifications]
{IS_LOYAL}
[/unit]

{CLEAR_VARIABLE Siddry_stored}
Expand Down
2 changes: 1 addition & 1 deletion data/campaigns/Dead_Water/scenarios/11_Getting_Help.cfg
Expand Up @@ -40,7 +40,7 @@
canrecruit=yes
type=Mermaid Diviner
[modifications]
{TRAIT_LOYAL}
{TRAIT_LOYAL OVERLAY=""}
{TRAIT_DEXTROUS}
[/modifications]
[ai]
Expand Down
3 changes: 0 additions & 3 deletions data/campaigns/Dead_Water/scenarios/12_Revenge.cfg
Expand Up @@ -406,7 +406,6 @@
{TRAIT_LOYAL}
{TRAIT_RESILIENT}
[/modifications]
{IS_LOYAL}
[/unit]
[unit]
side=1
Expand All @@ -419,7 +418,6 @@
{TRAIT_INTELLIGENT}
[/modifications]
experience=10
{IS_LOYAL}
[/unit]
[unit]
side=1
Expand All @@ -432,7 +430,6 @@
{TRAIT_STRONG}
[/modifications]
experience=32
{IS_LOYAL}
[/unit]
[message]
speaker=Nebthun
Expand Down
Expand Up @@ -613,7 +613,6 @@
name= _ "Theorin"
side=1
x,y=31,9
{IS_LOYAL}
[modifications]
{TRAIT_LOYAL}
{TRAIT_INTELLIGENT}
Expand Down Expand Up @@ -684,7 +683,6 @@
name= _ "Stanis"
side=1
x,y=29,25
{IS_LOYAL}
[modifications]
{TRAIT_LOYAL}
{TRAIT_STRONG}
Expand Down
6 changes: 2 additions & 4 deletions data/campaigns/Delfadors_Memoirs/utils/characters.cfg
Expand Up @@ -87,9 +87,8 @@
type=General
profile="portraits/lionel.png"
unrenamable=yes
{IS_HERO}
[modifications]
{OBJECT_LOYAL}
{TRAIT_LOYAL_HERO_NOSLOT}
{TRAIT_FEARLESS}
{TRAIT_STRONG}
[/modifications]
Expand All @@ -112,9 +111,8 @@
name= _ "Relgorn"
type=Dwarvish Fighter
unrenamable=yes # Shows up in HttT S14
{IS_HERO}
[modifications]
{OBJECT_LOYAL}
{TRAIT_LOYAL_HERO_NOSLOT}
{TRAIT_STRONG}
{TRAIT_HEALTHY}
[/modifications]
Expand Down
Expand Up @@ -3540,7 +3540,6 @@ And the tongue of fire begets ashen repose.</i>"
[/effect]
[/object]
[/modifications]
{IS_LOYAL}
[/unit]

[delay]
Expand Down
9 changes: 8 additions & 1 deletion data/campaigns/Descent_Into_Darkness/utils/characters.cfg
Expand Up @@ -38,7 +38,6 @@
profile=portraits/darken_volk.png
unrenamable=yes
random_traits=no
{IS_HERO}
[modifications]
# NOTE: if you change these, make sure you don't break the
# removal of the loyal trait in 'Alone at Last'
Expand All @@ -49,6 +48,14 @@
[effect]
apply_to=loyal
[/effect]
[effect]
apply_to=ellipse
ellipse=misc/ellipse-hero
[/effect]
[effect]
apply_to=overlay
add=misc/hero-icon.png
[/effect]
[/trait]
{TRAIT_QUICK}
[object]
Expand Down
Expand Up @@ -229,7 +229,6 @@
x,y=$prison_locations[$i].x,$prison_locations[$i].y
random_traits=no
facing=sw
{IS_LOYAL}
[modifications]
{TRAIT_LOYAL}
{TEAM_COLOR_OVERRIDE () white}
Expand Down
Expand Up @@ -434,10 +434,9 @@
type=$stored_Owaec.type
experience=$stored_Owaec.experience
profile=portraits/owaec.png
{IS_HERO}
random_traits=no
[modifications]
{TRAIT_LOYAL}
{TRAIT_LOYAL_HERO}
[/modifications]
[/unit]

Expand Down
Expand Up @@ -372,7 +372,6 @@

side=1
canrecruit=no
{IS_LOYAL}

[modifications]
{TRAIT_LOYAL}
Expand Down
Expand Up @@ -191,7 +191,6 @@
[modifications]
{TRAIT_LOYAL}
[/modifications]
{IS_LOYAL}
[/unit]
[message]
speaker=Dacyn
Expand Down
Expand Up @@ -208,11 +208,10 @@
id=Konrad
name= _ "Konrad II"
profile=portraits/konrad_II.png
{IS_HERO}
type=General
random_traits=no
[modifications]
{TRAIT_LOYAL}
{TRAIT_LOYAL_HERO}
[/modifications]
side=1
x=21
Expand Down
Expand Up @@ -13,12 +13,11 @@
type=White Mage
id=Dacyn
name= _ "Dacyn"
{IS_HERO}
profile=portraits/dacyn.png
random_traits=no
unrenamable=yes
[modifications]
{TRAIT_LOYAL}
{TRAIT_LOYAL_HERO}
{TEAM_COLOR_OVERRIDE () teal}
[/modifications]
#enddef
Expand Down

1 comment on commit 5cb9369

@sevu
Copy link
Member

@sevu sevu commented on 5cb9369 Sep 24, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. Found this only on coincidence, needs to be mentioned somewhere.

Please sign in to comment.