Search found 3020 matches
- Today, 7:26 pm
- Forum: Lua Labs
- Topic: How to save game into global variable
- Replies: 1
- Views: 43
Re: How to save game into global variable
You can look into wesnoth.game_events.on_save.
- Today, 5:15 pm
- Forum: Faction & Era Development
- Topic: Ageless Era - Current Version: 4.34
- Replies: 1997
- Views: 619059
Re: Ageless Era - Current Version: 4.34
Ageless Era 4.34 is out on the 1.18 add-on server Version 4.34: * Units and Factions * Era of Magic update * Rashy Era update * Balance * Many small balance changes. Detailed notes can be found from github - ProditorMagnus/Ageless-for-1-14 * Bug Fixes * FL summon * EFM trample interaction with othe...
- Today, 12:44 pm
- Forum: Coder’s Corner
- Topic: all units parameters in JSON
- Replies: 2
- Views: 81
Re: all units parameters in JSON
You can parse unit wml with tools included with game, example https://github.com/ProditorMagnus/WML_t ... n_lists.py https://github.com/wesnoth/wesnoth/blob ... parser3.py
- Today, 11:20 am
- Forum: Lua Labs
- Topic: [solved] Unit visibility check
- Replies: 4
- Views: 150
Re: Unit visibility check
Dont use have_unit then, use filter_vision.
- Yesterday, 4:47 pm
- Forum: Lua Labs
- Topic: Messing with saving and reloading
- Replies: 10
- Views: 259
Re: Messing with saving and reloading
There are ways but I am not going to give details since use case does not sound like something that should be done by campaign. If users wants to get extra motivation to not use saves it is up to [modification] to control.
- April 30th, 2024, 3:19 pm
- Forum: WML Workshop
- Topic: StandardUnitFilter, adjacent to tile
- Replies: 4
- Views: 177
Re: StandardUnitFilter, adjacent to tile
I would avoid multiple radius. [harm_unit] [filter] [not] x,y=$hit_locs[$i].x,$hit_locs[$i].y [/not] [filter_location] x,y=$hit_locs[$i].x,$hit_locs[$i].y radius=1 [/filter_location] [/filter] There is also filter_adjacent_location, but you would have to consult documentation to know if it fits use ...
- April 30th, 2024, 7:53 am
- Forum: WML Workshop
- Topic: StandardUnitFilter, adjacent to tile
- Replies: 4
- Views: 177
Re: StandardUnitFilter, adjacent to tile
filter_adjacent -> filter_location+radius should work.
- April 28th, 2024, 1:23 am
- Forum: WML Workshop
- Topic: Nearly impassably terrain
- Replies: 3
- Views: 170
Re: Nearly impassably terrain
You can add impassable overlay during player turns.
- April 27th, 2024, 7:52 pm
- Forum: Lua Labs
- Topic: [solved] two [grid] tags
- Replies: 54
- Views: 1150
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...
- April 27th, 2024, 4:44 pm
- Forum: Lua Labs
- Topic: [solved] two [grid] tags
- Replies: 54
- Views: 1150
Re: [solved] two [grid] tags
wml-utils part is reference how to test this code, it has nothing to do with dialogs.
- April 27th, 2024, 3:31 pm
- Forum: Lua Labs
- Topic: [solved] two [grid] tags
- Replies: 54
- Views: 1150
- April 27th, 2024, 2:35 pm
- Forum: Lua Labs
- Topic: [solved] two [grid] tags
- Replies: 54
- Views: 1150
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 ...
- April 27th, 2024, 2:01 pm
- Forum: Lua Labs
- Topic: [solved] two [grid] tags
- Replies: 54
- Views: 1150
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
- April 27th, 2024, 9:10 am
- Forum: Lua Labs
- Topic: [solved] two [grid] tags
- Replies: 54
- Views: 1150
Re: two [grid] tags
Compare the input value, and if it is ' ' then do one thing, else do other thing.
- April 24th, 2024, 3:55 pm
- Forum: WML Workshop
- Topic: [solved] comma = or syntax
- Replies: 4
- Views: 188