Search found 3041 matches
- Today, 1:33 pm
- Forum: WML Workshop
- Topic: [heal_unit] and status=unhealable
- Replies: 2
- Views: 35
Re: [heal_unit] and status=unhealable
Should be healed.
- Today, 11:55 am
- Forum: Lua Labs
- Topic: Core [message] image height and width macros
- Replies: 9
- Views: 171
Re: Core [message] image height and width macros
You need to use string concatenation then. Instead of
f((image_original_width < 300)
having f((]]..tostring(image_original_width)..[[ < 300)
for example.- Today, 10:39 am
- Forum: Lua Labs
- Topic: Core [message] image height and width macros
- Replies: 9
- Views: 171
Re: Core [message] image height and width macros
I cant tell if the wml you posted is expected inside [image]. By syntax it seems possible.
local image_original_width = ...
local image_original_height = ...
local portrait_mirror = ...
local portrait_image = ...
are not doing anything.
local image_original_width = ...
local image_original_height = ...
local portrait_mirror = ...
local portrait_image = ...
are not doing anything.
- Today, 9:35 am
- Forum: Lua Labs
- Topic: Core [message] image height and width macros
- Replies: 9
- Views: 171
Re: Core [message] image height and width macros
Now that you have wml you can use wml.parse # lua wesnoth.require("wml-utils").handle_event_commands(wml.load("~add-ons/EventLoader/action.cfg")) [lua] code=<< x = wml.parse([[ h="( if((image_original_width < 300) and (image_original_height < 300), image_original_height, ((i...
- Yesterday, 9:19 pm
- Forum: WML Workshop
- Topic: new campaign's questions and ideas
- Replies: 2
- Views: 107
Re: new campaign's questions and ideas
Start by creating unit types.
- Yesterday, 9:16 pm
- Forum: Lua Labs
- Topic: Core [message] image height and width macros
- Replies: 9
- Views: 171
Re: Core [message] image height and width macros
First get rid of macros, run preprocessor on them. Then convert macroless WML to Lua, by wml.parse or manually as fits your situation better.
- May 10th, 2024, 10:39 pm
- Forum: WML Workshop
- Topic: fire event in teleport
- Replies: 13
- Views: 399
Re: fire event in teleport
[filter] x,y=$x1,$y1 [/filter]
Is always passing, so you can just remove that.
Is always passing, so you can just remove that.
- May 10th, 2024, 1:40 pm
- Forum: Lua Labs
- Topic: [solved] weapon specials inside [abilities]
- Replies: 5
- Views: 156
Re: [solved] weapon specials inside [abilities]
id probably means it wont give you 14 damage.
- May 7th, 2024, 9:34 pm
- Forum: WML Workshop
- Topic: Linking Macro files
- Replies: 2
- Views: 120
Re: Linking Macro files
{~add-ons... is not linking, it is telling wesnoth to take data from there and put into current line. The instructions are carried out in the order written, so if {~add-ons/A_Addon_Test/scenarios} depends on {~add-ons/A_Addon_Test/utils} then {~add-ons/A_Addon_Test/utils} needs to be in earlier line.
- May 7th, 2024, 12:35 pm
- Forum: WML Workshop
- Topic: Testing WML actions more often without reloading cache
- Replies: 4
- Views: 5980
Re: Testing WML actions more often without reloading cache
It might be useful to wrap wml.load in
wml.tovconfig
if there is interest to use $ variables.:alias e=lua wesnoth.require("wml-utils").handle_event_commands(wml.tovconfig(wml.load("~add-ons/EventLoader/event.cfg")))
- May 7th, 2024, 10:42 am
- Forum: WML Workshop
- Topic: fire event in teleport
- Replies: 13
- Views: 399
Re: fire event in teleport
Add [fire_event]name=teleport[/fire_event] after you teleport units. If you mean ability then enter hex should work.
- May 6th, 2024, 7:05 pm
- Forum: Lua Labs
- Topic: [solved] How to move WML table
- Replies: 12
- Views: 324
Re: How to move WML table
Assign them with the API you have available to create wml variables. Including wml.variables if you prefer. Those like set_variable, set_variables, wml.array_access.set, wml.array_variables, wml.variables_proxy.
- May 6th, 2024, 6:59 pm
- Forum: Lua Labs
- Topic: [solved] How to move WML table
- Replies: 12
- Views: 324
Re: How to move WML table
You cant put them to wml.variables. You can think of wml.variables as function, not as table. It reflects state of wml variables, but itself is not wml variables.
- May 6th, 2024, 6:57 pm
- Forum: WML Workshop
- Topic: Annoying error: <lua> Repeated [endlevel] execution, ignored
- Replies: 4
- Views: 195
Re: Annoying error: <lua> Repeated [endlevel] execution, ignored
[fire_event] the [endlevel] call, but have the event containing [end_level] first_time_only=yes.
- May 6th, 2024, 6:50 pm
- Forum: Lua Labs
- Topic: [solved] How to move WML table
- Replies: 12
- Views: 324
Re: How to move WML table
wml.variables is not real table, so you cant insert another table into it. For regular tables it is just table.insert(destination_table, wml_table).