[Models] Captivated by Captive

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
User avatar
BuzzJ
Posts: 160
Joined: Sat Jan 12, 2013 4:06 pm

Re: [Models] Captivated by Captive

Post by BuzzJ »

Well, to be fair, I need to make edits in both objects.lua and wall_sets.lua, and the exact nature of those changes isn't covered in the tutorial.

I'm still owrking out some strange problems I found, but the model is showing up now.

my objects.lua looks like this:

defineObject{
name = "CaptiveWall001",
class = "Decoration",
model = "mod_assets/models/CaptiveWall001.fbx",
placement = "wall",
replacesWall = true,
editorIcon = 50,
}

and my wallsets looks like this:

defineWallSet{
name = "Captive",
randomFloorFacing = true,

floors = {
"assets/models/env/temple_floor_01.fbx", 30,
"assets/models/env/temple_floor_drainage.fbx", 1,
},

walls = {
"mod_assets/models/CaptiveWall001.fbx", 50,
"assets/models/env/temple_wall_01.fbx", 50,
"assets/models/env/temple_wall_drainage.fbx", 1,
},

pillars = {
"assets/models/env/temple_pillar.fbx", 1,
},

ceilings = {
"assets/models/env/temple_ceiling.fbx", 1,
},

ceilingShafts = {
"assets/models/env/temple_ceiling_pit.fbx", 1,
},

floorDecorations = {
},

wallDecorations = {
"assets/models/env/metal_hooks_wall.fbx", 1,
"assets/models/env/metal_hooks_chain_wall.fbx", 1,
},

pillarDecorations = {
"assets/models/env/metal_hook_pillar.fbx", 1,
"assets/models/env/metal_hook_chain_pillar.fbx", 1,
"assets/models/env/metal_ring_pillar.fbx", 1,
},
}

however there is more to do. At present, when I place these, they seem to show me the invisible backside in the direction that they should be facing the front. When I go around them it displays nortmally at least, so the model is correct. Now I just need to see what changes need to be made in the object.
hyteria
Posts: 266
Joined: Sat Dec 29, 2012 8:22 pm

Re: [Models] Captivated by Captive

Post by hyteria »

i had the same prob with wall , i dunno why but they need to be reversed ( well the front must be the back) dunno if i m clear haha
User avatar
BuzzJ
Posts: 160
Joined: Sat Jan 12, 2013 4:06 pm

Re: [Models] Captivated by Captive

Post by BuzzJ »

Yep, I flipped it 180 on the Z axis in blender after I knew everything else worked, and it worked like a charm.

Now I'm working out how to avoid there being automatic pillars placed.
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Re: [Models] Captivated by Captive

Post by Neikun »

You could use a model with a transparent texture for generated pillars.
"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
BuzzJ
Posts: 160
Joined: Sat Jan 12, 2013 4:06 pm

Re: [Models] Captivated by Captive

Post by BuzzJ »

Could anyone explain to me how a wall decoration, where I don't want the back wall to be replaced, but just add the decoration on top of the wall model is scripted?

I mean, I have a power outlet that is a seperate model from the wall it goes onto, and I'd like it to be placed on top of the wall, not instead of it.
User avatar
msyblade
Posts: 792
Joined: Fri Oct 12, 2012 4:40 am
Location: New Mexico, USA
Contact:

Re: [Models] Captivated by Captive

Post by msyblade »

Believe u can just add a line to the def that says

replacesWall = false,
Last edited by msyblade on Wed Jan 16, 2013 3:11 am, edited 1 time in total.
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
User avatar
Sutekh
Posts: 127
Joined: Sun Nov 25, 2012 9:58 am
Location: UK

Re: [Models] Captivated by Captive

Post by Sutekh »

I'd do it the same way you'd add a bench to the wall. For example:

Code: Select all

defineObject{
   name = "northern_dungeon_bench",
   class = "Decoration",
   model = "mod_assets/models/northern_dungeon/northern_dungeon_bench.fbx",
   placement = "wall",
   editorIcon = 92,
   }
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Re: [Models] Captivated by Captive

Post by Neikun »

msyblade wrote:Believe u can just add a line to the def that says

replaceWall = false,
*replacesWall = false,
"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
BuzzJ
Posts: 160
Joined: Sat Jan 12, 2013 4:06 pm

Re: [Models] Captivated by Captive

Post by BuzzJ »

Thanks for the prompt replies. I am usually asking questions in advance. Acyually, I've been on a modelling kick, that desk was a short diversion to keep from being bored; so far I have almost enough assets to do an entire tileset; so that's why I'm not really scripting them in, UVmapping takes a bit of time.

But here is another in advance question:

I want to make a wall decoration emit light, sort of like how the torch emits light; but in a persistent way, where you can't remove the torch. Sort of like how the healing crystal emits light. Any leads on the script code that allows this? Yes, I could just look into the scripts, but when I ask questions like this I figure that somebody reading later will come across it, and be like "a-ha!", so it might be useful in that way.

I'm really looking forward to being able to share the sci-fi themed assets with you all, but there are a bunch of assets I want to have in and functional before I move onto phase 2: the scriptening
User avatar
Komag
Posts: 3658
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: [Models] Captivated by Captive

Post by Komag »

probably the simplest "quick and dirty" way would be to just define a light source object (in your objects.lua) and then place one near each of your decorations:

Code: Select all

defineObject{
	name = "my_decoration_light",
	class = "LightSource",
	lightPosition = vec(0, 2, 0), -- x,y,z, center of square, 2 meters up; if you want near wall, adjust x and z
	lightRange = 12, -- this is in meters I believe, so about four squares
	lightColor = vec(1,1,1), -- RGB, white; temple lamp is (0.35, 0.98, 1.5)
	brightness = 25,
	castShadow = false,
	flicker = false, -- torches are set to true for the wavering light effect
--	particleSystem = "my_decoration_particles", -- if you want to set something up in your particles.lua
	placement = "floor",
	editorIcon = 88,
}
I'm not sure how to set it up for the decoration object itself to serve as a light source so you don't have to place separate lights. If you are going to do a LOT of them, that might be worth finding out, but for just a few, this method is easy
Finished Dungeons - complete mods to play
Post Reply