Search found 2235 matches

by Celtic_Minstrel
Yesterday, 8:28 pm
Forum: WML Workshop
Topic: What is the easiest way to set defence value on specific tile?
Replies: 2
Views: 90

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.
by Celtic_Minstrel
Yesterday, 8:27 pm
Forum: Lua Labs
Topic: [solved] two [grid] tags
Replies: 54
Views: 898

Re: [solved] two [grid] tags

Ravana wrote: Yesterday, 7:52 pm It is way how to run wml such as [lua] midscenario with debug command.
Or rather, it is the function to run arbitrary ActionWML for any reason whatsoever.
by Celtic_Minstrel
Yesterday, 5:36 pm
Forum: Lua Labs
Topic: [solved] two [grid] tags
Replies: 54
Views: 898

Re: [solved] two [grid] tags

white_haired_uncle wrote: Yesterday, 4:19 pm (though good luck finding it on the wiki unless you know exactly what to search for).
Why is that? Is there something that could be done to make it easier to find?
by Celtic_Minstrel
Yesterday, 12:41 pm
Forum: Lua Labs
Topic: [closed] How to dialog:close() when >space< is typed into the text_box
Replies: 2
Views: 71

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?
by Celtic_Minstrel
Yesterday, 12:41 pm
Forum: Lua Labs
Topic: [solved] two [grid] tags
Replies: 54
Views: 898

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...
by Celtic_Minstrel
Yesterday, 1:23 am
Forum: Lua Labs
Topic: [solved] two [grid] tags
Replies: 54
Views: 898

Re: two [grid] tags

Pretty much. Just be aware that that also includes deprecated things (which is mostly value_compat and callback).
by Celtic_Minstrel
April 26th, 2024, 11:36 pm
Forum: Lua Labs
Topic: [solved] two [grid] tags
Replies: 54
Views: 898

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.
by Celtic_Minstrel
April 26th, 2024, 6:00 pm
Forum: Lua Labs
Topic: [solved] two [grid] tags
Replies: 54
Views: 898

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 ...
by Celtic_Minstrel
April 26th, 2024, 1:59 pm
Forum: Lua Labs
Topic: [solved] two [grid] tags
Replies: 54
Views: 898

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...
by Celtic_Minstrel
April 26th, 2024, 4:57 am
Forum: Lua Labs
Topic: [solved] two [grid] tags
Replies: 54
Views: 898

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...
by Celtic_Minstrel
April 25th, 2024, 11:35 pm
Forum: Lua Labs
Topic: [solved] two [grid] tags
Replies: 54
Views: 898

Re: two [grid] tags

That's what [stacked_widget] is for.
by Celtic_Minstrel
April 25th, 2024, 1:38 pm
Forum: WML Workshop
Topic: sound_source clarification
Replies: 2
Views: 117

Re: sound_source clarification

I think that's correct. You could try resetting the sound source whenever a unit moves. I would expect that to restart the sound from the beginning, but maybe if you're lucky it won't.
by Celtic_Minstrel
April 25th, 2024, 4:08 am
Forum: Lua Labs
Topic: [GUI] dynamic widget definition
Replies: 4
Views: 172

Re: [GUI] dynamic widget definition

Sounds like what you're doing is digging into the spinner's internals (it's a compound widget, which means it's composed of several smaller widges). That's definitely not the way it's supposed to work, but it's good to know that there's at least a workaround for the fact that it's not properly suppo...
by Celtic_Minstrel
April 25th, 2024, 2:14 am
Forum: Lua Labs
Topic: [GUI] dynamic widget definition
Replies: 4
Views: 172

Re: [GUI] dynamic widget definition

Now for the float, I'd like to use a slider, and that slider's minimum and maximum values and step size aren't known when I create the node definition, and it appears they cannot be modified on the fly. My guess is that they are fixed, and I have to define them when I define(/instantiate/initialize...
by Celtic_Minstrel
April 25th, 2024, 12:04 am
Forum: WML Workshop
Topic: negative ai aggression
Replies: 2
Views: 127

Re: negative ai aggression

The quantity (1 - aggression) is used to determine which of two attacks is better. The actual code that does the comparison is this ( harm_weight is the aforementioned aggression-based quantity): // Compare: P(we kill them) - P(they kill us). a = them_a.hp_dist[0] - us_a.hp_dist[0] * harm_weight; b ...