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

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
User avatar
Huder
Posts: 26
Joined: Tue Apr 24, 2012 11:23 am
Location: Poland Piła
Contact:

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

Post by Huder »

Normals on my model are not recalulated that why you can see this black shadow on edges. Sorry for that, here is fix: http://www.mediafire.com/?c584r3p38rhdw08
Huder's Assets newest: Wooden Shield
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

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

Post by Neikun »

Here is a recent request from Belblind
Image

I would like to see it done better. Add a light or a particle system to it (only there is no model)
Make for some method of stopping a player from walking through it?
-probably use a floor texture as a blockage. Have the blockage destroyed upon pickup.
Scripts for the socket, and floor blockages as well.
I'm going to see if I can't make them glow.
SpoilerShow

Code: Select all

defineObject{
	name = "floating_sword_socket",
	class = "Alcove",
	anchorPos = vec(0, 1.1, -1.0),
	anchorRotation = vec(90,0,90),
	targetPos = vec(0, 1.1, -0.38),
	targetSize = vec(0, 0, 0),
	placement = "wall",
	editorIcon = 92,
}
defineObject{
	name = "dungeon_floor_blockage",
	class = "Blockage",
	model = "assets/models/env/dungeon_floor_01.fbx",
	placement = "floor",
	repelProjectiles = true,
	hitSound = "impact_blade",
	editorIcon = 56,
}

defineObject{
	name = "temple_floor_blockage",
	class = "Blockage",
	model = "assets/models/env/temple_floor_01.fbx",
	placement = "floor",
	repelProjectiles = true,
	hitSound = "impact_blade",
	editorIcon = 56,
}

defineObject{
	name = "prison_floor_blockage",
	class = "Blockage",
	model = "assets/models/env/prison_floor_01.fbx",
	placement = "floor",
	repelProjectiles = true,
	hitSound = "impact_blade",
	editorIcon = 56,
}
EDIT: Changed the anchorPos.
NOTE: With an alcove it is impossible to have the item in the center of the square and still be retrievable.
I have sent a query to the devs on this matter.
Last edited by Neikun on Tue Oct 16, 2012 2:49 am, edited 1 time in total.
"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
msyblade
Posts: 792
Joined: Fri Oct 12, 2012 4:40 am
Location: New Mexico, USA
Contact:

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

Post by msyblade »

For the Key behind the wall drainage no code is required. I pulled it off early on by placing the key on the near side of the square behind it. Much like a pad on the far side of a portcullis. Works just fine. Not sure if you can place items thru though,...some sort of "feed the rats" puzzle trigger with a 2 sec item teleporter connected? :)
Currently conspiring with many modders on the "Legends of the Northern Realms"project.

"You have been captured by a psychopathic diety who needs a new plaything to torture."
Hotel Hades
Hustin
Posts: 105
Joined: Thu May 31, 2012 7:26 am

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

Post by Hustin »

crisman wrote:Image

Here you go!
SpoilerShow
defineObject{
name = "dungeon_wall_drainage_alcove",
model = "assets/models/env/dungeon_wall_drainage.fbx",
class = "Alcove",
anchorPos = vec(0, 0.00, 0.5),
targetPos = vec(0, 0.1, 0),
targetSize = vec(0.3, 0.2, 0.1),
placement = "wall",
replacesWall = true,
editorIcon = 92,
}
I'm a bit in hurry, so it's not exactly perfect, you can put in everything. I'll tweak in that way -maybe- later! ;)
Man you guys are awesome. Here's my first attempt at a Lua script. I modded it so it only accepts keys:

Code: Select all

defineObject{
name = "dungeon_wall_drainage_alcove",
model = "assets/models/env/dungeon_wall_drainage.fbx",
class = "Alcove",
anchorPos = vec(0, 0.00, 0.5),
targetPos = vec(0, 0.1, 0),
targetSize = vec(0.3, 0.2, 0.1),
placement = "wall",
replacesWall = true,
editorIcon = 92,
onInsertItem = function(self, item)
  i, j = string.find(item.name, "_key")
  return (i ~= nil) and (j == string.len(item.name)) and (self:getItemCount() == 0)
end,
}
I've coded in BASIC, Pascal, Ada, C, Java, Perl, and Ruby, but Lua is one weird animal...
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

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

Post by Neikun »

I've started compiling the in-game model alcoves into a single .lua file
I have to go to work now, so I'll put it up later.
There are 24 alcoves in it.
"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!
Deadlylama
Posts: 22
Joined: Tue Oct 09, 2012 5:06 pm

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

Post by Deadlylama »

Neikun wrote:I've started compiling the in-game model alcoves into a single .lua file
I have to go to work now, so I'll put it up later.
There are 24 alcoves in it.
does this file contain all (or most) of the alcoves in this topic?
Dungeon maker, scripter and modeling beginner
My first Wallset
User avatar
crisman
Posts: 305
Joined: Sat Sep 22, 2012 9:23 pm
Location: Italy

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

Post by crisman »

Hustin wrote:

Code: Select all

defineObject{
name = "dungeon_wall_drainage_alcove",
model = "assets/models/env/dungeon_wall_drainage.fbx",
class = "Alcove",
anchorPos = vec(0, 0.00, 0.5),
targetPos = vec(0, 0.1, 0),
targetSize = vec(0.3, 0.2, 0.1),
placement = "wall",
replacesWall = true,
editorIcon = 92,
onInsertItem = function(self, item)
  i, j = string.find(item.name, "_key")
  return (i ~= nil) and (j == string.len(item.name)) and (self:getItemCount() == 0)
end,
}
I've coded in BASIC, Pascal, Ada, C, Java, Perl, and Ruby, but Lua is one weird animal...
I have a question for your code, can you explain me what this does?

i, j = string.find(item.name, "_key")
return (i ~= nil) and (j == string.len(item.name))

there is a lot of stuff I've never seen, so I'm pretty confused about these:

i, j = ...
string.find (for this one the name of the function explain everything, but how it works?)
string.len

thank you!
User avatar
Filipsan
Posts: 84
Joined: Fri Mar 16, 2012 10:18 am

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

Post by Filipsan »

crisman wrote:
i, j = ...
string.find (for this one the name of the function explain everything, but how it works?)
string.len

thank you!
See: http://lua-users.org/wiki/StringLibraryTutorial

s:len() --Return the length of the string passed.

s:find(pattern [, init [, plain]]) -- Find the first occurance of the pattern in the string passed. If an instance of the pattern is found a pair of values representing the start and end of the string is returned. If the pattern cannot be found nil is returned.
Hustin
Posts: 105
Joined: Thu May 31, 2012 7:26 am

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

Post by Hustin »

It's basically checking that (a) the pattern was found and (b) the pattern is at the very end of the name. It lets the alcove accept only object types ending in "_key".
User avatar
crisman
Posts: 305
Joined: Sat Sep 22, 2012 9:23 pm
Location: Italy

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

Post by crisman »

ok got it. I did not understand that string.find gives two results. Thank you!
Post Reply