Greets!
Don't know about you, but i find myself a bit ridiculous, sneakin with my torch on; wich would require some kind of night/infravision spell, or racial feature, with lights cancellin our stealth. And moreover, i think that it should apply to enemies as well, cause bein repeatedly and lethally shot in the blackness of a dark night by mere bandits that you, you can't see, is rather frustratin, not to speak of the breaked imersion.
Nops?
Lights and darkness.
- DunnyOfPenwick
- Posts: 275
- Joined: Wed Apr 14, 2021 1:58 am
- Location: Southeast US
Re: Lights and darkness.
There are definitely things I would like to enhance, such as enemy senses and enemy behavior, but I don't think those things can be easily modded. It would probably require some changes to the base code, which wouldn't occur until after version 1 is released.
- Syl
- Posts: 40
- Joined: Fri Sep 02, 2022 8:41 am
Re: Lights and darkness.
I understand. And just tinkerin a workaround with a kind of invisibility spell applied on dark zones wouldn't work?
Last edited by Syl on Fri Sep 02, 2022 9:49 pm, edited 1 time in total.
- Sluggy
- Posts: 20
- Joined: Tue Aug 23, 2022 9:28 pm
Re: Lights and darkness.
It's not really that easy since as far as I know there is nothing in DFU that inherently tracks how light or dark the area surrounding you is. So to start off, you'd need to find a reliable and no-too-performance-intensive way of doing that.
Off the top of my head I could think up one rather convoluted way of doing it. Create an object with a single quad facing straight up and attach it to the player at about their knee height (so that it doesn't clip underground on hills). Put this quad on a dedicated render layer and then create a camera facing straight down with the quad covering it's whole field of view. Make this camera only render things on the aforementioned layer. Give the camera custom render texture with a low resolution (could probably even be something like 8x8). Make sure this render texture is readable. Write a script that occasionally (maybe every 5th of a second or so) reads the contents of the render texture from the camera using GetPixel(), averages the values together and then translates that to some kind of table that determines how much light the player is currently standing in and what effect it should have.
Off the top of my head I could think up one rather convoluted way of doing it. Create an object with a single quad facing straight up and attach it to the player at about their knee height (so that it doesn't clip underground on hills). Put this quad on a dedicated render layer and then create a camera facing straight down with the quad covering it's whole field of view. Make this camera only render things on the aforementioned layer. Give the camera custom render texture with a low resolution (could probably even be something like 8x8). Make sure this render texture is readable. Write a script that occasionally (maybe every 5th of a second or so) reads the contents of the render texture from the camera using GetPixel(), averages the values together and then translates that to some kind of table that determines how much light the player is currently standing in and what effect it should have.
- Syl
- Posts: 40
- Joined: Fri Sep 02, 2022 8:41 am
Re: Lights and darkness.
I see. Seems a premature wish then. thxs!