Variable Rates – MV Plugin

      58 Comments on Variable Rates – MV Plugin

Adds the ability to increase/decrease a Game Variable(s) by a specified amount every specified amount of frames.

Each increase/decrease is separated into “Rates”. Each Rate has its own Variables that is affects, its own speed, and its own conditions, each of which are completely customizable.


Look at the code or download the Plugin:


Here is the Help file:

==========================================================================
What does this Plugin do?
==========================================================================
This Plugin allows you to make certain Variables get increased or decreased
by a certain amount every certain of frames in the background of your
game. This is similar to a Parallel Process that adds or subtracts a number
from a Variable.

However! Using this Plugin, you can set certain conditions, enable and
disable rates, and set a Variable to be increased every certain amount
of frames instead of being increased every frame.

==========================================================================
How does this Plugin work?
==========================================================================
Everything is separated into things known as “Rates”.

A Rate contains 3 things:
– the Variables it affects
– the Speed in which the Variables are increased by
– the JavaScript condition to determine when the Rate is active

When a Rate is activated, it will begin to increase (or decrease) the
specified Variables stored within it at the determined Speed in the
background of the game, similar to a Parallel Process.

==========================================================================
When are Rates active?
==========================================================================
There are three conditions a Rate must meet in order to run:
– the Rate must be enabled (activated)
– the Rate’s JavaScript condition must be true
– this Plugin’s Global condition must be true

We’ll get into conditions and enabling (activating) later.

Besides all of this, Rates will only be active when the Player is on the
Map, or in a Battle.

If the Player is on the Title Screen, in their Menu, selecting a move
in the Battle, or on the Game Over Screen, Rates will not be running.

==========================================================================
Rate ## Variables
==========================================================================
These Parameters allow you to set the Variables that will be affected
by the Rate.

You may simply put one Variable ID, or you may put in multiple.
If you put in multiple, separate them with commas.

Here are some examples:

3

1, 2, 6

3, 8, 5, 9, 10, 34

==========================================================================
Rate ## Speed
==========================================================================
These Parameters allow you to set the Speed in which the Variables
are increased.

You must input both the amount that the Variables are increased/decreased
by, and how often this occurs using this formula:

x per y frames

x = amount that is added to the Variables
y = the frequency of frames in which this occurs

For example, “1 per 60 frames” would increase the Variables by 1
every 60 frames (1 second).

Here are some more examples:

2 per 120 frames

-5 per 10 frames

10 per 500 frames

1 per 3600 frames

You may also use JavaScript to substitute for the numbers:

Math.pow(3, 2) per 60 frames

Math.randomInt(10) per 120 frames

100 per $gameVariables.value(2) frames

==========================================================================
Rate ## Condition
==========================================================================
Even when a Rate is activated, it will still need to have its Condition
be true.

These Conditions use JavaScript, but a couple variables have been created
in order to make your life easier:

v – Game Variables
s – Game Switches
actor – Game Actors
member – Party Members

Those variables are all arrays, so you use [square brackets] to reference
a certain value from them.

For example:

v[1] == 10
If this was the Condition of Rate 1, then Rate 1 will only be active when
Variable ID 1 is equal to 10.

s[1] == true
If this was the Condition of Rate 1, then Rate 1 will only be active when
Switch ID 1 is ON.

actor[1].level > 50
If this was the Condition of Rate 1, then Rate 1 will only be active when
Actor ID 1’s level is greater than 50.

member[0].hp < 100
If this was the Condition of Rate 1, then Rate 1 will only be active when
the Actor in the first slot of the Party has HP that is less than 100.

member[1].hasWeapon($dataWeapons[5])
If this was the Condition of Rate 1, then Rate 1 will only be active when
the Actor in the second slot of the Party has Weapon ID 5 equipped.

member[member.length – 1].isStateAdded(3)
If this was the Condition of Rate 1, then Rate 1 will only be active when
the Actor in the last slot of the Party has State 3 inflicted.
(If there is only 1 member, this will refer to that member.
If there are 2 members, this will refer to the second one, etc…)

Besides all of that, other JavaScript conditions can be used.
Here are some random examples:

$gamePlayer.isDashing()
Will only be active when the Player is dashing/running.

$gamePlayer.canMove()
Will only be active when the Player can move.

$gameMap.isEventRunning() == false
Will only be active when there are no autorun events occuring.

$gameMessage.isBusy() == false
Will only be active when there are no “Show Message” type events running.

$gamePlayer.isInVehicle()
Will only be active when the Player is in a Vehicle

==========================================================================
Rate ## Enabled?
==========================================================================
Setting this to “true” will just activate the Rate straight from the
beginning of the game.

You may want to do this if you wish the Rate to be active at the start
of the game, or if you wish to purely use conditions in order to control
the Rate.

If you set this to “false”, then you’ll need to use Plugin Commands to
manually activate (enable) the Rate.

Plugin Commands:

– VariableRate # Enable
Enables Rate #
Example: VariableRate 1 Enable
(Enables Rate 1)

– VariableRate # Disable
Disables Rate #
Example: VariableRate 5 Disable
(Disables Rate 5)

– VariableRate # Toggle
Changes the current state of Rate # to the opposite of its current state.
Example: VariableRate 2 Toggle
(If Rate 2 is disabled, it will be enabled;
If Rate 2 is enabled, it will be disabled.)

58 thoughts on “Variable Rates – MV Plugin

  1. Artur

    hi there =),
    Can I use this to make the system count specific actions in Battel and then add a number into a Varaible?
    I need couter that adds a number into a variable like this, for example:
    If actor 1 attacks it ads +1 to Variable (0001)
    If actor 1 hits it ads +1 to Varaible(0002)
    If actor 1 misses it ads +1 to Varaible(0003)
    If actor 1 gets hit by enemy it ads +1 to Varaible(0004)
    If actor 1 losses HP it ads +1 to Varaible(0005)
    If actor 1 takes action in Battle it ads +1 to Varaible(0006)
    If actor 1 is using a magic skill t ads +1 to Varaible(0007)
    If actor 1 is using a fire magic skill t ads +1 to Varaible(0008)
    If actor 1 is using a water magic skill t ads +1 to Varaible(0009)
    … and so on
    I am about to make a leveling system based on in battle statistics for this and a need a script that couts tins in battle actions and ands them in to Variables

    Reply
  2. mia pron khalifa

    LFTGJh Wow, awesome blog structure! How long have you ever been blogging for? you make blogging glance easy. The whole look of your web site is fantastic, as well as the content material!

    Reply
  3. Angel Cerda

    Interesting website, i read it but i still have a few questions. shoot me an email and we will talk more becasue i may have an interesting idea for you.

    Reply
  4. Piper

    Wow, wonderful blog layout! How long have you been blogging for? you make blogging look easy. The overall look of your site is great, as well as the content!

    Reply
  5. Singapore Tattoo

    What as Happening i am new to this, I stumbled upon this I have found It absolutely helpful and it has aided me out loads. I hope to contribute & assist other users like its helped me. Good job.

    Reply
  6. Winapay review

    This particular blog is really entertaining additionally informative. I have picked up a lot of interesting things out of this amazing blog. I ad love to come back again and again. Thanks a lot!

    Reply
  7. Micah

    We all talk a little about what you should speak about when is shows correspondence to because Perhaps this has more than one meaning.

    Reply
  8. Shantel

    Im no expert, but I think you just crafted a very good point point. You definitely understand what youre talking about, and I can truly get behind that. Thanks for being so upfront and so truthful.

    Reply
  9. oguz

    Very nice info and right to the point. I am not sure if this is really the best place to ask but do you people have any thoughts on where to hire some professional writers? Thanks

    Reply
  10. porn movie

    This article gives the light in which we can observe the reality. This is very nice one and gives in-depth information. Thanks for this nice article.

    Reply
  11. gameonline

    Maintain аАа’аАТ‚аЂТ˜em coming you all do such a great career at this kind of Concepts can at tell you how considerably I, for one appreciate all you do!

    Reply
  12. Jacinda

    You made some really good points there. I checked on the internet for additional information about the issue and found most individuals will go along with your views on this website.

    Reply
  13. Cathey

    I?аАТ’аЂа†ll immediately seize your rss as I can at in finding your e-mail subscription link or e-newsletter service. Do you ave any? Kindly allow me understand in order that I may subscribe. Thanks.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *