8000 Compatibility with 3dCanvas · Issue #133 · Saibot393/LocknKey · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Compatibility with 3dCanvas #133

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
surrealzerg opened this issue Feb 26, 2025 · 21 comments
Open

Compatibility with 3dCanvas #133

surrealzerg opened this issue Feb 26, 2025 · 21 comments
Labels
enhancement New feature or request

Comments

@surrealzerg
Copy link

When using 3dCanvas (TheRipper93), the module does not function as expected. A lock created with a given ID does not open when a player with a matching key ID interacts with the door. The tile is configured as a door and initially in the locked state.

@Saibot393 Saibot393 added the bug Something isn't working label Feb 26, 2025
@Saibot393
Copy link
Owner

I will look into it, might take a bit though, i am not that familiar with 3d Canvas

@surrealzerg
Copy link
Author

These are tile properties related to a tile's door state in 3d Canvas.

await doorTile.update({
"flags.levels-3d-preview.doorState": 1 //
});

0 = closed
1 = open
2 = locked

@Saibot393
Copy link
Owner

Thank you, i will try to add it in the next update

@surrealzerg
Copy link
Author

I looked into this for a couple hours yesterday. I didn't make as much progress as I'd hoped, but after reading through the code base, it looks like you handle compatibility with other modules through LnKCompatibility.js and LnKCompUtils.js. I made updates to those files to align with the current code structure. But I'm still not getting any code execution as I don't believe that toggleLock() is getting called.

Any help appreciated.

@Saibot393
Copy link
Owner

I am so sorry, i completely forgot about this. I will start looking for an implementation immediatly

@Saibot393 Saibot393 added enhancement New feature or request and removed bug Something isn't working labels May 10, 2025
@Saibot393
Copy link
Owner

As a quick update, i am almost done, there is just one small bug that i have yet to solve and a few test that i want to run.

@surrealzerg
Copy link
Author

Thanks so much for looking into this!

@Saibot393
Copy link
Owner

With v4.1.0 Lock & Key should now be compatible with 3D Canvas

@surrealzerg
Copy link
Author

I did some testing on 4.1.0 and identified an issue.
When Lock&Key is enabled, door locked or unlocked in Lock&Key, it's no longer possible to update any of the settings under 3D -> Vision.
Tile.locked is set to false.

@Saibot393
Copy link
Owner

Sorry for that, should now be fixed with v4.1.1

@surrealzerg
Copy link
Author

Looks like we fixed that issue but re-opened the initial issue.
Players can no longer open doors using keys.
Confirmed that you can now modify the settings under 3D > Vision when a tile is set as Locked under Lock&Key settings.

@Saibot393
Copy link
Owner

Regarding the Keys, everything seems to work as expected for me, a few questions:

  • Are there any errors in the console when using the key?
  • Could you try regenerating the key, in case a lock & key setting somehow reset?

@surrealzerg
Copy link
Author
surrealzerg commented May 19, 2025

I recreated the key, but I'm still experiencing the issue. Doors with a given key ID don't unlock when a player has the item with a matching key ID.
I don't see anything in the console when attempting to unlock.
Here's my tile and item settings:

Image

Image

Image

Uh oh!

There was an error while loading. Please reload this page.

@Saibot393
Copy link
Owner

I will do a few more tests. It worked with v4.1.0, right?

@surrealzerg
Copy link
Author

Yeah, 4.1.0 had doors opening.

@Saibot393
Copy link
Owner

There is only one reason for this behaviour, as far as i could find, though i am not sure how this would have changed for a specific door between v4.1.0 and v4.1.1. I have implemented a fix with v4.1.2 in case it truly is the reason. Should that not fix it, could you select the door-tile in question, put this into the console and sent me the out?
canvas.tiles.controlled[0].document.flags.LocknKey

@surrealzerg
Copy link
Author

Here's the door tile.flags.LocknKey:
{
"OpenImageFlag": "modules/levels-3d-preview/assets/blank.webp",
"ClosedImageFlag": "modules/levels-3d-preview/assets/blank.webp",
"LockableFlag": true,
"LockedFlag": true,
"IDKeysFlag": "plainKey",
"UseKeyDialogFlag": true,
"PasskeysFlag": "",
"PasskeyChangeableFlag": false,
"IdentityKeyFlag": "",
"LockjammedFlag": false,
"LockDCFlag": 15,
"SpecialLPFlag": "Lockpick",
"LockBreakDCFlag": 25,
"currentLPsuccessFlag": 0,
"requiredLPsuccessFlag": 1,
"LPAttemptsFlag": 5,
"LPAttemptsMaxFlag": 5,
"canbeCircumventedFreeFlag": true,
"SoundVariantFlag": "futuristic",
"isOpenFlag": false,
"CustomPopupsFlag": {
"LockLocked": "It's locked",
"LocknotPickable": "It can't be picked",
"LocknotBreakable": "It can't be broken",
"LockPasskeyTitle": "Enter password",
"LocknotCustom": "",
"CharacternotPickpocketable": ""
}
}

Here's item.flags.LocknKey:

{
"PickPocketDCFlag": "0",
"IDKeysFlag": "plainKey",
"RemoveKeyonUseFlag": false,
"LPFormulaFlag": "",
"LPFormulaOverrideFlag": false,
"LBFormulaFlag": "",
"LBFormulaOverrideFlag": false,
"ReplacementItemFlag": ""
}

@Saibot393
Copy link
Owner
Saibot393 commented May 20, 2025

Could you try downgrading to v4.1.0 and see if that causes the door to work? If not, could you try to create a new door? Also, could you send me a screenshot of how the attempt looks for the player?

@Saibot393
Copy link
Owner

Also, which control sceme are you using on the player account?

@surrealzerg
Copy link
Author

I've done some more testing and I'm seeing:

  1. Most of the time I am not able to unlock the door using the standard control K. I was able to get it to work one time, but upon reloading the server 3 times, none of the subsequent loads would allow unlock. The below feedback is from the one time it did work.
  2. It did not play an unlock sound, though an unlock sound was set. There is no way for the player to know a door is unlocked.
  3. I received a "user does not have permission to update tile" error when the player opened the door after unlock. It still opened, just threw the notification error also.

Note:
Originally I assumed that just by trying to open the door by double clicking on it, the key would be used or a dialogue would show. In my test that only would happen when highlighting the door and pressing K.

@Saibot393
Copy link
Owner

I might have found the problem, i have released a fix with v4.1.5 (hopefully)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants
0