Player Data
How to customise items held by user, user stats etc
- all player data is stored in the game save file, a serialized
Playerinstance - therefore, by editing it after saving and before loading, you can customise the player's stats, items, and keys
player stats
- the player has 3 stats: health, attack, and defense
- these are all integers
- to edit, change the
health,attack, anddefensefields in thePlayerstruct (at top level of the json file)
items
- items are stored in the
items_heldfield of thePlayerstruct - to add an item, add a new item to the
items_heldarray - to remove an item, remove the item from the
items_heldarray
keys
- keys are stored in the
keys_heldfield of thePlayerstruct - these can be added and removed in the same way as items
battles
- battles are stored in the
battlesfield of thePlayerstruct - this is an array of
Battlestructs - to add a battle, add a new battle to the
battlesarray - to remove a battle, remove the battle from the
battlesarray
current room
- the current room is stored in the
current_roomfield of thePlayerstruct - this is a
Roomstruct
game name
- the game name is stored in the
game_namefield of thePlayerstruct - exactly why you would want to change this is beyond me, but you can, I guess