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

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
User avatar
crisman
Posts: 305
Joined: Sat Sep 22, 2012 9:23 pm
Location: Italy

Re: (Object Assets) Empty Catacomb as Alcove and other alcov

Post by crisman »

petri wrote:
crisman wrote:Once I've tried to make a goromorg statue fourway acting like an alcove, for placing scrolls on it (if I recall correctly in the base game you can find a scroll on it once).
For some reasons the model shifted forward and it wasn't in the middle of a square anymore.
I should try that again...
Hint: eye sockets
Thak you very much Petri!
I did it, but now I cannot post any pictures or the script.
I'll do that later!

EDIT: Okay, here's the script
SpoilerShow
defineObject{
name = "goromorg_socket",
class = "Alcove",
anchorPos = vec(0.0, 0.18, 0.16),
targetPos = vec(0.0,0.18, 0.17),
targetSize = vec(0.3, 0.3, 0.3),
placement = "floor",
onInsertItem = function(self, item)
return item.name == "scroll" and self:getItemCount() == 0
end,
editorIcon = 92,
}
Now, this is almost exactly like a socket, it's not a physical object, and you cannot put things inside in-game, but only via script or inspector.
To place it you must put in front of the statue, like this screen shows (don't bother with the timers are there for something else ;)) The socket is facing East in this case.
Image
And here's the result
SpoilerShow
Image
Now here's a story. After 99 level of a very dangerous dungeon, after fighting several eating-men monsters, after passing several deadly trap, and solved crazy puzzles, you are in front of the Scroll of Power, those who read it will gain incredible Wisdom and will receive the answer of meaning of life and so on.
SpoilerShow
Image
Looks like the goromorgs have a nasty sense of humor...
Batty
Posts: 509
Joined: Sun Apr 15, 2012 7:04 pm

Re: (Object Assets) Empty Catacomb as Alcove and other alcov

Post by Batty »

They'll be no end to alcoves...the scroll on the statue is another good one.
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Re: (Object Assets) Empty Catacomb as Alcove and other alcov

Post by Neikun »

I thought you guys wanted it on the statues arms lol
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
  • Message me to join in!
User avatar
Blichew
Posts: 157
Joined: Thu Sep 27, 2012 12:39 am

Re: (Object Assets) Empty Catacomb as Alcove and other alcov

Post by Blichew »

I haven't seen any fix-post yet, but If there was one already, then this post is unnecessary :)
flatline wrote:
Batty wrote:Wall Lanterns Resurrected
Ignore the previous wall lantern solution as it doesn't work outside the editor. The lanterns you light don't survive save games because they were created via FX when I should have used objects instead. So, here is the revised fully functioning and simpler solution:
SpoilerShow

Code: Select all

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,
}
Define 4 LightSource objects - one for each facing position. The only difference between the four is the name and lightPosition. This has to be done because the convenient FX translate() function doesn't work with LightSource objects. They can't be moved. You also need to define a sound object:

Code: Select all

defineSound{
       name = "wall_lantern_crackling",
	    filename = "assets/samples/env/torch_burning_01.wav",
	    loop = true,
	    volume = 0.5,
	    minDistance = 2,
       maxDistance = 6,
}	
Lastly, replace the logical lantern script. It's simpler now.
SpoilerShow

Code: Select all

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 "everlasting_torch" 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,
}
Don't forget the visual lantern script from my previous post.
Batty, I've copied your stuff and it works fine except that it seems the script accepts ANY object to light the lanterns. When I fool around in the editor, I can put in a sling and still light one of the lanterns. At first, I thought the script lacked a "else"-parameter telling it to end if anything but a torch was inserted. I can't seem to fix it though. Thoughts?

Great work btw, and I'm quite new to scripting Grimrock so bear with me. I did manage to make some nice looking drainage floors with custom fires glowing far below and filling the room with smoke, so progress is being had.

The way I see it is that item.name "everlasting_torch" is actually "torch_everlasting" but the case is in this line:

Code: Select all

 if item.name == "torch" or "everlasting_torch" then
It should be:

Code: Select all

 if item.name == "torch" or item.name == "torch_everlasting" then
Lmaoboat
Posts: 359
Joined: Wed Apr 11, 2012 8:55 pm

Re: (Object Assets) Empty Catacomb as Alcove and other alcov

Post by Lmaoboat »

I wonder if would be possible just to make an alcove that you could control the object placement of using the inspector in the editor.
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Re: (Object Assets) Empty Catacomb as Alcove and other alcov

Post by Neikun »

Likely not.

NEWS: Just finishing up on a goromorg shield carrier alcove. Looks really neat.
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
  • Message me to join in!
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Re: (Object Assets) Empty Catacomb as Alcove and other alcov

Post by Neikun »

Introducing.. The Goromorg Shield Carrier

Code: Select all

defineObject{
	name = "goromorg_shield_slot",
	class ="Alcove",
	anchorPos = vec(0.02, 1.44, 0.12),
	anchorRotation = vec(90,0,270),
	targetPos = vec(0,1.7, 0),
	targetSize = vec(0.1, 0.8, 0.2),
	onInsertItem = function(self, item)
     local allowed = {"shield_valor", "legionary_shield","shield_elements","heavy_shield"}
     for i = 1, #allowed do
       if item.name == allowed[i] then
          return item.name == allowed[i] and self:getItemCount() == 0
       end
     end   
end,
	placement = "wall",
	replacesWall = false,
	editorIcon = 92,
}
Image

This is a logical alcove, and so you can put it on whatever wall you want. It's designed to fit nicely on the goromorg's arms though.

Happy modding!
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
  • Message me to join in!
User avatar
Merethif
Posts: 274
Joined: Tue Apr 24, 2012 1:58 pm
Location: Poland

Re: (Object Assets) Empty Catacomb as Alcove and other alcov

Post by Merethif »

Neikun wrote:Introducing.. The Goromorg Shield Carrier
Ok, now guys, you are really getting insane...

...KEEP IT COMING :-D

BTW, may I suggest alcove for the orbs into dragon statue mouth?
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Re: (Object Assets) Empty Catacomb as Alcove and other alcov

Post by Neikun »

Merethif wrote:
Neikun wrote:Introducing.. The Goromorg Shield Carrier
Ok, now guys, you are really getting insane...

...KEEP IT COMING :-D

BTW, may I suggest alcove for the orbs into dragon statue mouth?
Well I find the gems to be a little to small for that, but the ore would do nicely.
-will likely work on that later.
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
  • Message me to join in!
User avatar
Merethif
Posts: 274
Joined: Tue Apr 24, 2012 1:58 pm
Location: Poland

Re: (Object Assets) Empty Catacomb as Alcove and other alcov

Post by Merethif »

Neikun wrote:
Merethif wrote:
Neikun wrote:Introducing.. The Goromorg Shield Carrier
Ok, now guys, you are really getting insane...

...KEEP IT COMING :-D

BTW, may I suggest alcove for the orbs into dragon statue mouth?
Well I find the gems to be a little to small for that, but the ore would do nicely.
-will likely work on that later.
I mean the orbs like Orb of Radiance or Zhandul Orb. They're even slightly bigger then ore.
Post Reply