5E Character Create Playlist
  1. #1

    Question about equipment carry/equipped toggle...

    I have a hard time finding the piece of code that handle the equipment carry/equipped toggle when clicking on the icon in the inventory page. Can anyone point me to where I can find the code that do this toggling?
    I have looked in both CoreRule and 5e and I do not even know in which of those files this toggle function exists.

    Thanks for any help!

  2. #2
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,404
    Look for <button_char_inv_carried name="carried"> in <windowclass name="char_invitem"> in CoreRPG -> campaign\record_char_inventory.xml

    This will show you that the control is named name="carried" which is the database field that will store the carried state in the FG database. Doing a "find in files" for carried you'll see that there is a onUpdate handler for that field set in campaign\scripts\char_invlist.lua which triggers the LUA function onCarriedChanged
    Last edited by Trenloe; September 5th, 2018 at 07:11.
    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!

  3. #3

    Join Date
    Apr 2009
    Location
    Fullerton, CA.
    Posts
    625
    grisix,

    Campaign folder will have a scripts folder, in there look for char_invlist.lua and manager_char.lua. Another file that interacts with them is in the top level scripts folder a file named manager_item2.lua
    There are probably other files that may tie in depending on what you are trying to do. Those are the one I am sure of.
    Last edited by Paul Pratt; September 5th, 2018 at 07:16.

  4. #4
    Thanks much for the pointers!

  5. #5
    I want to replace the onCarriedChanged which is in a ruletset (eg 3.5e) with an extension, but the function doesn't have a package name associated with it (eg CharManager.onCarriedChanged). How can I have my extension overwrite the 3.5e onCarriedChanged (which itself is overwriting the CoreRPG onCarriedChanged function)?

    At the moment I keep running into an error where it either says window is nil, or getDatabaseNode is nil and it definitely can't reach the 3.5e onEncumbranceChanged because that also doesn't have a package name. Is it possible to do this in an extension - to replace these types of function via extension without having to change the rulesets?

    I appreciate any information people can provide!

  6. #6
    You would have to use an extension to replace the template that uses that script with your own template which uses your own script. You can't overwrite a single function on a window/template/control.

    Regards,
    JPG

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
  •  
DICE PACKS BUNDLE

Log in

Log in