The Custom Alcove Thread. (Neikun, Batty and Crisman)
Re: The Custom Alcove Thread. (Neikun, Batty and Crisman)
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
Re: The Custom Alcove Thread. (Neikun, Batty and Crisman)
Here is a recent request from Belblind
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.
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.
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,
}
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
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!
Re: The Custom Alcove Thread. (Neikun, Batty and Crisman)
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
"You have been captured by a psychopathic diety who needs a new plaything to torture."
Hotel Hades
Re: The Custom Alcove Thread. (Neikun, Batty and Crisman)
Man you guys are awesome. Here's my first attempt at a Lua script. I modded it so it only accepts keys:crisman wrote:
Here you go!
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!SpoilerShowdefineObject{
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,
}
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,
}
Re: The Custom Alcove Thread. (Neikun, Batty and Crisman)
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 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
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!
-
- Posts: 22
- Joined: Tue Oct 09, 2012 5:06 pm
Re: The Custom Alcove Thread. (Neikun, Batty and Crisman)
does this file contain all (or most) of the alcoves in this topic?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.
Dungeon maker, scripter and modeling beginner
My first Wallset
My first Wallset
Re: The Custom Alcove Thread. (Neikun, Batty and Crisman)
I have a question for your code, can you explain me what this does?Hustin wrote:I've coded in BASIC, Pascal, Ada, C, Java, Perl, and Ruby, but Lua is one weird animal...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, 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!
Re: The Custom Alcove Thread. (Neikun, Batty and Crisman)
See: http://lua-users.org/wiki/StringLibraryTutorialcrisman wrote:
i, j = ...
string.find (for this one the name of the function explain everything, but how it works?)
string.len
thank you!
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.
Re: The Custom Alcove Thread. (Neikun, Batty and Crisman)
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".
Re: The Custom Alcove Thread. (Neikun, Batty and Crisman)
ok got it. I did not understand that string.find gives two results. Thank you!