Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
BalrondNatureOptimizer
Conservative compatibility and performance fixes built specifically for Balrond Amazing Nature 1.3.8.
CHANGELOG
Changelog
0.7.7
- Removed
Suppress Duplicate Material Passescompletely after runtime testing showed that it could make transparent vegetation and other authored transparent materials render as opaque. - Every Amazing Nature material pass now runs. Both the legacy
Balrond Shaderskey and the short-lived numbered06 - Renderingkey are purged during config migration. - Kept the remaining exact-version 1.3.8 fixes and defaults unchanged; no new tick, global scan, save migration, world mutation, texture rewrite, or runtime LOD/GPU experiment was added.
0.7.6
- Rebuilt the release specifically for Balrond Amazing Nature 1.3.8 with an exact Thunderstore dependency, versioned BepInEx dependency, runtime metadata equality gate, and one compact startup capability summary.
- Removed the obsolete lava, Plains heat, biome-width, status/stamina, Deep North, station/converter, Dverger, iced-tree, stalagmite, recipe/tutorial/tentacle, old world-field, texture, mip, and heavy-tree LOD branches. The unreleased 0.8 runtime GPU experiment is not part of this release.
- Retargeted the optional Monster Climbing disable to
Character_CustomFixedUpdate_Patch.Postfix(Character,float)andCharacter_OnDestroy_Patch.Prefix(Character), with an exactDictionary<Character,ClimbState>check and orderedStatescleanup. The new switch defaults off, leaving Amazing Nature's improved climbing enabled. - Restored the bounded 0.7.5 material-state guard after confirming that Amazing Nature 1.3.8 still force-enables alpha cutout for nearly every tracked
_MainTexmaterial. Conservative cutoff/culling protection and full opaque keyword/blend/queue restoration are grouped under Rendering, migrate their old values, and both remain off by default. - Removed
Suppress Duplicate Material Passescompletely after it caused incorrect opaque vegetation in runtime testing. Every Amazing Nature material pass now runs, and both legacy and short-lived numbered config keys are purged. - Kept the verified StableHash, Serving Tray, geyser, swamp, clutter, optional heavy-shadow, Balrond Constructions null-effect, and vanilla streaming fixes.
- Added exact one-time tuning for
portal_NatureSmall_bal,portal_StoneSmall_bal, andFloatingDebris_bal: Automatic particle culling, conservative caps, and portal-light shadow removal without touching network, teleport, physics, loot, audio, or save behavior. - Reorganized all 29 settings into eight numbered sections, migrated retained values (including the two retained old
Balrond Shaderskeys), purged known obsolete entries, and deliberately did not invert the old MonsterClimb setting. - Added session-safe cleanup for the current Amazing Nature caches and optimizer-owned streaming/clutter state. No new tick, scheduler, global scan, forced GC, asset unload, or broad runtime rendering rewrite was introduced.
- Hardened the final release audit: legacy values now migrate without replacing canonical defaults or overwriting an existing 0.7.6 key, and the migration is idempotent across repeated loads.
- Moved the Serving Tray automatic-registration guard to
TryPrepareAsServingTrayPiece(..., requireConsumable)so it blocks before prefab mutation; removed the ineffective lateEnsureInPieceTablefallback, manual-entry reflection cache, and duplicate teardown cleanup. - Made vegetation and clutter filters exact typed 1.3.8 paths, expanded the startup contract to every retained lifecycle method and
ClutterBuilder.clutterObjects, and required an upstream climb patch to be present before reporting an exact unpatch as successful. - Added a one-shot
TerrainLod.OnEnableforeign-owner check so a later-loaded competing streamer also fails open to vanilla without a per-frame compatibility scan.
0.7.5
- Added a restart-time compatibility fix for five actually registered Balrond Constructions core-wood wall prefabs with enabled missing
WearNTear.m_hitEffectreferences. The fix runs once after prefab registration, preserves valid effects such asvfx_SawDust, and prevents vanillaEffectList.Createfrom attemptingInstantiate(null)during structure hits. - The repair uses five exact prefab lookups and changes only their runtime hit-effect arrays. It adds no damage hook, frame callback, sector/object/ZDO scan, exception suppression, or save rewrite.
0.7.4
- Re-audited the currently installed Amazing Nature binary and current Valheim
assembly_valheim.dll, then traced the live walking/sector paths throughTerrainLod,Heightmap,ClutterSystem,SlowUpdater/StaticPhysics,ZNetScene,ZDOMan, and BalrondConverter. - Added all-biome Amazing Nature clutter controls. The default 50% density scales only its 23 definitions, while six non-instanced entries are disabled before registration so crossing each 8 m clutter patch creates far fewer placement attempts and separate GameObjects.
- Fixed the 0.7.3 Swamp clutter filter: Amazing Nature prefixes
Clutter.m_namewithbalrond_; 0.7.4 resolves the actual prefab name, so the five configured entries are now correctly matched. - Time-sliced terrain-triggered grass resets by removing only
ResetGrass's forced-all flag. Reset patches remain valid and rebuild through Valheim's existing one-patch-per-frame generator;ClearAlland graphics-quality rebuilds remain vanilla. - Added fail-open 3x3 distant-terrain smoothing. Nine already-ready HMBuildData results are consumed at the configured rendered-frame budget instead of all nine Heightmaps regenerating in one frame. Teleports remain immediate, captured data is restored on any partial failure, and competing foreign TerrainLod patches disable the feature.
- Corrected vanilla
StaticPhysicscadence after its original 20-second delay. Eligible ground/solid-height checks now re-arm at the configured interval instead of repeating every SlowUpdater sweep; active falling remains unchanged. - Cached the exact comparison delegates used by
ZNetScene.CreateObjectsSorted,ZDOMan.ServerSortSendZDOS, andClientSortSendZDOS, removing three recurring delegate allocations without changing sort or network semantics. - Changed the exact
IcedTree_balGlobalWind component from a 0.01-second Invoke to Valheim's staggered two-second cadence. - Disabled the rendered-frame
MaterialVariationWorldLocation search on the outdoorstalagmite_ice_baltemplate; its default material, geometry, collision, destructibility, and drops remain. - Hardened BalrondConverter sector reloads. A long delta calls the converter's own
IsActivepredicate once and skips up to 3,600 zero-progress iterations for empty or currently unstartable stations, while active/startable work keeps offline progress. Existing one-second callbacks are distributed by a stable ZDO-ID phase. - Phase-shifted wet/cold, mist, and sitting-heal full passes so their four-per-second checks no longer land in the same physics step.
- Added no optimizer-owned
Update,FixedUpdate,LateUpdate, coroutine, global scheduler, sector/object/ZDO scan, forced GC, or asset unload. Synchronous new-zone vegetation/location/dungeon generation remains deliberately untouched to preserve deterministic world and multiplayer behavior. - Extended the metadata verifier with every new private signature and exact IL pattern, added steady-state allocation/reflection checks, rebuilt with zero warnings, and independently decompiled/reviewed the final DLL.
0.7.3
- Replaced the temporary BNO mark with a new 256x256 hand-painted Nordic nature/optimization icon designed for Thunderstore and Gale thumbnail readability.
- Reduced the Thunderstore README to one technical audit table plus the optional-controls table. Both use a three-column Gale-compatible layout, with separate
GameplayandWorld/saveblocks inside the visible result column. - Traced every optimizer target upward into current Valheim lifecycle roots and every replacement downward into Amazing Nature delegates. The audit now distinguishes method names from actual
Update,FixedUpdate, AI, scene, world-setup, and ZDO-streaming cadence. - Replaced Amazing Nature's Deep North
EnvMan.GetBiomeandEnvMan.UpdateEnvironmentreflection prefixes. The stable path previously performed five reflection operations and at least three boxed value allocations per processed fixed frame; the replacement uses cached open delegates and direct Harmony field references with no steady-state managed allocation. - Fixed Amazing Nature's stale
m_currentBiomeassignment while an environment override is active by storing the biome already computed byEnvMan.FixedUpdate. - Disabled the mis-targeted
Patch_Player_StaminaRegenSmoothCurveby default. Its two callbacks ran for every Character but wrappedCharacter.CustomFixedUpdate, not the realPlayer.UpdateStatsstamina regeneration path. - Replaced the Dverger betrayal AI postfix with allocation-free prefab-name normalization while preserving the dynamic Amazing Nature name whitelist and mark predicate.
- Added an O(1) fermenter template guard on
ConversionChanges.editFermenter. Streamed fermenter clones no longer repeat two conversion-list scans and tutorial work when their serialized entries match; incompatible instances run the original method. - Synchronized the throttled food-state pass with vanilla
m_foodUpdateTimerinstead of an independent timer, including forced food updates. - Removed the retained
SE_SitHealstatus when the player is no longer sitting or is already at full health. - Released Amazing Nature-owned runtime
RecipeScriptableObjects before ObjectDB rebuild/shutdown instead of only dropping their managed list references. - Removed the remaining
MonsterClimbCleanupPatchfromCharacter.OnDestroywhen monster climbing is disabled and cleared the disabled lava/heat/climb collections at startup. - Moved world cleanup from cancellable
Game.Logoutto terminalGame.Shutdown(bool). - Fixed tentacle source resolution during Amazing Nature's pre-vanilla
ZNetScene.Awakeprefix. The resolver performs one startup-only exact-name pass over the serialized prefab list and never runs from chunk/ZDO streaming. - Added verification after every foreign Harmony unpatch. Replacement hooks roll back if the corresponding Amazing Nature hook cannot be removed, preventing double execution on future incompatible builds.
- Removed the dormant
RecipeFactory.buildRecipeStationTutorialTagpatch; the method has no caller in the audited Amazing Nature build and lifecycle deduplication already protects the actual tutorial list. - Clarified that all Configuration Manager changes require a restart and that the two local-player status dispatchers still receive physics-step callbacks even though their full work is throttled.
0.7.2
- Removed the optimizer's global
Character.OnDestroypostfix. On sector unload it repeatedly calledAccessTools.TypeByName, which enumerates types from every loaded assembly and could turn a batch of despawning characters into a long frame plus GC pressure. - Removed the per-frame
MessageHud.UpdateBiomeFoundpostfix. The biome-message prefab is now widened once fromMessageHud.Awake. - Replaced per-material shader state objects, dictionaries, arrays and lowercase/concatenated strings with fixed value-type state and allocation-free ordinal searches.
- Retired the old broad alpha restore default. Conservative and aggressive material-state fixes use new keys and both default off; aggressive keyword/blend/queue restoration is explicitly opt-in.
- Added alpha-blend, premultiply, transparent queue and non-opaque mode recognition so transparent Piece materials are not misclassified as opaque.
- Replaced the full recursive scan of every ZNetScene prefab with exact-name lookups. Disabled poison geysers are collapsed from 53/66-object hierarchies to lightweight
Transform+ZNetViewroots, reducing the cost of loading old geyser ZDOs. - Removed the destructive full-ZDO scan/deletion feature entirely.
- Filters pending Balrond clutter before its registration and no longer calls a second
ClutterSystem.ClearAll, avoiding a redundant forced full clutter rebuild. - Reduced status replacement hooks from three to two and phase-shifted sitting-heal work from the wet/cold and mist pass.
- Disabled Serving Tray integration by default. Auto-scan and the four heaviest food prefabs are blocked before prefab mutation when the feature is enabled with its safety options.
- Resolves Amazing Nature types only inside the plugin assembly obtained from its BepInEx GUID and caches fields per type.
AccessTools.TypeByNameis no longer referenced anywhere, including startup/logout compatibility work. - Added an immutable startup settings snapshot, a restart warning for Configuration Manager changes, and
General / Enable Optimizerfor clean restart-based A/B tests. - Replacement hooks are now installed successfully before their original Amazing Nature hooks are removed. A future Harmony/signature incompatibility therefore leaves the original feature intact instead of silently disabling it.
0.7.1
- Removed the exact Balrond Amazing Nature 1.3.7 runtime version gate. Any loaded version with the expected plugin GUID is now accepted.
- Kept compatibility checks at individual-target level: missing, ambiguous, or Harmony-incompatible patch targets are skipped and logged without stopping the remaining targets in that feature group.
- Removed the version-pinned Thunderstore package dependency because Thunderstore has no version-wildcard syntax. Amazing Nature must be installed separately; the DLL still declares a hard dependency by plugin GUID.
0.7.0
- Re-audited and rebuilt every patch target against the installed Balrond Amazing Nature 1.3.7 DLL and current Valheim assemblies.
- Split
CustomLavaDamagePatchand the threePlainsMiniHeathooks into independent settings; both remain disabled by default. - Replaced the broken
Swampy*clutter match with the five actual 1.3.7 clutter prefabs and now clears only theirSwampbiome bit. - Changed swamp world filtering to preserve registrations in other biomes. Visual vegetation and Guck resource vegetation now have separate settings; resources stay enabled by default.
- Made poison-geyser disabling complete:
Aoe,EffectArea,SpawnArea,TerrainModifier, lights, particles, audio, renderers and colliders are neutralized while network roots remain loadable. - Made existing-ZDO deletion opt-in, server-only, and protected by a second master safety switch. An old 0.6.6
truevalue cannot delete anything by itself. - Added a non-destructive geyser optimization mode with particle, light-shadow and spawn caps when geysers are kept enabled.
- Added bounded food/environment/sitting-heal status passes and an exact non-allocating replacement for
BalrondHashCompat.StableHashreflection. - Added a conservative shader snapshot/restore guard for
StaticRockand non-vegetationPiece/Creature; authored_Cullis preserved independently from alpha-test intent. Duplicate material-pass suppression is available but defaults off so later shader retries are not lost. - Disabled Serving Tray automatic build-table registration by default and blocked new placement of the four audited extremely high-poly food displays. Prefabs are still prepared for old placed-ZDO compatibility; full feature removal is opt-in.
- Fixed recipe and tutorial accumulation, tentacle prefab duplication, mutation of vanilla
TentaRoot, and known character/world lifecycle collections. - Removed the old teleport polling and global runtime object scans.
- Added exact metadata target verification and a post-build decompilation audit.
0.6.6
- Updated the optimizer for Balrond Amazing Nature 1.3.7.
- Disables Balrond custom lava/plains heat hooks, monster door sensors, and the monster climb/slope movement postfix by default.
- Fixes Balrond biome discovery title width growth.
- Disables Balrond poison geysers, poison geyser spawners, extra swamp clutter, and extra swamp world vegetation while keeping items, recipes, build pieces, cultivator entries, loot sources, and locations intact.
- Removes
SpawnArea,ParticleSystem,AudioSource,Light, andLightFlickercomponents from disabled poison geyser prefabs, preventingLightFlicker.Awake()null-reference spam on existing geyser ZDOs. - Deletes existing poison geyser world ZDOs when the poison geyser cleanup option is enabled.
- Runs conservative cleanup after distant teleports and logout for disabled Balrond runtime components and stale lists.
- Keeps Balrond status systems untouched.