[solved] weapon specials inside [abilities]
Moderator: Forum Moderators
-
- Posts: 1288
- Joined: August 26th, 2018, 11:46 pm
- Location: A country place, far outside the Wire
[solved] weapon specials inside [abilities]
https://wiki.wesnoth.org/AbilitiesWML
Or if the wiki is more correct than I'm giving it credit for, would it just be:
Cool, but how? I'm guessing that the wiki omitted mentioning the [specials] tag, and I want something like this?(Version 1.15.0 and later only) All weapon specials except for [plague], [heal_on_hit], and [swarm] can be placed in the [abilities] tag. These "weapon specials as abilities" will give that weapon special to all attacks the unit has if matches with [filter_student/opponent/etc][filter_weapon].
Code: Select all
[abilities]
[dummy]
#textdomain wesnoth-loti
description=_"When this unit kills a certain amount of beings, it obtains special advancements."
female_name=_"female^soul eater"
id="soul eater"
name=_"soul eater"
[/dummy]
[regenerate]
affect_self=yes
#textdomain wesnoth-help
description=_"The unit will heal itself 8 HP per turn. If it is poisoned, it will remove the poison instead of healing."
female_name=_"female^regenerates"
id="regenerates"
name=_"regenerates"
poison="cured"
special_note=_"This unit regenerates, which allows it to heal as though always stationed in a village."
value=8
[/regenerate]
[specials]
[damage]
add=0
apply_to="self"
id="latent_wrath"
[/damage]
[/specials]
[/abilities]
Code: Select all
[abilities]
[dummy]
#textdomain wesnoth-loti
description=_"When this unit kills a certain amount of beings, it obtains special advancements."
female_name=_"female^soul eater"
id="soul eater"
name=_"soul eater"
[/dummy]
[regenerate]
affect_self=yes
#textdomain wesnoth-help
description=_"The unit will heal itself 8 HP per turn. If it is poisoned, it will remove the poison instead of healing."
female_name=_"female^regenerates"
id="regenerates"
name=_"regenerates"
poison="cured"
special_note=_"This unit regenerates, which allows it to heal as though always stationed in a village."
value=8
[/regenerate]
[damage]
add=0
apply_to="self"
id="latent_wrath"
[/damage]
[/abilities]
Last edited by white_haired_uncle on May 10th, 2024, 12:21 am, edited 1 time in total.
Speak softly, and carry Doombringer.
- Celtic_Minstrel
- Developer
- Posts: 2274
- Joined: August 3rd, 2012, 11:26 pm
- Location: Canada
- Contact:
Re: weapon specials inside [abilities]
The second one.
-
- Posts: 1288
- Joined: August 26th, 2018, 11:46 pm
- Location: A country place, far outside the Wire
Re: weapon specials inside [abilities]
Thank you. I've got a bunch of events to adjust that are non-trivial to test, so I wanted to make sure I was starting off on the right foot.
Speak softly, and carry Doombringer.
-
- Posts: 1288
- Joined: August 26th, 2018, 11:46 pm
- Location: A country place, far outside the Wire
Re: [solved] weapon specials inside [abilities]
Any idea what would happen in the case where you had the same special (same id) at both the weapon and ability level? I'm looking at moving from having the special on every weapon to putting it in abilities so it could happen when loading an old save.
Like:
Like:
Code: Select all
[abilities]
[damage]
add=10
apply_to="self"
id="latent_wrath"
[/damage]
[/abilities]
[attack]
...
[specials]
[damage]
add=4
apply_to="self"
id="latent_wrath"
[/damage]
[/specials]
[attack]
Speak softly, and carry Doombringer.
- Celtic_Minstrel
- Developer
- Posts: 2274
- Joined: August 3rd, 2012, 11:26 pm
- Location: Canada
- Contact:
Re: [solved] weapon specials inside [abilities]
Sorry, I'm not sure. It might interact and cancel out because they have the same ID, but I can't be sure.
Re: [solved] weapon specials inside [abilities]
id probably means it wont give you 14 damage.