User Tools

Site Tools


plugin-block-generate

This is an old revision of the document!


MYTH_BlockGenerate is a utility plugin which simulates Block in the style of deckbuilders like Slay the Spire. Block is a defensive resource that can be accumulated by playing cards or having certain items equipped. When damage is dealt to the Actor, Block is deducted first before Health.

This plugin has you select one State as the Block State which is automatically applied to an Actor or Enemy when they have any amount of Block. It includes Notetags and Script Calls (see below) for determining how this Block is gained and lost from different sources.

Current Version: 1.3.1

Parameters

Block State ID Set this to the ID of the Block State in your Database.
Default Initial Block Default Initial Block value for all Battlers at Battle Start.
Default Max Block Default Max Block value for all Battlers at Battle Start. Set to -1 to have no Max.
Position Offset X and Y Offsets for the Block Icon relative to its base position at the Actor.

Notetags

Notetag Syntax Database Usage Description
<Init Block: X>
Actors, Enemies Sets initial Block value this Actor/Enemy will have at the start of a battle.
<Max Block: X>
Actors, Enemies Sets maximum Block value this Actor/Enemy can have at any one time.
<Ignore Block>
Skills, Items Damage Formula of these Skills/Items will ignore target's Block and deal their damage directly to HP instead. Useful for “piercing” type Skills.
<Mod Init Block: +x>
Weapons, Armors Modifies an Actor's Initial Block amount by adding a positive/negative number. Can stack from multiple sources (like different pieces of equipment).
<Mod Max Block: +x>
Weapons, Armors Modifies an Actor's Max Block amount by adding a positive/negative number. Can stack from multiple sources (like different pieces of equipment).
<Block Change: +X>
States Determines how much an Actor with the State will gain/lose Block at the end of their turn (during the Regenerate Step). Can stack from multiple sources. If there is both Block Gain and Block Loss from multiple States, the values are summed together and applied as a single instance of generation e.g. if State A gains 20 BLOCK each turn and State B loses 40 Block each turn, then an Actor with both State A and B loses 20 Block (+20 - 40 = -20) each turn
<Negate Block>
States When a State with this Notetag is applied to an actor, they will lose all Block and be unable to gain Block until it elapses or is removed.

Script Calls

{battler}.getBlock()
Returns the Battler's current Block value.
{battler}.setBlock(value, show)
Sets the Battler's Block to value. Show can be true/false depending on whether you want a Damage Popup and Battle Log message to show the change.
{battler}.addBlock(value, show)
Adds to the Battler's Block. Value can be either positive or negative. If it goes over the Battler's Max or under 0, the value is automatically clamped. Show can be true/false depending on whether you want a Damage Popup and Battle Log message to show the change.
{battler}.clearBlock(show)
Clears the Battler's Block setting it to 0 and removing the Block State.

Version History

**v1.3.1**
- Improved Message Warning infrastructure.

**v1.3.0**  
- Changed parameters to accomodate multiple Block/Resource States
- Changed Notetags, Card Actions and Script Calls to work with new params
- Added Param to turn on/off Battle Log Messages for Block States
- Added Param to turn on/off Damge Popups for Block States
- Added Param letting you set the Damage Popup colors per Block State
- Added Param for whether Slip Damage reduces Block value before HP
- Added Param to let you set Resource States to HP, MP, TP or others
- Added Params to turn on/off State Icons on Actors and Windows
- Block Font Color does not change with Actor HP State in Windows
- Allowed using State Names instead of ID for Card Actions and Notetags
- Changed <Block Change> Notetag syntax to <Change Block>
- Added <Fill Block> and <Clear Block> State Notetags
- Added support for Variable Input in Card Actions and Notetags

**v1.2.0**
- Fixed issue with Normal Attack damage type ignoring Block
- <Ignore Block> is working again and unaffected by Damage Types
- Added new Card Actions for Add Block, Set Block and Clear Block
- Fixed bug where Block carried over rounds despite showing it cleared


**v1.1.0**
- Added in Health Icon in case users want to show both Health and Block on a Battler. Has a Notetags if you want to hide it.
- Block and Health values are written to Icons on Actor & Party Windows can set different Fonts for Block and Health Icon text.
- Exposed the text for State Messages for Block and Break. Now can be customized. Has differences between MV and MZ.
- Added support for Elements. You can now choose which Damage Types the Block State reduces vs which ones are ignored.
- Different Icon Offsets can be declared for Actors and Enemies

**v1.0.0** 
- Base Functionality complete! Will probably come back around and do some minor edits 
once I am done testing this with the CGC Demo Project.
plugin-block-generate.1751577188.txt.gz · Last modified: 2025/07/03 23:13 by isiahgames