object definition

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
bongobeat
Posts: 1076
Joined: Thu May 16, 2013 5:58 pm
Location: France

object definition

Post by bongobeat »

Hello all,
I'm trying to redefine the carpet and bed objects from log1:

can someone tell me how to set the carpet as a normal decoration, actually it's defined as an obstacle, I don't know what to put instead "base_obstacle"?

How to set the correct altar height for the bed? I ve tried the

Code: Select all

	anchorPos = vec(-0, 0.46, 0),
	anchorRotation = vec(0, 15, 0),
	targetPos = vec(-0, 0.46, 0),
	targetSize = vec(0.4, 0.5, 0.4),
but it crashes the editor after I put the bed on the map.

Code: Select all

-- Carpet for Legend of Grimrock
-- by Germanny 01/2013
defineObject{
	name = "log_carpet_a",
	baseObject = "base_obstacle",
	components = {
		{
			class = "Model",
			model = "mod_assets/models/log_carpet_a.fbx",
			staticShadow = true,
		},
	},
	automapIcon = 152,
}

Code: Select all

defineObject{
	name = "grim_bed",
	baseObject = "base_altar",
	components = {
		{
			class = "Model",
			model = "mod_assets/models/grim_bed.fbx",
			staticShadow = true,
		},
	},
	automapIcon = 152,
}
My asset pack: viewtopic.php?f=22&t=9320

Log1 mod : Toorum Manor: viewtopic.php?f=14&t=5505
Batty
Posts: 509
Joined: Sun Apr 15, 2012 7:04 pm

Re: object definition

Post by Batty »

Decoration:

Code: Select all

defineObject{
	name = "log_carpet_a",
	baseObject = "base_floor_decoration",
   components = {
		{
			class = "Model",
			model = "mod_assets/models/log_carpet_a.fbx",
			staticShadow = true
		}
   },
	minimalSaveState = true
}
All the base object defintions are in base.lua in the newly released asset scripts.
bongobeat
Posts: 1076
Joined: Thu May 16, 2013 5:58 pm
Location: France

Re: object definition

Post by bongobeat »

thank you :D

finally got the bed definition!

Code: Select all

-- Grimrock bed by germanny
defineObject{
	name = "grim_bed",
	baseObject = "base_altar",
	components = {
		{
			class = "Model",
			model = "mod_assets/models/grim_bed.fbx",
			staticShadow = true,
		},
		{
			class = "Surface",
			offset = vec(0.08, 0.44, 0),
			size = vec(0.7, 1),
			--debugDraw = true,
		},
	},
	automapIcon = 152,
}
My asset pack: viewtopic.php?f=22&t=9320

Log1 mod : Toorum Manor: viewtopic.php?f=14&t=5505
Post Reply