Skip to content

Drop ExteriorRadius overrides; inherit from Location component#45

Open
jneb802 wants to merge 1 commit into
masterfrom
fix/exterior-radius-jotunn
Open

Drop ExteriorRadius overrides; inherit from Location component#45
jneb802 wants to merge 1 commit into
masterfrom
fix/exterior-radius-jotunn

Conversation

@jneb802
Copy link
Copy Markdown
Owner

@jneb802 jneb802 commented Apr 13, 2026

Summary

  • Removes all 129 explicit ExteriorRadius assignments from LocationDefinitions.cs. With the paired Jötunn fix (jneb802/Jotunn#fix/location-exterior-radius-from-prefab), CustomLocation.SyncZoneLocationFromComponent now copies the Unity-Editor-authored radius from the prefab's Location component onto ZoneLocation when the config field is left unset.
  • Eliminates the mismatch between ZoneLocation.m_exteriorRadius (used by world-gen, ClearArea, slope sampling, and consumers like VentureValheim/LocationReset) and Location.m_exteriorRadius (authored in Unity, visible in-scene).
  • Bumps Libs/Jotunn.dll to a build carrying the nullable LocationConfig fields required for this to compile and run.

Why

LocationReset.LocationPosition reads zone.m_exteriorRadius off ZoneSystem.ZoneLocation, not the prefab's Location component. Before this change, that value was the (often smaller) LocationConfig.ExteriorRadius value — so reset operated on a subset of the location's actual footprint and left objects beyond the config radius unreset. The Unity-Editor-authored radius is the only place the footprint is actually visible, so making it the source of truth prevents the two from drifting.

Test plan

  • dotnet build clean against the paired Jötunn branch.
  • Deployed locally via mmcli develop profile.
  • Verified MWL_GoblinFort1 picks up its prefab-authored radius through the SoftReference sync path.
  • Regenerate a world with the modpack and spot-check a few locations across biomes for correct placement, vegetation clearing, and LocationReset behavior.

…tion component

Removes all explicit ExteriorRadius assignments from LocationDefinitions
(129 entries across every biome). With the Jötunn nullable-config fix in
place, leaving ExteriorRadius unset lets CustomLocation.SyncZoneLocationFromComponent
copy the Unity-Editor-authored value from the prefab's Location component
onto ZoneLocation, eliminating the mismatch that caused LocationReset and
ClearArea to operate on a smaller radius than the visible footprint.

Updates bundled Jotunn.dll to the build carrying the nullable LocationConfig
fields (fix/location-exterior-radius-from-prefab).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

1 participant