How to move the button mesh on the temple wallset?

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
User avatar
fazzasx
Posts: 104
Joined: Mon May 27, 2013 12:35 am

How to move the button mesh on the temple wallset?

Post by fazzasx »

Hi Everyone,

I wanted to know how I could move a button on the temple wallset. I have a button already but its against another wallset and this has like a small rectangle shape behind it.

So its really 2 questions

1) How do I move the button and mesh, and the animation down slightly
2) How do you replace the material on the small rectangle behind the button to match the temple wall set?

I have Blender (just downloaded and figuring it out...)
I have the Grimrock Model Toolkit and also GIMP 2.0

I just cant figure it out but it must be easy right?

BTW I am loving this game, figuring out that I can recolour monsters and retexture is amazing. I have figured out also how to create different colours of pillar to each wallset I want to use. I am really pleased and I have something decent to do now on the evening when the kids go to bed :)
Zastaph
User avatar
Skuggasveinn
Posts: 562
Joined: Wed Sep 26, 2012 5:28 pm

Re: How to move the button mesh on the temple wallset?

Post by Skuggasveinn »

Hi Fazzasx

I will try to explain.

The animation system in Grimrock works like this, you allways have a model file, and an animation file.
Obviously the model file contains the model, but the animation file contains the movements of nodes inside the model.

With the Grimrock model toolkit (GMT) open up the temple_secret_button_large.model

in the Nodes section you will see 3 nodes

Root Node
button_mesh
temple_wall_button_large_mesh

When you select them in the GMT you they will get highlighted red, you can see that the button_mesh is the button, and that temple_wall_button_large_mesh is the surrounding wall.

Now this is where the animation file comes into play, go to Anim, and load the animations from the env directory.
select the temple_secret_button_large_press and it will start to play, you can see this is working fine.

now select a different animation like temple_secret_button_small_press
They button has moved into place where the small button is in the temple tileset.

What we have learned is that the animation file controls the position of moving elements inside the model.
The animation file in this case is simply taking the node with the name button_mesh and moving it back and forth
If you select an animation designed for something else like dungeon_pit_trapdoor_close the button simply disappears, thats because that animation has no location for a mesh called button_mesh, its looking for nodes called l_door and r_door.

This also means that if you want to have a button in a different location then the ones already ingame (temple, dungeon or prison buttons) you will need to create your own animation file, and you can do that in the GMT by modifying the existing one and saving it as something else

In the Anim you need to select the button_mesh node ones again and change its location with the position +/-

When you have the button in a correct place save the modified animation as something new.

We are almost done.

you then need to create the new secret button object inside your lue files.


Code: Select all

defineObject{
	name = "fazzasx_temple_secret_button_large_",  -- name it 
	class = "Button",
	model = "mod_assets/models/env/faxxasx_temple_secret_button_large.fbx", -- this is your model from blender, with wall mesh and a button mesh
	pressAnim = "mod_assets/animations/env/fazzasx_temple_secret_button_large_press.fbx", -- this is your modified animation from the GMT
	replacesWall = true,
	placement = "wall",
	editorIcon = 12,
}
Hope that helps you get on track.
Link to all my LoG 2 assets on Nexus.
Link to all my LoG 1 assets on Nexus.
User avatar
fazzasx
Posts: 104
Joined: Mon May 27, 2013 12:35 am

Re: How to move the button mesh on the temple wallset?

Post by fazzasx »

Thanks a lot for this Skuggasveinn, I will attempt this tommorrow and let you know how I get along.

Many thanks for the detailed reply. I love this forum! :)
Zastaph
User avatar
Isaac
Posts: 3192
Joined: Fri Mar 02, 2012 10:02 pm

Re: How to move the button mesh on the temple wallset?

Post by Isaac »

Another point though... The game loads the model file as is, and the animation modifies it on first use [button press]. Both the model and the animation must start at the same new location; and the animation should end there ~else the entire button will visibly shift position to match the animation when it's used.

Image

* Also, the click region/bounds need changed to reflect the new location, or one must click at the old location to press the button.
User avatar
AdrTru
Posts: 223
Joined: Sat Jan 19, 2013 10:10 pm
Location: Trutnov, Czech Republic

Re: How to move the button mesh on the temple wallset?

Post by AdrTru »

My LOG2 projects: virtual money, Forge recipes, liquid potions and
MultiAlcoveManager, Toolbox, Graphic text,
Post Reply