NPC Map Locations - No More Lag - Performance Patch v1.1
NPC Map Locations Performance Patch – No More Lag
This performance patch is designed for NPC Map Locations when used together with large expansion mods that add 100+ NPCs. In such setups, constant background tracking can create CPU load, causing lag and stuttering. This mod removes that overhead while keeping the feature usable when needed.
It is intended for players who want better performance and do not rely on real-time mini-map NPC tracking.
Safe to install or remove at any time. Removing the mod only disables its functionality.
What This Mod Does
This patch stops NPC Map Locations from continuously updating NPC positions when the map is closed, significantly reducing CPU usage.
This patch changes the behavior:
– NPC tracking is disabled when the map is closed
– NPC tracking is active only when the map tab is open
– CPU usage is reduced by approximately 90–95% during normal gameplay
How It Works
The mod uses Harmony to modify NPC Map Locations update methods.
– Map closed: NPC position tracking is disabled, CPU usage is minimized
– Map open: NPC tracking is enabled and positions update normally
– Tab switching: automatically detects when the player opens or closes the map (Tab or E key)
Performance Impact
The improvement scales with the number of NPCs. The more expansion mods installed, the greater the performance gain.
What you need
– NPC Map Locations by Bouhm (required) – SMAPI 3.0.0 or later
Putting it in place
– Get SMAPI and NPC Map Locations set up.
– Download this mod.
– Put the files in the Stardew Valley/Mods folder.
– Start the game through SMAPI.
Expected log message:
[Performance Patch - NPC Map Locations] Performance Patch for NPC Map Locations loaded successfully!
[Performance Patch - NPC Map Locations] Successfully patched X update method(s).
Known Limitations
Mini-map compatibility
Real-time mini-map tracking does not work with this mod.
NPC positions on mini-maps will not update while the main map is closed.
Workaround:
– Open the full map (Tab/E)
– Switch to the Map tab
– Close the map again to refresh positions
If real-time mini-map tracking is required, this mod should not be used.
Compatibility
– Compatible with all map texture replacement mods
– Compatible with NPC expansion mods (SVE, Ridgeside Village, East Scarp, etc.)
– Compatible with UI mods that do not display real-time NPC tracking
– Compatible with multiplayer, each player must install it locally
FAQ
Q: Will this break NPC Map Locations?
A: No. When the map is open, the original behavior remains unchanged. Only background tracking is disabled.
Q: Is it suitable for large NPC expansion setups?
A: Yes. It is designed specifically for those cases and gives the highest performance benefit there.
Q: What happens to mini-map tracking?
A: It shows outdated positions until the full map is opened again.
Q: Does it work in multiplayer?
A: Yes. Each player installs it individually. It affects only local performance.
Q: Why do NPC positions seem delayed?
A: Positions update immediately when the map is opened.
Troubleshooting
Error: NPC Map Locations not found
– Ensure NPC Map Locations is installed and enabled before this patch
No performance improvement
– Check SMAPI console for successful patch messages
– If no methods are patched, update compatibility may be broken
Incorrect NPC positions
– This is expected after long map inactivity
– Positions refresh within one second after opening the map