Search found 1190 matches
- Today, 9:02 pm
- Forum: WML Workshop
- Topic: negative ai aggression
- Replies: 0
- Views: 19
negative ai aggression
https://wiki.wesnoth.org/AiWML#List_of_AI_Aspects If 'aggression=1', no negative contributions are added to the score. Thus, the AI disregards damage done to its own units and selects attacks based solely on the damage it can do to enemy units. If the AI can inflict 1 damage and take 0, or inflict 2...
- Today, 3:36 pm
- Forum: WML Workshop
- Topic: [solved] comma = or syntax
- Replies: 4
- Views: 104
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...
- Today, 2:31 pm
- Forum: WML Workshop
- Topic: [solved] comma = or syntax
- Replies: 4
- Views: 104
[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...
- April 22nd, 2024, 3:38 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: 389
- 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: 389
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...
- 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: 389
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...
- 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: 389
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...
- 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: 389
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...
- 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: 389
[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...
- April 20th, 2024, 2:52 pm
- Forum: WML Workshop
- Topic: [closed] Merge unit animaions
- Replies: 19
- Views: 561
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...
- April 20th, 2024, 2:12 pm
- Forum: Lua Labs
- Topic: How to display two dialogs on each other
- Replies: 5
- Views: 211
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 ...
- April 20th, 2024, 2:08 pm
- Forum: WML Workshop
- Topic: [closed] Merge unit animaions
- Replies: 19
- Views: 561
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, ...
- April 20th, 2024, 12:50 pm
- Forum: WML Workshop
- Topic: AI terrain affinity
- Replies: 2
- Views: 132
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.
- April 20th, 2024, 12:20 pm
- Forum: Lua Labs
- Topic: How to display two dialogs on each other
- Replies: 5
- Views: 211
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
https://wiki.wesnoth.org/Sandbox/GUI/Ge ... d#Canvases
- April 20th, 2024, 3:33 am
- Forum: WML Workshop
- Topic: AI terrain affinity
- Replies: 2
- Views: 132
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...