need help with light in my level

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
kelly11
Posts: 17
Joined: Mon Oct 08, 2012 12:30 am

need help with light in my level

Post by kelly11 »

Hello,

I'm very new to this modding / editing and scripting thing. I have been building my dungeon for some time now. But something changed and the light level on all levels/floors is brighter than it should be. I copied some scripts from "this rotten place" mod. Did that mess my light levels up?

And how to change it per level in the dungeon? ... atm It looks like im holding a torch (but I aint wielding one and there are no light sources near)

please help
flatline

Re: need help with light in my level

Post by flatline »

kelly11 wrote:Hello,

I'm very new to this modding / editing and scripting thing. I have been building my dungeon for some time now. But something changed and the light level on all levels/floors is brighter than it should be. I copied some scripts from "this rotten place" mod. Did that mess my light levels up?

And how to change it per level in the dungeon? ... atm It looks like im holding a torch (but I aint wielding one and there are no light sources near)

please help
This rotten place relies heavily on lightsources and particleeffects with a large area of effect, iirc.
Somewhere in those scripts, it probably defines a bunch of lightsources that are spawned around you or near you. Hard to say without seeing the scripts.
Lmaoboat
Posts: 359
Joined: Wed Apr 11, 2012 8:55 pm

Re: need help with light in my level

Post by Lmaoboat »

Did you set the light duration to -1? Because that doesn't make it last forever, it makes it grow brighter over time rather than dim over time.
kelly11
Posts: 17
Joined: Mon Oct 08, 2012 12:30 am

Re: need help with light in my level

Post by kelly11 »

what to change in the scripts?


This is the particle script:

defineParticleSystem{
name = "candle",
emitters = {
-- smoke
{
emissionRate = 5,
emissionTime = 0,
maxParticles = 50,
boxMin = {-0.03, 0.1, -0.03},
boxMax = { 0.03, 0.1, 0.03},
sprayAngle = {0,30},
velocity = {0.1,0.5},
texture = "assets/textures/particles/smoke_01.tga",
lifetime = {1,1.25},
color0 = {0.1, 0.1, 0.1},
opacity = 0.6,
fadeIn = 0.5,
fadeOut = 0.5,
size = {0.3, 0.6},
gravity = {0,0,0},
airResistance = 0.1,
rotationSpeed = 0.6,
blendMode = "Translucent",
objectSpace = false,
},

-- flames
{
emissionRate = 20,
emissionTime = 0,
maxParticles = 100,
boxMin = {-0.015, -0.02, 0.015},
boxMax = { 0.015, -0.02, -0.015},
sprayAngle = {0,10},
velocity = {0.1, 0.4},
texture = "mod_assets/textures/candle.tga",
frameRate = 45,
frameSize = 64,
frameCount = 16,
lifetime = {0.25, 0.85},
colorAnimation = false,
color0 = {1.5, 1.5, 1.5},
opacity = 0.5,
fadeIn = 0.15,
fadeOut = 0.3,
size = {0.17, 0.015},
gravity = {0,0,0},
airResistance = 1.0,
rotationSpeed = 1,
blendMode = "Additive",
depthBias = -0.0005,
objectSpace = true,
},

-- inner glow
{
spawnBurst = true,
emissionRate = 1,
emissionTime = 0,
maxParticles = 1,
boxMin = {0,-0.05,0.0},
boxMax = {0,-0.05,0.0},
sprayAngle = {0,30},
velocity = {0,0},
texture = "assets/textures/particles/glow.tga",
lifetime = {1000000, 1000000},
colorAnimation = false,
color0 = {0.1, 0.1, 0.1},
opacity = 1,
fadeIn = 0.1,
fadeOut = 0.1,
size = {0.5, 0.5},
gravity = {0,0,0},
airResistance = 1,
rotationSpeed = 0,
blendMode = "Additive",
depthBias = -0.0005,
objectSpace = true,
},

-- outer glow
{
spawnBurst = true,
emissionRate = 1,
emissionTime = 0,
maxParticles = 1,
boxMin = {0,0,0},
boxMax = {0,0,0},
sprayAngle = {0,30},
velocity = {0,0},
texture = "assets/textures/particles/glow.tga",
lifetime = {1000000, 1000000},
colorAnimation = false,
color0 = {0.1, 0.1, 0.1},
opacity = 0.25,
fadeIn = 0.1,
fadeOut = 0.1,
size = {2, 2},
gravity = {0,0,0},
airResistance = 1,
rotationSpeed = 0,
blendMode = "Additive",
depthBias = -0.0005,
objectSpace = true,
},

-- fog
{
emissionRate = 1.5,
emissionTime = 0,
maxParticles = 100,
boxMin = {-6, 0.1, -6},
boxMax = { 6, 0.1, 6},
sprayAngle = {0,30},
velocity = {0,0},
texture = "assets/textures/particles/smoke_01.tga",
lifetime = {10,20},
color0 = {0.5, 0.5, 0.5},
opacity = 0.2,
fadeIn = 9,
fadeOut = 9,
size = {4, 8},
gravity = {0,0,0},
airResistance = 0.1,
rotationSpeed = 0.05,
blendMode = "Translucent",
objectSpace = false,
}
}
}

