
Hakuen Studio Dynamic Parameters for RPG Maker MZ
A downloadable RPG Maker Plugin
Introduction
If the actor has state id X he gains a +10 attack boost! Easy?
But if the actor has class id X and is equipped with weapon Id X and also has state id X, then he will have a +50 ATK boost! Not too complicated?
If an actor has a state id X, and his level is below 4, equipping a sword, using a class id X, and his name is Harold, then he will have an HP boost of 1000!!! Got it?!
This plugin lets you implement dynamic parameter values to battlers(actors or enemies) through the Actors, Classes, Enemies, Weapons, Armors, and States note tags!
Features
- Dynamically add values to battler parameters through note tags: Supports Actors, Classes, Enemies, Weapons, Armors, and States.
- Supports normal parameters, X Parameters, S Parameters, and Custom Parameters.
- Lets you create reusable templates with plugin parameters and apply them through note tags.
- Use simple note tags to change specific parameters only instead of using the template.
- Accepts either parameter IDs or parameter short names in block note tags.
- Includes new methods for reading regular parameter values without the values added by this plugin.
- Parameters can be based on another parameter value
- Works with EliMZ_CustomParameters, EliMZ_EnemyClass, and EliMZ_CapParameterControl!
How to use
Dynamic Parameters are additive. The formula returns an extra value, and that value is added to the battler parameter.
For example, if a DynParam formula for ATK returns 10, the battler receives +10 ATK. If the formula returns -10, the battler loses 10 ATK.
For X Parameters and S Parameters, you normally work with decimal rate values. For example, 0.05 means +5 percentage points, and 0.25 means +25 percentage points.
Two Ways to Use the Plugin
- Create a template in the plugin parameters, then apply that template in the Note box.
- Write a formula directly in the Note box using a multiline block note tag.
Both methods can be used on the same database entry. When that happens, the template is applied first. Then the block note tags written directly in the Note box are applied on top of it.
This lets you create a large reusable template, then override only one or more parameters on a specific Actor, Class, Enemy, Weapon, Armor, or State.
Using Templates - Plugin Parameter
In the plugin parameters, use Dynamic Notes Templates to create reusable formula presets. Each template has a Name. That name is later used in a note tag.
Inside a template, you can configure these groups:
- Parameters → normal parameters such as mhp, mmp, atk, and def.
- X Parameters → extra parameters such as hit, eva, and cri.
- S Parameters → special parameters such as tgr, grd, and rec.
- Custom Parameters → parameters created by EliMZ_CustomParameters.
After creating a template, use this note tag in the Note box:
- <DynParams: TemplateName>
Replace TemplateName with the exact template name configured in the plugin parameters. Template names are case-sensitive. WarriorBuff, warriorbuff, and WARRIORBUFF are different names.
Example: if you created a template named WarriorBuff and configured ATK to return 10, write this in the Note box of an Actor, Class, Enemy, Weapon, Armor, or State:
- <DynParams: WarriorBuff>
Block Note Tags
For smaller changes, you do not need to create a full template. You can write the formula directly in the Note box by using multiline block note tags.
- Normal parameter
<DynParam atk> return 10 </DynParam>
- X Parameter
<DynXParam cri> return 0.05 </DynXParam>
- S Parameter
<DynSParam rec> return 0.25 </DynSParam>
- Custom Parameter (You can use either the parameter short name or the parameter ID:)
<DynCParam per> return 3 </DynCParam>
<DynParam 2> return 10 </DynParam>
Block Tags Overriding Templates
If the same database entry has a template and also has dynamic blocks, the template is applied first. Then the dynamic blocks are applied.
<DynParams: WarriorBuff> <DynParam atk> return 20 </DynParam>
In this example, the WarriorBuff template is applied first. Then the ATK formula from the block replaces the ATK formula from the template for that database entry.
This is useful when you want to reuse a large template but change only one parameter on one specific database entry.
JavaScript Formulas
Every dynamic value is JavaScript code. Even fixed numbers must use return.
Correct:
return 10
Incorrect:
10
The formula is executed in the context of the battler receiving the value. Inside the formula, this is that battler.
Always return a number. If a condition should not give a bonus, return 0.
Some useful formulas
Script Calls - Raw Methods
Use raw methods when a formula needs to read a regular parameter value without including the dynamic values added by this plugin. This is especially useful when one dynamic formula is based on another parameter value.
Normal parameter raw methods
- rawParamBase(nameOrId) → returns only the regular paramBase value.
- rawParamPlus(nameOrId) → returns the regular paramPlus value without Dynamic Parameters additions.
- rawParam(nameOrId) → returns the final regular parameter value without Dynamic Parameters additions.
- this.rawParamBase("atk")
- this.rawParamBase(2)
- this.rawParamPlus("atk")
- this.rawParamPlus(2)
- this.rawParam("atk")
- this.rawParam(2)
X Parameter and S Parameter raw methods
- rawXParam(nameOrId) → returns the regular X Parameter value without Dynamic Parameters additions.
- rawSParam(nameOrId) → returns the regular S Parameter value without Dynamic Parameters additions.
- this.rawXParam("cri")
- this.rawXParam(2)
- this.rawSParam("rec")
- this.rawSParam(2)
Custom Parameter raw methods
When EliMZ_CustomParameters is installed, Custom Parameters also have raw methods:
- rawCParamBase(nameOrId) → returns only the regular custom parameter base value.
- rawCParamPlus(nameOrId) → returns the regular custom parameter plus value without Dynamic Parameters additions.
- rawCParam(nameOrId) → returns the final regular custom parameter value without Dynamic Parameters additions.
- this.rawCParamBase("crm")
- this.rawCParamBase(1)
- this.rawCParamPlus("crm")
- this.rawCParamPlus(1)
- this.rawCParam("crm")
- this.rawCParam(1)
Example using raw methods
If ATK has this formula:
- return this.rawParam("def") + this.rawParam("mhp")
The plugin adds the regular DEF value and the regular MHP value to ATK.
If you want the final ATK value to be exactly regular DEF + regular MHP, subtract the regular ATK value first:
- return this.rawParam("def") + this.rawParam("mhp") - this.rawParam("atk")
For X Parameters and S Parameters, use the same idea:
- return this.rawXParam("cri") * 0.5
- return this.rawSParam("rec") * 0.25
Remember that Dynamic Parameters are additive. If you only want to add +5 percentage points to Critical Rate, return 0.05 instead of reading the current value.
Some useful formulas
Actor bonus - That actor gains extra Max HP based on their level.
<DynParam mhp> return this.level * 20 </DynParam>
Class bonus - Actors using that class gain extra Max MP only after level 10.
<DynParam mmp> return this.level >= 10 ? 50 : 0 </DynParam>
Actor bonus - That actor gains extra Luck when switch 12 is ON.
<DynParam luk> return $gameSwitches.value(12) ? 15 : 0 </DynParam>
Actor bonus - That actor gains extra Defense based on game variable 5.
<DynParam def> return $gameVariables.value(5) </DynParam>
Actor bonus - That actor gains extra Magic Attack only when HP is below 50%.
<DynParam mat> return this.hpRate() < 0.5 ? 25 : 0 </DynParam>
Actor bonus - That actor gains extra Agility when MP is full.
<DynParam agi> return this.mpRate() >= 1 ? 20 : 0 </DynParam>
Actor bonus - That actor gains extra Attack when using class ID 3.
<DynParam atk>
if(this.isActor() && this.currentClass().id === 3){
return 30
}else{
return 0
}
</DynParam>
Actor bonus - That actor gains extra Max HP when actor ID is 1.
<DynParam mhp> return this.isActor() && this.actorId() === 1 ? 100 : 0 </DynParam>
Enemy bonus - That enemy gains extra Defense based on its current HP rate.
<DynParam def> return Math.floor((1 - this.hpRate()) * 50) </DynParam>
Enemy bonus - That enemy gains extra Critical Rate when the party has more than 3 members.
<DynXParam cri> return $gameParty.members().length > 3 ? 0.10 : 0 </DynXParam>
Weapon bonus - The weapon gives extra Attack only to actors using class ID 1.
<DynParam atk>
if(this.isActor() && this.currentClass().id === 1){
return 10
}else{
return 0
}
</DynParam>
Weapon bonus - The weapon gives extra Critical Rate when the user is level 15 or higher.
<DynXParam cri> return this.isActor() && this.level >= 15 ? 0.05 : 0 </DynXParam>
Weapon bonus - The weapon gives extra Hit Rate when variable 8 is at least 10.
<DynXParam hit> return $gameVariables.value(8) >= 10 ? 0.10 : 0 </DynXParam>
Weapon bonus - The weapon gives extra Attack equal to 20% of the user's regular Defense.
<DynParam atk>
return Math.floor(this.rawParam("def") * 0.20)
</DynParam>
Weapon bonus - The weapon gives extra Attack when the actor has state ID 5.
<DynParam atk> return this.isStateAffected(5) ? 25 : 0 </DynParam>
Armor bonus - The armor gives extra Max HP based on the user's regular Defense.
<DynParam mhp>
return this.rawParam("def") * 5
</DynParam>
Armor bonus - The armor gives extra Recovery Effect Rate when the user's HP is below 25%.
<DynSParam rec> return this.hpRate() < 0.25 ? 0.30 : 0 </DynSParam>
Armor bonus - The armor gives extra Physical Damage Rate resistance when switch 30 is ON.
<DynSParam pdr> return $gameSwitches.value(30) ? -0.10 : 0 </DynSParam>
Armor bonus - The armor gives extra Magic Evasion Rate when the user has at least 50 MP.
<DynXParam mev> return this.mp >= 50 ? 0.08 : 0 </DynXParam>
State bonus - The state gives extra Attack while active.
<DynParam atk> return 20 </DynParam>
State bonus - The state reduces Agility while active.
<DynParam agi> return -15 </DynParam>
State bonus - The state gives extra Max HP based on the user's missing HP percentage.
<DynParam mhp> return Math.floor((1 - this.hpRate()) * 200) </DynParam>
State bonus - The state gives extra Attack equal to 10% of the user's regular Max HP.
<DynParam atk>
return Math.floor(this.rawParam("mhp") * 0.10)
</DynParam>
State bonus - The state gives extra Critical Rate based on the user's regular Critical Rate.
<DynXParam cri>
return this.rawXParam("cri") * 0.50
</DynXParam>
State bonus - The state gives extra Recovery Effect Rate based on the user's regular Recovery Effect Rate.
<DynSParam rec>
return this.rawSParam("rec") * 0.25
</DynSParam>
Equipment set bonus - The item gives extra Attack only when the actor has four equips with the MithrilSet meta tag.
<DynParam atk>
if(!this.isActor()){
return 0
}else{
const bonusTag = "MithrilSet"
const bonusEquips = this.equips().filter(equip => equip?.meta.hasOwnProperty(bonusTag))
const numberOfEquips = 4
return bonusEquips.length === numberOfEquips ? 25 : 0
}
</DynParam>
Equipment set bonus - The item gives extra Critical Rate only when the actor has two equips with the AssassinSet meta tag.
<DynXParam cri>
if(!this.isActor()){
return 0
}else{
const bonusTag = "AssassinSet"
const bonusEquips = this.equips().filter(equip => equip?.meta.hasOwnProperty(bonusTag))
return bonusEquips.length >= 2 ? 0.15 : 0
}
</DynXParam>
Variable scaling bonus - The object gives extra Magic Attack based on variable 14.
<DynParam mat> return $gameVariables.value(14) * 3 </DynParam>
Gold condition bonus - The object gives extra Luck when the party has at least 10000 gold.
<DynParam luk> return $gameParty.gold() >= 10000 ? 25 : 0 </DynParam>
Party condition bonus - The object gives extra Target Rate when actor ID 2 is in the party.
<DynSParam tgr> return $gameParty.members().some(member => member.actorId && member.actorId() === 2) ? 0.25 : 0 </DynSParam>
Battle condition bonus - The object gives extra Evasion Rate during battle only.
<DynXParam eva> return $gameParty.inBattle() ? 0.08 : 0 </DynXParam>
Custom parameter bonus - The object gives extra PER based on the user's regular Attack. Requires EliMZ_CustomParameters.
<DynCParam per>
return Math.floor(this.rawParam("atk") * 0.10)
</DynCParam>
Level milestone bonus - The object gives extra Attack at level 10, 20, and 30.
<DynParam atk>
if(!this.isActor()){
return 0
}
if(this.level >= 30){
return 60
}else if(this.level >= 20){
return 35
}else if(this.level >= 10){
return 15
}
return 0
</DynParam>
State synergy bonus - The object gives extra Magic Attack when the user has both state ID 4 and state ID 7.
<DynParam mat> return this.isStateAffected(4) && this.isStateAffected(7) ? 45 : 0 </DynParam>
Class and switch bonus - The object gives extra Defense only to actors in class ID 2 while switch 9 is ON.
<DynParam def>
if(this.isActor() && this.currentClass().id === 2 && $gameSwitches.value(9)){
return 30
}
return 0
</DynParam>
Circular Dependencies
This is a crash that can happen if for example you do that for ATK:
- return this.rawParam("def") + this.rawParam("mhp")
And do that for DEF:
- return this.rawParam("atk") + this.rawParam("mhp")
This will likely cause a maximum stack size error. You can make a parameter value be based on another one(ATK based on DEF). But then, you cannot also make DEF based on ATK. They will reference each other and end up in a loop.
Try to also avoid using the default maker formulas for that. Stick with the raw script call formulas if you want a parameter based on another.
Parameter Reference
You can use either short names or IDs in block note tags. Template fields are already separated in the Plugin Manager.
Normal Parameters
0 or mhp | Max HP |
1 or mmp | Max MP |
2 or atk | Attack |
3 or def | Defense |
4 or mat | Magic Attack |
5 or mdf | Magic Defense |
6 or agi | Agility |
7 or luk | Luck |
X Parameters
0 or hit | Hit Rate |
1 or eva | Evasion Rate |
2 or cri | Critical Rate |
3 or cev | Critical Evasion Rate |
4 or mev | Magic Evasion Rate |
5 or mrf | Magic Reflection Rate |
6 or cnt | Counter Attack Rate |
7 or hrg | HP Regeneration Rate |
8 or mrg | MP Regeneration Rate |
9 or trg | TP Regeneration Rate |
S Parameters
0 or tgr | Target Rate |
1 or grd | Guard Effect Rate |
2 or rec | Recovery Effect Rate |
3 or pha | Pharmacology |
4 or mcr | MP Cost Rate |
5 or tcr | TP Charge Rate |
6 or pdr | Physical Damage Rate |
7 or mdr | Magic Damage Rate |
8 or fdr | Floor Damage Rate |
9 or exr | Experience Rate |
Custom Parameters
Custom Parameters only work when EliMZ_CustomParameters is installed.
For DynCParam, use the short name configured in EliMZ_CustomParameters or the custom parameter ID.
Example with short name:
<DynCParam per> return 3 </DynCParam>
Example with ID:
<DynCParam 0> return 3 </DynCParam>
The short name must match exactly. Capitalization matters.
Help File | Terms of use | Sample Project
| Status | Released |
| Category | Tool |
| Rating | Rated 4.9 out of 5 stars (8 total ratings) |
| Author | Hakuen Studio |
| Made with | RPG Maker |
| Tags | hakuen-studio, mz, plugins, RPG Maker, RPG Maker MV, RPG Maker MZ, rpg-maker-plugin, tools |
| Average session | A few seconds |
| Languages | English |
| Content | No generative AI was used |
Download
Click download now to get access to the following files:
Development log
- Dynamic Parameters 3.0.1 - Bug fixes and compatibilityJun 02, 2026
- Dynamic Parameters 3.0.0 - New features and bug fixes!May 22, 2026
- Version 2.0.9 - Performance improvements, compatibilityJul 28, 2024
- Version 5.0.1 - Compatibility fix and performance improvement.Nov 27, 2022
- Version 5.0.0 - Updated terms of use.Feb 09, 2022
- 10/08/2021 - Bug fix!Oct 08, 2021
- 08/29/2021 - Minor fixes!Aug 29, 2021
- 08/25/2021 - Update!Aug 25, 2021






