Search found 2240 matches
- April 30th, 2024, 11:46 pm
- Forum: WML Workshop
- Topic: StandardUnitFilter, adjacent to tile
- Replies: 4
- Views: 155
Re: StandardUnitFilter, adjacent to tile
I think I would suggest using [filter_adjacent_location] instead of [filter_adjacent] . As you suspected, [filter_adjacent] requires a unit to be present (it is, after all, part of StandardUnitFilter). Something like this (untested): [harm_unit] [filter_location] [filter_adjacent_location] x,y=$hit_...
- April 30th, 2024, 11:37 pm
- Forum: Scenario & Campaign Development
- Topic: Need some fake bullying comments about campaigns for a meta-campaign
- Replies: 6
- Views: 255
Re: Need some fake bullying comments about campaigns for a meta-campaign
(Note: Some of these may sound more convincing with a few more typos and the like, or swapping out synonyms. Or if you just use them as inspiration rather than using them verbatim, that's fine too.) How could you ever think it would be fun for the main character to be killed off in the third scenar...
- April 28th, 2024, 5:08 am
- Forum: Lua Labs
- Topic: [solved] How to store unit using custom wml tag
- Replies: 4
- Views: 184
Re: How to store unit using custom wml tag
function wesnoth.wml_actions.your_tag(cfg) local filter = wml.shallow_literal(cfg) filter.key_you_want_to_remove = nil -- repeat for other keys wml.remove_children(filter, 'tag_you_want_to_remove', 'another_tag_you_want_to_remove') filter = wml.tovconfig(filter) -- now just use filter instead of cf...
- April 28th, 2024, 5:03 am
- Forum: WML Workshop
- Topic: Nearly impassably terrain
- Replies: 3
- Views: 161
Re: Nearly impassably terrain
P.S. I'm also a bit confused why I can make a custom terrain type, but I can't configure the "movement type" on it. Probably wouldn't help me here, but that just seems like something that would be part of a terrain type, it has to be stored somewhere and I can't think of a better place. A...
- April 28th, 2024, 4:49 am
- Forum: Lua Labs
- Topic: [solved] How to store unit using custom wml tag
- Replies: 4
- Views: 184
Re: How to store unit using custom wml tag
If you're asking how to store a unit in a WML variable from Lua, like [store_unit] does: local unit = wesnoth.units.find "unit_id" -- get the unit however you want, this example looks it up by its ID wml.variables["your.variable[2].path"] = unit.__cfg If you're asking how to find...
- April 27th, 2024, 8:28 pm
- Forum: WML Workshop
- Topic: What is the easiest way to set defence value on specific tile?
- Replies: 2
- Views: 151
Re: What is the easiest way to set defence value on specific tile?
Probably the easiest way is to make a custom version of the village overlay that sets the defense how you want it to be set.
- April 27th, 2024, 8:27 pm
- Forum: Lua Labs
- Topic: [solved] two [grid] tags
- Replies: 54
- Views: 1135
- April 27th, 2024, 5:36 pm
- Forum: Lua Labs
- Topic: [solved] two [grid] tags
- Replies: 54
- Views: 1135
Re: [solved] two [grid] tags
Why is that? Is there something that could be done to make it easier to find?white_haired_uncle wrote: ↑April 27th, 2024, 4:19 pm (though good luck finding it on the wiki unless you know exactly what to search for).
- April 27th, 2024, 12:41 pm
- Forum: Lua Labs
- Topic: [closed] How to dialog:close() when >space< is typed into the text_box
- Replies: 2
- Views: 115
Re: How to dialog:close() when >space< is typed into the text_box
I'm pretty sure you posted the method you tried in the previous thread. Why is it not in this post?
- April 27th, 2024, 12:41 pm
- Forum: Lua Labs
- Topic: [solved] two [grid] tags
- Replies: 54
- Views: 1135
Re: two [grid] tags
Thanks! Oh dumb me, this works "dialog.test_text:focus()" Yes – either that or "gui.widget.focus(dialog.test_text)". I use dialog:set_canvas(1, { } ) To hide the label background...Any idea how to hide text_box background? Just to clarify, that doesn't hide it. It deletes it. Th...
- April 27th, 2024, 1:23 am
- Forum: Lua Labs
- Topic: [solved] two [grid] tags
- Replies: 54
- Views: 1135
Re: two [grid] tags
Pretty much. Just be aware that that also includes deprecated things (which is mostly
value_compat
and callback
).- April 26th, 2024, 11:36 pm
- Forum: Lua Labs
- Topic: [solved] two [grid] tags
- Replies: 54
- Views: 1135
Re: two [grid] tags
If you mean in documentation, that would be LuaAPI/types/widget. If you mean in the source code, the relevant file is lua_widget_attributes.cpp.
- April 26th, 2024, 6:00 pm
- Forum: Lua Labs
- Topic: [solved] two [grid] tags
- Replies: 54
- Views: 1135
Re: two [grid] tags
I was hoping to find corresponding lua files that manipulate the widget so I could determine of its properties (select_layer(s), layer_selected, etc). Those don't exist. All core widgets are handled in C++. I don't know, but I did figure out that dialog.narration.selected_index=2 I'm not 100% sure ...
- April 26th, 2024, 1:59 pm
- Forum: Lua Labs
- Topic: [solved] two [grid] tags
- Replies: 54
- Views: 1135
Re: two [grid] tags
I'm not aware of any examples of it being used outside of mainline. In mainline it's used in the following windows: addon_list mp_create_game addon_manager campaign_dialog campaign_difficulty game_stats game_version mp_create_game preferences server_info story_viewer title_screen It's also used in a...
- April 26th, 2024, 4:57 am
- Forum: Lua Labs
- Topic: [solved] two [grid] tags
- Replies: 54
- Views: 1135
Re: two [grid] tags
The default mode of a stacked widget is to stack its layers on top of one another. A lot of actual uses of it instead use it as a way to swap between different layers, showing only one layer at a time. I'm not sure if there's an example of its intended use in mainline. On the other hand, it's probab...