So I need help making an lock-pick item. I found a tutorial on how to make items interact with events using labels, whatever those are. but I'm wondering if there's a way to make an item that takes like 3 to 20 seconds to work, being reduced by a DEX stat, and to were the player can interupt the process and run away if an enemy is coming, but that resets the progress on the lockpick
Lockpick item
RPG Maker VXAce SupportNow, here's an area of Open World RPG I know well, the Lockpick.
As far as I can tell, the part involving the 3 to 20 seconds to work would involve a lot of variable checks and conditional branches provided you went the non-script way.
As for me, I'd do this the Elder Scrolls way.
Assign a single variable to the Lockpick Meter, assign a variable to the Lockpick Position, assign a variable to the Correct Lockpick Position, and a conditional branch checking if the Lockpick Position is either exactly equal to, or within a certain offset to the Correct Lockpick Position. If it is, a successfully picked lock, if not, it subtracts a certain amount from the Lockpick Stability variable, and if the Lockpick Stability reaches a certain point, the Lockpick breaks, and [Change Items: Lockpick -1]. If after that, all your Lockpicks are gone, the event exits.
But Hell, you don't really need to make items interact, you just need to make a conditional branch on whether or not said item/s exist in your inventory.
Of course, the methods I described above don't really solve the incoming enemy issue; in Elder Scrolls, while you're picking a lock, time around you freezes [of course, if you're being watched while you're picking a lock (you can tell this by crouching and if the eye in the center is open) and you break your lockpick the lockpick event is interrupted].
As far as I can tell, the part involving the 3 to 20 seconds to work would involve a lot of variable checks and conditional branches provided you went the non-script way.
As for me, I'd do this the Elder Scrolls way.
Assign a single variable to the Lockpick Meter, assign a variable to the Lockpick Position, assign a variable to the Correct Lockpick Position, and a conditional branch checking if the Lockpick Position is either exactly equal to, or within a certain offset to the Correct Lockpick Position. If it is, a successfully picked lock, if not, it subtracts a certain amount from the Lockpick Stability variable, and if the Lockpick Stability reaches a certain point, the Lockpick breaks, and [Change Items: Lockpick -1]. If after that, all your Lockpicks are gone, the event exits.
But Hell, you don't really need to make items interact, you just need to make a conditional branch on whether or not said item/s exist in your inventory.
Of course, the methods I described above don't really solve the incoming enemy issue; in Elder Scrolls, while you're picking a lock, time around you freezes [of course, if you're being watched while you're picking a lock (you can tell this by crouching and if the eye in the center is open) and you break your lockpick the lockpick event is interrupted].
I was more wanting it to be done with stat checks, with a higher DEX stat reducing the time it takes to be successful. I guess what I'm asking for is two fold
1) checking stats with conditional branch script options
2) A way the player can interrupt the process and run away if an enemy is coming, and the door/chest/whatever not open while the player is hiding/finding a way to distract the enemy/knocking out the enemy (I'm including multiple ways to deal with problems/puzzles in this game)
I suppose sense you mentioned variables, one solution could be storing a stat in a variable when the event starts and having the event check it.
So all i really need is a way to interrupt the event with a directional button press. Do you think waiting for the lock to open would be boring? This is for a stealth-like game
Basically, its a mother escaping slavery crossing a war torn country with her children at night to try and reach a free country. I got the idea from an episode of Extra Credits on youtube
1) checking stats with conditional branch script options
2) A way the player can interrupt the process and run away if an enemy is coming, and the door/chest/whatever not open while the player is hiding/finding a way to distract the enemy/knocking out the enemy (I'm including multiple ways to deal with problems/puzzles in this game)
I suppose sense you mentioned variables, one solution could be storing a stat in a variable when the event starts and having the event check it.
So all i really need is a way to interrupt the event with a directional button press. Do you think waiting for the lock to open would be boring? This is for a stealth-like game
Basically, its a mother escaping slavery crossing a war torn country with her children at night to try and reach a free country. I got the idea from an episode of Extra Credits on youtube
Yeah, storing the stat in a variable is the best way I can think of SHORT OF using scripts.
Thing is about the timing aspect, in-game it is measured in FRAMES.
so, 3 seconds = 180 frames; 20 seconds = 1,200 frames (exceeds the maximum wait time by 600).
I don't know how one would implement this without scripts; perhaps @Trihan (good buddy) could give this a gloss over?
Thing is about the timing aspect, in-game it is measured in FRAMES.
so, 3 seconds = 180 frames; 20 seconds = 1,200 frames (exceeds the maximum wait time by 600).
I don't know how one would implement this without scripts; perhaps @Trihan (good buddy) could give this a gloss over?
What I would probably do is have page 1 of the event do the "setup" for the lockpicking (setting a variable for duration) then turn on self switch A, which would be a parallel process that first has a conditional branch for the player pressing the cancel button (and turns off self switch A if that's the case so that the event stops) and after that reduces the duration variable, then has a conditional branch for the variable being 0 (meaning the lock has been picked).
Edit: It would look something like this.
Edit: It would look something like this.
Thank you Trihan. I think id almost have to do it this way, because it works better for the game mechanics. Analyzing whether or not you have enough time to pick the lock, and running away if things go haywire amps up the tension. It also allows for interesting decisions
"Do i have enough time to unlock that shed and hide? Should I move ahead and plan my moves so they don't see me? Should I try to knock this guy out to buy more time? Is there another solution?" These are the types of choices I want to give the player by doing it this way, which leads to interesting problem solving
"Do i have enough time to unlock that shed and hide? Should I move ahead and plan my moves so they don't see me? Should I try to knock this guy out to buy more time? Is there another solution?" These are the types of choices I want to give the player by doing it this way, which leads to interesting problem solving
Original thread: https://forums.rpgmakerweb.com/threads/lockpick-item.75831/