Magicraft
You are viewing a potentially older version of this package. View Latest Version
Install with App

Details

Date Uploaded
6 months ago
Downloads
285
Size
14KB

Read before Using

  • This mod might conflict with other mods that would do approximately the same as what i did here, If something is wrong disable a feature from the config that was created.

What this mod offers ?

  • 1: enableLogRemoval

    What it does: It patches Unity’s Debug.Log methods so that any log messages (info, warnings) are simply ignored.

    Why: Logging in performance‑critical code paths can add a lot of CPU overhead. Removing it frees up processing time.

    Effect on the game: No visible change – the game just runs a bit smoother, especially in complex scenes.

  • 2: enableLinqReplacement

    What it does: It replaces certain LINQ queries (like .Select(), .Where(), etc.) with manual loops inside game code.

    Why: LINQ can create garbage (memory allocations) that the garbage collector must clean up later, causing frame spikes. Manual loops are allocation‑free and faster.

    Effect on the game: More stable frame rate, fewer stutters. No change in gameplay or visuals.

  • 3: enableFarAwareDisable (with farDistance)

    What it does: For every enemy unit (UnitBase), it checks the distance to the player. If the distance is greater than farDistance (default 30), the unit’s Update() method is skipped.

    Why: Far‑away enemies don’t need to run their AI or movement logic every frame – that’s wasted CPU. Skipping their updates saves a lot of processing.

    Effect on the game: Enemies outside the radius will freeze in place and stop attacking. They resume when you get closer. It’s a performance boost, but you may notice enemies “waking up” as you approach.

  • 4: disableParticles

    What it does: It stops every particle system from ever running:

      Patches Awake, Start, OnEnable to immediately kill particles.
    
      Blocks Play() and Emit() calls.
    
      Also runs a periodic cleanup every second.
    

    Why: Particle effects are often the most expensive visual feature – they use CPU for simulation and GPU for rendering. Disabling them gives the biggest performance gain.

    Effect on the game: All particle effects disappear – explosions, fire, spells, dust, muzzle flashes, etc. The game becomes visually “flat” but runs much faster, especially on low‑end hardware.

Config

  • Everything is configurable thru BepInEx/config/com.ngeorge.phosphor.cfg

Our Magicraft Modding Community is here.

Credits

  • Magicraft Community, for playing the mod :) well not everyone.. but i hope more people know about this.
  • ChatGPT | DeepSeek | Claude AI, For teaching me how to do all of this.
Thunderstore development is made possible with ads. Please consider making an exception to your adblock.