5E Character Create Playlist
  1. #1

    5e Extension Issues in ct_entry for NPCs?

    -
    UPDATE: Problem is solved with a combination of ruleset and extension updates. Can't tell you which parts are were the problems but I'm just happy everything is now working. Thank you all for your time and help.


    The problem: when a NPC is put in the combat tracker, its once functional charsheet is trashed. I've uploaded a png so you can see what I'm talking about; the charsheet on the right is the standard NPC from the SRD and the one partially covered by the errors is what happens after it's placed in the ct. Many things appear modifiable when they should be locked and readonly, the hitpoints are anchored way out of place and the label is mashed together with speed. Functionally, I suppose you could continue like nothing happened and the damage will still reduce as usual but I can't call it acceptable to distribute to people that want to use the extension.

    What I think: The extension mostly just modifies functions already in place and it looks to be a problem with npc ct entries. I think it's tied to my modified ct\scripts\ct_entry, specifically the modified "onLinkChanged" and "linkPCFields" functions since my extension modifies values and definitions for PC-exclusive features that when "setActiveVisible" has " bNPC = (sClass ~= "charsheet") " the NPC charsheet simply can't handle it... I am completely open to me being wrong about the whole thing but that is my best guess. I've cracked open the files and found the lines references in the error window but I didn't get anywhere with those. It's worth noting that my extension does not touch ANY NPC-specific files; no record_npc.xml, no npc.lua, nothing.

    What I need: I have no idea how to solve the problem, any helpful suggestions would be SO appreciated - thanks.

    UPDATE: So I found the root of the problem; something about the ct_entry function onIDChanged is screwing with the NPC sheet. Currently I've taken that function out of the code and the previous problem has stopped but I don't feel like this is the "right" solution to the problem (especially since doing so brings its own problems, albeit not quite as serious as before). I'll keep trying to figure out why this is going on and make a new thread for that specific function. Thank you all for your help.
    Attached Images Attached Images
    Last edited by trembot_89; September 4th, 2018 at 22:02. Reason: update

  2. #2
    I've attached some more pics. The two extension pics are what I think are involved and I've included two ruleset pics, the pics of -linkpc&onlinkchanged show the differences in between the ext and pak codes (the setActiveVisible png has no pair because there weren't any changes between the extension and ruleset), and the second ruleset photo from record_npc highlights the references in the error window from the original post's picture (which isn't included in the extension's modified files).
    Attached Images Attached Images
    Last edited by trembot_89; September 2nd, 2018 at 07:03.

  3. #3
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,685
    Blog Entries
    1
    Hey trembot_89

    I cant try and troubleshoot your code just now but a couple of things just to be aware of and check... and I might be telling you thinks you already know
    NPCs are not linked in the CT. A copy is made into the CT. LinkPCFields wont link back to these copies because each CT instance is unique - its no longer linked to its original so LinkPCFields has nothing to link to for NPCs...
    npc_mail.lua ln 58 specifies that HP is bReadOnly
    do you have any NPC files in your extension?

  4. #4
    Thank you damned for your response; I thought it has to be ct_entry related because there isn't an issue with an npc sheet until it's entered and then opened by clicking on the tracker link. I haven't altered any npc files, and my altered files are thus (and I searched them all for lines containing "npc"):

    "campaign/record_char.xml", "campaign/record_char_main.xml", "campaign/template_char.xml", "campaign/scripts/manager_char.lua", "ct/ct_host.xml" (3 "npc" hits), "ct/scripts/ct_entry.lua" (11 "npc" hits), "scripts/manager_action_damage.lua" (2 "npc" hits), "scripts/manager_actor2.lua", "scripts/manager_combat2.lua" (41 "npc" hits), and "scripts/manager_token2.lua"

    I suppose it could be related to the "addNPC" function in "manager_combat2.lua"? But I haven't touched any part of that section of the file - maybe that's the problem? (uploaded picture of highlighted function)
    Attached Images Attached Images

  5. #5
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,408
    When you made your extension did you make a backup/keep a copy of the files you modified/based your extension on? If so, you can do a compare of the original files (whatever pre version 3.3.6 code you based your extension on) with the v3.3.6 files and get an idea of what is different and therefore how you may need to merge your original changes into the new v3.3.6 code.
    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!

  6. #6
    I did not... I usually only keep the current and WIP files.

  7. #7
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,408
    Quote Originally Posted by trembot_89 View Post
    I did not... I usually only keep the current and WIP files.
    What version were they based on? v3.3.5 or earlier?

    Do you know which filenames you used code from?
    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!

  8. #8
    Update: FOUND IT! I am going through the original vitality extension (pre improved critical merge) for 3.1.2 and am noting key differences between them regarding NPCs. So far I've found that 3.3.6A uses "function onIDChanged()" in "ct_entry.lua" that affects NPCs and isn't included in the old extension; when removing this, the original problem disappears but now there's the complication of not including that function. Observable errors are that I can't delete the creatures by right-clicking radial menu (I don't think the right-click radial recognizes the character window in the tracker) and of course changing the ID from known to unknown does nothing.

    So I still have that to work on, but this is progress right?

    Trenloe, The current extension is updated for 3.3.6 and my WIP is for 3.3.6A; they include the following files from the 5e.pak: "campaign/record_char.xml", "campaign/record_char_main.xml", "campaign/template_char.xml", "campaign/scripts/manager_char.lua", "ct/ct_host.xml", "ct/scripts/ct_entry.lua", "scripts/manager_action_damage.lua""scripts/manager_actor2.lua", "scripts/manager_combat2.lua", and "scripts/manager_token2.lua".
    Attached Images Attached Images
    Last edited by trembot_89; September 2nd, 2018 at 23:03. Reason: clarifying ruleset version and edited files

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
  •  
Starfinder Playlist

Log in

Log in