OpenBOR supports a robust native blocking system, utilizing the following animations and properties.
Contents
Animations
Animations played in response to blocking commands and conditions. All blocking animations are optional unless noted otherwise.
Block
Basic blocking animation. Required for blocking.
anim block
By default, this animation enables blocking. AI controlled entities in idle state randomly block attacks on impact (see Block Odds), and play the Block animation in response. Players assume the Block animation and a blocking state by pressing the Special key, and return to idle when the Block animation completes. Note this replaces the Special animation, but you may remap the Special animation to Attack + Jump (see Controls).
While in blocking state, all frontal attacks are nullified. By default entities cannot block attacks from behind.
See Configuration to customize blocking behaviors.
BlockPain
Block impact animation.
anim blockpain
anim blockpain2
anim blockpain3
...
If available, Blockpain plays when an attack makes contact while blocking. If there is a Blockpain# to match the incoming attack#, that Blockpain will play. For example, if an entity with Blockpain3 blocks an attack with type 3, Blockpain3 plays. If there is no Blockpain# to match, Blockpain plays instead.
During any Blockpain animation, the entity is in a blocking state. If an attack hits while still in Blockpain, the entity will transition to another appropriate Blockpain, or restart the same Blockpain as necessary using the same logic as above.
Tip: Don’t let the name “blockpain” fool you, this is not a pain animation. These animations are designed to give a block more visual appeal by animating the entity absorbing the force of a blow with their guard.
Blockrelease
Transition out of block.
anim blockrelease
Plays when blocking voluntarily ceases (Ex: Player releases the Block command) before the entity returns to idle. During Blockrelease the entity is in a blocking state. If an attack hits while still in Blockrelease the entity will instantly transition to Block animation, or an appropriate Blockpain if available, then back to Blockrelease.
Tip: Just like many one on one fighting games, a long enough Blockrelease and/or fast enough string of attacks could potentially trap the entity in a blocking state until the string is complete or interrupted some way.
Blockstart
Transition to block.
anim blockstart
Transition animation that plays when blocking is first initiated. When Blockstart completes, the Block animation plays. During Blockstart the entity is in a blocking state. If an attack hits while still in Blockstart the entity will instantly transition to Block animation, or an appropriate Blockpain if available.
Chipdeath
Death from chip damage.
anim chipdeath
Plays when entity loses its remaining hitpoints via block damage. By default entities do not take block damage, but you can enable block damage with various global and model properties.
Guardbreak
Optional guard break animation.
anim guardbreak
Optional guard break animation that works with blocking entity’s guard points and incoming attack’s guard cost attack parameters. If a blocked attack’s guard cost exceeds blocking entity’s guard points, the blocking entity plays GUARDBREAK if available and loses its blocking state.
Configuration
Global
These properties are placed in Models.txt and affect the entire module. You may want to consider looking at Defense properties and other individual model settings if you want more nuanced control.
Block Ratio
blockratio <int>
# Default
blockratio 0
Enables chip damage when blocking attacks.
0
: Use defense blockratio.1
: Blocked attacks cause 0.25 their normal damage.
MP Block
mpblock <int>
# Default
mpblock 0
Controls which resource chip damage affects.
0
: Damage affects Hitpoints only.1
: Damage affects MP first. If MP is insufficient, remainder applies to Hitpoints.
No Chip Death
nochipdeath <int>
# Default
nochipdeath 0
Disable death from chip damage.
0
: Chip damage is lethal.1
: Chip damage cannot reduce Hitpoints below 1.
Model
These properties are part of a single model’s text file.
Block Configuration
block_config <flags>
# Default (players)
block_config active
# Default (all other types)
block_config none
Basic blocking set up.
Accepts one or more of the following flags.
none
– No blocking config. No effect if any other flags are included.active
– Enables more human like blocking behavior, meaning AI controlled entities can “anticipate” incoming attacks and also attempt to maintain a block across multiple successive hits. AI controlled entities without active blocking only block attacks on impact, and treat each impact separately when calculating odds to block. AI controlled entities with active blocking will block under the following conditions:- There is a hostile target within range of entity’s Block animation. Current opponent is checked first. If entity doesn’t have an opponent or its current opponent is out of range, then the first hostile entity (if any) within range is used.
- Target is actively attacking.
- Blocking chance passes (same chances as passive blocking).
back
– Entity can block attacks from behind.disabled
– Entity cannot block at all.hold_impact
– Players can hold block button to keep blocking until an attack impacts.hold_infinite
– Players can hold block button to keep blocking indefinitely.
Script
Block configuration is an integer property with the following bitmask constants.
openborconstant("BLOCK_CONFIG_NONE")
openborconstant("BLOCK_CONFIG_ACTIVE")
openborconstant("BLOCK_CONFIG_BACK")
openborconstant("BLOCK_CONFIG_DISABLED")
openborconstant("BLOCK_CONFIG_HOLD_IMPACT")
openborconstant("BLOCK_CONFIG_HOLD_INFINITE")
Blocking Odds
blockoods <int>
# Default
blockodds 0
Chance for AI controlled entity to block an attack.
- 0 – Entity will block 100% of incoming attacks.
- 100+ – Entity blocks rarely, if at all.
Don’t be misled by “100%”. Without script, AI controlled entities still follow the same rules players do. In other words they can only block when in an idle state. This property has no effect on player controlled entities.
Block Pain
blockpain <int>
# Default
blockpain 0
Threshold to use a Blockpain animation. Incoming attack damage must meet or exceed blockpain value, or the entity will not play a Blockpain animation on impact.
Guard Points
guardpoints <int>
# Default
guardpoints 0
Guard crushing. If this is any non 0 value, the entity becomes susceptible to guard crushing. Each time the entity blocks an attack, its guard points are reduced by the attack’s guard cost property. If the attack’s guard cost exceeds current guard points, entity plays its Guard Break animation (if available). During this time the entity is considered to be in a pain state.
Guard points recover over time. See Guard Rate.
Guard Rate
guardrate <int>
# Default
guardrate 2
Guard points recovery. This amount (or * 0.5 amount when blocking) is added to guard points every 200 centiseconds.
Threshold
thold <int>
# Default
thold 0
Added to entity’s defense.block.threshold (if any) when hit by an attack. If the combined result is any value other than 0
and less than final damage (after attacker’s offense and target’s defense factors apply), target cannot block attack.