Jump to content
Sign in to follow this  

Action History

Recommended Posts

Action History



This script stores all of the actions and their corresponding results with the battler so you can easily retrieve them when needed. Actions and results are cleared at the end of the battle.


It serves as a base script for any other scripts that would like to use such functionality.


The script itself does not provide any particular functionality for the end-user and is meant for scripters.


It will be improved as needed.




Will come eventually...




Added a bunch of instance variables that store cumulative data across all repetitions of a single action.




Aside from some bookkeeping, the methods of interest are


last_action - returns the last action performed
last_result - returns the last result from some action performed
get_action(index) - returns the action specified by the index
get_result(index) - returns the result specified by the index
pop_action - removes and returns the last action
pop_result - removes and returns the last action
get_turn_actions(turn) - returns an array of actions that have the particular turn count
get_turn_results(turn) - same as above except returns an array of results
Note that while each action produces a result, there is no guarantee that the last result corresponds to the last action. For example, if everyone hits the same battler, then the rest of the battlers will not have any results.


Also note that the action is the action executed by the user, while the result is the result of the action executed by someone else.


A reference to the action used is stored in Game_ActionResult, so if you need to grab the user you can use that link.




Script: Download here

Edited by Tsukihime

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

Top ArrowTop Arrow Highlighted