Bas: Difference between revisions

5,048 bytes added ,  4 years ago
Added info on basic bas layout, with known info for player attack animations
imported>Leoetlino
(Fix typo)
imported>Ginger
(Added info on basic bas layout, with known info for player attack animations)
Line 4: Line 4:
</onlyinclude>
</onlyinclude>


== Layout ==
Each bas file is made up of one list of elements, named Elements. Each element (Element0, Element1, etc) can be either a test to figure out what animation to play, or a call to play the animation.
=== Parameters ===
All nodes have Parameters, which determine what kind of node they are. They can be a control node, which helps decide which animation to play, or an animation node, which actually plays the animation.
{| class="wikitable"
!Key
!Type
!Description
!TypeIndex
!Default value
|-
|TypeIndex
|int
|Type of node the Element is. Known types are listed below the table.
| -
| -
|-
|NoSync
|bool
| -
|16
| -
|-
|JudgeOnce
|bool
| -
|7, 16, 98
|False
|-
|FileName
|str64
|Name of the animation to play
|67
| -
|-
|Morph
|int
| -
|67
| -
|-
|}
TypeIndex values:
* 7 - unknown
* 16 - unknown (believed to be range value comparison of Link's current movement speed or movement analog stick input, might be limited to two children)<ref>Element2 of Player_CutNinja.bas, WiiU 1.5.0</ref>
* 67 - play animation
* 98 - string value switch statement comparison (believed to use equipped weapon subtype to compare, known to accept three values to test against but might accept more or less)
=== Children ===
Control nodes will have Children, in addition to Parameters, which determine which Element to go to after the control node is evaluated. The properties of Children will be named Child0, Child1, etc, and each will have a single integer value, which will correspond to the Element number. e.g. <code>Child0: 7</code> points to Element7.
=== Extend ===
All nodes have an Extend, which contains specific details about the node. Control node Extends will contain details about the comparison being performed, while animation nodes will contain information about the animation being played, such as: during which frames of the animation the weapon will deal damage if it hits something, when user input is ignored, when to draw the weapon trails through the air, etc.
==== StringArray ====
A list of strings to use for a Parameter TypeIndex 98 comparison. Corresponds directly the Children of the node. i.e. if Value0 matches the value being compared against, the code will jump to the Element listed under Child0. If no comparison of a lower Child number has evaluated as true, automatically evaluates a Child whose value is "default" as true.<ref>Element0 of Player_CutNinja.bas, WiiU 1.5.0</ref>
==== BitIndex ====
Used with Parameter TypeIndex 7. Not much is known. <code>BitIndex0: {TypeIndex: 30}</code> evaluates whether or not Link has a shield equipped.<ref>Element1 of Player_CutNinja.bas, WiiU 1.5.0</ref>
==== Ranges ====
Used with Parameter TypeIndex 16. If the value being compared is above the Start value and below the End value, evaluates as true. Otherwise, moves on to the next value. (Unknown what happens if none of the Ranges evaluate to true, presumably game crash)
==== FrameCtrl ====
Used with Parameter TypeIndex 67. Required, even if it is empty.
{| class="wikitable"
!Key
!Type
!Description
!Default value
|-
|Rate
|float
|Speed at which to play the animation. Higher numbers are faster.
|1.0
|-
|EndFrame
|int
| -
| -
|-
|}
==== TriggerEvents ====
Used with Parameter TypeIndex 67. Events which are triggered during this animation.
{| class="wikitable"
!Key
!Type
!Description
!Default value
|-
|TypeIndex
|int
|Which type of event to fire. Known events are detailed below
| -
|-
|Frame
|int
|Which frame to fire the event on, relative to the frame numbers of the animation. Can be negative.
| -
|-
|Value
|strRef
| -
| -
|-
|}
TypeIndex values:
* 0 - unknown (believed to define when an attack begins to deal damage)<ref>Compare Event0 of TriggerEvents and Event0 of HoldEvents for any of Link's attack animations</ref>
* 4 - Triggers the animation controller to transition back into the idle stance. The Frame value should be a few before the end of the actual animation, so that the controller can make the blending look natural.<ref>Compare TriggerEvent TypeIndex 4 Frame value for an animation with the number of frames in the actual animation.</ref>
* 7 - unknown
==== HoldEvents ====
Used with Parameter TypeIndex 67. States that are entered into while the animation is playing.
{| class="wikitable"
!Key
!Type
!Description
!Default value
|-
|TypeIndex
|int
|Which type of event to fire. Known events are detailed below
| -
|-
|StartFrame
|int
|Which frame to start the event on, relative to the frame numbers of the animation. Unknown if it can be negative.
| -
|-
|EndFrame
|int
|Which frame to end the event on, relative to the frame numbers of the animation. A value of -1 is treated as the ending frame of the animation.
| -
|-
|Value
|strRef
| -
| -
|-
|}
TypeIndex values:
* 0 - unknown
* 2 - unknown
* 3 - Defines when an attack will deal damage. Value is the damage type. Left: slashing. Stab: piercing. Lower: blunt.
* 17 - unknown
* 45 - Defines when to accept input to start the next attack.
* 48 - Defines when to display the trails in the air during an attack.
[[Category:File extensions]]
[[Category:File extensions]]
[[Category:File extensions (AAMP)]]
[[Category:File extensions (AAMP)]]
[[Category:Actor parameter files]]
[[Category:Actor parameter files]]
<references />
Anonymous user