Keys in locks. Dungeon Master 2 style.

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
User avatar
germanny
Posts: 530
Joined: Sat Apr 07, 2012 10:52 pm
Location: Kiel, Germany

Re: Keys in locks. Dungeon Master 2 style.

Post by germanny »

Okaay... so i´ve modeled my DM pack key models the wrong way - they have no underside^^
Need to fix.. :/
Dungeon Master Resource Pack worker and passionated Beer drinker
User avatar
spectre900
Posts: 124
Joined: Fri Sep 14, 2012 1:47 am

Re: Keys in locks. Dungeon Master 2 style.

Post by spectre900 »

Isaac wrote: It is easy to define a decoration, and use any lock model for it... but you will have to load the lock model into the GMT utility and adjust the height (and depth?) manually; saving the result as a custom model for the alcove.

*Any fake lock alcove should probably return False if there is an object in it.
that.... sounds a lot harder to do than just make a few text edits. ^^;
Buuut, may be worth it in the long run.


Anyways, I added some prison aligned alcoves in the meantime so they should look fine now as well.
User avatar
Isaac
Posts: 3192
Joined: Fri Mar 02, 2012 10:02 pm

Re: Keys in locks. Dungeon Master 2 style.

Post by Isaac »

spectre900 wrote:
Isaac wrote: It is easy to define a decoration, and use any lock model for it... but you will have to load the lock model into the GMT utility and adjust the height (and depth?) manually; saving the result as a custom model for the alcove.

*Any fake lock alcove should probably return False if there is an object in it.
that.... sounds a lot harder to do than just make a few text edits. ^^;
Buuut, may be worth it in the long run.


Anyways, I added some prison aligned alcoves in the meantime so they should look fine now as well.
it's not as involved as it sounds; John Wordsworth did all the heavy lifting creating the utility. 8-)

What you need first, is to download the Grimrock Asset Pack;that will give access to the lock model.
Next install GMT and then load the lock model into it. Locks have two nodes; the root node you can ignore; select the other one and the entire model should turn red [highlighted]. It would probably suffice to just type the number 1.5 into the vertical translation field [the middle one] and click the "translate" button to commit; then save the model to your mod folder.

The asset pack also gives access to the object definitions and you can load them into any text editor and find a decoration object; then just copy/paste the entry into your mod's object.lua file. Change the path to the model file that it uses to the path to your custom model. Change the object's name to something else (but descriptive). The only non-intuitive part is that the where the model you saved from GMT ends in a .model extension, in the path you need to type it as a .fbx extension; so "mod_assets/models/my_custom_lock.model" needs to be written as "mod_assets/model/my_custom_lock.fbx" for the game to use it.

Once you save the Object.lua file to your mod's "scripts" folder, completely reload your Dungeon project, and you should see your custom decoration.
User avatar
AdrTru
Posts: 223
Joined: Sat Jan 19, 2013 10:10 pm
Location: Trutnov, Czech Republic

Re: Keys in locks. Dungeon Master 2 style.

Post by AdrTru »

There are my models for lock alcoves.
http://ulozto.cz/xPctn75o/models-zip
My LOG2 projects: virtual money, Forge recipes, liquid potions and
MultiAlcoveManager, Toolbox, Graphic text,
User avatar
spectre900
Posts: 124
Joined: Fri Sep 14, 2012 1:47 am

Re: Keys in locks. Dungeon Master 2 style.

Post by spectre900 »

AdrTru wrote:There are my models for lock alcoves.
http://ulozto.cz/xPctn75o/models-zip
Awesome, these works great! Makes placing these locks soooo much easier. ^^

------

Edit:

I have noticed an issue with the vanilla locks. While they appear further inside the walls in the editor and the level you start your game in, they are NOT that far in the wall on levels that you get to later. so any prison lock alcove is now mis-aligned. =/
User avatar
Isaac
Posts: 3192
Joined: Fri Mar 02, 2012 10:02 pm

Re: Keys in locks. Dungeon Master 2 style.

Post by Isaac »

You need to open the lock models you plan to use, and adjust the position in the GMT utility, save them as alternate models, and define duplicate lock objects that use your adjusted models; place those on the levels instead. It will work.
User avatar
spectre900
Posts: 124
Joined: Fri Sep 14, 2012 1:47 am

Re: Keys in locks. Dungeon Master 2 style.

Post by spectre900 »

Isaac wrote:You need to open the lock models you plan to use, and adjust the position in the GMT utility, save them as alternate models, and define duplicate lock objects that use your adjusted models; place those on the levels instead. It will work.
Alright, I managed to edit the models to fit with the prison wallset. Should work fine now, at least it looks good in testing anyway.
User avatar
spectre900
Posts: 124
Joined: Fri Sep 14, 2012 1:47 am

Re: Keys in locks. Dungeon Master 2 style.

Post by spectre900 »

Made a small update with two new pics and I also merged all files into one single zip file for easier download and usage. I also added the gate locks, although those only contain locks for iron and brass keys.
SpoilerShow
Gate lock
Image

Normal lock
Image
Enjoy!
User avatar
Isaac
Posts: 3192
Joined: Fri Mar 02, 2012 10:02 pm

Re: Keys in locks. Dungeon Master 2 style.

Post by Isaac »

They look really nice. 8-)
Post Reply