Page 1 of 1

Advanced Lockpicking

Posted: Fri May 13, 2011 10:42 am
by Leslie
I wonder if it is possible to create a pickable lock with the chance of success depending on your ninja level (or stealing skill). Also, can RTC trigger an alternate action if the lockpicking attempt fails (e.g. destroy the lockpicks)?

Re: Advanced Lockpicking

Posted: Fri May 13, 2011 11:21 am
by Lord_BoNes
It is DEFINATELY possible (I've done it in one of my test maps).... but, it involves a hell of a lot of mechanics (lots of relays to check values).

Re: Advanced Lockpicking

Posted: Fri May 13, 2011 10:29 pm
by Chaos-Shaman
hey bones
what's the method on checking the character values? not tried this yet, would like to use it, didn't know how to check character level.

Re: Advanced Lockpicking

Posted: Sat May 14, 2011 8:01 pm
by Leslie
After some tryine I mentioned to create a semi-advanced lockping which checks for the ninja level of the active character and then opens the lock or not.

Re: Advanced Lockpicking

Posted: Mon May 16, 2011 7:56 am
by Lord_BoNes
Since you asked this question, I've been working on a tutorial dungeon for lockpicking. It even makes a different sound when you 'almost get it' (I use 2 random sections that work as a team, so when it gets the first one, it makes a different sound, then if it gets the second one, it opens the door) I should be uploading it shortly.

Re: Advanced Lockpicking

Posted: Mon May 16, 2011 8:16 am
by Lord_BoNes
I've uploaded the new tutorial here. That should help you in your venture.

Re: Advanced Lockpicking

Posted: Mon May 16, 2011 9:08 pm
by Chaos-Shaman
Lord_BoNes wrote:Since you asked this question, I've been working on a tutorial dungeon for lockpicking. It even makes a different sound when you 'almost get it' (I use 2 random sections that work as a team, so when it gets the first one, it makes a different sound, then if it gets the second one, it opens the door) I should be uploading it shortly.
thanks for all your effort on the tutorials. keep up the excellent work! :D
ok , so i understand and have tried everything above, just a little unclear as to what is checked with the characters. do not know their values, LO=value MON=value, how to check the experience level.

Re: Advanced Lockpicking

Posted: Tue May 17, 2011 6:14 am
by Lord_BoNes
Oh... so you're asking what the values for each of the spell strength runes (each rune is worth a random percentage value, within a certain range... so you use 2 relays, the 1st firing the 2nd, the 2nd triggering the outcome)
LO: >= 0 & <= 24
UM: >= 25 & <= 43
ON: >= 44 & <= 62
EE: >= 63 & <= 73
PAL: >= 74 & <= 87
MON: >= 88 & <= 100

Re: Advanced Lockpicking

Posted: Tue May 17, 2011 7:30 pm
by Leslie
Yeah, thank you for the tutorial! I have to say it's very impressive, but I really don't understand all that complex relay mechanics yet. Maybe I'm too new to RTC, but I got a little overhelmed. What are the cloned relay items called "lockpick attempt" for?

I guess it'll take me some more time to learn even the basics of RTC :(

Re: Advanced Lockpicking

Posted: Tue May 17, 2011 8:22 pm
by Chaos-Shaman
Lord_BoNes wrote:Oh... so you're asking what the values for each of the spell strength runes (each rune is worth a random percentage value, within a certain range... so you use 2 relays, the 1st firing the 2nd, the 2nd triggering the outcome)
LO: >= 0 & <= 24
UM: >= 25 & <= 43
ON: >= 44 & <= 62
EE: >= 63 & <= 73
PAL: >= 74 & <= 87
MON: >= 88 & <= 100
ahh, thankyou :D i will play with this, if i understand correctly, it's in a series of relays from LO to MON. wonder why the rune values are random.

Re: Advanced Lockpicking

Posted: Tue May 17, 2011 8:25 pm
by Chaos-Shaman
Leslie wrote:Yeah, thank you for the tutorial! I have to say it's very impressive, but I really don't understand all that complex relay mechanics yet. Maybe I'm too new to RTC, but I got a little overhelmed. What are the cloned relay items called "lockpick attempt" for?

I guess it'll take me some more time to learn even the basics of RTC :(
ask away leslie, no harm in that. i saw some of your work with the walls :)

Re: Advanced Lockpicking

Posted: Tue May 17, 2011 9:37 pm
by Lord_BoNes
Leslie wrote:What are the cloned relay items called "lockpick attempt" for?
I'll put it this way:
Find the WALLITEM_ACTION that target's that particular object type (4,1,0).. now every relay of that cloned type fires (activates) whenever this WALLITEM_ACTION does (because it uses ACTION_OBJECT_ACTIVATE)... the main reason that I did it this way is so that I don't have to target the 16 individual relays (1 for each possible ninja level + level 0)... it also decreases the amount of "arrow clutter" when recursing targets (and speeds up the editor, due to less drawing).

The chain of events goes something like this... click keyhole, relays check what item is currently attached to the mouse (looking for lockpicks), set a counter to 0 instead of 1 (this counter is unique to each door)...
Now at this point (the bit you asked about) it activates all WALLITEM_RELAY_LOCKPICK_ATTEMPT objects, each of these relays checks the members current ninja level and attempts to 'pick the lock'... if any of these relays succeeds, then it fires all WALLITEM_RELAY_LOCKPICK_SUCCESS objects, and sets a temporary counter, that resets on a delay, so that only 1 "success message" gets through (we don't want to toggle the door twice in one frame, now do we? :P ).
This is the part where that first counter comes into play... when all the success relays fire, each of them checks their unique counter (only the one that we set a minute ago should be 0), and then we know which lock was the one being picked. Then it triggers the appropriate door. Once everything is done, the final step is to set that counter back to 1, ready for next time (or ready for the user to click a different lock).

Just remember to always check out what those WALLITEM_ACTIONS do. They're the most powerful tool that RTC has to offer.