Dear plugin creators / javascript aficionados,
Whats the consensus of using $gameSystem to store data for plugins in RPG maker MV/MZ?
I am developing an item upgrade system for MZ and one of the challenges I have to tackle is creating independent items. Game_Item doesn't store any unique data (it only references $dataItems / $dataWeapons etc.) so I have created a map that is saved in $gameSystem that stores a reference to the item as well as assigning the item a unique id. I can now access unique items in the game by calling $gameSystem._uniqueItems (returns a map). As I expand the system to include tracking upgrades for items, all of this data will be saved in $gameSystem.
$gameSystem seems like a noob friendly place to store data; not to mention its globally accessible. I see more advanced plugin makers such as Yanfly make their own class and then hook into the save/load methods to save their data. And then plugins such as SRPG Gear MZ using $gameSystem extensively despite being a fairly complex plugin ecosystem. But is there really any harm in using $gameSystem to store data?
Whats the consensus of using $gameSystem to store data for plugins in RPG maker MV/MZ?
I am developing an item upgrade system for MZ and one of the challenges I have to tackle is creating independent items. Game_Item doesn't store any unique data (it only references $dataItems / $dataWeapons etc.) so I have created a map that is saved in $gameSystem that stores a reference to the item as well as assigning the item a unique id. I can now access unique items in the game by calling $gameSystem._uniqueItems (returns a map). As I expand the system to include tracking upgrades for items, all of this data will be saved in $gameSystem.
$gameSystem seems like a noob friendly place to store data; not to mention its globally accessible. I see more advanced plugin makers such as Yanfly make their own class and then hook into the save/load methods to save their data. And then plugins such as SRPG Gear MZ using $gameSystem extensively despite being a fairly complex plugin ecosystem. But is there really any harm in using $gameSystem to store data?