|
NSUNI/NSLAR Library a250670
|
Classes | |
| struct | nnl::colbox::CollisionBox14 |
| Represents a collision box. More... | |
| struct | nnl::colbox::CollisionBox18 |
| Represents a collision box. More... | |
| struct | nnl::colbox::CollisionBox20 |
| Represents a collision box in a hitbox config. More... | |
| struct | nnl::colbox::HitboxConfig |
| Represents a hitbox config. More... | |
| struct | nnl::colbox::ColBoxConfig |
| Represents the configuration for various collision boxes of a character. More... | |
Functions | |
| bool | nnl::colbox::IsOfType (BufferView buffer) |
| Tests if the provided file is a collision box config. | |
| ColBoxConfig | nnl::colbox::Import (BufferView buffer) |
| Parses a binary file and converts it to a structured CollisionBoxConfig. | |
| Buffer | nnl::colbox::Export (const ColBoxConfig &colbox_config) |
| Converts a CollisionBoxConfig to a binary file representation. | |
| struct nnl::colbox::CollisionBox14 |
Represents a collision box.
This struct allows you to configure collision boxes that can be used in interactions with the environment, other entities, and damage handling.
Public Attributes | |
| model::BoneTarget | bone_target = 0 |
| u16 | unknown2 = 0 |
| unknown: equals to 1 in NSLAR (in damage, attack boxes) | |
| glm::vec3 | translation {0.0f} |
| f32 | size = 4.0f |
| Specifies the size of the box. | |
| model::BoneTarget nnl::colbox::CollisionBox14::bone_target = 0 |
Specifies the bone to which this box will be attached.
| f32 nnl::colbox::CollisionBox14::size = 4.0f |
Specifies the size of the box.
| glm::vec3 nnl::colbox::CollisionBox14::translation {0.0f} |
Specifies the position of the box relative to the bone.
| u16 nnl::colbox::CollisionBox14::unknown2 = 0 |
unknown: equals to 1 in NSLAR (in damage, attack boxes)
| struct nnl::colbox::CollisionBox18 |
Represents a collision box.
This struct allows you to configure collision boxes that can be used to detect collisions with other entities.
Public Attributes | |
| model::BoneTarget | bone_target = 0 |
| u16 | unknown2 = 0 |
| unknown | |
| glm::vec3 | translation {0.0f} |
| f32 | size = 4.0f |
| Specifies the size of the box. | |
| f32 | unknown14 = 0.0f |
| Unknown. | |
| model::BoneTarget nnl::colbox::CollisionBox18::bone_target = 0 |
Specifies the bone to which this box will be attached.
| f32 nnl::colbox::CollisionBox18::size = 4.0f |
Specifies the size of the box.
| glm::vec3 nnl::colbox::CollisionBox18::translation {0.0f} |
Specifies the position of the box relative to the bone.
| f32 nnl::colbox::CollisionBox18::unknown14 = 0.0f |
Unknown.
| u16 nnl::colbox::CollisionBox18::unknown2 = 0 |
unknown
| struct nnl::colbox::CollisionBox20 |
Represents a collision box in a hitbox config.
Public Attributes | |
| model::BoneTarget | bone_target = 0 |
| u16 | distance_attack = 0 |
| glm::vec3 | translation {0.0f} |
| glm::vec3 | translation_2 {0.0f} |
| f32 | size = 0 |
| Specifies the size of the box. | |
| model::BoneTarget nnl::colbox::CollisionBox20::bone_target = 0 |
Specifies the bone to which this box will be attached.
| u16 nnl::colbox::CollisionBox20::distance_attack = 0 |
Sets some flags (e.g., if a secondary box is created). Equals 5 or 1 in NSUNI.
| f32 nnl::colbox::CollisionBox20::size = 0 |
Specifies the size of the box.
| glm::vec3 nnl::colbox::CollisionBox20::translation {0.0f} |
Specifies the position of the box relative to the bone.
| glm::vec3 nnl::colbox::CollisionBox20::translation_2 {0.0f} |
Specifies the position of the second box (if distance attack is set)
| struct nnl::colbox::HitboxConfig |
Represents a hitbox config.
Public Attributes | |
| u16 | dmg_start_frame = 0 |
| The frame at which damage starts (relative to the action). | |
| u16 | dmg_end_frame = 0 |
| The frame at which damage ends. | |
| u16 | effect_id = 0 |
| u8 | unknownC = 1 |
| u8 | unknownD = 0 |
| u16 | unknownE = 0 |
| Unknown. | |
| std::vector< CollisionBox20 > | colboxes |
| Configures parts that can deal damage. | |
| std::vector<CollisionBox20> nnl::colbox::HitboxConfig::colboxes |
Configures parts that can deal damage.
| u16 nnl::colbox::HitboxConfig::dmg_end_frame = 0 |
The frame at which damage ends.
| u16 nnl::colbox::HitboxConfig::dmg_start_frame = 0 |
The frame at which damage starts (relative to the action).
| u16 nnl::colbox::HitboxConfig::effect_id = 0 |
The ID of the effect played when the attack hits another entity. This may affect the damage it receives.
| u8 nnl::colbox::HitboxConfig::unknownC = 1 |
Unknown, maybe an ID: affects health dmg, in most cases it goes incrementally
| u8 nnl::colbox::HitboxConfig::unknownD = 0 |
Unknown: not used, usually equals to 0 (not in the monkey boss from NSLAR)
| u16 nnl::colbox::HitboxConfig::unknownE = 0 |
Unknown.
| struct nnl::colbox::ColBoxConfig |
Represents the configuration for various collision boxes of a character.
This struct contains various configurations for collisions with the environment, other entities, and configurations for both receiving and dealing damage.
In NSUNI only attack and damage collisions (hitboxes/hurtboxes) can be changed with this configuration. Other types of collision boxes seem to be unaffected by it. However, everything works correctly in NSLAR.
Public Attributes | |
| std::vector< CollisionBox14 > | col_enviroment |
| std::vector< CollisionBox14 > | col_unknown |
| Unknown collision configuration. | |
| std::vector< CollisionBox18 > | col_entities |
| std::vector< CollisionBox14 > | col_damage |
| Configures parts that can receive damage (hurtboxes). | |
| tsl::ordered_map< action::Id, std::vector< HitboxConfig > > | col_attack |
| Configures parts that can deal damage (hitboxes). | |
| tsl::ordered_map<action::Id, std::vector<HitboxConfig> > nnl::colbox::ColBoxConfig::col_attack |
Configures parts that can deal damage (hitboxes).
| std::vector<CollisionBox14> nnl::colbox::ColBoxConfig::col_damage |
Configures parts that can receive damage (hurtboxes).
| std::vector<CollisionBox18> nnl::colbox::ColBoxConfig::col_entities |
Configures collisions with other entities
| std::vector<CollisionBox14> nnl::colbox::ColBoxConfig::col_enviroment |
Configures collisions with the static environment.
| std::vector<CollisionBox14> nnl::colbox::ColBoxConfig::col_unknown |
Unknown collision configuration.
|
nodiscard |
Converts a CollisionBoxConfig to a binary file representation.
| colbox_config | The config to be converted into a binary format. |
| ColBoxConfig nnl::colbox::Import | ( | BufferView | buffer | ) |
Parses a binary file and converts it to a structured CollisionBoxConfig.
| buffer | The binary file to be processed. |
| bool nnl::colbox::IsOfType | ( | BufferView | buffer | ) |
Tests if the provided file is a collision box config.
| buffer | The file to be tested. |