Page 1 of 1

[Source] Picklock mini-game

Posted: Wed Apr 03, 2013 9:06 pm
by mahric
As part of my room-round-robin2 entry I was thinking of making a picklock with a mini-game when activated.

Preview:
SpoilerShow
Image
* It shows a lock with two mini locks circling around it in opposite direction. You need to click the lock (or press space) when the two locks are on the same position.
* The green bar in the middle shows the progress; the more accurate you are the fewer attempts are needed to fill the bar and pick the lock.
* If you're not accurate enough the picklock will loose some of it's durability, indicated by the moving icon's color (from green to red). If the durability is zero, the attempt failed

I published a source example here. The picklock is re-usable; consult the readme in the "mod_assets/md_picklock" folder of the example for more info.

The script allows you to register a lock (or door) as pickable. It also adds a "lockpick" item to the game, that can be used to attempt to pick a lock. To pick a lock, the player needs to play the mini-game. The difficulty of the mini-game depends on the difficulty of the lock minus a bonus based on the champion's dexterity. Every player can attempt to pick a lock, but rogues get a bigger bonus, making the unlocking of harder locks considerably easier.

Through scripting you have full control over what happens when a player succeeds or fails; you can just open a door on success, or do whatever you want. And you can punish the player for failing too: break the picklock, shoot fireballs, whatever you put in your callback function. :twisted:

Credits to Isaac/Gizmojunk for the model and textures of the picklock item.

Please give me your thoughts and suggestions to improve it, or leave a message if you (plan to) use it in one of your mods.

Re: [Source] Picklock mini-game

Posted: Wed Apr 03, 2013 9:40 pm
by AdrTru
Hi, good work :)

But when I unlock door and go forward , my LOG program is ended (in position 8,26).
This error is begin when I have/use lockpick and my position is behind door.

Re: [Source] Picklock mini-game

Posted: Wed Apr 03, 2013 9:50 pm
by mahric
Weird, I can't reproduce this.
1) Do you get the error every time?
2) Do you fail or succeed in opening the door?
3) Do you get the error in the editor or when exported to a .DAT file?
4) Would you please export it to a .DAT file and run it as a custom dungeon? If the program crashed please post the error.log here. It can be found in the "Almost Human\Legend of Grimrock\Dungeons" folders.

Thanks in advance!

Re: [Source] Picklock mini-game

Posted: Wed Apr 03, 2013 10:40 pm
by AdrTru
1) Every time when I have lockpick.
2) I succees open door becouse this crash is behind door
3) both
4) error.log isnt create. Windows say: Program grimrock.exe dont work, and I have button end program.
So grimrock.exe is not correct ended.

Re: [Source] Picklock mini-game

Posted: Wed Apr 03, 2013 11:02 pm
by Drakkan
wonderfull stuff thanks for sharing !

Re: [Source] Picklock mini-game

Posted: Thu Apr 04, 2013 2:02 am
by Grimfan
Another great idea and execution Mahric! :D

Some players are going to absolutely love this (of course others will hate it, but them's the breaks) ;)