Attract-Mode Support Forum

Attract-Mode Support => Scripting => Topic started by: sickle on May 16, 2020, 02:09:21 PM

Title: how do you package a module with a layout (solved)
Post by: sickle on May 16, 2020, 02:09:21 PM
I want to include a module with a layout, but don't want to put users through the trouble of adding it to their modules folder, how do you direct the fe.load_module command to a directory relative to the layout. I tried fe.load_module("[...]/[...]"), but it didn't work, same for fe.do_nut
Title: Re: how do you package a module with a layout
Post by: progets on May 16, 2020, 02:54:58 PM
examples

in same folder as layout
Code: [Select]
fe.do_nut("sidebar.nut");

in script folder inside of layout folder
Code: [Select]
fe.do_nut("scripts/sidebar.nut");

in module folder inside layout folder
Code: [Select]
fe.do_nut("module/sidebar.nut");
Title: Re: how do you package a module with a layout
Post by: sickle on May 16, 2020, 03:37:09 PM
haha, thanks. I forgot to add .nut when I tried it that way :P