Page 1 of 36

The Custom Alcove Thread. (Neikun, Batty and Crisman)

Posted: Sat Sep 29, 2012 1:40 am
by Neikun
Non Custom Model alcove compilation: https://www.dropbox.com/s/36uaw9mnpntu7d4/alcoves.lua
  • --At this file to your scripts folder and include it in the init.lua by placing the line
    import "mod_assets/scripts/alcoves.lua"
Batty's lightable Wall Lanterns:
SpoilerShow

Code: Select all

        defineObject{
              name = "wall_lantern_visual",
              class = "Alcove",
              anchorPos = vec(0, 0, 0),
              targetPos = vec(0, 0, 0),
              targetSize = vec(0, 0, 0),
              model = "assets/models/env/wall_lantern.fbx",
              placement = "wall",
              replacesWall = false,
              editorIcon = 92,
        }

        defineObject{
              name = "wall_lantern_logical",
              class = "Alcove",
              anchorPos = vec(0, 1.65, 0),
              targetPos = vec(0, 1.65, 0),
              targetSize = vec(0.2, 0.2, 0.2),
              onInsertItem = function(self, item)
                 if item.name == "torch" or item.name == "torch_everburning" then
                    spawn("wall_lantern_fx_"..self.facing, self.level, self.x, self.y, 0)
                    playSoundAt("wall_lantern_crackling", self.level, self.x, self.y)
                    self:destroy()     
                 end
              end,
              placement = "wall",
              replacesWall = false,
              editorIcon = 84,
        }

        defineSound{
               name = "wall_lantern_crackling",
               filename = "assets/samples/env/torch_burning_01.wav",
               loop = true,
               volume = 0.5,
               minDistance = 2,
               maxDistance = 6,
        }

        defineObject{
               name = "wall_lantern_fx_3",
               class = "LightSource",
               lightPosition = vec(-1.18, 1.85, 0),
               lightRange = 12,
               lightColor = vec(0.7, 0.5, 0.5),
               brightness = 10,
               castShadow = true,
               particleSystem = "torch",
               placement = "floor",
               editorIcon = 88,
        }

        defineObject{
               name = "wall_lantern_fx_2",
               class = "LightSource",
               lightPosition = vec(0, 1.85, -1.18),
               lightRange = 12,
               lightColor = vec(0.7, 0.5, 0.5),
               brightness = 10,
               castShadow = true,
               particleSystem = "torch",
               placement = "floor",
               editorIcon = 88,
        }

        defineObject{
               name = "wall_lantern_fx_1",
               class = "LightSource",
               lightPosition = vec(1.18, 1.85, 0),
               lightRange = 12,
               lightColor = vec(0.7, 0.5, 0.5),
               brightness = 10,
               castShadow = true,
               particleSystem = "torch",
               placement = "floor",
               editorIcon = 88,
        }

        defineObject{
               name = "wall_lantern_fx_0",
               class = "LightSource",
               lightPosition = vec(0, 1.85, 1.18),
               lightRange = 12,
               lightColor = vec(0.7, 0.5, 0.5),
               brightness = 10,
               castShadow = true,
               particleSystem = "torch",
               placement = "floor",
               editorIcon = 88,
        }

--Original post--
I know when I played Legend of Grimrock, I thought the catacombs were going to be interactive.
Now that we've been given an editor, it's very easy to do it ourselves! =D

Here's a empty dungeon catacomb turned into alcove, and tweaked to prevent clipping by a placed object.

Code: Select all

defineObject{
	name = "dungeon_catacomb_alcove",
	class = "Alcove",
	anchorPos = vec(0, 0.75, 0.2),
	targetPos = vec(0,1.3,0),
	targetSize = vec(0.6, 0.5, 0.6),
	model = "assets/models/env/dungeon_catacomb_empty.fbx",
	placement = "wall",
	replacesWall = true,
	editorIcon = 92,
}
Image

Unfortunately, I am only able to place things in dead-centre of the shelf.
And Idea how I might be able to change that to something wider?

Re: (Object Asset) Empty Catacomb as Alcove

Posted: Sat Sep 29, 2012 2:05 am
by ScroLL
Nice work! Maybe changing targetSize will work? Not sure what that function is for...

Re: (Object Asset) Empty Catacomb as Alcove

Posted: Sat Sep 29, 2012 2:05 am
by Batty
Very nice, no visual problems with this change, just added it to my scripts!

I *thought* I saw a thread on widening the alcove box...

Re: (Object Asset) Empty Catacomb as Alcove

Posted: Sat Sep 29, 2012 2:25 am
by Lmaoboat
Trying increasing the dimensions of the targetSize, that's the one that defines the click box for placing items.

Re: (Object Asset) Empty Catacomb as Alcove

Posted: Sat Sep 29, 2012 2:26 am
by Neikun
I am currently searching through every post in the modding forum containing the word alcove.

Here's a thought though, what if I made a prison_bench into an alcove just for fits and wiggles? (not sure if I should swear as I normally do)
*Noted, Chuckleship.

Re: (Object Asset) Empty Catacomb as Alcove

Posted: Sat Sep 29, 2012 2:34 am
by Neikun
Changing the parameters of targetSize has yielded no changes

Re: (Object Asset) Empty Catacomb as Alcove

Posted: Sat Sep 29, 2012 2:48 am
by Lmaoboat
Well if you meant placing things in several places within the alcove, you'd need to use several different alcoves, like I did here:
viewtopic.php?p=32847#p32847
You'd still need to adjust the values to match that catacombs though.

Re: (Object Asset) Empty Catacomb as Alcove

Posted: Sat Sep 29, 2012 3:10 am
by Neikun
They don't want to work right when they're on top of each other.

Re: (Object Asset) Empty Catacomb as Alcove

Posted: Sat Sep 29, 2012 3:54 am
by Batty
And I was just filling a room with prison benches...

Image

Code: Select all

defineObject{
   	name = "dungeon_prison_bench_alcove",
   	class = "Alcove",
   	anchorPos = vec(0, 0.65, -0.2),
   	targetPos = vec(0, 1, 0),
   	targetSize = vec(0.6, 0.3, 0.6),
   	model = "assets/models/env/prison_chair.fbx",
   	placement = "wall",
   	replacesWall = false,
   	editorIcon = 92,
}
Tested with a few objects, seems to be problem free.

Re: (Object Asset) Empty Catacomb as Alcove

Posted: Sat Sep 29, 2012 4:30 am
by HaunterV
love the bench alcove.