-
May 27th, 2020, 16:46 #11
Okay, I seem to be too dumb to include a script file.
in the extension.xml I added:
<script file="scripts/calendar_day.lua" />
so far so good.
The calendar_day.lua is in place inside the correct folder and I changed the colors to my liking.
Inside FGU unfortunately nothing changes.
Do I need to add / change anything for the file to execute correctly?
Thanks for your help and patience everyone.Last edited by SirMotte; May 28th, 2020 at 22:25.
I support ORC(L) and #opendnd!
Check out my Extensions and Materials for FGU!
Dark Theme: Sir Motte's Magnificent Darkness - Hearth Edition.
Custom GM Icon: Sir Motte's GM Icon Replacer.
Midjourney Art: AI generated images for my campaign.
-
May 29th, 2020, 23:18 #12
Bump. I'm sure this can be solved easily and it would enable me to finish up v 1.2 of my themes for publishing . Sorry to nag, but I wasn't able to figure this one out myself .
Last edited by SirMotte; May 29th, 2020 at 23:20.
I support ORC(L) and #opendnd!
Check out my Extensions and Materials for FGU!
Dark Theme: Sir Motte's Magnificent Darkness - Hearth Edition.
Custom GM Icon: Sir Motte's GM Icon Replacer.
Midjourney Art: AI generated images for my campaign.
-
May 30th, 2020, 18:42 #13
To run code you've written in an extension there are a few steps you need.
The first thing you need to do is to first register the script file in extensions.xml as you've done.
Alternatively if you need to call the scripts functions somewhere you need to give the name a script, such as in the example below:
Code:<script name="MenuItemRegister" file="scripts/menu_item_register.lua" />
Code:function onInit() registerMenuItems(); end function registerMenuItems() ... end
Code:function someFunctionFoo() ... MenuItemRegister.registerMenuItems; ... end
Code:function onInit() Token.onWheel = onWheel; end function onWheel(token, notches) if token == nil then return; end ... end
Last edited by StoryWeaver; May 30th, 2020 at 18:46.
Extension writer, FGU Backer, Ultimate License holder.
5E Enhancer (development and support on hold for now)
Combat Enhancer 5E Classic (no longer officially supported, community support only)
ps. Do not send PM's for support for the extensions I write, I will not not be able to respond there. Use the relevant forum threads instead so the community can benefit from the replies, thank you.
-
May 30th, 2020, 20:03 #14
[SOLVED]
Oookay.....it was a long road, but I got it....turned out I didn't need to do any additional coding! Your insight led me to the following discovery:
Within the utility_calendar.xml was an entry pointing the file directory of the calendar_day.lua to its default location. I simply had to change this to the correct folder...done -.-.
I had the idea because you told me how to define the script name, so I was wondering if the default name was mentioned anywhere else, overwriting my changes.
THANK YOU SO MUCH, I'll make sure to give your Themes extra care!
Thanks to everyone for your guidance, I feel like I have learned a lot through this.Last edited by SirMotte; May 30th, 2020 at 22:03.
I support ORC(L) and #opendnd!
Check out my Extensions and Materials for FGU!
Dark Theme: Sir Motte's Magnificent Darkness - Hearth Edition.
Custom GM Icon: Sir Motte's GM Icon Replacer.
Midjourney Art: AI generated images for my campaign.
-
May 30th, 2020, 20:34 #15
Happy to help, glad it worked out!
Extension writer, FGU Backer, Ultimate License holder.
5E Enhancer (development and support on hold for now)
Combat Enhancer 5E Classic (no longer officially supported, community support only)
ps. Do not send PM's for support for the extensions I write, I will not not be able to respond there. Use the relevant forum threads instead so the community can benefit from the replies, thank you.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks