Dugy / Legend_of_the_Invincibles

An add-on campaign for the Battle for Wesnoth game
GNU General Public License v3.0
40 stars 22 forks source link

Tutorial's crafting doesn't work #229

Closed Dugy closed 5 years ago

Dugy commented 5 years ago

See the forums: https://forums.wesnoth.org/viewtopic.php?f=8&t=32384&p=637445#p637445

edwardspec commented 5 years ago

That T alias for wml.tag (added in ffee4f7871cee6c63ec5fcadba76c951abbb5653) is not a part of Wesnoth core. It had to be added explicitly.

In the future, the following one-liner is handy for testing: wesnoth --nocache -m -d --debug-lua --scenario LotI-Gladiators --controller=2:null --controller=3:null --controller=4:null --controller=5:null (opens Wesnoth and immediately starts Gladiators with 1 player, skipping any "multiplayer options" dialogs, etc.)

Please do try the changes you commit/merge unless they require difficult-to-obtain saves.

Dugy commented 5 years ago

Btw, I have created a testing scenario, it can be enabled by making a dummy add-on filter with this _main.cfg file:

[campaign]
    id="Legend_of_the_Invincibles_test"
    name= _ "Legend of the Invincibles"+ "
" +_"The Test"
    define=CAMPAIGN_LEGEND_OF_THE_INVINCIBLES_TEST
    first_scenario="test_scenario"
    abbrev= _ "LotI1"
    rank=816
    difficulties=EASY,NORMAL,HARD
    difficulty_descriptions="&data/core/images/items/bones.png=Easy;*&data/core/images/items/burial.png=Medium;&data/core/images/items/bonestack.png=Hard"
    description= _ "Just a test" 
    icon="data/core/images/misc/blank-hex.png"
[/campaign]
#ifdef CAMPAIGN_LEGEND_OF_THE_INVINCIBLES_TEST
[binary_path]
path=data/add-ons/Legend_of_the_Invincibles/
[/binary_path]
{~add-ons/Legend_of_the_Invincibles/_main.cfg}
{LOTI_LUA}
{OTHER_LOTI_MAIN_STUFF}
{~add-ons/Legend_of_the_Invincibles/utils}
[+units]
{~add-ons/Legend_of_the_Invincibles/units}
[/units]
{~add-ons/Legend_of_the_Invincibles/scenarios6/test_scenario.cfg}
{~add-ons/Legend_of_the_Invincibles/terrain.cfg}
#endif
Dugy commented 5 years ago

So it was actually my cache that broke it? Oh damn, I owe you an excuse.

Dugy commented 5 years ago

I am getting this error when I get there:

Legend_of_the_Invincibles/lua/scenario/tutorial.lua:58: bad argument #2 to 'set_dialog_visible' (widget not found)
stack traceback:
    [C]: in field 'set_dialog_visible'
    ...-ons/Legend_of_the_Invincibles/lua/scenario/tutorial.lua:58: in function <...-ons/Legend_of_the_Invincibles/lua/scenario/tutorial.lua:53>
    [C]: in field 'show_dialog'
    ...-ons/Legend_of_the_Invincibles/lua/scenario/tutorial.lua:103: in field 'craft'
    [string " wesnoth.require('~add-ons/Legend_of_the_Invi..."]:1: in local 'bytecode'
    lua/wml-tags.lua:272: in local 'cmd'
    lua/wml-utils.lua:145: in field 'handle_event_commands'
    lua/wml-flow.lua:6: in function <lua/wml-flow.lua:5>
Dugy commented 5 years ago

This time, it was me who broke it.