Search found 1189 matches

by white_haired_uncle
Today, 3:36 pm
Forum: WML Workshop
Topic: [solved] comma = or syntax
Replies: 4
Views: 86

Re: comma = or syntax

If I understand you correctly, in the general case: [if] [variable] name,equals=unit.level,3 is equivalent to: [if] [variable] name=unit.level equals=3 While [if] [variable] name=unit.level equals=3,4 # or 3-6 might work, if it happens that someone implemented support for this specific case, but can...
by white_haired_uncle
Today, 2:31 pm
Forum: WML Workshop
Topic: [solved] comma = or syntax
Replies: 4
Views: 86

[solved] comma = or syntax

Often, you can use a comma to represent (effectively) "or", like type=Ghost,Wraith,Shadow. But, is this on a case by case basis (at least where it makes sense), or is it a general rule? Does it apply only to values, or keys as well? I guess I should ask about "-" for range as wel...
by white_haired_uncle
April 22nd, 2024, 1:17 pm
Forum: WML Workshop
Topic: [solved] where I can use [lua] and it's return value, what I can do in modify_unit
Replies: 12
Views: 386

Re: [solved] where I can use [lua] and it's return value, what I can do in modify_unit

So it looks like you can't do this either, which is unfortunate as I have multiple objects I'd like to insert. Why would you need to? You can dump multiple objects into [modify_unit anyway, so just put the [insert_tag] directly in there (like in your second example, but with name=object ). Using [i...
by white_haired_uncle
April 22nd, 2024, 5:00 am
Forum: WML Workshop
Topic: [solved] where I can use [lua] and it's return value, what I can do in modify_unit
Replies: 12
Views: 386

Re: [solved] where I can use [lua] and it's return value, what I can do in modify_unit

So it looks like you can't do this either, which is unfortunate as I have multiple objects I'd like to insert. #ifdef NONONO [modify_unit] [filter] id=$unit.id [/filter] [foreach] array=my_items [do] [insert_tag] name=object variable=this_item [/insert_tag] [/do] [/foreach] [/modify_unit] #endif Had...
by white_haired_uncle
April 21st, 2024, 3:12 pm
Forum: WML Workshop
Topic: [solved] where I can use [lua] and it's return value, what I can do in modify_unit
Replies: 12
Views: 386

Re: where I can use [lua] and it's return value, what I can do in modify_unit

Thank you. That clears up most, probably all of my confusion. For now, at least. Perhaps an option to do something with the return value of a non-conditional [lua] is worthwhile. It does not exist at this time however. It seems quite logical to me. If a [lua] block returns a valid WML tag, I would e...
by white_haired_uncle
April 20th, 2024, 6:40 pm
Forum: WML Workshop
Topic: [solved] where I can use [lua] and it's return value, what I can do in modify_unit
Replies: 12
Views: 386

Re: where I can use [lua] and it's return value, what I can do in modify_unit

P.S. while I'd still like to understand the above, keeping the [lua] outside [modify_unit], passing the return through a wml variable, and using [insert_tag] does work. ... wml.variables["my_item"] = item >> [/lua] [modify_unit] [filter] id=$unit.id [/filter] [insert_tag] name=object varia...
by white_haired_uncle
April 20th, 2024, 5:24 pm
Forum: WML Workshop
Topic: [solved] where I can use [lua] and it's return value, what I can do in modify_unit
Replies: 12
Views: 386

[solved] where I can use [lua] and it's return value, what I can do in modify_unit

This is similar to another thread where I was pointed to [insert_tag], which may be an alternative here, but I'd like to understand some things. I want to create an object in lua and feed that to [modify_unit]. I can create an object, and I can use [modify_unit] to add an object to a unit, but I can...
by white_haired_uncle
April 20th, 2024, 2:52 pm
Forum: WML Workshop
Topic: [closed] Merge unit animaions
Replies: 19
Views: 558

Re: [closed] Merge unit animaions

No, now that you mention it I think it's fine. What probably happened was I followed a link to AnimationWML#Frames so I didn't read the entire page from start to finish. Or I just skimmed past it. Maybe copy that "At any given time, an animation will display one frame for each frame prefix it c...
by white_haired_uncle
April 20th, 2024, 2:12 pm
Forum: Lua Labs
Topic: How to display two dialogs on each other
Replies: 5
Views: 210

Re: How to display two dialogs on each other

So your foreground/background canvas can't be another dialog? It may seem like a silly idea, but I had it and now the concept interests me. [EDIT: No, probably not. The wiki lists the things you can put "on" a canvas, and dialogs and arbitrary widgets and any other silly thing I can think ...
by white_haired_uncle
April 20th, 2024, 2:08 pm
Forum: WML Workshop
Topic: [closed] Merge unit animaions
Replies: 19
Views: 558

Re: Merge unit animaions

In the frames section , it clearly says this: Animation frames are defined using either the [frame] tag or a prefixed version of it, like [xxx_frame] . The xxx can be any sequence of alphanumeric characters. However, prefixes beginning with an underscore are reserve by the engine for internal use, ...
by white_haired_uncle
April 20th, 2024, 12:50 pm
Forum: WML Workshop
Topic: AI terrain affinity
Replies: 2
Views: 130

Re: AI terrain affinity

Thank you. I searched a couple of the AI pages for "terrain", I must have overlooked that one. That looks better than I had hoped.
by white_haired_uncle
April 20th, 2024, 12:20 pm
Forum: Lua Labs
Topic: How to display two dialogs on each other
Replies: 5
Views: 210

Re: How to display two dialogs on each other

I don't know if this will help, but I recently built an example of placing a label over another widget. I didn't have much luck with the fonts, and I don't know if this could be used to stack dialogs, but...

https://wiki.wesnoth.org/Sandbox/GUI/Ge ... d#Canvases
by white_haired_uncle
April 20th, 2024, 3:33 am
Forum: WML Workshop
Topic: AI terrain affinity
Replies: 2
Views: 130

AI terrain affinity

I'm creating fire elemental units. They will heal when over lava, and maybe get a damage bonus or something. I'd like to inform the AI that this unit should have an affinity for lava, but I'm not really finding anything. Best I can think of is to give the unit a good defense on unwalkable. Better id...