Effects Manager

This script is aimed at developers that wish to write and add more effects to the game, but find it too tedious to do so. It is also useful for users that are not as proficient with ruby to write their own effects without having to worry about all the technical stuff behind the scenes.

The script turns a potential 200 line script into one method call and one method definition.

You should place this above all custom scripts.

Download

Script: http://db.tt/td91YZXW

Usage

Description

I spent about 15 minutes planning and writing an Effect Manager for RMVX Ace.
Then I spent another 15 minutes thinking about ways to improve it, and ended up adding in custom effect messages for the battle log and allowing you to pass in an arbitrary number of arguments which will be stored in the RPG::UsableItem::Effect object as an array of strings.

Next, I want to apply this plugin-based design to allow you to write a method that will let you determine how to store the arguments, because you may want to type cast them first rather than type casting them everytime you run the effect.

The script is remarkably simple:

  • It replaces just one method. In Game_Battler, I changed the `item_effect_apply` method to point to a different hash which I dynamically generate using the plugin interface.
  • I provide a single method, Effect_Manager.register_effect, that allows you to quickly register your effect. This involves choosing an effect code, a method name, as well as an idstring for your effect
  • You then just implement the method you reference above, and then you’re done!

I quickly wrote up 3 scripts using these effects based on a couple completed scripts that seemed to be having a couple issues, or at least, were just very long and complex.

Effect: Rare Candy – a simple script based on the same item from the pokemon series
Effect: Gold Pouch – gives you money when you use the item. Or skill.
Effect: Steal Drops – add a “steal” effect to your item/skill to steal enemy drops

The amount of effort required to write the scripts was minimal in time, lines of code, number of aliases or overwrites, and overall complexity. Obviously I am impressed by the work I have done despite not doing a whole lot.

This entry was posted in RMVXA. Bookmark the permalink.

2 Responses to Effects Manager

  1. Virgil says:

    I cannot get my ‘escape’ skill to function properly, I have the tags on my item and dungeon to use it in, and when activated, nothing happens

    • xtsukihime says:

      I have updated the script recently due to a report on the RMVXA forums. There was an incompatibility issue due to me updating the effect manager but not updating the plugin. It should be fine now

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s