Issue with AMLA Ability Addition in WML
Moderator: Forum Moderators
Forum rules
- Please use [code] BBCode tags in your posts for embedding WML snippets.
- To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Issue with AMLA Ability Addition in WML
Hi everyone,
I would like to ask how to prevent the repeated appearance of abilities when adding them through AMLA (Advanced Multilevel Advancement). Specifically, I have a unit where the first AMLA choice is Leadership, and the remaining unchosen AMLA option is Heal. However, when I try to apply AMLA again, the options for Heal appear twice in the menu (Heal, Heal).
Currently, my WML script is unable to resolve this issue. Any advice or suggestions would be greatly appreciated.
I would like to ask how to prevent the repeated appearance of abilities when adding them through AMLA (Advanced Multilevel Advancement). Specifically, I have a unit where the first AMLA choice is Leadership, and the remaining unchosen AMLA option is Heal. However, when I try to apply AMLA again, the options for Heal appear twice in the menu (Heal, Heal).
Currently, my WML script is unable to resolve this issue. Any advice or suggestions would be greatly appreciated.
Filtering!
With filtering. The [advancement] tag accepts a [filter] tag.
This would not offer the advancement option in the advancement dialogue. But if the advancement option would still be useful, and you just want to avoid that the ability is given twice, one can filter at other places instead. Below two examples, one for the heals ability, and one with a weapon special instead.
Code: Select all
[advancement]
[filter]
[not]
ability=healing
# this will exclude units which have the mainline ability to heal +4 and +8
# ability_type=heals would exclude any healing ability and also curing
[/not]
Code: Select all
[effect]
apply_to=new_ability
[filter]
[not]
ability=healing
[/not]
[/filter]
[abilities]
{ABILITY_HEALS}
[/abilities]
[/effect]
[effect]
apply_to=attack
range=melee
# No filter tag here. If one is used, it checks if the unit has such an attack.
# Without filter tag it checks if this attack passes the filter.
[not]
special_id=firststrike
[/not]
[set_specials]
mode=append
{WEAPON_SPECIAL_FIRSTSTRIKE}
[/set_specials]
[/effect]
Try out the dark board theme.
Re: Issue with AMLA Ability Addition in WML
Thank you! But I may not have expressed myself clearly.
Below is the WML code I am currently using. The issue right now is that basic abilities and the "loyal" trait do not appear multiple times, but abilities like Heal, Leadership, and Illuminates do.
For example, if I don't choose Leadership the first time and instead select Heal, then on the second AMLA, both Leadership and Illuminates will appear twice in the selection menu.
Below is the WML code I am currently using. The issue right now is that basic abilities and the "loyal" trait do not appear multiple times, but abilities like Heal, Leadership, and Illuminates do.
For example, if I don't choose Leadership the first time and instead select Heal, then on the second AMLA, both Leadership and Illuminates will appear twice in the selection menu.
- lhybrideur
- Posts: 454
- Joined: July 9th, 2019, 1:46 pm
Re: Issue with AMLA Ability Addition in WML
That can easily be explained.
In your code (that is poorly incremented BTW), there is a check to see if the loyal amla has already been taken, but neither for leadership nor for illuminate.
In your code (that is poorly incremented BTW), there is a check to see if the loyal amla has already been taken, but neither for leadership nor for illuminate.