Author Topic: Say no to light!  (Read 1277 times)

Legacy_Master Jax

  • Hero Member
  • *****
  • Posts: 618
  • Karma: +0/-0
Say no to light!
« Reply #60 on: May 14, 2013, 06:05:58 am »


               So, what you're saying is static placeables don't cast light unless scripted, right? As for the ones I am talking about, they're the regular, vanilla ones, braziers, campfires, and whatnot.

Well, this would definitely solve the mystery then, guys! It just made no sense to me that a placeable with a flame on it didn't cast any light, but this seems to be an issue that comes all the way from the original game! Thanks to you all for helping out!
               
               

               
            

Legacy_3RavensMore

  • Hero Member
  • *****
  • Posts: 1153
  • Karma: +0/-0
Say no to light!
« Reply #61 on: September 30, 2014, 07:01:58 pm »


               

Digging up this old thread.  I don’t think the question of how to remove flare from tileset lights without killing spell flares was ever answered.  The fx_flame01 fix does remove the tileset light flare, but unfortunately removes spell flares as well.  Is there a fix for this?  Even if I have to edit each tile model, I’d be willing to do that—at least for the tileset I’m working on.



               
               

               
            

Legacy_Tarot Redhand

  • Hero Member
  • *****
  • Posts: 4165
  • Karma: +0/-0
Say no to light!
« Reply #62 on: October 01, 2014, 03:09:34 am »


               

Can I also ask if anyone made a version of the standard, large, thick candles that can be 


  1. lit and extinguished via scripting and

  2.    
  3. Not give off any sort of glow when in the unlit state?

I did find that number 1 is possible if you edit copy to make a custom candle but even when unlit each candle still gives off a glow.


 


TR



               
               

               
            

Legacy_Tiberius_Morguhn

  • Sr. Member
  • ****
  • Posts: 396
  • Karma: +0/-0
Say no to light!
« Reply #63 on: October 01, 2014, 03:23:36 am »


               


Can I also ask if anyone made a version of the standard, large, thick candles that can be 


  1. lit and extinguished via scripting and

  2.    
  3. Not give off any sort of glow when in the unlit state?

I did find that number 1 is possible if you edit copy to make a custom candle but even when unlit each candle still gives off a glow.


 


TR




 


Use the 'no ambient' version of those candles.  Toolset has both types.  When using the no ambient version, you'll have to script the on state ambient light though (you can see the diff between the two in the placeables.2da file).


               
               

               
            

Legacy_Tarot Redhand

  • Hero Member
  • *****
  • Posts: 4165
  • Karma: +0/-0
Say no to light!
« Reply #64 on: October 02, 2014, 01:06:25 am »


               

Arrrgh! So that's what the "na" at the end of the name means in the toolset. Thanks for the heads up.


 


TR



               
               

               
            

Legacy_Tarot Redhand

  • Hero Member
  • *****
  • Posts: 4165
  • Karma: +0/-0
Say no to light!
« Reply #65 on: October 02, 2014, 06:58:53 pm »


               

Well I've just tried the script earlier in the thread and it would seem that it doesn't completely work for candles. The candle flame lights but there is no ambient illumination. I also tried it with applyeffectatlocation as well and that doesn't work. Perhaps it's because it's indoors. Because the majority of the scripting will be going onto the candles, I don't think it will be safe to use the old destroy "no ambient candle" and create "ambient candle" at that location either. So it looks like I'm going to have to just use ambient candles.


 


TR



               
               

               
            

Legacy_Pstemarie

  • Hero Member
  • *****
  • Posts: 4368
  • Karma: +0/-0
Say no to light!
« Reply #66 on: January 03, 2015, 07:06:44 pm »


               

*uses Animate Dead on this thread...*


 


Has anyone looked at this script? with some modification I think it accomplishes quite nicely the original task of getting rid of the lens flare for placeables and require no model or 2da edits. It might also have applications for tile source lighting with further modification and conversion to an area OnEnter event script.


 


The original script


 



   Spoiler
   


 


By uncommenting the original lines and commenting-out the lines related to the VFX, you can pretty much resolve the flare issue. Using SetPlaceableIllumination() in conjunction with RecomputeStaticLighting turns off the lens flare when the placeable's light is off.


 


This is what the modified script looks like:


 



   Spoiler
   


 


Token Screenshot...lights on (left) versus light off (right). Note the flare with the light on and its absence with the light off...


 


lights_zps126ebf36.png



               
               

               
            

Legacy_TheOneBlackRider

  • Hero Member
  • *****
  • Posts: 512
  • Karma: +0/-0
Say no to light!
« Reply #67 on: January 05, 2015, 09:24:23 am »


               

Now that is a good finding! I tested it and it seems to be working.


But I seem to be a bit brick minded regarding the way to achive this... I used the NWN Lamp Post (plc_lamppost). The script is looking for OBJECT_SELF. To test, I gave the placeable the variable "NW_L_AMION" and put the script in OnHeartbeat. Of course now the placeable turns off and on after each heartbeat. There is no OnSpawn to completely turn it off once.


But the lens flare is gon, when it's off! (As written in the posts before: Just manually deactivating the placeable leaves this lense flare effect).


Can you point me into the right direction?



               
               

               
            

Legacy_Pstemarie

  • Hero Member
  • *****
  • Posts: 4368
  • Karma: +0/-0
Say no to light!
« Reply #68 on: January 05, 2015, 11:54:12 am »


               

The script goes into the placeable's OnUsed event slot. I use a variant for each area that uses GetIsDay() and GetIsNight() to determine if the lights are supposed to be on or off when the PC enters the area. All the script requires is that any light casting placeable by tagged "LightSource" so that the script knows which one to check for.  I also have all the placeable light objects' "Useable" flag checked so that PCs can interact with them; although the script should work with them set to static as well.


 



   Spoiler
   



               
               

               
            

Legacy_TheOneBlackRider

  • Hero Member
  • *****
  • Posts: 512
  • Karma: +0/-0
Say no to light!
« Reply #69 on: January 05, 2015, 02:34:18 pm »


               

Thank you,  Pstemarie!