5E Product Walkthrough Playlist
  1. #1
    leozelig's Avatar
    Join Date
    Jun 2007
    Location
    Eastern USA
    Posts
    1,850
    Blog Entries
    1

    DCC onCharItemDelete not working

    CharManager.onCharItemDelete does not run when an item is deleted from the inventory, so weapons stay in the weapon list on the Actions tab, and AC does not recalculate. Debug confirms that the function simply isn't running when the item is deleted, which is strange because CharManager.onCharItemAdd works great.

    The ruleset is layered on CoreRPG and borrows heavily from 5E. I have this in the CharManager.onInit function...

    Code:
    function onInit()
        ItemManager.setCustomCharAdd(onCharItemAdd);
        ItemManager.setCustomCharRemove(onCharItemDelete);
    end
    No extensions running, created a new campaign, restarted the computer - still nothing... I feel like I am missing something very basic.

    Any ideas?

  2. #2
    LordEntrails's Avatar
    Join Date
    May 2015
    Location
    -7 UTC
    Posts
    17,147
    Blog Entries
    9
    I only know that it has been said elsewhere multiple times that FG does not delete any actions or such when things are removed from the character sheet. Don't know if it can be made to work though.

    Problems? See; How to Report Issues, Bugs & Problems
    On Licensing & Distributing Community Content
    Community Contributions: Gemstones, 5E Quick Ref Decal, Adventure Module Creation, Dungeon Trinkets, Balance Disturbed, Dungeon Room Descriptions
    Note, I am not a SmiteWorks employee or representative, I'm just a user like you.

  3. #3
    I’d probably have to get a copy of entire ruleset as it stands to understand why it’s not being called.

    Do you have a link for me? You can send PM if it’s a work in progress thing you don’t want to post yet.

    Regards,
    JPG

  4. #4
    leozelig's Avatar
    Join Date
    Jun 2007
    Location
    Eastern USA
    Posts
    1,850
    Blog Entries
    1
    It worked in DCC v2.9 with no major changes to that part of CharManager. I checked the db files, and the data nodes are the same. Maybe I should reinstall FG??

    I will PM you the ruleset Moon, thank you...
    Last edited by leozelig; February 4th, 2018 at 20:02.

  5. #5
    Was there a 'fix' for the issue, as I have this with the 'Traveller' ruleset at the moment.

    Cheers,
    MBM
    Ruleset and much more content built for FGU.
    Come join me on Twitter at: https://twitter.com/MadBeardMan to see what I'm up to!

  6. #6
    leozelig's Avatar
    Join Date
    Jun 2007
    Location
    Eastern USA
    Posts
    1,850
    Blog Entries
    1
    Yes, JPG helped me. Here is his explanation:

    I think I found the issue. You are overwriting the script for char_invitem window class; so it's not calling any of the built-in functions. Try adding
    super.onInit(); as the first line of your new script for char_invitem. That will set up the event callback for the delete event, which ends up calling the ItemManager event chain.

    That fixed it for me!
    Last edited by leozelig; September 24th, 2018 at 03:00.

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
  •  
FG Spreadshirt Swag

Log in

Log in