Closed: House and Ship information
- Interkarma
- Posts: 7242
- Joined: Sun Mar 22, 2015 1:51 am
Re: Open: House and Ship information
Will do mate.
- Interkarma
- Posts: 7242
- Joined: Sun Mar 22, 2015 1:51 am
Re: Open: House and Ship information
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.
Code: Select all
ClimateBases climateBase = ClimateSwaps.FromAPIClimateBase(GameManager.Instance.PlayerGPS.ClimateSettings.ClimateType);
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.
- Hazelnut
- Posts: 3016
- Joined: Sat Aug 26, 2017 2:46 pm
- Contact:
Re: Open: House and Ship information
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.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods
- Hazelnut
- Posts: 3016
- Joined: Sat Aug 26, 2017 2:46 pm
- Contact:
Re: Open: House and Ship information
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.
Player housing!
Player housing!
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods
- Hazelnut
- Posts: 3016
- Joined: Sat Aug 26, 2017 2:46 pm
- Contact:
Re: Open: House and Ship information
Closing this as player housing is all done. Just need to wait until someone finds a bug.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods