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.
CHANGELOG
Changelog
v5.0.0 - The World & Environment Optimization Update
This major release introduces new environment caching systems, background world generation, a robust PhysX warning silencing system, and highly requested stability improvements to the core physics and garbage collection loops.
New Features & Optimizations
-
Full localization support added for English, Russian, Ukrainian, Spanish.
- Terrain Mesh Cache: Implemented a Least Recently Used (LRU) cache for generated heightmap meshes. This helps eliminate micro-stutters when crossing zone boundaries. It safely invalidates affected and adjacent sectors on Heightmap.Poke to remain compatible with terrain deformation.
- Chunky Pre-generator: Introduced a background world pre-generation queue that generates terrain tiles incrementally. Features configurable generation delays and minimum safety FPS thresholds to keep gameplay smooth during exploration.
- Automated Base Anchor Batching (F7): Added custom Base Anchors. Pressing F7 saves your base coordinates, enabling automated static batching after a configurable spawning delay (BaseAnchorBatchDelay) when entering the base zone.
- PhysX Console Warn Silencing: Added deep Rigidbody patches that block setting velocities on Kinematic bodies. This prevents the performance-degrading console spam ("Setting linear velocity of a kinematic body") during building or cell destruction. Supports both standard velocities and Unity 6 linearVelocity.
- Interactive Loading Screen Tips: Integrated a custom tips injector that submixes over 40 informative, stylized performance and optimization facts directly into the loading screen.
Critical Fixes & Refactoring
-
A major issue that prevented the main module responsible for buildings from working has been resolved.
- Corrected Smoke Aerodynamics: Fixed a bug in the smoke physics throttle where a shared static frame counter caused some smoke particles to freeze mid-air or prematurely extinguish fires. Caching, AddForce application (once every 3 frames), and mass updates (once every 100ms) are now handled per-particle.
- Projectiles Excluded from VFX Pool: Removed arrow and weapon projectiles from the object pooling system to resolve network desyncs and floating projectile bugs. High-frequency particle impacts (blood, sparks, arrow hits) remain pooled.
- Zero-Allocation Pooling Hot Path: Whitelist checks now compare pre-computed StableHashCode values directly, removing string operations on the hot path. State resets utilize compiled Expression delegates to bypass reflection and boxing.
- Refined Garbage Collection Logic: Improved the GC Low Latency manager. It transitions the CLR Garbage Collector to LowLatency mode during heavy player actions (swimming, attacking, teleporting, moving) and gracefully restores it to Interactive when idle. Uses fast delegates and includes a 45-second safety timeout to avoid OOM crashes.
- Vegetation Popping Correction: Restored the standard grass patch size. This resolves abrupt popping artifacts at chunk boundaries, leaving grass optimization to the highly efficient GPU Instancing system.
- Throttled Minimap & Pin Updates: Skipped map updates when the minimap is closed or inactive. Dynamic pin recalculations are now throttled to run once every 4 frames to lower main-thread overhead.
- Smart Zone Ownership Fix: Rebuilt the server-side zone transfer query to iterate through active characters instead of querying ZDOMan, correcting transfer errors and securing server stability.
v4.0.0 - The Ultimate Graphics, Memory & Physics Update
This is a massive overhaul to the core rendering, physics, and asset pipeline of the mod, bringing several major features and deep performance bugfixes.
New Features & Optimizations
- GPU Instancing & Material Deduplication: Automatically forces Unity's GPU Instancing on highly repetitive world objects like grass, clutter, and rocks. It also merges duplicate material instances under the hood to maximize batching sizes and cut draw calls.
- Asynchronous LOD Generation: Generates simplified LOD1 (50% vertices) and LOD2 (15% vertices) meshes using a customized Quadratic Error Metrics (QEM) decimator. The process runs smoothly in the background to avoid any loading screen freezes.
- On-Disk Persistent Binary Cache: Added a custom disk cache system. Generated LOD meshes and optimized textures are saved locally to speed up subsequent load times. The cache is automatically invalidated when either the mod or the game updates.
- Static Batching per Sector: Scans and combines unique static geometry (dungeon details, ruins, POI, cliffs) per world sector using Unity's native StaticBatchingUtility. Runs on a configurable settle cooldown after spawning to ensure stability.
- Runtime Texture Downscaler & Compressor: Downscales secondary object textures and compresses them to save VRAM. It safely bypasses Unity's write protection by rendering through an off-screen RenderTexture, saving raw bytes to the disk cache.
- Piece Sleep Manager: Puts static building pieces (WearNTear) to sleep after 2 frames of inactivity, freeing up CPU cycles on large, settled bases.
Critical Fixes & Refactoring
- Physics & Tamed Idle Overhaul: Rewrote the TamedIdleOptimizer to actually disable colliders during animal idle mode (saving significant PhysX CPU cycles). Fixed a potential clipping bug by ensuring colliders are restored before making the Rigidbody non-kinematic.
- Fast-Path Decor Optimization: Optimized the DecorOptimizer to use a native fast-path check. It now immediately exits if an object has no Rigidbody, completely bypassing expensive C# array allocations on thousands of static decorations.
- Audio Pooling Bridge Optimization: Optimized the parameter-copying code inside AudioPoolManager. It now only copies expensive 3D properties if the sound is actually spatialized, saving costly C# to C++ (FMOD) native boundary transitions.
- Safe AI Manager Cleanup: Resolved Unity pseudo-null reference issues in AIOptimizerManager during the cleanup of destroyed entities to prevent silent memory leaks.
- Support Cache Cleanups: Added automatic queue clearing on scene unload to prevent null reference errors when switching worlds.
v3.1.0
- Campfire & Smoke Fix: Resolved a conflict where campfires could extinguish under certain configurations.
- Arrow Pooling Fix: Fixed a potential issue with dynamic arrow projectile spawning and networking.
v3.0.0
- Decor Batching: Implemented chunk mesh combining for decorative pieces (Misc category) in a 32x32 grid to reduce draw calls.
- In-Game Settings Menu: Added a built-in configuration UI accessible directly from the Main Menu.
- Network Optimizations: Restructured and safely re-enabled several network
performance tweaks:
- Steam Socket Uncap: Increases P2P data limits (solves lag on huge bases). Safely disables itself if not running on Steam (crossplay friendly).
- Adaptive Throttling: Intelligently drops updates to clients with high ping to prevent choking.
- Smart ZDO Sorting: Prioritizes players, portals, and ships during network sync.
- Smart Zone Ownership: Automatically transfers AI control to the player with the lowest ping in the zone.
v2.7.1
- Smoke Patch Adjustment: Maintenance update for smoke physics.
v2.7.0
- Light Flicker Optimization: Fixes light intensity, stopping per-frame shadow map rebuilds.
- Smoke Physics Optimization: Replaces heavy smoke aerodynamics with a lightweight approximation.
- Engine Quality Settings: Enforces low-level Unity QualitySettings tweaks at startup.
- Skip Intro: Skips the Iron Gate and Coffee Stain logo screens.
- Frame Budget Guard: Prevents physics Death Spiral during heavy load spikes.
v2.6.4
- Maintenance Release: Small bug fixes and code cleanup.
v2.6.3
- Welcome Screen: Added a welcome screen with a clickable Discord link.
v2.6.0
- Refactored Code: Removed old buggy networking; refactored DistanceCuller and AsyncWearInit.
v2.5.1
- Initial Release: First public release of Valheim Performance Overhaul.