Search found 3012 matches

by Ravana
Today, 7:52 pm
Forum: Lua Labs
Topic: [solved] two [grid] tags
Replies: 53
Views: 832

Re: [solved] two [grid] tags

That is why I created https://wiki.wesnoth.org/Template:Lua_Functions for https://wiki.wesnoth.org/LuaAPI as documentation where you can actually use search. I say again that handle_event_commands has nothing to do with current topic about grids and closing. It is way how to run wml such as [lua] mi...
by Ravana
Today, 4:44 pm
Forum: Lua Labs
Topic: [solved] two [grid] tags
Replies: 53
Views: 832

Re: [solved] two [grid] tags

wml-utils part is reference how to test this code, it has nothing to do with dialogs.
by Ravana
Today, 2:35 pm
Forum: Lua Labs
Topic: [solved] two [grid] tags
Replies: 53
Views: 832

Re: two [grid] tags

Your latest version does not need callbacks at all. Can be simplified to # lua wesnoth.require("wml-utils").handle_event_commands(wml.load("~add-ons/EventLoader/action.cfg")) [lua] code=<< local T = wml.tag local chat = wesnoth.interface.add_chat_message local sf = string.format ...
by Ravana
Today, 2:01 pm
Forum: Lua Labs
Topic: [solved] two [grid] tags
Replies: 53
Views: 832

Re: two [grid] tags

That does not match what previously described use case was. You code that after something has been entered, start listening for mouse event. But mouse event callback just does not work anyways https://github.com/wesnoth/wesnoth/issues/8815
by Ravana
Today, 9:10 am
Forum: Lua Labs
Topic: [solved] two [grid] tags
Replies: 53
Views: 832

Re: two [grid] tags

Compare the input value, and if it is ' ' then do one thing, else do other thing.
by Ravana
April 24th, 2024, 3:55 pm
Forum: WML Workshop
Topic: [solved] comma = or syntax
Replies: 4
Views: 169

Re: comma = or syntax

Yes.
by Ravana
April 24th, 2024, 2:38 pm
Forum: WML Workshop
Topic: [solved] comma = or syntax
Replies: 4
Views: 169

Re: comma = or syntax

For multiple assignements on one line you can do equals,name=3,unit.level. If values to be split themselves contain comma you can probably do something with quotes, but not sure. For single key like type=Ghost,Wraith,Shadow it is only supported in keys where such support was intentionally added. I d...
by Ravana
April 20th, 2024, 7:32 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: 427

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

[lua] as actionWML is wesnoth.wml_actions.lua, while [lua] in [if] is wesnoth.wml_conditionals.lua. From wml point of view both are [lua], but behaviour is different. There are similar examples for example [object] as actionWML is different from [object] in tags such as [modify_unit].
by Ravana
April 20th, 2024, 6:54 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: 427

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

You can do [modify_unit] part also in Lua https://wiki.wesnoth.org/LuaAPI/wesnoth/units#wesnoth.units.add_modification Example https://github.com/ProditorMagnus/OrociaRandomMod/blob/master/lua/spawn_functions.lua#L93 where effect definition is in https://github.com/ProditorMagnus/OrociaRandomMod/blo...
by Ravana
April 20th, 2024, 11:54 am
Forum: Scenario & Campaign Development
Topic: No Randomness Mod Released
Replies: 56
Views: 29641

Re: No Randomness Mod Released

1.18 wesnoth.deepcopy() does not work on wml tables, better use wml.clone for them.
by Ravana
April 19th, 2024, 4:03 pm
Forum: Lua Labs
Topic: [closed] Custom dialog placement
Replies: 18
Views: 488

Re: Custom dialog placement

Search finds where it is published.