defineParticleSystem{
name = "drip",
emitters = {
-- drip
{
emissionRate = 3,
emissionTime = 0,
maxParticles = 50,
boxMin = {0,0,0},
boxMax = {0,0,0},
sprayAngle = {0,5},
velocity = {0,-3},
texture = "assets/textures/particles/glow.tga",
lifetime = {2, 3},
colorAnimation = false,
color0 = {0.25, 0.25, 0.25},
opacity = 0.4,
fadeIn = 0.1,
fadeOut = 0.1,
size = {0.05, 0.1},
gravity = {0,-5,0},
airResistance = 0.05,
rotationSpeed = 0,
blendMode = "Additive",
depthBias = -0.0005,
objectSpace = true,
}

}
}

defineParticleSystem{
name = "glitter_gear",
emitters = {
-- sparks
{
emissionRate = 30,
emissionTime = 0,
maxParticles = 100,
boxMin = {-0.015, 0.02, 0.015},
boxMax = { 0.015, 0.1, -0.015},
sprayAngle = {0,180},
velocity = {0.1, 2.4},
texture = "assets/textures/particles/glow.tga",
lifetime = {0.25, 0.85},
colorAnimation = false,
color0 = {1.5, 1.5, 1.5},
opacity = 0.8,
fadeIn = 0.15,
fadeOut = 0.3,
size = {0.01, 0.05},
gravity = {0,0,0},
airResistance = 1.0,
rotationSpeed = 1,
blendMode = "Additive",
depthBias = -0.0005,
objectSpace = true,
},

-- outer glow
{
spawnBurst = true,
emissionRate = 1,
emissionTime = 0,
maxParticles = 1,
boxMin = {0,0,0},
boxMax = {0,0,0},
sprayAngle = {0,30},
velocity = {0,0},
texture = "assets/textures/particles/glow.tga",
lifetime = {1000000, 1000000},
colorAnimation = false,
color0 = {0.1, 0.1, 0.1},
opacity = 0.2,
fadeIn = 0.1,
fadeOut = 0.1,
size = {2, 4},
gravity = {0,0,0},
airResistance = 1,
rotationSpeed = 0,
blendMode = "Additive",
depthBias = -0.0005,
objectSpace = true,
},

}
}
flatline

Re: need help with light in my level

Post by flatline »

It's not in the particle scripts, it's a lightSource object that emits light. Particle scripts emit particles, not light. (for example, "sparks" don't actually shine by themselves, they need a lightObject to do so.)

Check you objectsfile for lighsources.
Post Reply