5E Character Create Playlist
  1. #1

    5e ct_entry function onIDChanged problems

    -
    UPDATE: Problem solved. The combination of updates to ruleset and extension seem to be jiving, still not totally sure how/why but I'm not going to look a gift horse in the mouth. Thanks everyone for your time and input!


    This is a continuation of a past thread found here about my extension not cooperating with NPC sheets when they're added to the combat tracker (no problems with NPCs before their links are activated through the tracker). Since the situation has changed a bit I figured that a new thread was appropriate -- if it's not, I'm sorry and understand if it needs to be deleted.

    Onward to the problem!:
    Basically, when the ct_entry.lua function "onIDChanged" is active...
    -after clicking on a NPC link through the combat tracker the NPC sheet's hp anchoring is all jacked-up and overlapping the "ID unknown name" and "speed",
    -plus a bunch of text fields are open when they should be closed,
    -a bunch of errors get thrown, etc;
    -a very troublesome experience for people wanting to use the extension.

    When the function is removed, the NPC sheet looks great but...
    -toggling the "ID known/unknown" does nothing to the creature's name in the tracker (expected from the function's removal),
    -the creature/character windows in the tracker are unrecognized when using the right-click radial menu (making deletion from the tracker limited to the menu button at the bottom),
    -when the combat tracker is opened with previously loaded characters (like in a continued campaign) all of the window colors that display the relation of character/creature (friendly/neutral/faction/hostile) are displayed in the blank "faction" color even though the button selection shows the proper relation status,
    -and of course there's the errors that are thrown by removing a function from the code.

    I've uploaded screenshots of what happens to NPC sheets and the thrown errors with and without the onIDChanged function (the script warnings are from toggling the NPC ID known/unknown), and one more of the (deactivated) function itself.

    I'm looking for any insight on what the function does to affect the NPC sheets in the manner it did (before removing it) and any advice that could lead to an error/bug-free solution, thank you all so much for reading through this and any help you have to offer.
    Last edited by trembot_89; September 4th, 2018 at 22:01. Reason: update

  2. #2
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,684
    Blog Entries
    1
    start with the first error.
    data type mismatch for control "hp"
    find the definition of "hp" in the npc xml
    im pretty sure you will see that it used to in 3.3.5 have a load of definition in the tags and now everything is in a template
    <number_column name="hp" />
    you need to check the definition of number_column
    and then look in the db.xml and see if the data in that field is correct (Database type mismatch)

    Start there....

  3. #3
    Do you think it's possible that the NPC sheet uses the <windowlist name="hd"> from record_char_main.xml for its own record_npc.xml? I'm asking because the files in the extension have literally not directly touched anything "npc" and I'm really trying to figure out how something on my end is causing a bug like this... I'm grasping at straws trying to pull something out of the woodworks, I really don't understand as much as I need to (what is a number_column?, which is the db.xml?) but I'm trying damn it! I'm posting a picture of both for comparison.

    Edit 1: I suspect the hd windowclass because it got anchored to a value that doesn't (shouldn't) exist in the NPC sheet.
    Edit 2: I just found something interesting between the ruleset and extension char_main.xmls, that would be very important if the npc sheet does use the char as a template of some sort. (posting these two too, ending in "-hp"). Basically, I think the regular hp definition might have been replaced with something else...?
    Attached Images Attached Images
    Last edited by trembot_89; September 4th, 2018 at 05:43.

  4. #4
    The client combat tracker was extensively reworked as part of the last update. (The host tracker had already been rewritten in a previous release to be more modular, and it was time for the next step of modularizing the client CT content as well as adding NPC ID support.)

    You may need to rewrite the client CT changes for this extension. I would not override the whole CT script if you can avoid it. You'll probably be able to re-use most of your script code, so you can use as a reference.

    Also, you shouldn't be overriding the NPC sheet at all in your extension, if your extension doesn't apply to NPCs.

    Regards,
    JPG

  5. #5
    Quote Originally Posted by Moon Wizard View Post
    The client combat tracker was extensively reworked as part of the last update. (The host tracker had already been rewritten in a previous release to be more modular, and it was time for the next step of modularizing the client CT content as well as adding NPC ID support.)
    I don't what changes you all did in the last update but it seems to have sorted everything out! If I were able I'd buy you and the dev team a round of your drinks of choice, I would. Cheers.

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

Log in

Log in