[Source] Picklock mini-game

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
User avatar
mahric
Posts: 192
Joined: Sun Nov 04, 2012 3:05 pm

[Source] Picklock mini-game

Post 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.
Did you visit the Wine Merchant's Basement? And heard about the Awakening of Taarnab?
User avatar
AdrTru
Posts: 223
Joined: Sat Jan 19, 2013 10:10 pm
Location: Trutnov, Czech Republic

Re: [Source] Picklock mini-game

Post 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.
My LOG2 projects: virtual money, Forge recipes, liquid potions and
MultiAlcoveManager, Toolbox, Graphic text,
User avatar
mahric
Posts: 192
Joined: Sun Nov 04, 2012 3:05 pm

Re: [Source] Picklock mini-game

Post 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!
Did you visit the Wine Merchant's Basement? And heard about the Awakening of Taarnab?
User avatar
AdrTru
Posts: 223
Joined: Sat Jan 19, 2013 10:10 pm
Location: Trutnov, Czech Republic

Re: [Source] Picklock mini-game

Post 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.
My LOG2 projects: virtual money, Forge recipes, liquid potions and
MultiAlcoveManager, Toolbox, Graphic text,
User avatar
Drakkan
Posts: 1318
Joined: Mon Dec 31, 2012 12:25 am

Re: [Source] Picklock mini-game

Post by Drakkan »

wonderfull stuff thanks for sharing !
Breath from the unpromising waters.
Eye of the Atlantis
Grimfan
Posts: 369
Joined: Wed Jan 02, 2013 7:48 am

Re: [Source] Picklock mini-game

Post 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) ;)
Post Reply