Enhanced sky

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

Enhanced sky

Post by Midknightprince » Mon Apr 23, 2018 12:38 pm

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: 2960
Joined: Sun Mar 22, 2015 1:51 am

Re: Enhanced sky

Post by Interkarma » Mon Apr 23, 2018 12:39 pm

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: 591
Joined: Wed Sep 14, 2016 6:22 pm
Contact:

Re: Enhanced sky

Post by TheLacus » Mon Apr 23, 2018 5:23 pm

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.
If you are interested in creating mods for Daggerfall Unity you can find the documentation here.

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

Re: Enhanced sky

Post by Interkarma » Mon Apr 23, 2018 6:48 pm

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

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

Re: Enhanced sky

Post by Interkarma » Mon Apr 23, 2018 9:00 pm

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: 2960
Joined: Sun Mar 22, 2015 1:51 am

Re: Enhanced sky

Post by Interkarma » Tue Apr 24, 2018 12:57 am

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 598 times

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

Re: Enhanced sky

Post by TheLacus » Tue Apr 24, 2018 7:05 am

Glad this was solved :)
If you are interested in creating mods for Daggerfall Unity you can find the documentation here.

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

Re: Enhanced sky

Post by Midknightprince » Wed Apr 25, 2018 3:05 pm

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

Post Reply