Saibot393 / LocknKey

A Foundry VTT module to handle locking and unlocking of doors and other objects
MIT License
10 stars 7 forks source link

Cannot Copy Door ID #89

Closed hmbaxharm closed 6 months ago

hmbaxharm commented 6 months ago

I cannot copy a door's ID following the instructions on the Foundry page/GitHub Readme: "To copy a tokens or doors IDs ctrl+right-click them and to paste them ctrl+left-click them."

I have a prison with several doors I want to copy to the same Key. I Ctrl + Right-click and the door turns into an unlocked, normal door. Nothing else happens. I then go to the Key Item > Lock & Key tab > ID Keys and try to paste with Ctrl + Left-click and nothing is pasted. 2024-04-29 10_50_15-Foundry Virtual Tabletop

I also tried to use the included Macros and that does not seem to copy/paste either. I'm not sure if I'm misunderstanding how this should work, or this is an issue ?

Foundry v11 Build 315 D&D 5E v3.1.2 Lock & Key v2.7.7 Windows 11

Saibot393 commented 6 months ago

This might be a misunderstanding, to paste an ID into a key you can right-click the item in the side bar and choose the option "paste IDs into key" from the context menu image

hmbaxharm commented 6 months ago

Thank you - so the locked door has to be an item ? When I create a Key for a locked door, is the "ID key" the key's ID or the door's ID ?

Assuming it is the door's ID, is there any way I can get the door IDs without having to make a new key for each one ?

Saibot393 commented 6 months ago

So how the system works is a follows: Each key (item) and each lockable object (Doors, Token, Tiles) has a set of IDs(these IDs are not connected to any other default Foundry IDs like e.g. the walls id or the item ID). You can access these directly, for the items via the Lock & Key tab in the item settings ("ID keys"), for objects via the respective object settings (e.g. the wall settings for the door, see attached screenshot) under the L&K tab ("ID keys"). image

Both keys and objects can have an arbitrary amount of these IDs, with these IDs being seperated by a ";" . If a key and a lock object have at least one matching ID, the key can open the door.

You can copy and paste key IDs between already existing objects/items. To copy you can use ctrl+right click on object, or use the copy option from the items context menu and to paste you can use ctrl+left click or use the paste option in the items context menu. (or you can simply copy the literal text between the fields)

You can also directly create a new key for an object by shift+right clicking it, in this case this menu will open: image

hmbaxharm commented 6 months ago

Thanks very much ! I didn't realize how I could access the door settings in the Wall configurations. I appreciate your help !