Jump to content


Photo

Simulating lock-picking


  • Please log in to reply
3 replies to this topic

#1 temnix

temnix
  • Member
  • 983 posts

Posted 10 November 2016 - 10:08 AM

The updated G3 guide says the PickLock action doesn't work. I'll take their word for it, but it should be possible to simulate lock-picking by going through a series of stat checks. The Pick Locks skill is no. 26 in STATS.IDS, so how about this for a creature with that skill at 30 to 35:

 

 

IF



CheckStatGT(Myself,29,26)

CheckStatLT(Myself,31,26)



THEN



RESPONSE #65



MoveToObject("door/chest")

DisplayString(Myself,"Sorry, couldn't do it.")



RESPONSE #35



MoveToObject("door/chest")

Unlock("door/chest")

DisplayString(Myself,"There you go!")



END

 

 

How about this? The 35% chance is a little generous for the 30-35% percentage, and the lock might be of some extreme difficulty which we can't actually measure, but I think those factors would only make this NPC ability more useful, and so enjoyable, in practice. The problem is getting the doors and the containers in that Object field generally, without having to write specific ones in there. NearestDoor() is a possibility for doors, though I don't know how well that works in practice - I tried it for BashDoor without much success, but there might have been bad code there.

 

At any rate, bashing doors is not a problem, a gnome could do it. The trick is a) getting the bashing to work on chests and b) with the lock-picking, the challenge is to have some way of making a creature aware of containers around it - hopefully this will not include a scroll case or a Bag of Holding. Once it is aware, we can use a series of checks like the one above, up to 100%, to simulate the picking. Any ideas?

 

P.S. Does an area-of-effect Knock work?



#2 temnix

temnix
  • Member
  • 983 posts

Posted 11 November 2016 - 02:02 PM

I'm still thinking about this, going deeper into the jungle of simulation and hideous, sinuous pretense. There don't seem to be any tigers, I mean triggers that include containers in their scope, nothing like NearestDoor for doors. That one, by the way, is funky: I told Tarnesh to go to the nearest door in Beregost, and he walked all the way across town instead of a few yards to the left, where there was a perfectly normal door as well. But doors are not a problem on the whole, when it comes to bashing, only for picking their locks; containers are a problem on both counts. I have a little hope about the [ANYTHING] or perhaps the [INANIMATE] objects. Can somebody elucidate me on their function?

 

If that falls through and there are absolutely no triggers to home in proper actions on, like picking locks or bashing locks, then I can only think of a workaround: get a PC near the container, then tell the creature to approach the PC and pseudo-pick or quasi-bash. (That's a good name for an ogre NPC, by the way, Quasibash.) Actually I would just apply a limited-percentage Knock effect, depending on the creature's Strength and Pick Locks, plus the appropriate messages and sounds. But this needs to look convincing, so - do you have any thoughts on how to limit the range of the ability, so that the PC really has to stand by the door/chest instead of out in the open somewhere?

 

I suppose I could just make it a *very small-radius* Knock, so that unless the PC has his butt pressed to the lock, nothing is going to happen.



#3 Fiann of the Silver Hand

Fiann of the Silver Hand
  • Member
  • 286 posts

Posted 11 November 2016 - 05:23 PM

You can always specify a specific door/containter/whatever for any particular Area, since they're individually named in the ARE file.

I don't think that will help since you seem to be wanting a more general script that will travel with an NPC.

#4 temnix

temnix
  • Member
  • 983 posts

Posted 12 November 2016 - 10:54 AM

Yes... I could write in every container in every area, but that's not practical. Besides, it would not solve the problem of pointing the creature to a desired container.