Enhanced sky

Discuss modding questions and implementation details.
Post Reply
User avatar
Midknightprince
Posts: 1324
Joined: Fri Aug 11, 2017 6:51 am
Location: San Antonio TX
Contact:

Enhanced sky

Post by Midknightprince »

As of build # 0.5.24 on Github 4/23/18 enhanced sky has stopped working. :(
Check out my YouTube Channel!

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: Enhanced sky

Post by Interkarma »

Thanks for the reports on these. I'll leave it to TheLacus to see if there's any way to restore compatibility. Otherwise mod creators will need to update their versions.

User avatar
TheLacus
Posts: 1305
Joined: Wed Sep 14, 2016 6:22 pm

Re: Enhanced sky

Post by TheLacus »

DFTFU 1.7.3: Error in SkyManager.GetRefrences()
I extracted the code and this is printed under a catch statement, but i'm not sure what is actually being thrown. Doesn't look related to modsettings though, i can edit them in game and the file is created without issues.

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: Enhanced sky

Post by Interkarma »

Could be related to weathermanager fix I made. I'll take a look when I can today.

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: Enhanced sky

Post by Interkarma »

I don't think this is related to WeatherManager change. All I did was move it out from under ExteriorParent. The GameManager singleton is still able to grab its reference OK.

Here's a copy of the "GetRefrences()" method extracted from EnhancedSky 2.0.5. Any ideas TheLacus?

Code: Select all

private bool GetRefrences()
        {
            try
            {
#if DEBUG
                Debug.Log("SkyMan.GetReferences() starting");
#endif
                //_UnlitAlphaFadeShader = ESky_Setup.unlitalpha;

                //_depthMaskShader = ESky_Setup.depthMask;

                SkyMat = ESky_Setup.SkyMat;
                CloudMat = ESky_Setup.CloudMat;
                StarsMat = ESky_Setup.StarsMat;
                StarMaskMat = ESky_Setup.StarsMaskMat;

                if (!_cloudGen)
                    _cloudGen = this.GetComponent<CloudGenerator>();
                if(!_cloudGen)
                    _cloudGen = gameObject.AddComponent<CloudGenerator>();
                dfallSky = GameManager.Instance.SkyRig.gameObject;
                playerEE = GameManager.Instance.PlayerEnterExit;
                exteriorParent = GameManager.Instance.ExteriorParent;
                weatherMan = GameManager.Instance.WeatherManager;

                UseSunFlare = ESky_Setup.useFlare;
                cloudQuality = ESky_Setup.cloudQuality;

#if DEBUG
                Debug.Log("skyman SkyMat: " + (SkyMat == null));
                Debug.Log("skyman StarMat: " + (SkyMat == null));
                Debug.Log("skyman Cloudmat: " + (CloudMat == null));
                //Debug.Log("skyman skyObjMat: " + (SkyObjMat == null));
                Debug.Log("skyman star mat: " + (StarsMat == null));
                Debug.Log("sky man star mask mat: " + (StarMaskMat == null));
                Debug.Log("skyman cloud gen: " + (_cloudGen == null));
                Debug.Log("skyman dfallsky: " + GameManager.Instance.SkyRig);// (dfallSky == null));
                Debug.Log("skyman playerEE: " + playerEE);
                Debug.Log("skyman exterior parent: " + exteriorParent);
                Debug.Log("skyman weatherman: " + weatherMan);
                Debug.Log("skyman container prefab: " + (_containerPrefab == null));
#endif
            }
            catch
            {
                DaggerfallUnity.LogMessage("Error in SkyManager.GetRefrences()", true);
                this.ToggleEnhancedSky(false);
                return false;
            }
            if (dfallSky && playerEE && exteriorParent && _cloudGen && _containerPrefab && StarMaskMat && StarsMat && SkyMat)
                return true;
            else
                return false;

        }
Does anyone know if Lypyl provided full source for Enhanced Sky 2.0.5 anywhere? I still have the really old source from before mod system was in place, but that's likely very out of date now.

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: Enhanced sky

Post by Interkarma »

Aaand the root cause is my fault. :oops: When I made the "quick" change of adding version text to DaggerfallUI, I check GameManager to see if game is paused. This in turn invokes GameManager singleton and a bunch of things happen out of order because the GameManager singleton is persistent across scenes. I'll clean this up now and issue new builds soon.

enhanced-sky.jpg
enhanced-sky.jpg (48.21 KiB) Viewed 4650 times

User avatar
TheLacus
Posts: 1305
Joined: Wed Sep 14, 2016 6:22 pm

Re: Enhanced sky

Post by TheLacus »

Glad this was solved :)

User avatar
Midknightprince
Posts: 1324
Joined: Fri Aug 11, 2017 6:51 am
Location: San Antonio TX
Contact:

Re: Enhanced sky

Post by Midknightprince »

Yep, fixed on my end, that was fast.
Thank you guys :)
Check out my YouTube Channel!

Post Reply