
You are viewing a potentially older version of this package. View Latest Version
BaseGameFixes
Fixes various base game errors and NREs you'd encounter late-game.BaseGameFixes
Fixes a collection of base game errors and NullReferenceExceptions via Harmony patches.
Fixes
- Defective Unit - death state no longer throws when its model is already gone (e.g. Void Fields wave ending).
- Void Barnacle - spawn no longer tries to spawn a null muzzle flash effect.
- Dream Demon - projectile no longer throws on destroyed growth renderers.
- RigidbodySoundOnImpact - no longer throws when a collision happens before
Start. - SetStateOnHurt - freeze/stun no longer throws when applied before
Start(duration modifiers are still respected). - DoTargetInfoSearch - When a drone command is aimed at a chest, the loop finds the chest correctly.
- SpecialObjectAttributes.Start - Some prefabs have a missing object in that list. A patch that runs before Start removes dead entries from it.
- beamVfxInstance.transform - Skips the update when the beam effect or the muzzle is gone.
- MinionOwnership - Skips minions that are already destroyed. A destroyed minion has no CharacterMaster to report as lost anyway.
- AddTimedBuffInterval - When anything sets TeamComponent.teamIndex, the component adds itself to the global team list right away, even if the object hasn't woken up. If a mod sets teamIndex on a body prefab, that prefab joins the team list for good. Prefabs never get OnDestroy, so it's never removed. Every BuffWard (Warbanner and the like) then reaches that ghost member on every FixedUpdate and throws. That's where the slowdown comes from: an exception plus a ~40-frame stack trace logged constantly. Each throw also aborts the BuffWard loop, so allies after the ghost entry in the list weren't getting the buff at all.
- ComputePathNodeIndex - Out-of-range indices are now treated as invalid, which the game already handles by returning "unreachable".
- SimpleMuzzleFlash - FireLaserDisc null-checks the wrapper object around the muzzle flash prefab, not the prefab inside it, and that prefab is null. SimpleMuzzleFlash now does nothing when the prefab is null.
- ChipAnimator.OnDestroy - it destroyed chips without checking them. It now skips a null array and chips that are already gone.
- TrialGongInteractionHurtbox - damage-over-time has no hurtbox, which the push-direction code needs. While the method runs, the gong's own main hurtbox stands in, so the hit still counts. The original value is put back afterwards.
- Scene loading (multiplayer) - a scene object destroyed while the scene was spawning stopped the rest of the scene from being spawned for clients. Destroyed objects are now skipped.
- Void Fields spawns - on one cell the monster spawn marker sits right next to the cell, so enemies could spawn inside the bubble. Spawn spots inside the active cell's bubble are now treated as taken, so enemies spawn just outside it instead.
- Void Fields cells - objects running the cell states without a SphereZone no longer throw when they start.
- Wandering Vagrant - Jelly Barrage no longer throws every tick when the Vagrant has no model.
- Wake mission - leaving the cursed book state no longer throws when the scene is unloading.
- Footsteps - bodies with footstep dust enabled but no dust prefab no longer throw when they spawn.
- EnemyDetection - no longer throws when it touches a hurtbox that has no health component or body behind it.
- Interactable locks - if a locked interactable was destroyed, unlocking stopped partway through. Destroyed ones are now skipped.
- Aurelionite's Blessing - takes gold from the attacker, so damage with no attacker (e.g. Shared Suffering) threw. The gold drain is skipped when there's no attacker.
- Director cards - a null spawn card left by a mod broke the whole stage spawn pool. Null cards are now removed.
- Teleporter boss - no longer throws when the stage has no monster cards at all.
- Lynx totem - summoned Lynx no longer throw when the totem's owner has no master.
- Inspect panel - no longer throws when shown from a panel with no event system, or for items with no name/description/lore token (e.g. Starstorm 2's trader and shard panel).
- Animation effects - animation events with no effect assigned no longer log
Unable to SpawnEffect(e.g. in Starstorm 2's Stranger's Hideout). - Artifact achievements - an "obtain artifact" achievement whose artifact is disabled no longer throws when the profile loads (e.g. Expedition).
- Log spam - silences
GenericPool: ReleasePools called on non-empty pool,Particle System is trying to spawn on a mesh with zero surface area, Starstorm 2'sUI/TranslucentImagematerial errors and itsShardPoisonitem index message.
Mod fixes
These only apply when the mod is installed.
- MoonstormSharedUtils - destroying a pickup display no longer throws in MSU's item tier hook.
- Starstorm 2 - the Birthright health bar hook no longer throws on destroyed inventories.
- Starstorm 2 - Mimics still drop their items when their pickup pivot is gone.
- Starstorm 2 - Sticky Overloader no longer throws every frame when it's stuck to a body without hurtboxes.
- Starstorm 2 - the trader no longer throws on an invalid choice or on a trade whose item is disabled.
- ShareSuite - with shared money on, blood shrines threw while any player was dead, and the shared gold was lost. Dead players now count as 0 health.
- SniperClassic - its reload menu hook threw when a UI prompt lost its player, which also cut off the rest of the network message (e.g. finishing a trade with Starstorm 2's ZanZan). It now skips the check when there's no player.
- ZetAspects - a duplicate key error when bodies were destroyed also stopped the game's own body cleanup from running. Both are fixed.