DICE PACKS BUNDLE
  1. #1
    Blackfoot's Avatar
    Join Date
    Oct 2010
    Location
    New Jersey, USA
    Posts
    4,202
    Blog Entries
    4

    Unlocked Number Fields in NPCs..

    This isn't exactly a 'bug' but I'm not sure whether or not it works quite right... or as intended... so I'm posting it here as I'm not really sure where else to put it.

    For some reason Number Fields in NPCs do not 'lock' when the NPC is locked. I'm not sure why this would be a feature.. it seems like it is pretty easy to mess up your NPC data with it set up this way. I know it works this way in the current REV of PF.. I'm just sorta wondering if there is a good reason for it. I'm currently looking to change this in my own ruleset and wondering about it.
    Full License Operator - You must have a 'Lite' License to play in my games.
    Member and GM in the Fantasy Grounds Pathfinder Society Group.
    PFS Fantasy Grounds Forum
    FG Community Teamspeak Server: ts.fg-con.com
    Interested in Custom Character Portraits and Tokens? Contact me.

  2. #2

    Join Date
    Jun 2013
    Location
    Isanti, MN
    Posts
    2,922
    Which ruleset? Because you can't change them in locked NPCs on any of the rulesets I commonly use...

  3. #3
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,361
    I hadn't noticed this before. To re-create:
    1. Load up a Pathfinder (PFRPG) campaign.
    2. Open the bestiary module and drag an NPC from the library to the campaign NPC lists.
    3. Open the NPC in the campaign list and click on the "CR" field - you can change the value by typing in a new number or using CTRL+mousewheel - even though the record is showing locked.
    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!

  4. #4
    Blackfoot's Avatar
    Join Date
    Oct 2010
    Location
    New Jersey, USA
    Posts
    4,202
    Blog Entries
    4
    Quote Originally Posted by Trenloe View Post
    I hadn't noticed this before. To re-create:
    1. Load up a Pathfinder (PFRPG) campaign.
    2. Open the bestiary module and drag an NPC from the library to the campaign NPC lists.
    3. Open the NPC in the campaign list and click on the "CR" field - you can change the value by typing in a new number or using CTRL+mousewheel - even though the record is showing locked.
    Exactly. Sorry for not including more details. I haven't tested this in other Rulesets but since my NPCs (for my Champions Ruleset) are based largely on the 3.5 NPCs I suspect it works that way in both 3.5 and PF at least.
    Full License Operator - You must have a 'Lite' License to play in my games.
    Member and GM in the Fantasy Grounds Pathfinder Society Group.
    PFS Fantasy Grounds Forum
    FG Community Teamspeak Server: ts.fg-con.com
    Interested in Custom Character Portraits and Tokens? Contact me.

  5. #5
    Blackfoot's Avatar
    Join Date
    Oct 2010
    Location
    New Jersey, USA
    Posts
    4,202
    Blog Entries
    4
    I tried getting around this by creating a new lockable template... but apparently I 'f'd' it up. It doesn't change state when the lock is clicked... it just stays whatever state the thing was when the NPC was started up. Does it... hmm.. it doesn't do this with number fields in inventory items... I wonder what template they use.
    Hrm.. they use number_columnh... rather than basicnumber... a much more complicated template in terms of placement and stuff. Hrm.
    Full License Operator - You must have a 'Lite' License to play in my games.
    Member and GM in the Fantasy Grounds Pathfinder Society Group.
    PFS Fantasy Grounds Forum
    FG Community Teamspeak Server: ts.fg-con.com
    Interested in Custom Character Portraits and Tokens? Contact me.

  6. #6
    Blackfoot's Avatar
    Join Date
    Oct 2010
    Location
    New Jersey, USA
    Posts
    4,202
    Blog Entries
    4
    I tried switching to number_columnh and it still doesn't lock them. I'm not sure what's up here. Is this functionality is as intended?
    Full License Operator - You must have a 'Lite' License to play in my games.
    Member and GM in the Fantasy Grounds Pathfinder Society Group.
    PFS Fantasy Grounds Forum
    FG Community Teamspeak Server: ts.fg-con.com
    Interested in Custom Character Portraits and Tokens? Contact me.

  7. #7
    The templates don't auto-lock, since that would require every single control to register a callback when the "locked" field changes.

    All of the rulesets I've built register a callback when the "locked" field changes at the windowclass level, then the callback function specifically locks/unlocks the relevant fields as well as showing/hiding additional controls used for layout.

    Regards,
    JPG

  8. #8
    Blackfoot's Avatar
    Join Date
    Oct 2010
    Location
    New Jersey, USA
    Posts
    4,202
    Blog Entries
    4
    So the unlocked functionality in the 3.5/PFRPG ruleset for NPCs is 'as intended'? I don't know about other rulesets, I based my code (in my Champions Ruleset) off the 3.5 functionality.. so it works/doesn't work the same as that ruleset.
    Full License Operator - You must have a 'Lite' License to play in my games.
    Member and GM in the Fantasy Grounds Pathfinder Society Group.
    PFS Fantasy Grounds Forum
    FG Community Teamspeak Server: ts.fg-con.com
    Interested in Custom Character Portraits and Tokens? Contact me.

  9. #9
    No. I'm just saying that the templates used don't lock/unlock themselves based on the lock field changing. You have to register callback in main window, then call template functions to lock/unlock each control.

    Check out the npc.lua file in 3.5E ruleset. Or look for any onLockChanged functions scattered throughout.

    Regards,
    JPG

  10. #10
    Blackfoot's Avatar
    Join Date
    Oct 2010
    Location
    New Jersey, USA
    Posts
    4,202
    Blog Entries
    4
    OK. So what I ended up doing was creating a new template 'lockable_number' and copied the update scripts from 'number_columnh' to this template but removed the Visibility bits from it. Then I set them to be called in npc_main. This seems to have resolved the issue for my ruleset but it remains an issue in 3.5 and PFRPG.
    Full License Operator - You must have a 'Lite' License to play in my games.
    Member and GM in the Fantasy Grounds Pathfinder Society Group.
    PFS Fantasy Grounds Forum
    FG Community Teamspeak Server: ts.fg-con.com
    Interested in Custom Character Portraits and Tokens? Contact me.

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
  •  
5E Product Walkthrough Playlist

Log in

Log in