DICE PACKS BUNDLE
Page 2 of 2 First 12
  1. #11
    Quote Originally Posted by Moon Wizard View Post
    Try looking in the "scripts/data_library_35E.lua" file in the 3.5E ruleset for an example.

    You can copy to data_library_strange.lua in your own ruleset, and then you can strip out everything but the code that calls aRecordOverrides variable. You'll need to customize the onInit function to register your overrides, update the aRecordOverrides variable which your specific record type information, and make sure that the new "data_library_strange.lua" file is referenced in the base.xml as a global script called "LibraryDataStrange".

    Regards,
    JPG
    Success! buttonsuccess.PNG
    Thank you so much!
    Now all I need to know is what you mean by/how to "customize the onInit function to register your overrides"

  2. #12

    Join Date
    May 2016
    Location
    Jacksonville, FL
    Posts
    2,211
    Blog Entries
    7
    I just uploaded a fixed extension. The reason it was generating the windowclass error before is because I wasn't paying attention. Now it works as far as creating the Library button and bringing up a masterindex window.

    Quote Originally Posted by sujifae View Post
    Which part of the code in your extension controls the name in the Library?
    This part:

    Code:
    <string name="library_recordtype_label_recursion">Recursions</string>
    Then take a look at scripts/data_library.lua in CoreRPG. You'll see reference to sDisplayText which is discussed in the commentary at the top of the file. The initialize() function defines it then later on the getDisplayText function pulls the string value from the record being called.

  3. #13
    I was talking about slimming down the onInit function to only perform the loop to add the aRecordOverrides; since the rest of the stuff in that file is not needed for your case.

    Regards,
    JPG

  4. #14

    Would like help with an error message

    Hi! I recently found this thread because I too would like to create a new tab in the sidebar. When I downloaded the extension provided I got an error (Posted below this). I'm curious if you happen to know whats going on and how I could fix it.

    Code:
    [Error] Script execution error: [string "campaign/scripts/campaign_button_new.lua"]:28: attempt to index 'w' (a nil value)

  5. #15
    This thread is two years old; so is not going to be the correct method to add a button to the sidebar any longer. In general, it is best to start a new thread with your questions, if the thread is older than about 6 months.

    Perhaps you can provide information on what you are trying to do in a new thread in the Workshop forum, and we can point you in the right direction.
    https://www.fantasygrounds.com/forum...2-The-Workshop

    Going to lock this thread; to avoid further necro.

    Regards,
    JPG

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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
  •  
STAR TREK 2d20

Log in

Log in