Skip to content

Commit

Permalink
more explanation of attack event tags
Browse files Browse the repository at this point in the history
  • Loading branch information
CarnageMarkus committed Jan 29, 2024
1 parent 8ff9c7f commit 2a8dd60
Showing 1 changed file with 40 additions and 11 deletions.
51 changes: 40 additions & 11 deletions docs/zengin/anims/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ Syntax:
!!! Note
In some rare occasions duplicates item

## eventSFX
## eventSfx

Play sound effect. It can be either `SFX` instance from scripts, or `.WAV` file.

Expand Down Expand Up @@ -230,9 +230,9 @@ Syntax:
A lot of original game animations contain `EMTPY_SLOT` instead of `EMPTY_SLOT` which was probably unintended. Gothic therefore acts as no keyword was provided, which causes a lot of sound interruptions. Therefore be mindful of spelling when copying original MDS scripts


## eventSFXGRND
## eventSfxGrnd

he same as [eventSfx](#eventsfx) with only one difference, the sound effect name is appended with the current material name.
the same as [eventSfx](#eventsfx) with only one difference, the sound effect name is appended with the current material name.

Example:
```dae
Expand Down Expand Up @@ -784,13 +784,13 @@ Syntax:
*eventTag (FRAME "DEF_WINDOW" "HIT_1_WINDOW_START HIT_1_WINDOW_END HIT_2_WINDOW_START HIT_2_WINDOW_END ...")
```

`HIT_1_WINDOW_START HIT_1_WINDOW_END HIT_2_WINDOW_START HIT_2_WINDOW_END` - specify 1 and up to 20? integers separated by space inside quotes. A window consists of start and end frame, therefore for each DEF_OPT_FRAME 2 numbers must be provided
`HIT_1_WINDOW_START HIT_1_WINDOW_END HIT_2_WINDOW_START HIT_2_WINDOW_END` - specify 1 and up to 20? integers separated by space inside quotes. A window consists of a start and end frame, therefore for each DEF_OPT_FRAME, you must provide 2 numbers.

- `HIT_WINDOW_START` - First value of the pair defines frame from which attack can continue.
- `HIT_WINDOW_END` - Second value is a little confusing. It defines START of the next attack animation. Ability to continue combo is stopped by [DEF_HIT_END](#def_hit_end) frames, therefore window end frame should be one frame after characters return to idle stance, which should be start of a next attack
- `HIT_WINDOW_END` - Second value is a little confusing. It defines **START** of the next attack animation. Ability to continue combo stops at [DEF_HIT_END](#def_hit_end) frames. Usually there are few frames of animation, where characters returns to idle position. `HIT_WINDOW_END` should be one frame after characters return to idle stance, which should also be first frame of the next attack


#### Attack combo event tags summary
#### Attack eventTags explained

This is original attack combo from Gothic 1

Expand Down Expand Up @@ -820,13 +820,39 @@ ani ("s_1hAttack" 1 "s_1hAttack" 0.0 0.1 M. "Hum_1hAttackComboT3_M05.asc
}
```

Now. The animation starts at frame 1 with fast swing of the sword, dealing damage at frame 4 (DEF_OPT_FRAME), then character goes into sort of 'recovery' stance ready for next attack. This recovery stance lasts from frames 10 (DEF_WINDOW first value) to 31 (DEF_HIT_END) after which he returns back to 'idle stance' at frame 32 (DEF_WINDOW second pair value - 1).
If player continues attack in the frames 10-31 the animation will jump to 33 (DEF_WINDOW second pair value) which marks start of next attack..
Let's focus only on the first combo.

```dae
ani ("s_1hAttack" 1 "s_1hAttack" 0.0 0.1 M. "Hum_1hAttackComboT3_M05.asc" F 1 114)
{
...
*eventTag (0 "DEF_OPT_FRAME" "4 ...")
*eventTag (0 "DEF_HIT_END" " 31 ...")
*eventTag (0 "DEF_WINDOW" " 10 33 ...")
...
}
```

| Frames | Aniamtion | Description |
|---------------|-----------------------------------------------------------|-----------------------------------------------------------------------------------------------|
| 1 | animation start | |
| 1..4 | swing of the sword | |
| 4 | sword is in the front of the model | `DEF_OPT_FRAME` - test damage collisions at this frame |
| 4..10 | end of the sword swing | |
| 10 | model stands ready to start next swing | `DEF_WINDOW` - user can press key to advance combo from this frame. |
| 10..31 | slight idle 'shake' | if player continues combo, animation playback will jump to the frame 33 (`DEF_WINDOW` second pair), from the animation perspective, next attack starts from pose similar to frame 10. If perfect inputs would be provided, animation would continue perfectly. |
| 31 | | `DEF_HIT_END` - ends user input. |
| 31..32 | model returns to the idle position | |
| 32 | idle position, standing with sword in hand | animation will end here, if combo not continued (`DEF_WINDOW` second pair - 1) |
| 33 | first frame of the next attack (similar to frame 10) | `DEF_WINDOW` second pair, start of next attack |


## eventPFXGRND



## eventPfxGrnd

Not used anywhere in the original game. Could possibly spawn particle effect like [eventPfx](#eventpfx) but with an added suffix similar to how [eventSfxGrnd](#eventsfxgrnd) works. Needs to be investigated.

Syntax:
```dae
Expand All @@ -835,15 +861,18 @@ Syntax:

## eventSetMesh

Unknown

Syntax:
```dae
*eventSETMESH (FRAME "NODE_NAME")
```

## modelTag

Should work similarly to eventTag, but can be defined inside aniEnum and applies for all animations of the Model.
Should work similarly to [eventTag](#eventtag), but can be defined inside aniEnum block and applies to all animations of the Model.

Syntax:
```dae
*modelTag (FRAME ??)
*modelTag (FRAME "EVENT_TAG_TYPE" "PARAMETER1" "PARAMETER2" "PARAMETER3" "PARAMETER4" ... )
```

0 comments on commit 2a8dd60

Please sign in to comment.