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 States
State ID Set this to the ID of this Block State in your Database. If set to None/0, this state will not be valid.
Default Initial Valid Default Initial Block value of this Block State set for all Battlers at Battle Start. If set higher than Max, will be clamped.
Default Maximum Value Default Max Block value for all Battlers at Battle Start. Set to -1 to have no Maximum.
Icon Settings Show on Battlers? Settings for showing/Hiding the Icon on Actors and Enemies.
Actor Offset The X/Y Offsets for the Icon relative to its base position at the Actor.
Enemy Offset The X/Y Offsets for the Icon relative to its base position at the Enemy.
Show in Windows? Settings for showing/hiding the Icon in Actor and Party Status Windows.
Font Face Font Face for the value drawn on the Icon.
Font Size Font Size for the value drawn on the Icon.
Log Messages

For these parameters you can use the following codes and it will replace them with the relevant values:
%1 - Subject
%2 - Value
%3 - State Name
Show Messages in Log? If ON, all Messages below will show in the Battle Log. If OFF, none will show.
Value Gain Text Log Text Popup when you gain Block Value via Card Action.
Value Loss Text Log Text Popup when you lose Block Value via Card Action.
Block State Message Log Text Popup when the Block State Holds after Damage.
Break State Message Log Text Popup when the Block State Breaks after Damage.
Blocked Elements List of Elements blocked by State, e.g “1, 2, 3” blocks Damage of Elements 1, 2, 3 while the rest will bypass.
Allow Damage Popup? If ON, a Damage Popup is generated to reflect change in Block State. if OFF, no Popup is generated.
Popup Color Code Set the Color of your Damage Popup.
For MV, matches with your Damage numbers spritesheet in img/system.
Other Parameters
Multi Block Rule Set rule for how DMG is dealt when multiple valid Block States are on a target. See Plugin Help File for details.
Allow Slip DMG/HP Degen? If ON, Slip DMG/HP Degen will reduce a Battler's Block before HP. If OFF, Slip DMG/HP Degen ignores Block and reduces HP.
Remove State on 0? If ON, Block States will be removed if you have 0 Block for that State. If OFF, State will persist regardless of value.
Resource States
State ID State of the Resource State. If set to None/0, this state will not be valid.
Resource Type Choose if Icon shows the Battler's HP, MP, or TP. Ignore the drop-down list and use the Text tab to manually input parameters such as ATK, DEF, MAT, etc.
Icon Settings See the Icon Settings for Block States (above)

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.1751578699.txt.gz · Last modified: 2025/07/03 23:38 by isiahgames