[Solved] Need help. Cannot get a custom lock to render

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
Post Reply
MrChoke
Posts: 324
Joined: Sat Oct 25, 2014 7:20 pm

[Solved] Need help. Cannot get a custom lock to render

Post by MrChoke »

I want to create a few different colored locks. I know we don't have the asset pack yet but I know we can use LoG1 models. I cannot seem to get the custom lock to render.

NOTE: I cannot even get it to render when I use one of LoG 2's lock models!!

I don't get it. I have made custom keys, even custom walls and they work. This lock will not. My simple code is:

Code: Select all

defineObject{
	name = "white_lock",
   	baseObject = "lock_gold",   	
  	components = {
  		{
   			class = "Model",
   			model = "assets/models/env/wall_lock.fbx",
	   	},
    },
    placement = "wall"
}
Notice how I am re-using a model in grimrock2.dat itself and it still won't render. Any ideas on what I am doing wrong?

Thanks
Last edited by MrChoke on Tue Nov 11, 2014 3:17 am, edited 1 time in total.
MrChoke
Posts: 324
Joined: Sat Oct 25, 2014 7:20 pm

Re: Need help. Cannot get a custom lock to render

Post by MrChoke »

Looks like I need to specify offset values for these models. I thought it wasn't rendering until I pulled it out of the wall and into open space. And then I see it was half rendered into the floor and totally behind the wall, hence I couldn't see it.

I guess FYI for those that may have this problem in the future. Some of the models need an offset.
User avatar
Lark
Posts: 178
Joined: Wed Sep 19, 2012 4:23 pm
Location: Springfield, MO USA

Re: [Solved] Need help. Cannot get a custom lock to render

Post by Lark »

You can also easily reposition them with the Grimrock Model Toolkit using the translation feature. Have it generate a 3x3 room, and you can see where your model will reside by default (without offsets), then move the model(s). Take care, -Lark
Post Reply