TTLG|Thief|Bioshock|System Shock|Deus Ex|Mobile
Results 1 to 12 of 12

Thread: Help with NVKeyRing -- Keyring doesn't always auto-select when keys are picked up

  1. #1
    Member
    Registered: May 2017
    Location: USA

    Help with NVKeyRing -- Keyring doesn't always auto-select when keys are picked up

    Hi all,

    I'm experiencing an issue that I can't sort out. I have a bunch of keys all with the NVKeyRingKey script (and don't inherit = TRUE). All of them work perfectly in the sense that they get added to a keyring object's stack count, and that keyring is then capable of opening doors with KeyDsts corresponding to the KeySrcs of the acquired keys.

    The only issue I'm experiencing is that picking up a key doesn't reliably auto-select the keyring in inventory. The first key I pick up does, but subsequent keys do not. There is still a key pick-up noise, but the player then needs to scroll through the inventory to find the key ring.

    Is this by design? Or is there something wrong with how I'm implementing the script? All-in-all, it's perfectly playable, but I'd rather have the keyring auto-select everytime a key is picked up.

  2. #2
    Member
    Registered: Mar 2001
    Location: Ireland
    Hmm, it's supposed to select the keyring object after you pick up a key.
    It looks like it doesn't actually work.

    Please try this version of the script, it should fix the problem.

  3. #3
    Member
    Registered: May 2017
    Location: USA
    Still have the same issue---must be something I did in my hierarchy...

  4. #4
    Member
    Registered: Mar 2001
    Location: Ireland
    What exactly are you doing when you test this?

    I tried:

    1) Pick up first key, switch to compass, pick up second key.
    2) Pick up first key, clear inventory, pick up second key.
    3) Pick up first key, wait for it to time out, pick up second key.

    In all three cases, it worked consistently with the new script module.

  5. #5
    Member
    Registered: May 2017
    Location: USA
    This is odd, they do not act the same for me. See below:

    Quote Originally Posted by Nameless Voice View Post
    What exactly are you doing when you test this?
    1) Pick up first key, switch to compass, pick up second key.
    This works perfectly. From compass (or anything else in inventory), picking up the next key brings up the keyring in inventory.

    Quote Originally Posted by Nameless Voice View Post
    What exactly are you doing when you test this?
    2) Pick up first key, clear inventory, pick up second key.
    Same problem described above. Key pickup sounds play, and the keyring takes the new key (added to stackcount and the list of KeySrcs), but it does not bring up the keyring in inventory.

    Quote Originally Posted by Nameless Voice View Post
    What exactly are you doing when you test this?
    3) Pick up first key, wait for it to time out, pick up second key.
    Same problem as (2).

    EDIT: The plot thickens---it also works perfectly if I pick up a key, then scroll through inventory, then clear it and pick up a next key. It seems is only breaks when both of the following hold: (a) there is currently nothing selected in inventory; and (b) the keyring was the last item selected in inventory.
    Last edited by trefoilknot; 15th Mar 2020 at 22:53.

  6. #6
    Member
    Registered: May 2002
    Location: Texas
    Does this problem happen with non-keyring objects too?
    Have you tried to turn auto equip off and back on again?

  7. #7
    Member
    Registered: May 2017
    Location: USA
    The problem does not occur for any other object (so far tested). Loot, flashbombs, keys which don't go on a keyring; they all work just fine.

    Messing around with auto-select doesn't make a difference. I must have mucked something up on my end...

  8. #8
    Member
    Registered: May 2017
    Location: USA
    For now, I'm content to just fake it. Is there a brute force way to call the keyring in inventory? I tried giving each key a the NVItemGiver script, and setting world frob to "Script" instead of "Move." Essentially, frobbing a key gives the key to the player. This works just as well as the current setup, but still fails to select the keyring in certain instances.

    Is there a script like NVItemGiver which just forces a particular item to select in inventory?

  9. #9
    Member
    Registered: Mar 2001
    Location: Ireland
    You could try NVSelectTrap, which selects the item specified by the NVSelectTrapItem param upon activation.

    Also, removing and re-adding the item from your inventory should do it (so long as auto-equip is enabled.)

  10. #10
    Member
    Registered: May 2017
    Location: USA
    Having the key select itself doesn't work. Is there a way I can ascertain the object number for the keyring, itself? Does it have an object number?

  11. #11
    Member
    Registered: Mar 2001
    Location: Ireland
    It gets created dynamically, so no.

    However, the object is named "NV-192-Keyring".

    (You can change that number, if you want multiple keyrings, via the NVKeyringID parameter. It defaults to 192.)

  12. #12
    Member
    Registered: May 2017
    Location: USA
    Sadly no dice with that approach either. I might just have to accept this imperfection. It’s still fully playable, I suppose.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •