Check references
check_referencesDetects broken references in RPG Maker MV projects by flagging event commands, page conditions, and database fields that point to missing records before release.
Instructions
Finds references that point at records which do not exist: a Battle Processing (301) on a missing troop, a shop item (302/605), Change Items/Weapons/Armors (126-128), Learn/Forget Skill (318), Change State (313), Change Party Member (129) and the other actor commands, Common Event calls (117), Transfer Player (201) or Set Vehicle Location (202) to a missing map, page conditions on a missing item or actor, enemy drops and actions, class learnings, actor class and equipment, troop members, item and skill effects, map encounter lists and System startMapId and partyMembers. It uses the same index as find_usages, so it checks exactly the references find_usages lists (staged changeset data included). A record exists when its database file (Items, Weapons, Armors, Skills, States, Actors, Classes, Enemies, Troops, CommonEvents) holds a non-null row whose id field is that id (not its array position, as in find_usages), or MapInfos.json lists the map. Id 0 means 'none' (an empty equipment slot, no drop) and is never reported. Switches and variables are not checked (plain numbers; lint_events reports unnamed ones). Run it before a release and after deleting or renaming records, and use find_usages on one reported id to see every place. Returns {summary, missing: [{kind, id, count, locations, severity: 'error'}], truncated, counts: {distinctMissing, references}, notes}. missing is grouped by kind and id, ordered by kind (item, weapon, armor, skill, state, actor, class, enemy, troop, commonEvent, map) then id; count is the number of references and locations lists at most 3 of them (same format as find_usages). missing is cut at limit groups and truncated is the number cut. A database file that is missing or unreadable is named in notes and its references are NOT reported as missing. notes also state what is not checked: references made by script commands, plugin commands, notetags, plugin parameters, damage formulas, trait codes and variable-designated transfers and battles (with how many such commands the project has), and maps that could not be read.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Most missing records (kind + id groups) returned. |