Statistics: Posted by ZombieKnight — Yesterday, 5:25 pm
Code:
local u = wesnoth.units.get(wml.variables["unit.id"])local u_table=u.__cfg
Code:
local u_table = wml.variables["unit"]
This is what I'd recommend for getting that information, assuming the stored unit hasn't been modified at all:Whats the path to weapon (name=weapon_name), specials with index [index], specials id?
Code:
local u = wesnoth.units.get(wml.variables["unit.id"])local weapon = u.attacks[weapon_name]local special_id = weapon.specials[index].id
Code:
local u_table = wml.variables["unit"]local weapon_table = wml.find_child(u_table, "attack", {name = weapon_name})local specials = wml.get_child(weapon_table, "specials")local specials_id = specials[index].contents.id
.contents
probably needs to be replaced with [2]
.Statistics: Posted by Celtic_Minstrel — Yesterday, 5:14 pm
Code:
local u = wesnoth.units.get(wml.variables["unit.id"])local u_table=u.__cfg
Statistics: Posted by ZombieKnight — Yesterday, 4:01 pm
Statistics: Posted by ZombieKnight — March 17th, 2024, 3:59 pm
[resolution]
tag to gui.show_dialog
, you'd have a dialog that looks exactly like a message dialog, but probably lacks some functionality.Statistics: Posted by Celtic_Minstrel — March 17th, 2024, 2:22 pm
gui.show_naration
tag...gui.show_naration
defined in lua?Statistics: Posted by ZombieKnight — March 17th, 2024, 6:05 am
show_narration
is part of GUI2 – it's just one of the pre-built dialogs provided for you.Statistics: Posted by Celtic_Minstrel — March 17th, 2024, 1:43 am
Statistics: Posted by ZombieKnight — March 16th, 2024, 3:25 pm
Statistics: Posted by Celtic_Minstrel — March 16th, 2024, 3:21 pm