Search found 74 matches

by Pilauli
14 minutes ago
Forum: WML Workshop
Topic: Gaining XP whenever a unit is killed by plague
Replies: 5
Views: 95

Re: Gaining XP whenever a unit is killed by plague

[event] name=last_breath [filter] race=elf [/filter] [filter_second] race=orc [/filter_second] [message] speaker=unit message= _ "I am a lovely elf, but a vicious orc killed me!" [/message] [message] speaker=second_unit message= _ "I am a strong orc, and I just killed one of those annoying elves! B...
by Pilauli
Yesterday, 10:15 pm
Forum: WML Workshop
Topic: Gaining XP whenever a unit is killed by plague
Replies: 5
Views: 95

Re: Gaining XP whenever a unit is killed by plague

In last breath, you're filtering based on the dying unit's side. It says "I am a side 2 unit". Let me write you another example: [event] name=last_breath [filter_second] side=1 [/filter_second] [message] speaker=unit message= _ "I don't know what side I am on, but I do know that I am dead and a side...
by Pilauli
Yesterday, 4:02 pm
Forum: WML Workshop
Topic: Gaining XP whenever a unit is killed by plague
Replies: 5
Views: 95

Re: Gaining XP whenever a unit is killed by plague

In a die event, [filter] generally filters the unit that just died. Try changing [filter] to [filter_second] to filter the "second unit" that killed the recently-deceased unit, while sticking with the die event. If that doesn't work, I'll try to research it later when I have more time.
by Pilauli
Yesterday, 2:53 pm
Forum: Art Workshop
Topic: A quick question regarding Unit art...
Replies: 3
Views: 95

Re: A quick question regarding Unit art...

If you do that, your add-on won't match the rest of the Wesnoth style very well. It will, however, be more consistent with any other add-on that goes for multiple soldiers per unit. I don't have strong opinions either way, but I lean in the direction of consistency and often like to pretend that ind...
by Pilauli
October 19th, 2020, 9:31 pm
Forum: WML Workshop
Topic: How to add custom terrains
Replies: 4
Views: 113

Re: How to add custom terrains

Okay, I've tested some things, and it looks like you can use any terrain that you include in an #ifdef MULTIPLAYER section in any multiplayer game. (I'm not sure whether that's only required for the host, or whether it's required for everyone playing, but if you are playing a local game, then it won...
by Pilauli
October 19th, 2020, 5:31 am
Forum: WML Workshop
Topic: A hex that kills a unit who passes through it
Replies: 8
Views: 170

Re: A hex that kills a unit who passes through it

In 1.12 or later you can check for $unit.flying , although this was undocumented. It doesn't actually say whether the unit can fly or not. This is all it does: A unit with flying=yes does not have its image's height adjusted for different terrains. The flying Drake movetypes do not have flying=true...
by Pilauli
October 19th, 2020, 2:43 am
Forum: WML Workshop
Topic: A hex that kills a unit who passes through it
Replies: 8
Views: 170

Re: A hex that kills a unit who passes through it

Okay, it looks like Octalot already answered the question you asked. (That's the easy, logical solution.) I had a different solution (I didn't test it, but I snagged it from something similar, so it ought to work), but I spent way too long researching the second part of this post. :roll: $x1 means y...
by Pilauli
October 16th, 2020, 8:13 pm
Forum: WML Workshop
Topic: campaign difficulty: various WML questions
Replies: 4
Views: 154

Re: campaign difficulty: various WML questions

I would guess that it inserts each value only once. So difficulty (which doesn't change every turn) would look fine, but "flagged" (which does) wouldn't update properly, according to my guess. Try updating the objectives every time you update "flagged". You should be able to do that by copying the [...
by Pilauli
October 16th, 2020, 3:08 pm
Forum: Writers’ Forum
Topic: Using game-related terms in dialogue: okay? not okay?
Replies: 3
Views: 129

Re: Using game-related terms in dialogue: okay? not okay?

Not an expert here. My own suggestion goes like this: - Have a wolf rider show up, when the player has just barely enough time to capture the orcish village and hold it for long enough. - The wolf rider reports "Warchief! Reinforcements will arrive at sunset!" (Or whatever time is a logical descript...
by Pilauli
October 16th, 2020, 5:03 am
Forum: WML Workshop
Topic: How to prevent animation when unit moves only 1 hex
Replies: 6
Views: 152

Re: How to prevent animation when unit moves only 1 hex

Cool! How long is your pre-movement curling up animation? It's actually possible to change the speed it moves across the screen at, something like this: [movement_anim] value=0 # only play this animation when beginning to move offset="0:50,0~1:150" # hold still for 50ms, then move across the screen ...
by Pilauli
October 16th, 2020, 2:52 am
Forum: WML Workshop
Topic: How to prevent animation when unit moves only 1 hex
Replies: 6
Views: 152

Re: How to prevent animation when unit moves only 1 hex

It looks like the pre- and post-movement animations don't use value= and value_second=, so there's probably no way to make those animations situational. Depending on what your pre- and post-movement animations are, would it work to change them into alternate movement animations? (I mean, would it lo...
by Pilauli
October 16th, 2020, 2:51 am
Forum: WML Workshop
Topic: Adding moves to a unit after it has attacked
Replies: 24
Views: 472

Re: Adding moves to a unit after it has attacked

It shouldn't be completely impossible! For one thing, there's Ravana's suggestion to add a custom variable to each frog unit that works sort of like resting should, but is customized for your uses: You can add unit variable into each relevant unit which would be updated during moveto and turn refres...
by Pilauli
October 16th, 2020, 12:50 am
Forum: WML Workshop
Topic: How to prevent animation when unit moves only 1 hex
Replies: 6
Views: 152

Re: How to prevent animation when unit moves only 1 hex

What sort of running animation? If the movement animation contains any sort of one-time wind-up effect, you could use a pre-movement animation. Otherwise, of course, looking at what the wiki says about animations is a good starting point. I'll pick out the part that looks most useful: value= contain...
by Pilauli
October 15th, 2020, 12:51 pm
Forum: WML Workshop
Topic: Adding moves to a unit after it has attacked
Replies: 24
Views: 472

Re: Adding moves to a unit after it has attacked

I forgot about that! Yeah, that sounds helpful. The field resting= ("yes" or "no") is stored in my sample save file, so it should be accessible under that name. Specifically, you should be able to write $unit.resting| , but a resting= field doesn't seem to be part of the standard unit filter, so you...
by Pilauli
October 14th, 2020, 3:21 pm
Forum: WML Workshop
Topic: How to use HIGHLIGHT_IMAGE
Replies: 2
Views: 63

Re: How to use HIGHLIGHT_IMAGE

Relevant wiki page: https://wiki.wesnoth.org/PreprocessorRef Relevant example, from the first scenario of HttT: {HIGHLIGHT_IMAGE 1 1 scenery/signpost.png ()} 1 and 1 are the x and y coordinates, of course, and "scenery/signpost.png" is the image that it highlights. Then the () seems to be an empty a...