Need something opened in the core for your mod, or even help with research?
You can get climateBase from static helper class ClimateSwaps using the current climate type from PlayerGPS.Hazelnut wrote: EDIT: Also for setting climate using dfMesh.SetClimate() where should I get the climateBase and climateSeason from? No rush for this bit - I can add climates later.
For climateSeason, you can probably just use ClimateSeason.Summer in the bank UI. I can't recall if classic applies snow texture set inside the bank interface. Otherwise, you can work out climateSeason from world time.
Code: Select all
ClimateBases climateBase = ClimateSwaps.FromAPIClimateBase(GameManager.Instance.PlayerGPS.ClimateSettings.ClimateType);
If you're wondering about the different climate & season handling between DFTFU and Daggerfall Unity, it's kind of a historical thing. All the layout guts were ported over from DaggerfallConnect and Daggerfall Modelling at the beginning when I was just building DFTFU. Which in turn came from my C++ codebase for Daggerfall Explorer written around 2000-2001.
Code: Select all
DaggerfallDateTime.Seasons worldSeason = DaggerfallUnity.Instance.WorldTime.Now.SeasonValue; ClimateSeason climateSeason = ClimateSeason.Summer; if (worldSeason == DaggerfallDateTime.Seasons.Winter) climateSeason = ClimateSeason.Winter;
As I started building out Daggerfall Unity, it was apparent the game world needed better climate & season handling beyond just the simplified model (climate+summer/winter/raining) required for laying out models. Rather than retro-fit this back onto the model layout code (which didn't really need it anyway), I just bridged them across with some helper methods. It can make things a but confusing though.
I also think it's kind of cool to see the progression of this layout code across the years from Daggerfall Explorer, to Daggerfall Modelling, to Daggerfall Unity.
The engines above are Alchemy for Daggerfall Explorer (one of my first attempts at a game engine back in my DirectX and C++ days), XNALibrary for Daggerfall Modelling (built on XNA and C#), and of course Unity and C# today for Daggerfall Unity.
Thanks for the info. I actually don't appear to get snowy houses in classic so can't really test whether seasons affect houses in bank UI. Tried both evening and morning star. Trees are snowy but not buildings. Ah well I will leave it affected by the current season for now.
PR submitted for when you need a break from magic. Far too excited about this so for now I've just handled loading inside a bank by using the no houses for sale message. I'm happy to switch from using BuildingDirectory to datafiles, but not convinced it's worth it for this edge case. I'll sleep on it and see what opinions are posted by you, or others.