Reader Functions for Features/Effects

● ARCHIVED · READ-ONLY
Started by Mr. Bubble 2 posts View original ↗
  1. Reader Functions for Features/Effects

    Script by Mr. Bubble


    Summary

    This is a scripter’s tool. This means programming knowledge and Ruby knowledge are required to understand and utilize this script. This script does nothing by itself.

    All RPG::BaseItem objects have an array of RPG::BaseItem::Feature objects that contain all Feature properties defined by the developer in the database. Unfortunately, the way Feature objects is coded makes it not immediately understandable by humans. It requires checking the methods in Game_BattlerBase and Game_Battler to decipher what the values in a Feature mean. This makes trying to display a specific object’s Features difficult to accomplish.

    This script is essentially a collection of wrapper functions based off the methods defined in Game_BattlerBase and Game_Battler. This was mostly a copy and paste job and most of the return values are similar to the ones from those original classes.

    For example, if you have a $data_items object, you can do



    Code:
    $data_items[id].hp_recovery
    to directly get that item’s total hp recovery value. There are many other usable methods.

    RPG::UsableItem objects do not have Features, but have a similar inner class called RPG::UsableItem::Effect which have their own reader functions.

    This script was made for my own use, but other scripters can use it if they want.

    Script

    Can be found here: http://wp.me/PxlCT-rC

    Installation

    Paste this script into its own page within the "Materials" section in the script editor of your project.

    How to Use

    This is a scripter’s tool. This means programming knowledge and Ruby knowledge are required to understand and utilize this script. This script does nothing by itself.

    Compatibility

    There are no default method overwrites.

    Requests for compatibility with other scripts are encouraged and welcome.

    Terms and Conditions

    Free for non-commercial use.

    If you wish to use this for commercial games, contact me first.

    Please feel free to post coding and efficiency suggestions, script features suggestions, and bug reports.
  2. Now we just need writer methods =P

    EDIT: lol nvm I just looked at how you did it and actually creating features probably wouldn't be a matter of adding 2 or 3 methods.