About this mod
Tools to help with mod debugging, especially identifying what AI package an NPC is running.
- Requirements
- Permissions and credits
- Changelogs
This mod adds spells that you can use to help debug your mod. Knowing what AI package an NPC is running is sometimes vital when you're trying to figure out why something isn't working the way you expected it to.
I created this after searching for how to determine what package an NPC was running. The best answer I could find was to add scripts to the packages, even to those that don't otherwise need scripts, just to get to this piece of information.
That seemed like a clunky and poor solution to a common problem. I could not find any console command or mod that performed the function that I needed (GetCurrentAIPackage doesn't do what I wanted), so I made it for myself. I have found it invaluable when working on any non-trivial mod.
The spells
All of the spells work by both showing a debug notification (top left of the screen, normally) and by writing info to the Papyrus logs. This mod automatically adds the spells to the player when you load a game, and you can find them under Illusion spells.
- Show Target Package: The spell will show you the form ID of the package that the target NPC is running right now.
- Monitor Target Package (Event): The spell will put the NPC into one of 10 monitoring "slots" and attach a script that will display when the OnPackageStart, OnPackageChange, and OnPackageEnd events occur. The NPC will remain monitored until you clear them out of the monitoring slot with either the Stop Monitoring Target Package spell or the Stop All Package Event Monitors spell.
- Monitor Target Package (Timer): The spell will last 10 minutes or until you stop it with the stop spell, and it will display the form ID of the package that the target NPC is running at a 3 second interval.
- Stop Monitoring Target Package: If you're done with the effects of the Monitor Target Package spells on an NPC, you can end them by casting this spell at a monitored NPC. This spell will end both Timer-based and Event-based monitoring of the target NPC.
- Stop All Package Event Monitors: Clears all of the monitor "slots" for event-based monitoring. Useful if you want to clear out monitoring of NPCs who are no longer within range of a spell.
- Show Player Location: Shows you the name and form ID of the player's current Location (note: their Location, not their Cell).
As an alternative to casting a spell, you can trigger event based monitoring with the following console commands:
startquest PDBHEventMonitor
ssq PDBHEventMonitor
prid <NPC Ref ID> (or click on NPC)
forcerefintoalias monitor1 (or monitor2 through monitor10)
Requirements and Installation
The only requirement is SKSE. Install with a mod manager or by putting PackageDebugHelper.esp and PackageDebugHelper.bsa in your Data folder and activating them. This mod also includes its Papyrus source.