Quantcast
Channel: The Battle for Wesnoth Forums
Viewing all articles
Browse latest Browse all 2108

WML Workshop • Trouble with duplicate traits on the same unit

$
0
0
Hello

I'm having an issue with getting duplicate traits on my units when I made the jump from 1.14 to 1.18.
I've tried to use the 'exclude_traits' and exclude itself, but this seems to make the trait not show at all.

Here is the snippet of code of the unit I've been using as the guinea pig:

Code:

num_traits=4{TRAIT_PTU_RALLY}{TRAIT_PTU_TYPE_STRATEGIST_BUG}{TRAIT_PTU_PRESSURE}{TRAIT_PTU_TWISTED_POWER}
And the code of the 'Rally' trait

Code:

#define TRAIT_PTU_RALLY[trait]id="PTU_trait_Rally"exclude_traits="PTU_trait_Rally"name="Rally"description=_"Scene, Swift ActionEffect: The user and all allies within 10 meters may immediately Disengage 1 Meter as a free Action.Rally does not work on sleeping, paralyzed, stuck, fainted, or otherwise incapacitated allies."[effect]apply_to=new_attackname=Rallytype=ability   [specials]   {WEAPON_SPECIAL_RALLY}  [/specials]        range=status       damage=0        number=1    [/effect][/trait]#enddef
The other traits are still written like this:

Code:

#define TRAIT_PTU_TYPE_STRATEGIST_BUG[trait]name="Type Strategist Bug"description=_"Static: Whenever the user uses a Bug-type Move, they gain +5 Damage Reduction for one full round. If they are under a third of their Maximum Hit Points, they instead gain +10 Damage Reduction."[/trait]#enddef

What I want is for the unit to have the 4 listed traits (which happened in 1.14) and not 4 different traits at random with duplicates most of the time.

I use Wesnoth as a Battlemap with an easy way to lookup rules for a Pokémon Tabletop RPG which I've been running for a couple of years.
Thats the reason for the dummy trait with weird description...

The traits were a good way to randomize the 'abilities' of wild pokémon, but for caught pokémon the traits would ideally be fixed.

Any help for a solution would be great, otherwise I'll just have to keep using 1.14 but I really want to use the fun height differences in my maps.

Statistics: Posted by Grockham — Yesterday, 8:06 pm



Viewing all articles
Browse latest Browse all 2108

Trending Articles