SmashWiki:12TP/Attack system
The amount of knockback taken when attacked is calculated as follows:
When there is no fixed knockback value set:
- ((((((Accumulated damage / 10) + (Accumulated damage × Damage dealt / 20)) × Weight × 1.4) + 18) × Knockback influence value) + Additional knockback value) × Damage rate
When there is a fixed knockback value set:
- ((((((1 + (10 × Fixed knobkack value / 20)) × Weight × 1.4) + 18) × Knockback influence value) + Additional knockback value) × Damage rate
- ※Damage rate is based on handicap (see basics 1) and selected difficulty
Here are the parameters of each attack:
- Configuration number
- This is the identification number of the attack. If multiple hitboxes strike at once, this determines which one counts.
(For example, there could be a hitbox on the right hand and another on the right elbow)
- This is the identification number of the attack. If multiple hitboxes strike at once, this determines which one counts.
- ID
- This determines whether it is a continuous attack. If the ID changes during an animation, its hitboxes can strike again.
- Part
- This represents the position of the attack.
- If multiple hitboxes strike at once, the parameter number breaks the tie.
- Damage
- The damage the enemy takes when the attack hits.
- Knockback is calculated after damage is added.
- Size
- The size of the hitbox. Size units are about 1/3cm, and are also scaled by the character's defined size.
- Offset
- This determines how far away from the body part the hitbox is positioned. (in X, Y, Z co-ordinates)
- Vector
- The angle at which the opponent is knocked away. If the angle is 361, then low knockback will have a sideways angle, while high knockback will produce a more upwards diagonal angle.
- Knockback influence value
- Knockback can be increased or reduced by a percentage. Increasing this makes an attack very strong at high damage. Usually 100.
- Fixed knockback value
- In order to make an attack always deal the same amount of knockback, this value can be set to get a specific power. However, it's still affected by the opponent's weight.
- Additional knockback value
- This value adds a specific amount of knockback.
- Attribute
- This changes the effects and visuals of the attack. Attacks can be normal, cutting, fire, or electric. There was a freezing effect, but it ended up not being used.
- Cancel
- By turning this on or off, it sets whether the attack can cancel out other attacks. By setting to Off, cancellation does not occur.
- Shield abrasion
- Normally, shields take damage just like players do, but by modifying this value, the damage taken by shields can be increased or decreased. The Fan is a good at damaging shields.
- Sound level
- When an attack hits, it can have a small, medium, or large impact sound.
- Sound attribute
- This determines the sound effect on hit. It's combined with the sound level to determine exactly what sound is played. It can be Punch, Kick, Cutting, Fire, Electric, and others.
- Coverage
- Whether an attack can hit enemies on the ground (G) on in the air (A) can be individually controlled. For example, Donkey Kong's Hand Slap cannot hit enemies in the air.
※ Example: The parameters of Mario's side smash attack (angled sideways)
AcFrame( 4 ), ←On frame 4
AcEffect( PN(RArmJ), Flash, 60, 0, 0, 0, 0, 0 ), ←Show a graphical effect (a flash) on the right arm
AcFrame( 16 ), ←On frame 16
AcAttackSound,/*Voice*/ ←Attacking voice clip
/* Configuration number,Id,Part,Damage,Size,Offset,Vector,Knockback influence value,Fixed knockback value,Additional knockback value,Attribute,Cancel,Shield abrasion,Sound level,Sound attribute,Coverage */ ←This line is a comment
AcAttack( 0, 0, PN(RShoulderJ), 17, 180, 0, 0, 0, 361, 100, 0, 30, Normal, On, 0, L, Normal, GA ), ←Right shoulder
AcAttack( 1, 0, PN(RArmJ), 17, 240, 50, 0, 0, 361, 100, 0, 30, Normal, On, 0, L, Normal, GA ), ←Hitbox on right hand
AcEffect( PN(Top), Special, 0, 0, -150, 0, 0, 0 ), ←Produce smoke
AcSwish( hit_no_l ), ←Swish sound
AcWait( 5 ), ←Wait 5 frames
AcClrAttackAll, ←Clear hitboxes
AcEnd, ←That's it.