|
NSUNI/NSLAR Library a250670
|
Classes | |
| union | nnl::action::AnimationNode |
| A union that represents a function or argument node within an animation playback chain. More... | |
| union | nnl::action::EffectNode |
| A union that represents a function or argument node within an auxiliary effect playback chain. More... | |
| struct | nnl::action::Action |
| Represents an action. More... | |
Typedefs | |
| using | nnl::action::ActionConfig = tsl::ordered_map<action::Id, Action> |
| Represents a collection of actions associated with an entity. | |
Functions | |
| bool | nnl::action::IsOfType (BufferView buffer) |
| Tests if the provided file is an action config. | |
| ActionConfig | nnl::action::Import (BufferView buffer) |
| Parses a binary file and converts it to ActionConfig. | |
| Buffer | nnl::action::Export (const ActionConfig &action_config) |
| Converts ActionConfig to a binary file representation. | |
Variables | |
| constexpr u16 | nnl::action::kNumAnimFuncNSUNI = 0x1C |
| constexpr u16 | nnl::action::kNumEffectFuncNSUNI = 0x26 |
| constexpr u16 | nnl::action::kNumAnimFuncNSLAR = 0x14 |
| constexpr u16 | nnl::action::kNumEffectFuncNSLAR = 0xC |
| union nnl::action::AnimationNode |
A union that represents a function or argument node within an animation playback chain.
Public Member Functions | |
| NNL_PACK (struct { AnimationFunction function;u8 next_main_node;bool flag;}) main | |
| Layout of a main node. | |
Public Attributes | |
| u8 | args [4] |
| Raw memory for storing argument values in argument nodes. | |
| nnl::action::AnimationNode::NNL_PACK | ( | struct { AnimationFunction function;u8 next_main_node;bool flag;} | ) |
Layout of a main node.
| u8 nnl::action::AnimationNode::args[4] |
Raw memory for storing argument values in argument nodes.
| union nnl::action::EffectNode |
A union that represents a function or argument node within an auxiliary effect playback chain.
Effect nodes trigger additional visual and sound effects during the playback of a main animation chain.
Public Attributes | |
| u8 | args [4] |
| Array for storing argument values (in argument nodes) | |
| u8 nnl::action::EffectNode::args[4] |
Array for storing argument values (in argument nodes)
| struct nnl::action::Action |
Represents an action.
An action is a behavior that an entity can perform, such as running, jumping, or attacking. It may consist of multiple animations accompanied by various visual and sound effects.
Public Attributes | |
| std::string | name = "" |
| The name of the action. It does not affect anything. | |
| std::vector< AnimationNode > | animation_nodes |
| std::vector< EffectNode > | effect_nodes |
| std::vector<AnimationNode> nnl::action::Action::animation_nodes |
A series of nodes that configure what animations are played during the action and how they are played.
| std::vector<EffectNode> nnl::action::Action::effect_nodes |
A series of nodes that can trigger additional effects during the animation playback.
| std::string nnl::action::Action::name = "" |
The name of the action. It does not affect anything.
| using nnl::action::ActionConfig = tsl::ordered_map<action::Id, Action> |
Represents a collection of actions associated with an entity.
|
strong |
Enumeration for different animation functions.
This enum defines various functions that can be used in animation nodes to control animation playback.
Function used in NSLAR (0x14 in total): 0, 2, 5, 6, 7, 8, a, b, c, e, f, 0x10, 0x13
Functions used in NSUNI (0x1C in total): 0, 2, 6, 7, 8, 9, a, b, c, e, f, 0x10, 0x13, 0x14, 0x16, 0x19, 1a, 1b
Syntax notes:
[] - represents a list of argument nodes expected by the function
{} - a single 4 byte node with different layouts.
a - an argument
| Enumerator | |
|---|---|
| kEnd | Mark the end of a node sequence; []. |
| kNext | Jump to the next specified node; []. |
| kGoto | Go to a node; a0 - a relative index of the node to go back or forward to: current index + index*4; [{i32}] |
| kTransitionToAnimation5 | |
| kTransitionToAnimation6 | Transition into another animation from the current pose; a0 - animation id, a1 - num of frames the transition takes; [{i16,i16}] |
| kEndAnimationPlayback | This is used after 0xF, 0x6, 0x5; []. |
| kInitAnimationPlayback | This is used before 0xF (sometimes 0x6); []. |
| kSetFlags | Writes some flags at the offset, used when jumping, getting hit; a0 - offset, a1 flag, a2 flag [{u16,i8,u8}] |
| kInitCountdown | |
| kCheckCountdown | Check if the countdown is 0; []. |
| kSetBossHitTarget | |
| kUnkD | Might call a function; [{i32}]. |
| kSetAnimSpeed | Changes the animation playback speed; a0 - speed (4096 is the default) [{i16,_}] |
| kPlayAnimation | Play an animation; a0 - animation id (from an AnimationContainer); [{i16,_}] |
| kSetAnimStartFrame | Play the animation from a frame; a0 - frame to start playback from; [{u16,_}] |
| kUnk11 | |
| kUnk12 | ?; if a0 == 0 animation gets stuck; [{u16,_}] |
| kUnk13 | Might call a function; [{unused}]. |
| kSetMeshGroupVisib | Change visibility of a mesh group; a0 - mesh group, a1 - visibility status; [{u16,u16}] |
| kWaitAfter | Pause after executing animation and before going to the next node; a0 - time in frames; [{u16,_}] |
| kWaitBefore | Pause before executing animation and before going to the next node; a0 - time; [{u16,_}] |
| kEnableTextureSwap | Activate a texture swap; a0 - texture swap id; [{u16,_}]. |
| kDisableTextureSwap | Disable a texture swap; a0 - texture swap id; [{u16,_}]. |
| kEnableEffect | Trigger an effect; a0 effect id (e.g. 0xF shakes the camera); [{u16,u16},{u16,u16}] |
| kUnk1A | Might call a function; [{u16,u16},{u16,u16},{f32},{f32},{f32},{f32}] |
| kSetComboTransitFrames | Set combo animation transition frames: a0 - action id ,a1 = -1; a0 cooldown, a1 time frame to trigger the next attack; [{i16,i16},{i16,i16},{i16,i16}] |
|
strong |
Enumeration for different effect functions.
This enum defines various functions that can be used during animation playback that is controlled by animation nodes.
Functions used in NSLAR (0xC in total): 0, 1, 2, 3, 4, 6, 7, a, b;
Functions used in NSUNI (0x26 in total): 0, 1, 2, 3, 6, 7, a, b, 0x14, 0x17, 0x19, 1a, 1b, 1d, 1e, 1f, 0x20, 0x21, 0x22, 0x23;
Syntax notes:
[] - represents a list of argument nodes expected by the function
{} - a single 4 byte node with different layouts
<{}> - an optional node
| Enumerator | |
|---|---|
| kEnd | Mark the end of a node sequence; []. |
| kSetFlags1 | Set some flags [<{u16,u16}>, <{i16,_}>]; 0-2 args in NSUNI, 0-3 in NSLAR [<{u16,i8,u8}>]; |
| kEnableEffect | Change the effect that appears from footsteps (?); a0 effect id [{u16, i16}]; |
| kOpacityTransition3 | |
| kOpacityTransition4 | |
| kOpacityTransition6 | |
| kPlaySFX | Play a sound from a sound bank; a0 - sound id, a1 - ?, a2 - ? [{u16,u8,__},{f32}] |
| kPlaySFXRND | Play one of the 2 sounds from a sound bank; a0, a1 - sound id [{u16, u16},{u8 = 1, u8 = 1,__}] |
| kPlayUVAnim | a0 - uv anim id, a1 - u_shift, a2 - v_shift [{u16,i16},{i16,_}] |
| kOpacityTransitionB | |
| kUnkC | ? |
| kNextD | Does nothing?; []. |
| kNextE | Does nothing?; []. |
| kNextF | Does nothing?; []. |
| kUnk10 | ? |
| kUnk11 | ? |
| kUnk12 | ? |
| kSetFlags13 | ? |
| kEnableEffect14 | |
| kSetFlags15 | |
| kSetFlags16 | |
| kUnk17 | |
| kUnk18 | ? |
| kSlowdown | ? |
| kEnableDisplayEffect | Enable a display effect. The num of args may vary [{u16 - effect id, u16},...]; |
| kEnableEffect1B | a0 effect group, a1 effect id, a2 repeat interval (if 0 - play once) [{u16,__}, {u16, u16}] |
| kUnk1C | ? |
| kAnimateCamera | [{u16 num extra args,u16 - play time num frames},{u16 - transition to default camera,u16 - fps to transition back in start pos},{f32 = x start},{f32 = y start},{f32 = x shift},{f32 = y shift},{f32 pitch},{f32 yaw },{f32 roll},{f32 pitch shift},{f32 yaw shift},{f32 roll shift},{f32 fov (extra)},{f32 pan(extra)},{f32 pan shift},{f32}] |
| kMoveRootBone | a0 - mode, a1 num frames, a2, a3, a4 x,y,z [{u16,u16},{f32},{f32},{f32},{f32},{u16,u16},{u16,u16}] |
| kAnimateCamera1F | Almost the same as 0x1D but more arg nodes are used (17 - 19) [...] |
| kSetMeshGroupVisib | |
| kEnableJutsuEffect | The num of args may vary. |
| kSetTextureSwapStat | |
| kSetFlags23 | Set some character flags (?) [{i16,i16},{i16,i16},{i16,i16}]. |
| kUnk25 | ? Used in "Scene" action configs [{}, {}] |
|
nodiscard |
Converts ActionConfig to a binary file representation.
This function takes an ActionConfig object and converts it into its binary format.
| action_config | The ActionConfig object to be converted into the binary format. |
| ActionConfig nnl::action::Import | ( | BufferView | buffer | ) |
Parses a binary file and converts it to ActionConfig.
This function takes a binary representation of an action config, parses its contents, and converts them into an ActionConfig object for easier access and manipulation.
| buffer | The binary file buffer to be processed. |
| bool nnl::action::IsOfType | ( | BufferView | buffer | ) |
Tests if the provided file is an action config.
This function takes a file buffer and checks whether it corresponds to the in-game action config format.
| buffer | The file buffer to be tested. |
|
constexpr |
The number of functions available for use in animation nodes in NSLAR
|
constexpr |
The number of functions available for use in animation nodes in NSUNI
|
constexpr |
The number of functions available for use in effect nodes in NSLAR
|
constexpr |
The number of functions available for use in effect nodes in NSUNI