Find usages
find_usagesLists every read, write, and use of a switch, variable, item, map, or database record and flags dead ends before renaming, deleting, or reusing an ID.
Instructions
Lists everywhere one switch, variable, item, weapon, armor, skill, state, actor, class, enemy, troop, common event or map is read, written or used, and warns about dead ends. Use it before renaming, deleting or reusing an id. reads: page conditions, Conditional Branch (111), variable operands and \V[n] text escapes; writes: Control Switches/Variables (121/122), Change Items/Weapons/Armors (126-128), Change Party Member (129), Change State/Skill (313/318), set-switch route steps; uses: Transfer Player (201), Common Event (117), Battle Processing (301), shops (302/605), actor commands, enemy drops and actions, class learnings, actor equipment, troop members, item/skill effects, map encounter lists, System startMapId and partyMembers. It reads staged changeset data. Each location is a string: 'Map003 event 5 page 1 command index 12', 'CommonEvent 4 command index 7', 'Troop 2 page 1 command index 3', 'Enemies #4 dropItems', 'System startMapId', 'Map003 encounterList'. Map ids, event ids, common event ids and troop ids are the real ids and pages are 1-based like the editor shows them, but 'command index N' is the 0-based position in the command list (the index lint_events reports). A location without a command index is a page condition. counts are the true totals; each list is cut at limit entries and truncated gives the omitted counts. warnings cover: a switch or variable that is read but never set, or set but never read; a common event never called (autorun and parallel common events are exempt); a map nothing transfers to; and an id with no name or record (unknown id, not an error). Script commands (355), plugin commands (356), variable-designated transfers and battles, notetags and plugin parameters are not understood, so every 'never ...' warning carries a note when the project has script or plugin commands (or truncated range commands) that could act on the id. Only the 121/122 ids up to 1000 per command are indexed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Id of the switch, variable, database record, common event or map. | |
| kind | Yes | What to look up. | |
| limit | No | Most locations listed per role (reads, writes, uses). |