ActionEffect System Overview
ActionEffect System Overview
Section titled “ActionEffect System Overview”ActionEffects are Cobblemon’s keyframe-based animation and scripting system. Titan uses them to create complex boss attack sequences with precise timing, damage application, and visual effects.
What is an ActionEffect?
Section titled “What is an ActionEffect?”An ActionEffect is a timeline of keyframes that execute sequentially to create a complete attack or ability. Think of it like a movie script:
- Keyframes = Individual actions (stop movement, play animation, show particles, deal damage)
- Timeline = Sequence of keyframes in order
- Execution = Keyframes run one after another until complete
Each titan move references one ActionEffect timeline.
Basic Structure
Section titled “Basic Structure”{ "timeline": [ { "type": "keyframe_type_1", "property": "value" }, { "type": "keyframe_type_2", "property": "value" } ], "condition": "true"}Key Components:
timeline- Array of keyframe objectscondition- MoLang expression to control execution (optional)
Execution Model
Section titled “Execution Model”Sequential Processing
Section titled “Sequential Processing”Keyframes execute in order, one at a time:
{ "timeline": [ {"type": "stop_movement", "duration": "2000"}, // Step 1: Freeze titan {"type": "pause", "pause": 0.5}, // Step 2: Wait 0.5s {"type": "define_obb", "name": "fireball"}, // Step 3: Define hitbox {"type": "telegraph_obb", "name": "fireball"}, // Step 4: Show warning {"type": "damage_obb", "name": "fireball"}, // Step 5: Deal damage {"type": "pause", "pause": 1.0} // Step 6: End lag ]}Execution Flow:
- Titan stops moving for 2 seconds
- 0.5 second pause
- OBB defined (instant)
- Telegraph appears (1-2 seconds based on size)
- Damage applied to entities in OBB
- 1 second recovery pause
- Timeline complete
Timing Control
Section titled “Timing Control”Control attack pacing with:
pause keyframes:
{"type": "pause", "pause": 1.5} // Wait 1.5 secondsduration properties:
{"type": "stop_movement", "duration": "3000"} // 3000ms = 3stelegraph_obb auto-timing:
// Telegraph duration calculated from OBB size{"type": "telegraph_obb", "name": "huge_explosion"} // ~3s warning{"type": "telegraph_obb", "name": "small_slash"} // ~1s warningHolds System
Section titled “Holds System”Prevent titan from acting during attack:
{ "timeline": [ {"type": "add_holds", "holds": ["effects"]}, // Lock titan {"type": "stop_movement", "duration": "2500"}, // ... attack keyframes ... {"type": "remove_holds", "holds": ["effects"]}, // Unlock titan {"type": "pause", "pause": 1.0} ]}Without holds: Titan could start another attack mid-timeline
With holds: Titan locked until remove_holds
Always pair:
- Start timeline with
add_holds - End timeline with
remove_holds
ActionEffect Context
Section titled “ActionEffect Context”When an ActionEffect executes, it has access to:
The User (Titan)
Section titled “The User (Titan)”MoLang queries:
q.user_position- Titan’s current positionq.user_rotation- Titan’s yaw/pitchq.user_health- Current HPq.user_max_health- Max HP
Used in:
- OBB positioning (
positioning: "AT_USER") - Conditional keyframes
- Damage calculations
The Target (Player)
Section titled “The Target (Player)”MoLang queries:
q.target_position- Target’s positionq.target_distance- Distance to targetq.target_exists- Whether target is valid
Used in:
- OBB positioning (
positioning: "AT_TARGET") - Conditional execution
- Distance-based effects
Custom Variables
Section titled “Custom Variables”Set variables for complex logic:
{ "timeline": [ {"type": "set_variable", "name": "phase", "value": "2"}, { "type": "damage_obb", "name": "fireball", "damage": "q.variable('phase') * 10" // 20 damage in phase 2 } ]}Conditional Execution
Section titled “Conditional Execution”Make keyframes conditional with MoLang:
{ "type": "damage_obb", "name": "electric_field", "condition": "q.target_distance <= 5.0" // Only if target close}Common Conditions:
q.target_distance <= 8.0- Close range onlyq.user_health / q.user_max_health < 0.33- Low HP onlyq.is_phase(3)- Phase 3 onlyq.target_exists- Has valid target
Timeline-level condition:
{ "timeline": [...], "condition": "q.target_distance <= 10.0" // Entire timeline skips if false}Integration with Cobblemon
Section titled “Integration with Cobblemon”Animation System
Section titled “Animation System”Play Cobblemon animations:
{"type": "animation", "animation": "special"}Common Animations:
physical- Physical attackspecial- Special attackstatus- Status movebattle_idle- Return to idle
Custom Animations: Create in pokemon species JSON:
"animations": { "titan_roar": "animation.pokemon.titan_roar"}Particle System
Section titled “Particle System”Use Cobblemon/Minecraft particles:
{ "type": "entity_particles", "particleType": "minecraft:flame", "count": 20, "spread": {"x": 1.0, "y": 1.0, "z": 1.0}}Common Particles:
minecraft:flame- Fireminecraft:electric_spark- Electricminecraft:dragon_breath- Dragonminecraft:snowflake- Iceminecraft:explosion- Explosion
Sound System
Section titled “Sound System”Play sounds for impact:
{ "type": "sound", "sound": "entity.generic.explode", "volume": "1.0", "pitch": "1.0"}Common Sounds:
entity.generic.explode- Explosionentity.lightning_bolt.thunder- Thunderentity.ender_dragon.growl- Dragon roarentity.blaze.shoot- Fire attack
File Organization
Section titled “File Organization”Location
Section titled “Location”Data Pack Structure:
server/├── data/│ └── titan/│ └── action_effects/│ ├── charizard_inferno_blaze.json│ ├── mewtwo_psycho_break.json│ └── ... (30+ effects)Or:
server/├── datapacks/│ └── your_pack/│ └── data/│ └── titan/│ └── action_effects/│ └── custom_move.jsonNaming Convention
Section titled “Naming Convention”Format: pokemon_move_name.json
Examples:
charizard_inferno_blaze.jsonmewtwo_psycho_break.jsonrayquaza_draco_meteor.jsonlucario_aura_sphere.json
Referencing in Fight Config
Section titled “Referencing in Fight Config”{ "moves": { "inferno_blaze": { "name": "Inferno Blaze", "actionEffect": "titan:charizard_inferno_blaze", // namespace:filename ... } }}Namespace:
titan:- Mod resources or data pack underdata/titan/custom:- Data pack underdata/custom/
ActionEffect Categories
Section titled “ActionEffect Categories”Titan uses 23 Cobblemon keyframes + 8 Titan-specific keyframes:
Cobblemon Core Keyframes (23)
Section titled “Cobblemon Core Keyframes (23)”Standard Cobblemon ActionEffect keyframes:
- Movement control
- Animation playback
- Particle effects
- Sound effects
- Entity manipulation
- Status effects
- MoLang scripting
See Cobblemon ActionEffect Docs for full reference.
Titan-Specific Keyframes (8)
Section titled “Titan-Specific Keyframes (8)”OBB System (3):
define_obb- Create hitbox shapetelegraph_obb- Show ground warningdamage_obb- Deal damage in OBB
Combat System (2):
stop_movement- Freeze titan temporarilyset_vulnerable- Set vulnerability state (RECOVERING/EXHAUSTED)
Damage System (3):
sequenced_damage- Multiple damage pulsesrepeating_damage_obb- Continuous damage fielddelayed_damage_obb- Damage after delay
See OBB System → for Titan keyframes.
Complete Example
Section titled “Complete Example”Simple Attack (Flamethrower)
Section titled “Simple Attack (Flamethrower)”{ "timeline": [ {"type": "add_holds", "holds": ["effects"]}, {"type": "stop_movement", "duration": "2000"},
{"type": "animation", "animation": "special"}, {"type": "pause", "pause": 0.5},
{"type": "define_obb", "name": "flame", "shape": "CONE", "positioning": "IN_FRONT", "distance": "2.5", "halfExtents": {"x": "2.0", "y": "6.0", "z": "2.0"}, "includePitch": true}, {"type": "telegraph_obb", "name": "flame", "telegraphType": "WARNING"},
{"type": "entity_particles", "particleType": "minecraft:flame", "count": 30}, {"type": "sound", "sound": "entity.blaze.shoot", "volume": "1.5", "pitch": "0.8"},
{"type": "damage_obb", "name": "flame", "damage": "15.0", "damageType": "FIRE"},
{"type": "remove_holds", "holds": ["effects"]}, {"type": "pause", "pause": 1.0} ], "condition": "true"}Timeline Breakdown:
- Lock titan (2000ms)
- Play special animation
- 0.5s windup
- Define cone hitbox in front
- Show warning markers (~1.5s)
- Fire particles + sound
- Deal 15 fire damage
- Unlock titan
- 1s recovery
Total Duration: ~5.5 seconds
Complex Attack (Ultimate)
Section titled “Complex Attack (Ultimate)”{ "timeline": [ {"type": "add_holds", "holds": ["effects"]}, {"type": "stop_movement", "duration": "5000"},
{"type": "animation", "animation": "special"}, {"type": "sound", "sound": "entity.ender_dragon.growl", "volume": "2.0", "pitch": "0.6"}, {"type": "pause", "pause": 1.5},
{"type": "entity_particles", "particleType": "minecraft:dragon_breath", "count": 50}, {"type": "pause", "pause": 0.5},
{"type": "define_obb", "name": "explosion", "shape": "SPHERE", "positioning": "AT_USER", "halfExtents": {"x": "12.0", "y": "12.0", "z": "12.0"}}, {"type": "telegraph_obb", "name": "explosion", "telegraphType": "CRITICAL"},
{"type": "sound", "sound": "entity.generic.explode", "volume": "2.0", "pitch": "0.8"}, {"type": "entity_particles", "particleType": "minecraft:explosion", "count": 100},
{"type": "damage_obb", "name": "explosion", "damage": "40.0", "damageType": "EXPLOSION", "knockback": "3.0"},
{"type": "set_vulnerable", "vulnerabilityState": "EXHAUSTED"}, {"type": "remove_holds", "holds": ["effects"]}, {"type": "pause", "pause": 3.0} ], "condition": "q.user_health / q.user_max_health < 0.33"}Timeline Breakdown:
- Lock titan (5000ms)
- Play animation + roar sound
- 1.5s dramatic pause
- Dragon breath particles
- 0.5s charge
- Define massive sphere
- Show CRITICAL warning (~3s)
- Explosion sound + particles
- Deal 40 damage + knockback
- Enter EXHAUSTED state (vulnerable)
- Unlock titan
- 3s recovery
Total Duration: ~10 seconds Condition: Only at <33% HP
Best Practices
Section titled “Best Practices”Timing
Section titled “Timing”Attack Pacing:
- Quick attacks: 2-4 seconds total
- Medium attacks: 4-6 seconds total
- Ultimate attacks: 8-12 seconds total
Telegraph Duration:
- Small OBB (<5 blocks): ~1s warning
- Medium OBB (5-8 blocks): ~1.5-2s warning
- Large OBB (8-12 blocks): ~2-3s warning
- Massive OBB (12+ blocks): ~3-4s warning
Recovery Windows:
- Always include pause after damage
- Match recovery to attack power
- 1-3 second pause is standard
Structure
Section titled “Structure”Always Include:
add_holdsat startstop_movementif titan should freeze- Telegraph before damage
remove_holdsbefore end- Final
pausefor recovery
Recommended Order:
- Locks (
add_holds,stop_movement) - Windup (animation, particles, sounds)
- Pause (charge time)
- Define OBB
- Telegraph OBB
- Damage OBB
- Unlocks (
remove_holds) - Recovery pause
Performance
Section titled “Performance”Keep Timelines Lean:
- Avoid excessive particles (>100 per effect)
- Don’t spam sounds
- Use appropriate OBB sizes
- Limit keyframe count (<20 per timeline)
Optimize OBBs:
- Match size to visual effect
- Don’t make everything huge
- Use appropriate shapes
- Test performance with multiple titans
Debugging
Section titled “Debugging”Test Incrementally:
- Start with basic timeline (just damage)
- Add telegraph
- Add particles/sounds
- Add holds/pauses
- Test timing
Common Issues:
- Timeline too fast? Add more
pausekeyframes - Titan moving during attack? Check
stop_movementduration - Damage not applying? Verify OBB positioning
- Players can’t dodge? Increase telegraph duration
Creating Custom ActionEffects
Section titled “Creating Custom ActionEffects”Method 1: Interactive Builder
Section titled “Method 1: Interactive Builder”Use the ActionEffect Builder → for visual timeline creation:
- Add keyframes from library
- Configure properties
- Preview timeline
- Export JSON
- Save to data pack
Best for: New users, prototyping, visual learners
Method 2: Manual JSON
Section titled “Method 2: Manual JSON”Edit JSON files directly:
- Copy existing ActionEffect
- Modify keyframes
- Adjust timing
- Test in-game
- Iterate
Best for: Advanced users, complex logic, version control
Method 3: Hybrid
Section titled “Method 3: Hybrid”Start with builder, finish with manual editing:
- Build basic timeline in builder
- Export JSON
- Add advanced features manually
- Test and refine
Best for: Most users, balanced workflow
Loading and Reloading
Section titled “Loading and Reloading”Initial Load
Section titled “Initial Load”ActionEffects load on server start from:
- Mod resources (
titan.jarinternal files) - Data packs (
datapacks/*/data/titan/action_effects/)
Reloading
Section titled “Reloading”/titan reloadReloads:
- All fight configs
- All ActionEffects from data packs
- All state machines
Does NOT reload:
- Existing titan entities (spawn new ones to test)
- Mod internal ActionEffects (requires restart)
Testing Changes
Section titled “Testing Changes”Workflow:
- Edit ActionEffect JSON
/titan reload- Spawn fresh titan
- Test attack
- Adjust and repeat
Tip: Use creative mode with god mode to survive testing.
Common Patterns
Section titled “Common Patterns”Pattern: Basic Melee Attack
Section titled “Pattern: Basic Melee Attack”{ "timeline": [ {"type": "add_holds", "holds": ["effects"]}, {"type": "animation", "animation": "physical"}, {"type": "pause", "pause": 0.3}, {"type": "define_obb", "name": "slash", "shape": "ARC", "positioning": "IN_FRONT", "distance": "2.0", "halfExtents": {"x": "3.0", "y": "2.0", "z": "3.0"}}, {"type": "telegraph_obb", "name": "slash", "telegraphType": "WARNING"}, {"type": "damage_obb", "name": "slash", "damage": "10.0"}, {"type": "remove_holds", "holds": ["effects"]}, {"type": "pause", "pause": 0.5} ]}Pattern: Ranged Projectile
Section titled “Pattern: Ranged Projectile”{ "timeline": [ {"type": "add_holds", "holds": ["effects"]}, {"type": "stop_movement", "duration": "1500"}, {"type": "animation", "animation": "special"}, {"type": "pause", "pause": 0.5}, {"type": "define_obb", "name": "beam", "shape": "CYLINDER", "positioning": "IN_FRONT", "distance": "5.0", "halfExtents": {"x": "1.0", "y": "10.0", "z": "1.0"}, "includePitch": true}, {"type": "telegraph_obb", "name": "beam", "telegraphType": "DANGER"}, {"type": "entity_particles", "particleType": "minecraft:electric_spark", "count": 40}, {"type": "sound", "sound": "entity.lightning_bolt.thunder"}, {"type": "damage_obb", "name": "beam", "damage": "18.0", "damageType": "ELECTRIC"}, {"type": "remove_holds", "holds": ["effects"]}, {"type": "pause", "pause": 1.0} ]}Pattern: AOE Explosion
Section titled “Pattern: AOE Explosion”{ "timeline": [ {"type": "add_holds", "holds": ["effects"]}, {"type": "stop_movement", "duration": "3000"}, {"type": "pause", "pause": 1.0}, {"type": "define_obb", "name": "blast", "shape": "SPHERE", "positioning": "AT_TARGET", "halfExtents": {"x": "8.0", "y": "8.0", "z": "8.0"}}, {"type": "telegraph_obb", "name": "blast", "telegraphType": "DANGER"}, {"type": "entity_particles", "particleType": "minecraft:explosion", "count": 50}, {"type": "sound", "sound": "entity.generic.explode", "volume": "1.5"}, {"type": "damage_obb", "name": "blast", "damage": "25.0", "knockback": "2.0"}, {"type": "set_vulnerable", "vulnerabilityState": "RECOVERING"}, {"type": "remove_holds", "holds": ["effects"]}, {"type": "pause", "pause": 2.0} ]}Pattern: Multi-Hit Combo
Section titled “Pattern: Multi-Hit Combo”{ "timeline": [ {"type": "add_holds", "holds": ["effects"]},
{"type": "define_obb", "name": "hit1", "shape": "ARC", "positioning": "IN_FRONT", "distance": "1.5", "halfExtents": {"x": "2.5", "y": "2.0", "z": "2.5"}}, {"type": "telegraph_obb", "name": "hit1", "telegraphType": "WARNING"}, {"type": "damage_obb", "name": "hit1", "damage": "6.0"}, {"type": "pause", "pause": 0.4},
{"type": "define_obb", "name": "hit2", "shape": "ARC", "positioning": "IN_FRONT", "distance": "1.5", "halfExtents": {"x": "2.5", "y": "2.0", "z": "2.5"}}, {"type": "telegraph_obb", "name": "hit2", "telegraphType": "WARNING"}, {"type": "damage_obb", "name": "hit2", "damage": "6.0"}, {"type": "pause", "pause": 0.4},
{"type": "define_obb", "name": "hit3", "shape": "ARC", "positioning": "IN_FRONT", "distance": "2.0", "halfExtents": {"x": "3.5", "y": "2.5", "z": "3.5"}}, {"type": "telegraph_obb", "name": "hit3", "telegraphType": "DANGER"}, {"type": "damage_obb", "name": "hit3", "damage": "12.0", "knockback": "1.5"},
{"type": "remove_holds", "holds": ["effects"]}, {"type": "pause", "pause": 1.0} ]}Next Steps
Section titled “Next Steps”- OBB System → - Detailed OBB documentation
- ActionEffect Builder → - Interactive timeline editor
- Creating Custom Moves → - Complete workflow guide
Master ActionEffects to create unforgettable boss fights! ⚡