Huge Performance Overhaul for Dynamic NPC Routines
Hi everyone,
This update brings a major boost to efficiency and responsiveness. The Dynamic NPC Routines plugin now supports larger, busier maps while using a fraction of the processing power. Here’s what’s new:
Distance-Based Updates
NPCs farther than 20 tiles from the player now update less frequently. This improves performance by focusing logic on the characters the player can actually see or interact with.
Performance gain: 40–60% fewer update calls for off-screen NPCs.
Configurable Update Frequency
You can now control how often NPCs run their routine logic. By default, routines update every 60 frames (1 second), but this can be adjusted in the plugin settings.
Performance gain: 50–70% reduction in update frequency when using slower update intervals.
Smart Update Timing
NPCs now recalculate their destinations only when the in-game hour changes. This removes unnecessary processing and keeps logic aligned with actual schedule shifts.
Performance gain: Around 90% fewer destination calculations.
Reduced Distance Checks
Instead of calculating the distance to the player every frame, NPCs now check once per second. This change dramatically reduces one of the more expensive operations in routine processing.
Performance gain: Approximately 95% fewer distance checks.
Blocked Movement Handling
When NPCs encounter an obstacle, they now wait 30 to 90 frames before attempting to move again. This avoids constant failed pathfinding loops and helps free up processing time.
Performance gain: 80–90% fewer pathfinding attempts during blockage situations.
Early Exit Conditions
NPC updates are automatically paused during dialogue and scene transitions. When the player is in a menu or cutscene, NPCs stop trying to move or calculate paths.
Performance gain: 100% reduction in routine updates during these moments.
Before vs After
System Behavior | Previous Version | Updated Version |
---|---|---|
Routine updates | 60 times per second | 1–2 times per second (configurable) |
Distance calculations | Every frame | Once per second |
Destination recalculations | Every frame | On hour change only |
Blocked movement retries | Constant | Delayed with cooldown timer |
Conversation handling | Continued updates | Fully paused |
Total Performance Impact
Estimated 70–85% reduction in CPU usage related to NPC routine logic.
In real gameplay terms:
-
10 NPCs now process ~10–20 updates per second instead of ~600
-
20 NPCs now process ~20–40 updates per second instead of ~1200
-
Smooth framerates hold steady even with complex schedules across multiple characters
These improvements maintain identical visible behavior for players while drastically reducing behind-the-scenes load. Games that rely on detailed NPC movements, especially with large cast sizes, will see immediate benefits.
Please let me know what improvements or features you'd like to see next!
Get Dynamic NPC Routines for RPG Maker MZ
Dynamic NPC Routines for RPG Maker MZ
Daily behavior system for NPCs
Status | Released |
Category | Tool |
Author | BitQuest Studio |
Tags | RPG Maker, RPG Maker MZ |
Leave a comment
Log in with itch.io to leave a comment.