Search found 69 matches
- January 2nd, 2021, 9:46 pm
- Forum: WML Workshop
- Topic: Store a variable using [option] in [message]
- Replies: 4
- Views: 167
Re: Store a variable using [option] in [message]
Huh, you're right. Putting the the [command] tag inside the [option] tag works as intended.
Thanks.
Thanks.
- January 1st, 2021, 5:28 am
- Forum: WML Workshop
- Topic: Store a variable using [option] in [message]
- Replies: 4
- Views: 167
Store a variable using [option] in [message]
I'm trying to allow a player to hand over gold to a unit which can then in turn hand that gold over to another player. For that I'm using a right click menu prompt which contains the following code: [store_side] side=$side_number variable=goldsendsidevar [/store_side] [message] speaker=unit message=...
- November 18th, 2020, 4:44 pm
- Forum: WML Workshop
- Topic: Lifting fog around units with custom status
- Replies: 3
- Views: 149
Re: Lifting fog around units with custom status
Apparently I did not correctly save before adding the multiturn=yes. Just lifting the fog at turn refresh apparently is not working since it is recalculated at a slightly later point and thus not displayed at all. I now tested it again and it works as intended.
- November 18th, 2020, 4:30 pm
- Forum: WML Workshop
- Topic: Lifting fog around units with custom status
- Replies: 3
- Views: 149
Re: Lifting fog around units with custom status
Are you sure you don't want delayed_variable_substitution=yes ? By setting it to no, $possessionvar.side is evaluated at the creation of the event (trigger of partent event), but unless I'm wrong, here you want it to be evaluated when the event is actually triggered. That would mean setting it to y...
- November 18th, 2020, 2:17 am
- Forum: WML Workshop
- Topic: Lifting fog around units with custom status
- Replies: 3
- Views: 149
Lifting fog around units with custom status
I'm trying to code a possession ability and for that I need to grant vision around a unit to a side that doesn't control that unit. For some reason the code I've written doesn't work though. I would be happy if someone could tell me what I did wrong. [event] delayed_variable_substitution=no name=tur...
- November 17th, 2020, 4:10 pm
- Forum: WML Workshop
- Topic: Structure of stored unit array and traits thereof
- Replies: 7
- Views: 310
Re: Structure of stored unit array and traits thereof
Ok, I no longer use transform_unit because in my use case I need to change the types on the recall list. I didn't bother with the amla, check out the sota-utils as beetlenaut said for that part. In my case, whatever experience the unit currently has gets copied over. apart from modifications, i'm a...
- November 8th, 2020, 12:27 pm
- Forum: WML Workshop
- Topic: Structure of stored unit array and traits thereof
- Replies: 7
- Views: 310
Re: Structure of stored unit array and traits thereof
SotA creates a lich out of a necromancer preserving all the traits (and also all experience--even if the unit had an AMLA). There is a macro in the utils folder you can look at. It's a little bit more involved than it seems like it should have to be. Thanks! Edit2: I tested transform_unit some more...
- November 5th, 2020, 3:34 pm
- Forum: WML Workshop
- Topic: Structure of stored unit array and traits thereof
- Replies: 7
- Views: 310
Structure of stored unit array and traits thereof
I'm trying to have a unit be replaced by a different unit but retain name and traits (and possibly objects), but I can't get it to work. I'm sure I saw the structure of stored unit arrays somewhere on the wiki but I'm not finding it. The name works fine, as one would expect, but I can't seem to just...
- November 5th, 2020, 3:22 pm
- Forum: WML Workshop
- Topic: Gaining XP whenever a unit is killed by plague
- Replies: 28
- Views: 635
Re: Gaining XP whenever a unit is killed by plague
Truth be told I didn't realize there was a second page of replies :9
And oh yeah, you're right. [filter_attack] is definitely the way to go. I was trying to show how to filter a unit having a weapon, like Helmet tried to do. Didn't think about the case of multiple weapons.
And oh yeah, you're right. [filter_attack] is definitely the way to go. I was trying to show how to filter a unit having a weapon, like Helmet tried to do. Didn't think about the case of multiple weapons.
- November 5th, 2020, 12:11 pm
- Forum: WML Workshop
- Topic: Gaining XP whenever a unit is killed by plague
- Replies: 28
- Views: 635
Re: Gaining XP whenever a unit is killed by plague
Bit late, but the reason this doesn't work is that "special" simply isn't a valid unit filter. Only things listed on this wiki page are valid entries for the [filter] tag: https://wiki.wesnoth.org/StandardUnitFilter Using the [has_weapon] tag should do the trick. [filter_second] [has_weapo...
- November 5th, 2020, 12:05 pm
- Forum: WML Workshop
- Topic: Team colors and transparency
- Replies: 4
- Views: 201
Re: Team colors and transparency
First of all, I'm not sure using the dev version is a good idea when doing anything multiplayer, since it has a lot of new features (ways to filter for example) that, if I understand this correctly, won't be understood by the stable release. Anyway, regarding your question, couldn't you do it using ...
- November 2nd, 2020, 10:39 am
- Forum: WML Workshop
- Topic: Allowing a unit to pass through enemies (with [move_unit])
- Replies: 12
- Views: 497
Re: Allowing a unit to pass through enemies (with [move_unit])
[store_unit] kill=yes to not need to hide and kill separately. But that would mean the faction in question has no leader for the duration of the movement, right? I usually play with addons that do something while a side's (only) leader dies, so that would be bad. Or are events not fired for that de...
- October 31st, 2020, 1:06 pm
- Forum: WML Workshop
- Topic: Allowing a unit to pass through enemies (with [move_unit])
- Replies: 12
- Views: 497
Re: Allowing a unit to pass through enemies (with [move_unit])
You need to set 3 coordinates for that: start, enemy, end. Then it does not do pathfinding. Thanks, that works. Here's my code for anyone interested. The only problem is that there is like one frame where the unit is hidden, but the fake move hasn't started yet, but it's barely visible. [store_unit...
- October 30th, 2020, 10:48 am
- Forum: WML Workshop
- Topic: Allowing a unit to pass through enemies (with [move_unit])
- Replies: 12
- Views: 497
Allowing a unit to pass through enemies (with [move_unit])
I'm trying to make a weapon special that has the attacking unit move through (and end up behind) the enemy using [move_unit] and [harm_unit], but [move_unit] doesn't allow movements that wouldn't otherwise be possible unless there is no other way. Is there a way to allow a unit to pass through enemy...
- October 30th, 2020, 3:45 am
- Forum: WML Workshop
- Topic: Problem with filtering unit movement points
- Replies: 3
- Views: 179
Re: Problem with filtering unit movement points
Now, for a unit filter, you want just a straight formula. Formulas are usually enclosed in quotes, since they use characters (such as + or # ) that would otherwise have a special meaning to the WML parser. A formula to check if a unit has any moves left would look like this: formula="moves > 0...