This script attempts to provide a standard way to keep track of game-related "records" such as how many encounters you've had throughout the game, how many enemies you've killed, how many times you've escaped from battle, etc.
The idea is to allow developers to quickly add things that they want to keep track of without having to write their own logging system.
- Keep track of various things with simple method calls
- Design your own records scene using standard object access to retrieve data
Game Log is accessed using the script call
For users, you can use script calls to keep track of events.
For example, if you want to keep track of how many chests have been opened, you might add a script call
Which increments the number of chests you've opened by 1.
For developers (scripters), all global records are stored in the Game_Records object accessed via $game_records. Each Battler object also has their own Game_Records object which can be retrieved using @game_records.
All record adding and removing should be done using the methods provided by the Game_Records object. You can add your own methods if you need.
The provided methods so far are
init_record(record, value) - meant for initializing a record add_record(record, value) - for number-related records add_set_record(record, value) - for set-related records add_hash_record(record, key, value) - for hash-type records. Values must be numeric types. add_max_record(record, value) - for "max" type of records get_record(record) - retrieves the value for this record get_max_record(record) - for hashes. Collects all of the values and returns the largest key all_records
You can quickly go through different classes and add some calls if you want to record things. A simple alias with an extra line of code is typically enough to get the job done.
A simple Records window has been provided for each actor and the party in general, which simply goes over each record and displays the value associated with it. The code is written so that you can design your own records window and style it however you wish. All you need is $game_records and all of the information is available to you.
To toggle between actor and party mode, just press the A key (game "X"), or press pageup and pagedown to scroll through actors.
An experimental feature I am implementing is the use of "record details", specified as the 4th element of each Record Table entry. It allows you to display specific information recorded in array or hash records. For example,
I am not sure what is interesting to record.
Also, all of these things can be accomplished using in-game variables.
But rather than using variables, which are specific to the individual project, I think it's better to just store them somewhere else.
Edited by Tsukihime, 22 May 2012 - 04:21 PM.