User: bblizzard
Bug: Crash on access of equipment data during gameplay.
How to Replicate the Bug:
Alternatively the editor functionality could be changed so that it checks all actors' initial equipment when the weapon or armor maximum has been reduced and properly sets the IDs to 0.
It's possible that a similar issue is present with Skill Learnings in the Class tab of the database and reducing the maximum of Skills.
It's also possible that this is present with some other data where the maximum can be changed (e.g. elements or weapon/armor types).
Bug: Crash on access of equipment data during gameplay.
How to Replicate the Bug:
- Give an actor any initial equipment piece except the very first weapon (or armor). As example, let's say we set the weapon with ID 10 as initial equipment.
- Change the maximum number of weapons (or armors) so that the initial equipment doesn't exist anymore. Following the initial example, let'c change the maximum to 9 (or lower).
- In the database the actor's initial equipment will be displayed as "None" (which is correct), but the ID in actors.json will remain 10.
- When running the game in this state and the method Game_Actor.equips is used somewhere, the game can crash (e.g. equipment menu, battle when calculating the paramPlus for actors, etc.). In our example when checking the contents of the result of the equips() call of the affected Game_Actor instance, the weapon will be "undefined" instead of "null" (all the other free equipment slots will have "null").
Alternatively the editor functionality could be changed so that it checks all actors' initial equipment when the weapon or armor maximum has been reduced and properly sets the IDs to 0.
It's possible that a similar issue is present with Skill Learnings in the Class tab of the database and reducing the maximum of Skills.
It's also possible that this is present with some other data where the maximum can be changed (e.g. elements or weapon/armor types).
