Thread: FGU: Extension not working?
-
September 26th, 2020, 11:23 #1
- Join Date
- Sep 2018
- Posts
- 75
FGU: Extension not working?
I'am writing an extension for a ruleset I'am developping.
I want to join (or replace) the script for a window control.
Code in the ruleset:
Code:<root> <windowclass name = "window_talente"> [...] <sheetdata> [...] <windowlist name = "liste"> <anchored> [...] </anchored> <class>liste_normaletalente</class> <sortby> <control>name</control> </sortby> <script file = "campaign/character/talente/scripts/script1.lua"/> <allowdelete/> </windowlist> </sheetdata> </windowclass> </root>
Code:<root> <windowclass name = "window_talente" merge = "join"> <sheetdata> <windowlist name = "liste"> <script file = "campaign/character/talente/scripts/script2.lua" merge="join"/> </windowlist> </sheetdata> </windowclass> </root>
For a test I tried to delete the window_talente with:
Code:<windowclass name = "window_talente" merge = "delete"/>
This makes me guess that the extension is not loaded correctly even if no error/warning is shown.
extension.xml:
Code:<root version="3.2"> <properties> <name>Addon: Talentlisten</name> <description>Talentlisten für das DSA4 Rulseset von der DZ</description> <ruleset> <name>DasSchwarzeAuge4DZ</name> </ruleset> </properties> <version>0.1</version> <base> <incluefile source="campaign/character/talente/window_talente.xml"/> </base> </root>
-
September 26th, 2020, 18:36 #2
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,416
* Have you loaded the extension on the launch screen for your test campaign?
* Are there any errors in the console?
When I'm not sure if a script is loading, I will usually add a global script with a Debug.console() statement in the onInit function in order to verify loading.
Regards,
JPG
-
September 26th, 2020, 20:13 #3
- Join Date
- Sep 2018
- Posts
- 75
I get no errors in the console and get the extension loaded message.
This code gets executed:
Code:<script name="Test"> function onInit() Debug.console("Extension loaded") end </script>
Last edited by Weltenbrand; September 26th, 2020 at 21:46.
-
September 27th, 2020, 06:16 #4
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,416
In window classes, the merge attribute is meant to be usedor specifying at the windowclass level, and at each control level; not within the controls. The one you have on the script tag for the windowclass merge will just be added to the existing control (which means that it gets layered, I believe). So, the underlying script functions will still be there, but can be overriden by your script.
Regards,
JPG
-
September 27th, 2020, 06:30 #5
- Join Date
- Sep 2018
- Posts
- 75
Layering the script would be great. But this does not happen.
Only the original script is executed für the windowlist.
Basically nothing happens if I try to merge windowclasses or windocontrols.
Best Regards
-
September 27th, 2020, 06:51 #6
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,416
Without an example extension that I can use to step through and test, I don't know what is happening or not happening.
I'm not familiar with DSA nor can I speak German; is there a way to make a sample for CoreRPG that has the same issue?
Regards,
JPG
-
September 27th, 2020, 07:14 #7
- Join Date
- Sep 2018
- Posts
- 75
It is not specific to DSA.
In my understanding these files should draw a box over the charsheet.
But nothing happends.
-
September 27th, 2020, 10:17 #8Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
September 27th, 2020, 10:59 #9
- Join Date
- Sep 2018
- Posts
- 75
Oh ...
I will look at this when I get home.
If this is the error I am really sorry.
... several days for finding a d -.-'.Last edited by Weltenbrand; September 28th, 2020 at 08:27.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks