DICE PACKS BUNDLE
  1. #1

    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>
    I want to join or replace the script of the window list in the extension:
    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>
    This seems to do nothing. "window_talente" behaves like so ruleset verion.
    For a test I tried to delete the window_talente with:
    Code:
    <windowclass name = "window_talente" merge = "delete"/>
    Which should produce a class not found error in my understanding, but the original window is loaded.
    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>
    Any idea what I'am doing wrong?

  2. #2
    * 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

  3. #3
    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.

  4. #4
    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

  5. #5
    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

  6. #6
    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

  7. #7
    It is not specific to DSA.

    In my understanding these files should draw a box over the charsheet.
    But nothing happends.
    Attached Files Attached Files

  8. #8
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,362
    Quote Originally Posted by Weltenbrand View Post
    It is not specific to DSA.

    In my understanding these files should draw a box over the charsheet.
    But nothing happends.
    Two typos:

    1) extension.xml: <incluefile source="campaign/box.xml"/> should be includefile
    2) box.xml: <backcoloer>#FFFFFF</backcoloer> should be <backcolor>
    Private 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!

  9. #9
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
5E Character Create Playlist

Log in

Log in