Page 1 of 1
Natural light (Red/yellow) ceiling lamps/kill light spell
Posted: Mon Oct 29, 2012 5:10 pm
by msyblade
If anybody has messed around with Asteroths Corrupt tileset, you may have noticed that the torchlight makes it vibrant and lively, while ceiling lamps dull the environment (suck the life right out of the walls).
So, if I'm gonna go for a moody/horror thing I want to control the lighting instead of allowing the player to light the entire place carrying a torch (even kill the light spell). So can I just clone ceiling lamps and change some definitions to get the natural light out of them, or is it more complicated than that? Can't get the particle system definition to be found or recognized after cloning a new object(lamp) and new particle system (just changed the color defs in the prison_ceiling_lamp particles def/changed the name) and put the location into the new lamp object clone. Got the object, but a "no such particle system" warning.
Re: Natural light (Red) ceiling lamps instead of magical(blu
Posted: Mon Oct 29, 2012 5:44 pm
by Grimorial
I am actually doing this currently with my dungeon. I am not at home at the moment so forgive any inaccuracies or lack of depth.
If you look at the asset pack you will find the temple ceiling lamp and its corresponding particle. The lamp itself has a place to make RGB adjustments on a scale of 0 to 1 per Red, Blue, and Green. You'll see it right away. Also able to adjust brightness and range. I also killed the orb particle within the lamp by placing a -- in front of the particle system. If you would like to keep the particle intact but adjust its color then do the same for it.
An example of what I do with mine, I maximize all of RGB to look like daylight and then adjust the height so I can place it high in a shaft. I only do this on the first floor of course.
Also just a suggestion if you are wanting to control torch use, how about only adding torches with low fuel.
You mentioned killing the light spell, how do I accomplish this?
Re: Natural light (Red) ceiling lamps instead of magical(blu
Posted: Mon Oct 29, 2012 5:53 pm
by Skuggasveinn
First you define the lamp object
Code: Select all
cloneObject{
name = "temple_ceiling_lamp_red",
baseObject = "temple_ceiling_lamp",
particleSystem = "temple_ceiling_lamp_red",
lightColor = vec(1,0,0), -- sets light to red. edit the numbers to any r,g,b values between 0 and 1 to change the color
}
you can see that I use also a new particleSystem called "temple_ceiling_lamp_red" so we can't forget to define that also
Code: Select all
defineParticleSystem{
name = "temple_ceiling_lamp_red",
emitters = {
-- glow
{
spawnBurst = true,
emissionRate = 1,
emissionTime = 0,
maxParticles = 1,
boxMin = {0,0,-0.1},
boxMax = {0,0,-0.1},
sprayAngle = {0,30},
velocity = {0,0},
texture = "assets/textures/particles/glow.tga",
lifetime = {1000000, 1000000},
color0 = {0.90, 0.1, 0.1},
opacity = 1,
fadeIn = 0.1,
fadeOut = 0.1,
size = {3, 3},
gravity = {0,0,0},
airResistance = 1,
rotationSpeed = 0,
blendMode = "Additive",
}
}
}
Hope that helps
Skuggasveinn.
Re: Natural light (Red) ceiling lamps instead of magical(blu
Posted: Mon Oct 29, 2012 6:00 pm
by msyblade
That is awesome, I got it completely figured out. cloned it, called it corrupt_ceiling_lamp, and changed the colors in it. In the process instead of killing the particle system I renamed it to "fireball" to check it out.Now I've got floating flameballs in the ceiling giving off natural light, looks pretty cool.
To kill the light spell, clone it, rename it (I called mine "Neutral Light") and replace the oncast string to Darkness. When cast, it says "Neutral Light" and Darkness doesnt affect the lighting you've set up for the player, so it's a push. (To put it simpler, just use the same runes as light, but redifine what those runes do. You could always just make runes 2 and 5 create a snail slice instead, and light would be disabled.
defineObject{
name = "corrupt_ceiling_lamp",
class = "LightSource",
lightPosition = vec(0, 3, 0),
lightRange = 10,
lightColor = vec(1.0, 0.5, 0.25),
brightness = 18,
castShadow = true,
particleSystem = "fireball",
placement = "floor",
editorIcon = 88,
}
-- Nuetral light
defineSpell{
name = "nuetral_light",
uiName = "Nuetral Light",
skill = "spellcraft",
level = 1,
runes = "BE",
manaCost = 25,
onCast = "darkness",
}
Re: Natural light (Red) ceiling lamps instead of magical(blu
Posted: Mon Oct 29, 2012 7:14 pm
by Brodie301
Is it more of a dim orange light like a torch?
I'm using Batty's wall & ceiling lanterns but they give off more of a white light and changes the shadow effects in the dungeon that don't have the same effect.
Re: Natural light (Red) ceiling lamps instead of magical(blu
Posted: Mon Oct 29, 2012 7:48 pm
by msyblade
I've got the three variables in the color code of my ceiling lamp clone set to 1.0, 0.5, and 0.25 respectively. I should note that after looking at torchlight effect scripts, I believe a torch actually gives of three colors of light simultaneously. I believe I'm actually just getting the fireballs light, which is fine because it is that perfectly natural blend. So the corrupt_ceiling_lamp script above inserted into your objects.lua
script will give you a natural light without the player getting torches. Coming from the ceiling changes EVERYTHING shadow wise. look for those chandelier thingies around randomly and a light above it (no shaft!) casts its shadow all around the walls/room.Cooool effect.
Re: Natural light (Red) ceiling lamps instead of magical(blu
Posted: Tue Oct 30, 2012 5:35 am
by Grimorial
msyblade wrote:That is awesome, I got it completely figured out. cloned it, called it corrupt_ceiling_lamp, and changed the colors in it. In the process instead of killing the particle system I renamed it to "fireball" to check it out.Now I've got floating flameballs in the ceiling giving off natural light, looks pretty cool.
To kill the light spell, clone it, rename it (I called mine "Neutral Light") and replace the oncast string to Darkness. When cast, it says "Neutral Light" and Darkness doesnt affect the lighting you've set up for the player, so it's a push. (To put it simpler, just use the same runes as light, but redifine what those runes do. You could always just make runes 2 and 5 create a snail slice instead, and light would be disabled.
defineObject{
name = "corrupt_ceiling_lamp",
class = "LightSource",
lightPosition = vec(0, 3, 0),
lightRange = 10,
lightColor = vec(1.0, 0.5, 0.25),
brightness = 18,
castShadow = true,
particleSystem = "fireball",
placement = "floor",
editorIcon = 88,
}
-- Nuetral light
defineSpell{
name = "nuetral_light",
uiName = "Nuetral Light",
skill = "spellcraft",
level = 1,
runes = "BE",
manaCost = 25,
onCast = "darkness",
}
Hey thanks, sorry I couldn't actually throw some scripts at you at the time but looks like Skugg was all over it.