Jump to content

[REL] The Ningheim Race + Followers (New Eyes of Beauty + ENB ToD Fix)


Recommended Posts

  • 2 weeks later...

Lmao, Uno, thanks for making me laugh again.

 

Bit of a late response, but Uriel the change I had to make is that the script has to update the vanilla game's Global Variable called GameDaysPassed with a float (decimal number) instead of an integer (whole number). That and I made some very small optimizations in the PCTracker that are solely related to the system I made for the powers with regard to the GameDaysPassed value.

 

I honestly have no idea why I sent integers to keep track of the amount of game days passed anyway, because even my own system relies on decimal values to know when a day has passed since registering a power as depleted. It was an oversight on my part.

The reason ENB's ToD would cause flickering/dimming/etc. is because ENB's script and my script were both updating the GameDaysPassed value every second, making the value switch between an integer value and a decimal value rapidly every second.

During hours of light this would become apparent through flickering as the ENB rapidly switched between day and night settings every second.

 

An example:

  1. It's the third day in the game and it's noon.
  2. That means GameDaysPassed should be 2.5 for ENB to "know" it is noon.
  3. The Papyrus Script System runs my script and ENB's. In one pass, which is a second in this case, it will execute my script and ENB's, which will both ask the game engine for the amount of passed days in a decimal value.
    (Note: the game does NOT update the global variable "GameDaysPassed" by itself. It's a global variable put in place by the devs specially for mods. The game engine itself always internally keeps track of the amount of game days passed, which in turn, you can request and store.)
  4. My old script would update GameDaysPassed to 2 or 3, depending on whether it does a floor or round on the value 2.5. ENB would update GameDaysPassed to 2.5 as told by the engine.
  5. To ENB's ToD function the value of 2.0 or 3.0 for GameDaysPassed would mean it's night. The value of 2.5 would mean it's noon on the third day of the game.
  6. Every second the GameDaysPassed global variable rapidly switches from 2.0 to 2.5 and back (or vice versa depending on which script gets to execute first). Flickering ensues as ENB's ToD function rapidly switches between the stored settings for day and night.

 

I hope that explains it a bit. It was no biggie to fix it, but it took me a little bit of time to figure out that that's how ENB's ToD works. There was no documentation on it. I had to find that all out by observing the scripts' behaviour and then when I had a feeling what was going on I switched the GameDaysPassed value around in a controlled setup, which proved my hypothesis.

Link to comment
  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use