PluginName: SDJB_LockpickSystem
Author: ShadowDragon (original Author Pixeldrama)
The PXD_Lockpick plugin is really nice, but there are some bugs, and some annoying ones!
While this is a recoded version, and modifications here and there, it goes under SDJB_LockpickSystem.
While not claiming his ownership, it does have various bug fixes, issues, fail-safes, parsing parameters,
missing functions restored.
The following of the plugin are fixed:
- success sound was missing and not used (removed)
- some of the input was rather double and confusing (fixed)
- hide gauge was possible on skill level 101+ but this was not the case (fixed)
- some parameters was parsed wrong (fixed) (parameters are now in struct)
- parameter for "lockpick" plugin command name is removed for the time being.
The following are added:
+ able to change data item + image (so you can have a normal and stronger lockpick)
a nice way if you don't want to increase skill level above 50 (but rest based on lockpicks!)
+ scene stays open while you hold lockpicks (last one used) else it closes when you run out.
+ new parameter to rotate the lockpick speed (some found it to slow)
+ new parameter to turn the lock open (some found it to slow)
+ new parameter to add a list of lockpicks and add a modifier, and is it unbreakable?
+ No more need for conditional branch logic if player has lockpicks!
The plugin logic is optimized to do the heavy work for you!!!! (how cool is that)
This way, you just need the plugin command, drop all the rest.
to be added to the parameters till fully functional for release
- Gauge count before the scene is open, losing durability (still trying to fix this too).
- new parameters for font (if you want too).
- new parameter to be able to name your lockpick items (image usage).
- new parameter to close the scene after losing picklock or not.
- gauge change color from green to red if lockpick is about to break (optional inside parameter).
- block locked chest from opening when you have no lockpicks. (you could event this already).
but you should if you have different lockpicks to determine the skill level to be lower or higher!
there could be lower eventing requirements to make things work.
once done, I share the plugin here, as this is a nice plugin, lots of things is fixed and added.
if you have a suggestion not added yet, please leave it behind.
if you like PXD_Lockpick plugin, this one is a must for a smooth gameplay!
=== TERMS OF USE ===
Free for Non-Commercial and Commercial use when credit is given.
credit one of the following:
Pixeldrama (it's not on his page, but would be nice if you did)
ShadowDragon
ShadowDragonJB
Version + UPDATE'S
21-01-2025 Version 1.0.0 first release
xx-01-2026 Version 2.0.0 Heavy optimized, improved lockpick logic
=== WARNING ===
YOU ARE NOT ALLOWED TO REDISTRIBUTE OR SELL IT OR TAKE CODE FOR YOUR OWN.
DO NOT REMOVE THE HEADER.
(file is below as it require my base plugin (SDJB_Base or SDJB_BaseMVZ (minified version))
leave Feedback and or suggestions.
Plugin coming soon when the helpfile is ready, but not all features would be available right away,
but do my best to add them when I got time.
=== ATTENTION ===
Data files are for download (almost everything is implemented, need some more adjustments)
Create a new project, copy the files to the corresponding Project and try it out.
(I use NWJS 0.48.4 and PIXI 4.8.9) 0.29 probably doesn't play nice!
if you encounter any bugs, let me know (same for suggestions/feedback).
Author: ShadowDragon (original Author Pixeldrama)
The PXD_Lockpick plugin is really nice, but there are some bugs, and some annoying ones!
While this is a recoded version, and modifications here and there, it goes under SDJB_LockpickSystem.
While not claiming his ownership, it does have various bug fixes, issues, fail-safes, parsing parameters,
missing functions restored.
The following of the plugin are fixed:
- success sound was missing and not used (removed)
- some of the input was rather double and confusing (fixed)
- hide gauge was possible on skill level 101+ but this was not the case (fixed)
- some parameters was parsed wrong (fixed) (parameters are now in struct)
- parameter for "lockpick" plugin command name is removed for the time being.
The following are added:
+ able to change data item + image (so you can have a normal and stronger lockpick)
a nice way if you don't want to increase skill level above 50 (but rest based on lockpicks!)
+ scene stays open while you hold lockpicks (last one used) else it closes when you run out.
+ new parameter to rotate the lockpick speed (some found it to slow)
+ new parameter to turn the lock open (some found it to slow)
+ new parameter to add a list of lockpicks and add a modifier, and is it unbreakable?
+ No more need for conditional branch logic if player has lockpicks!
The plugin logic is optimized to do the heavy work for you!!!! (how cool is that)
This way, you just need the plugin command, drop all the rest.
to be added to the parameters till fully functional for release
- new parameters for font (if you want too).
- new parameter to close the scene after losing picklock or not.
- gauge change color from green to red if lockpick is about to break (optional inside parameter).
- block locked chest from opening when you have no lockpicks. (you could event this already).
but you should if you have different lockpicks to determine the skill level to be lower or higher!
there could be lower eventing requirements to make things work.
once done, I share the plugin here, as this is a nice plugin, lots of things is fixed and added.
if you have a suggestion not added yet, please leave it behind.
if you like PXD_Lockpick plugin, this one is a must for a smooth gameplay!
Code:
Parameters are setup as the base parameters as PXD_Lockpicks plugin
while there are new added ones pre-configured, so it's mostly plug & play.
However, there are some settings that require attention so let's check
each one as well as new added parameter and features to get the best out of it.
You require to configure the Lockpick tools in the GamePlay Settings.
This overhaul has more features and bugfixes, failsafes, and more customisable.
Global Lockpick Settings
͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞
[Keep Scene Open] you can keep it open or close when failed.
The lockpick is refreshed when it breaks.
[Rotation Speed] and [Unlock Speed] is to check how fast it turns.
[Max Turnrange] is how far it can turn before opening it, while it has one
setting before, it is now customisable.
Control Lockpick Settings
͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞
[Turn Left] and [Turn Right] is to rotate the lockpick.
[Unlock Button] to unlock the lock
[Cancel Buttom] to exit the scene any time.
Gameplay Settings
͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞
[Lockpick Skill Variable], this variable is required for your skill to open
the lock of their strength.
[Lockpick item Id's] The list of Lockpick items to use and settings.
[Strength Name] The name of the strength of the lock.
[Lockpick Name] The name of the lockpicks you carry
[Lockpick Gauge Level] Lockpick Gauge is hidden until you reach a skill level.
number 101+ remove the gauge entirely.
[Name X/Y Position] Name of the Strength and Item base position
[Number X/Y Position] Number of the Strenght and Items position
Lockpick Item Settings
͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞
[Item ID] is the data Item ID you use for the lockpick.
This can be changed midgame, so reset it on the top of the lockpick event.
[Skill Modifier] add bonus to the lockpick if desired.
when the lockpick strength = 40, with a modifier of 8, than the strength
of the lockpick become 32 automatically!
[Lockpick Image (top/bottom)] The lockpick image to use which can be changed
based on the lockpick item (must use scriptcalls for now to change them).
[Max Durability] set the max durability per lockpick between 1 and 999.
[Unbreakable] This boolean can make the lockpick unbreakable and does not
lose any durability, see this as a late game item.
Gauge Settings
͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞
[Gauge Width/Height] set the width and height of the gauge
[Gauge X/Y Position] set X and Y Position for the gauge
[Gauge Color 1-4] set the gauge colors when it is about to break,
Lockpick Sound Settings
͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞
[Open Sound] Set sound when you successfully open the lock
[Failed Sound] Set sound when you failed to open it
[Break Sound] Set sound when you break your lockpick
[Position Sound/Turn Sound] Set the sound effect for position and turning
the lock, while it's similar to the other sounds, this one have a few extra
parameters: [Base Volume], [Random Volume], [Count] and [Repeat Timer].
Repeat Timer can be any that repeat the sound ever x Frames.
Count require multiple files that choose a random count while checking.
FileName_0 + 1 makes FileName_01 as sound file.
Font Settings
͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞
[Font Name] Set the name to be used for the lock system (strength and number)
[Font Size] The size to be used
[Font Color] The color of the font (use RGBA)
[Font Outline Width] The thickness of the outline width
[Font Outline Color] The color of the outline (use RGBA)
[Font Italic] use italic font (boolean)
Plugin Commands:
͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞
To use the plugin command, use the following call:
lockpick strength background selfwitch
Example:
lockpick 30 Wood D
The above example have a lock strength of 30, background image "Wood"
and set the SelfSwitch "D" when succeed.
In addition of multiple lockpicks, use the same, as if you have more
than 2 lockpicks, you get the choice which one you like to use of the
available lockpicks in your inventory.
It is recommended to use the "strongest" strength.
Reason for this is the the modifier that the lockpick can have, which
lower the strength.
Example:
lockpick 40 Metal A
You have lockpick A (weak)
and you have lockpick B (stronge4, modifier: 5)
weak: 40 = 40, as the default strength
stronger: 40 = 35 as its a better set.
Lockpick modifier = optional in this part, as you can keep it at 0,
but you can increase the durability from 100 to 150, which is also better.
However you set your lockpicks is up to you.
Scriptcalls:
͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞
There is 1 scriptcall that is required to use for each chest in order to make sure
it has the correct locks on them:
$gameSystem.changeLocks(main, background, cover);
=> main: The front of the lock
=> background: The background of the lock
=> cover: The cover that cover on the main (left half).
Example:
$gameSystem.changeLocks("Lock", "LockBG", "LockCover");
Use the scriptcall before the Plugin Command.
=== TERMS OF USE ===
Free for Non-Commercial and Commercial use when credit is given.
credit one of the following:
Pixeldrama (it's not on his page, but would be nice if you did)
ShadowDragon
ShadowDragonJB
Version + UPDATE'S
21-01-2025 Version 1.0.0 first release
xx-01-2026 Version 2.0.0 Heavy optimized, improved lockpick logic
=== WARNING ===
YOU ARE NOT ALLOWED TO REDISTRIBUTE OR SELL IT OR TAKE CODE FOR YOUR OWN.
DO NOT REMOVE THE HEADER.
(file is below as it require my base plugin (SDJB_Base or SDJB_BaseMVZ (minified version))
leave Feedback and or suggestions.
Plugin coming soon when the helpfile is ready, but not all features would be available right away,
but do my best to add them when I got time.
=== ATTENTION ===
Data files are for download (almost everything is implemented, need some more adjustments)
Create a new project, copy the files to the corresponding Project and try it out.
(I use NWJS 0.48.4 and PIXI 4.8.9) 0.29 probably doesn't play nice!
if you encounter any bugs, let me know (same for suggestions/feedback).