LW_SkillCosts
Skills that cost HP, gold, items or a variable, skills that hide or need a condition, and code before and after a hit.
Needs LW_Core (LWZ_Core in MZ) above all Living World plugins in the Plugin Manager. It's included in every pack.

Skills that cost more than MP.
Highlights
- Costs in HP, gold, items or a variable
- All costs side by side in the skill list
- Skills that hide or need a condition
- A few lines of code before and after a hit
Ideas for your game
- A blood spell that eats HP
- A coin toss that costs gold
- A rifle that uses up bullets
Works well with
Introduction
Requires LW_Core. Put it above LW_Cooldowns and LW_QuickActions.
A blood spell that eats HP, a coin toss that costs gold, a rifle shot that uses up bullets: skills can cost more than MP and TP here. The skill list shows every cost side by side and shortens the name if it has to. Skills can hide until you need them, and a few lines of code can run when a skill hits.
HP costs never bring the user below 1 HP. Whoever doesn't have more HP than the cost can't use the skill.
Costs (Skill Notetags)
<LW HP Cost: 50> <LW HP Cost: 10%> % of max HP <LW MP Cost: 20> <LW MP Cost: 5%> on top of the database <LW TP Cost: 30> <LW TP Cost: 25%> <LW Gold Cost: 500> <LW Item Cost: 3 x 2> uses up 2 of item 3 <LW Variable Cost: 10 x 1> takes 1 from variable 10 (arrows, ammo)
<LW HP Cost Code> cost += user.level * 2; </LW HP Cost Code> the same for MP and TP
Gold, item and variable costs are paid by the party, so they count for actors only.
Showing and Hiding (Skill Notetags)
<LW Hide in Battle> <LW Hide in Menu>
<LW Hide if Learned: 12, 20 to 25>
for a weak spell that should go away once the strong one is learned
<LW Show Code> visible = user.level >= 10; </LW Show Code>
<LW Requirement Code> value = $gameSwitches.value(5); </LW Requirement Code> the skill is shown but greyed out when false
<LW Cost Text>
\c[4]Full moon\c[0]
</LW Cost Text> shown in front of the other costs, text codes
work. <LW Cost Text Code> runs right before.
Code During the Action (Skill or Item Notetags)
<LW Use Code> ... </LW Use Code> once when it is used <LW Before Code> ... </LW Before Code> before it hits each target <LW After Code> ... </LW After Code> after it hits each target <LW Damage Code> ... </LW Damage Code> before damage, can change value <LW After Damage Code> ... </LW After Damage Code>
The code can use user (or a), target (or b), item, value, v(n) and s(n) for variables and switches, and this for the action. A mistake in the code doesn't stop the game. It shows up in the console with the skill's name.
Swapping the Gauges (Class, Weapon, Armor, State or Enemy)
<LW Gauge 1: TP> the HP gauge shows TP instead <LW Gauge 3: Nothing> the TP gauge stays empty Slot 1 is HP, 2 is MP, 3 is TP. Weapons count first, then armor, states, class and enemy.
Script Calls
actor.skillHpCost(skill) HP the skill costs this actor actor.lwSkillVisible(skill) false if the skill is hidden right now actor.lwGauge(1) 'HP', 'MP', 'TP' or 'NOTHING'
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. Put it above LWZ_Cooldowns and LWZ_QuickActions.
A blood spell that eats HP, a coin toss that costs gold, a rifle shot that uses up bullets: skills can cost more than MP and TP here. The skill list shows every cost side by side and shortens the name if it has to. Skills can hide until you need them, and a few lines of code can run when a skill hits.
HP costs never bring the user below 1 HP. Whoever doesn't have more HP than the cost can't use the skill.
Costs (Skill Notetags)
<LW HP Cost: 50> <LW HP Cost: 10%> % of max HP <LW MP Cost: 20> <LW MP Cost: 5%> on top of the database <LW TP Cost: 30> <LW TP Cost: 25%> <LW Gold Cost: 500> <LW Item Cost: 3 x 2> uses up 2 of item 3 <LW Variable Cost: 10 x 1> takes 1 from variable 10 (arrows, ammo)
<LW HP Cost Code> cost += user.level * 2; </LW HP Cost Code> the same for MP and TP
Gold, item and variable costs are paid by the party, so they count for actors only.
Showing and Hiding (Skill Notetags)
<LW Hide in Battle> <LW Hide in Menu>
<LW Hide if Learned: 12, 20 to 25>
for a weak spell that should go away once the strong one is learned
<LW Show Code> visible = user.level >= 10; </LW Show Code>
<LW Requirement Code> value = $gameSwitches.value(5); </LW Requirement Code> the skill is shown but greyed out when false
<LW Cost Text>
\c[4]Full moon\c[0]
</LW Cost Text> shown in front of the other costs, text codes
work. <LW Cost Text Code> runs right before.
Code During the Action (Skill or Item Notetags)
<LW Use Code> ... </LW Use Code> once when it is used <LW Before Code> ... </LW Before Code> before it hits each target <LW After Code> ... </LW After Code> after it hits each target <LW Damage Code> ... </LW Damage Code> before damage, can change value <LW After Damage Code> ... </LW After Damage Code>
The code can use user (or a), target (or b), item, value, v(n) and s(n) for variables and switches, and this for the action. A mistake in the code doesn't stop the game. It shows up in the console with the skill's name.
Swapping the Gauges (Class, Weapon, Armor, State or Enemy)
<LW Gauge 1: TP> the HP gauge shows TP instead <LW Gauge 3: Nothing> the TP gauge stays empty Slot 1 is HP, 2 is MP, 3 is TP. Weapons count first, then armor, states, class and enemy.
Script Calls
actor.skillHpCost(skill) HP the skill costs this actor actor.lwSkillVisible(skill) false if the skill is hidden right now actor.lwGauge(1) 'HP', 'MP', 'TP' or 'NOTHING'
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_SkillCosts 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.