Skip to content

Fixed climate-swap changes in DaggerfallLocation not respecting the billboard's "AlignToBase"#2548

Merged
KABoissonneault merged 1 commit intoInterkarma:masterfrom
KABoissonneault:fix/rmb-climate-swap
Feb 11, 2024
Merged

Fixed climate-swap changes in DaggerfallLocation not respecting the billboard's "AlignToBase"#2548
KABoissonneault merged 1 commit intoInterkarma:masterfrom
KABoissonneault:fix/rmb-climate-swap

Conversation

@KABoissonneault
Copy link
Copy Markdown
Collaborator

Billboards always float in the air, so the bottom touches the ground. In DaggerfallLocation.ApplyClimateSettings, we have a procedure to apply climate swap on child billboards, but it fails to account for the change in billboard height.

This issue only affects nature used in RMB "misc block flats". In normal Daggerfall data, nature is in the ground scenery, which applies the climate swap directly in RMBLayout.AddNatureFlats, before the billboard's been aligned to base. However, ground scenery is bound to a 16x16 grid and has fixed elevation, so mods prefer to use "misc flats" for better control (like putting a tree on a hill).

This issue was reported by carademono here: #2545 (comment)

Without climate swap:
284473002-19c8ef5a-6cfd-403c-81ef-ab392fb65b4d

With climate swap:
284473016-fb1d70cc-6b7b-4956-9242-b76ba28c88f0

My suggested fix is to cancel out the "AlignToBase" in DaggerfallLocation using the original size, then realign to base using the new size.

Now, trees keep the correct elevation.
image

Other potential solutions:
We could apply the climate swap in RMBLayout.AddMiscBlockFlats similarly to what we already have for the ground scenery. However, DaggerfallLocation is intended to have control of whether climate swap is applied, and I figured this might have side effects of forcing climate swaps in contexts where it's not intended.

…illboard's "AlignToBase". Billboards always float in the air so the bottom touches the ground, but climate swap can change a billboard's size
@KABoissonneault KABoissonneault added this to the DFU 1.0.1 milestone Feb 3, 2024
// Billboard is already aligned to base
// But we're potentially changing the archive
// Because the summary size can change, we have to cancel
// the "base" alignment and reapply it after
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes perfect sense, good fix Kab

@KABoissonneault KABoissonneault merged commit 3d9916f into Interkarma:master Feb 11, 2024
@KABoissonneault KABoissonneault deleted the fix/rmb-climate-swap branch February 11, 2024 03:13
@KABoissonneault KABoissonneault mentioned this pull request Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants