Linked Stats (e.g.: MHP based on DEF), v. 1.1.1

Zevia

Veteran
Veteran
Joined
Aug 4, 2012
Messages
640
Reaction score
353
First Language
English
Primarily Uses
RMMV
Created from this thread.

Version 1.1.1: Github Link

Description
This plugin allows a user to add bonuses to one of the primary 8 stats (mhp, mmp, atk, def, mat, mdf, agi, luk) based on a percentage of the other stats. This bonus can be applied based either on a class basis, for Actors, or on an enemy basis. As an example, a Hero class could have its MHP increased by 50% of its DEF, or a Bat could have its ATK increased by 30% of its AGI and 40% of its LUK. Equipping new items or adding states that change these values would adjust the stats, accordingly.

Installation
Either right click the Github link above and save as "LinkedStats.js", or create a new text file called "LinkedStats.js" and copy-paste the text from the link into it.
Move the file into your project's js/plugins folder.

Instructions
Under either an enemy's note box or a class's note box, add a note tag with the format:
Code:
<link stat: x secondStat>
where stat is the stat you want to adjust, secondStat is the stat you want to base the adjustment on, and x is the percentage of the secondStat you want to adjust by.

For example, if you want an enemy's MHP to be increased by 35% of their DEF, put:

Code:
<link mhp: 35 def>
If you'd like a class's ATK to be increased by 22% of the class's AGI and 45% of the class's LUK, put:

Code:
<link atk: 22 agi, 45 luk>
Editable Parameters
You can edit the minimum value for any of the 8 primary stats. By default, the RPG Maker MV Engine assigns a default minimum of 0 for MMP and 1 for the other 7. However, if you'd like a class's stat to be based solely on a combination of other stats, you can adjust the minimums. For example, if you'd like a class's MHP to be solely based on the class's DEF plus LUK, then you can set the minimum HP parameter to 0 and in the class's note box, put:

Code:
<link mhp: 100 def, 100 luk>
If you'd like a class to be potentially killed by having their DEF and LUK reduced to 0, then additionally set the minimum DEF and minimum LUK parameter to 0.

Screenshots
Hero class has MHP of 200, ATK of 16, DEF of 100, LUK of 32. Adding a couple notetags to increase mhp and atk:


With MHP increases by 40% of DEF and ATK increased by 50% of LUK, the Hero class now has 240 MHP and 32 ATK:


Equipping a shield that raises DEF by 10...


Also increases MHP by 4!

Terms of Use
This Plugin is available for commercial and non-commercial use, as long as credit is given to the author listed in the @ author section of the Plugin. Credit must be listed in-game, as well as in any additional credits documentation provided with the game.
This Plugin may be modified in any way by any author, most notably for compatibility fixes with specific projects or other Plugins, as long as credit is provided to the original author and to whichever author made said modifications, according to the above-stated rules.

EDIT: Fixed an issue with linking multiple stats to a stat. Now you comma-separate values instead of trying to link the same stat multiple times.

EDIT: Added a polyfill for older versions of RMMV that don't support Array.prototype.find.
 
Last edited:

Spoofuss

Just, sort of here.
Veteran
Joined
Mar 15, 2018
Messages
32
Reaction score
6
First Language
English
Primarily Uses
RMXP
Quick question on this.
Is it possible to have a version based on a set amount instead of a percentage?
i.e say for every point in def, MHP increase by 3, same would work for MATK for MMP.

Also is this a plug and play or do you need a certain engine?
 
Last edited:

Zevia

Veteran
Veteran
Joined
Aug 4, 2012
Messages
640
Reaction score
353
First Language
English
Primarily Uses
RMMV
I'm not planning to add support for flat values at the moment, but you can achieve the same effect with something like:
Code:
<link mhp: 300 def>
That will make MHP increase by 3 for every point in DEF.

This is a standalone Plugin, so no other Plugins are necessary for it to work. There's no configuration you need to do, unless you want to change the minimum values of certain params from the default - except, of course, adding notetags to classes or enemies.
 

Spoofuss

Just, sort of here.
Veteran
Joined
Mar 15, 2018
Messages
32
Reaction score
6
First Language
English
Primarily Uses
RMXP
Ah okay, still looking at some RMMV stuff I am thinking of transferring my project over and something like this plays a key part in my project
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,868
Messages
1,017,066
Members
137,576
Latest member
SadaSoda
Top