oasis-b

Docs / Battle system

LW_HitFormula

Battle system
RPG Maker MV and MZ hit and evasion formula plugin

Hit and evasion in one roll, with formulas you can change.

Free Battle Pack (free)Battle Essentials ($9.99)Full Collection ($19.99)

Needs LW_Core (LWZ_Core in MZ) above all Living World plugins in the Plugin Manager. It's included in every pack.

LW_HitFormula in a test project

One roll for hit and evasion, so 95 % means 95 %.

Highlights

Ideas for your game

Works well with

LW_DamageStepsLW_Taunt

Introduction

Requires LW_Core.

MV rolls twice: once to see if the attack hits, then again to see if the target evades. A hero with 300% hit still misses a target with 5% evasion. With this plugin there is one roll by default:

success rate of the skill x (hit of the attacker - evasion of the target)

100% success rate, 95% hit and 10% evasion give an 85% chance to hit.

Formulas

The formulas are JavaScript, like damage formulas. You can use:

skill      success rate of the skill or item, 1 = 100%
hit        result of the Hit parameter for this kind of attack
eva        result of the Evade parameter for this kind of attack
a, b       attacker and target
item       the skill or item
v, s       $gameVariables.value and $gameSwitches.value, like v(5)

Physical, magical and certain hit attacks each have their own Hit and Evade parameter. A formula with a mistake falls back to what MV does and writes the error to the console once.

Example for a hit chance that also counts luck:

skill * (hit - eva) + (a.luk - b.luk) / 1000

Terms of Use

See TERMS_OF_USE.txt in the download. Short version: use it in as many of your own games as you like, free or commercial. Edit it for your game, but keep this header. Don't share or resell the plugin files on their own. Name oasis-b in the credits of your game.

Changelog

Version 1.0.0 - 2026-11-21 - First release.

Introduction

Requires LWZ_Core.

MZ rolls twice: once to see if the attack hits, then again to see if the target evades. A hero with 300% hit still misses a target with 5% evasion. With this plugin there is one roll by default:

success rate of the skill x (hit of the attacker - evasion of the target)

100% success rate, 95% hit and 10% evasion give an 85% chance to hit.

Formulas

The formulas are JavaScript, like damage formulas. You can use:

skill      success rate of the skill or item, 1 = 100%
hit        result of the Hit parameter for this kind of attack
eva        result of the Evade parameter for this kind of attack
a, b       attacker and target
item       the skill or item
v, s       $gameVariables.value and $gameSwitches.value, like v(5)

Physical, magical and certain hit attacks each have their own Hit and Evade parameter. A formula with a mistake falls back to what MZ does and writes the error to the console once.

Example for a hit chance that also counts luck:

skill * (hit - eva) + (a.luk - b.luk) / 1000

Terms of Use

See TERMS_OF_USE.txt in the download. Short version: use it in as many of your own games as you like, free or commercial. Edit it for your game, but keep this header. Don't share or resell the plugin files on their own. Name oasis-b in the credits of your game.

Changelog

Version 1.0.0 - First release for MZ.

Get it

LW_HitFormula is in these packs. Every pack comes as an MV and an MZ download at the same price and needs no other plugin collection. Tested in RPG Maker MV 1.6.2 and MZ 1.10.0 games on Windows, macOS and Linux and in current browsers.

Free Battle Pack (free)Battle Essentials ($9.99)Full Collection ($19.99)
← LW_BattleRulesLW_DamageSteps →