gachapy.loader
Library of loader functions for loading gachapy objects from json files. These functions can be used to save and load Controller objects to and from json files. This should be used to save and load game state of active gachapy games. Loading and saving objects lower than the Controller (Items, Banners, Players) separately is not supported.
Examples of the structure that gachapy json files should follow can be found in the examples/ directory
These functions operate as the Loader of a gachapy game
Author: Jacob Kerr, 2021
- gachapy.loader.load_controller(filename: str) gachapy.controller.Controller [source]
Creates a Controller object from the specified json files
- filenamestr
the path of the json file
- Controller
the controller loaded from the specified files
- gachapy.loader.save_controller(controller: gachapy.controller.Controller, filename: str) None [source]
Saves the controller in json format into the specified files
- controllerController
the controller to save into files
- filenamestr
the path to the json file
None