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.
You can get climateBase from static helper class ClimateSwaps using the current climate type from PlayerGPS.
Code: Select all
ClimateBases climateBase = ClimateSwaps.FromAPIClimateBase(GameManager.Instance.PlayerGPS.ClimateSettings.ClimateType);
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
DaggerfallDateTime.Seasons worldSeason = DaggerfallUnity.Instance.WorldTime.Now.SeasonValue;
ClimateSeason climateSeason = ClimateSeason.Summer;
if (worldSeason == DaggerfallDateTime.Seasons.Winter)
climateSeason = ClimateSeason.Winter;
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.
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.
- daggerfall-explorer-2001.jpg (81.57 KiB) Viewed 2716 times
- daggerfall-modelling-2009.jpg (99.24 KiB) Viewed 2716 times
- daggerfall-unity-2017.jpg (100.01 KiB) Viewed 2716 times
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.