From bb986e406ac909e6fdeb8f87680b94584da66eb0 Mon Sep 17 00:00:00 2001 From: ttl269 Date: Tue, 30 Dec 2014 21:34:57 +0100 Subject: [PATCH 1/3] Particle system + 20.3.0.9 support 1. Better support for Skyrim particle system - some "Unknowns" replaced in NiPSysData and BSStripPSysData blocks. 2. Better support for 20.3.0.9 games Divinity 2 and Black Prophecy. Added structure of CSStreamableAssetData found in .item files (actually nif files) of Divinity 2 game. --- nif.xml | 221 +++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 162 insertions(+), 59 deletions(-) diff --git a/nif.xml b/nif.xml index fcf535d..e05b2ac 100644 --- a/nif.xml +++ b/nif.xml @@ -37,7 +37,7 @@ Emerge Emerge Emerge - Warhammer, Lazeska, Divinity 2, Howling Sword, Bully SE + Warhammer, Lazeska, Divinity 2, Howling Sword, Bully SE, Black Prophecy KrazyRain KrazyRain Epic Mickey @@ -1227,7 +1227,7 @@ Unknown link. Usually -1. Unknown. Unknown. - Idle animations tend to have low values for this, and NIF objects that have high values tend to correspond with the important parts of the animation. + Idle animations tend to have low values for this, and NIF objects that have high values tend to correspond with the important parts of the animation. Refers to the NiStringPalette which contains the name of the controlled NIF object. The name of the animated node. The name of the animated node. @@ -1263,10 +1263,10 @@ Determines the endianness of the data in the file. An extra version number, for companies that decide to modify the file format. Number of file objects. - This also appears to be the extra user version number and must be set in some circumstances. Probably used by Bethesda to denote the Havok version. + This also appears to be the extra user version number and must be set in some circumstances. Probably used by Bethesda to denote the Havok version. Unknown. Possibly User Version 2? - + Number of object types in this NIF file. List of all object types used in this NIF file. Maps file objects on their corresponding type: first file object is of type object_types[object_type_index[0]], the second of object_types[object_type_index[1]], etc. @@ -1440,7 +1440,7 @@ The triangles. Do we have bone indices? Bone indices, they index into 'Bones'. - Unknown + Unknown @@ -1553,7 +1553,7 @@ Offset of the skin from this bone in bind position. Translation offset of a bounding sphere holding all vertices. (Note that its a Sphere Containing Axis Aligned Box not a minimum volume Sphere) Radius for bounding sphere holding all vertices. - Unknown, always 0? + Unknown, always 0? Number of weighted vertices. The vertex weights. The vertex weights. @@ -2509,13 +2509,14 @@ Generic node object. Some flags; commonly 0x000C or 0x000A. Unknown Flag + Unknown Flag The translation vector. The rotation part of the transformation matrix. Scaling part (only uniform scaling is supported). Unknown function. Always seems to be (0, 0, 0) - The number of property objects referenced. - List of node properties. + The number of property objects referenced. + List of node properties. Always 2,0,2,0. 0 or 1. Do we have a bounding box? @@ -2572,8 +2573,58 @@ Adds randomness to Life Span. + + Unknown. + Index of the next NiParticleSystem?. + Unknown. + + + + Unknown. + Float data. + Unknown. + Unknown. + Unknown. + + + + Unknown. + Float data. + Unknown. + Unknown. + Unknown. + Unknown. + + + + Unknown. + Unknown. + Unknown. + + + + Unknown. + Unknown. + Unknown. + + + + Unknown. + Float data. + Unknown. + Unknown. + Unknown. + Unknown. + Unknown. + Unknown. + Unknown. + + An emitter that emits meshes? + Unknown bool. + Unknown. + Found in nifs from Black Prophecy game where this array if filled with 13 values of 0xBDBDBDBD. Is it some kind of pattern? Node parent of this modifier? @@ -2778,8 +2829,8 @@ The size of the second list of shape groups. Group of NiTriShape indices. Group of NiTriShape indices. - Unknown. - Unknown. + Unknown. + Unknown. @@ -2800,7 +2851,7 @@ Cyanide extension (only in version 10.2.0.0?). Unknown. Dirty Flag? - Two property links, used by Bethesda. + Two property links, used by Bethesda. @@ -2812,24 +2863,26 @@ Unknown identifier. Always 0. Number of vertices. - Number of vertices. - Bethesda uses this for max number of particles in NiPSysData. + Number of vertices. + Bethesda uses this for max number of particles in NiPSysData. Used with NiCollision objects when OBB or TRI is set. Unknown. Is the vertex array present? (Always non-zero.) The mesh vertices. Number of UV texture sets. - - Fallout3/Skyrim: can't be higher than 1. + Fallout3/Skyrim: can't be higher than 1. Bit 4: Has Tangents/Bitangents - Unknown, seen in Skyrim. + Unknown, seen in Skyrim. Do we have lighting normals? These are essential for proper lighting: if not present, the model will only be influenced by ambient light. The lighting normals. Tangent vectors. Bitangent vectors. + Enables/disables Unknown array 1. + Unknown array. Center of the bounding box (smallest box that contains all vertices) of the mesh. Radius of the mesh: maximal Euclidean distance between the center and all vertices. - Unknown, always 0? + Unknown, always 0? + Unknown Do we have vertex colors? These are usually used to fine-tune the lighting of the model. @@ -2845,10 +2898,8 @@ Note: for compatibility with NifTexture, set this value to either 0x00000000 or 0xFFFFFFFF. The UV texture coordinates. They follow the OpenGL standard: some programs may require you to flip the second coordinate. - Consistency Flags - Consistency Flags - Unknown. - Unknown. + Consistency Flags + Unknown. @@ -2948,22 +2999,22 @@ The maximum number of particles (matches the number of vertices). The particles' size. Is the particle size array present? - The individual particel sizes. + The individual particel sizes. The number of active particles at the time the system was saved. This is also the number of valid entries in the following arrays. Is the particle size array present? - The individual particel sizes. + The individual particel sizes. Is the particle rotation array present? - The individual particle rotations. - Unknown, probably a boolean. - Unknown + The individual particle rotations. Are the angles of rotation present? - Angles of rotation - Are axes of rotation present? + Angles of rotation + Are axes of rotation present? Unknown - if value is no, a single image rendered - 2,4,8,16,32,64 are potential values. If "Has" was no then this should be 256, which represents a 16x16 framed image, which is invalid + if value is no, a single image rendered + 2,4,8,16,32,64 are potential values. If "Has" was no then this should be 256, which represents a 16x16 framed image, which is invalid - Unknown + Unknown + Unknown + Unknown @@ -2988,21 +3039,21 @@ Particle system data. - Unknown. - Unknown. - Unknown. - Unknown. - Unknown. - - Boolean for Num Subtexture Offset UVs - How many quads to use in BSPSysSubTexModifier for texture atlasing - Sets aspect ratio for Subtexture Offset UV quads - Defines UV offsets - Unknown - Unknown - Unknown - Unknown - Unknown + Unknown. + Unknown. + Unknown. + Unknown. + Unknown. + Boolean for Num Subtexture Offset UVs + How many quads to use in BSPSysSubTexModifier for texture atlasing + Defines UV offsets + Sets aspect ratio for Subtexture Offset UV quads + Unknown + Unknown + Unknown + Unknown + Unknown + Unknown @@ -3172,8 +3223,8 @@ Name of this object. This is also the name of the action associated with this file. For instance, if the original NIF file is called "demon.nif" and this animation file contains an attack sequence, then the file would be called "demon_attack1.kf" and this field would contain the string "attack1". Name of following referenced NiTextKeyExtraData class. Link to NiTextKeyExtraData. - Unknown - Unknown + Unknown + Unknown Number of controlled objects. Unknown. Refers to controlled objects. @@ -3211,6 +3262,7 @@ Directional light source. + Unknown. @@ -3397,6 +3449,7 @@ 01 ROTATE_ABOUT_UP 10 RIGID_FACE_CAMERA 11 ALWAYS_FACE_CENTER + Unknown. The way the billboard will react to the camera. @@ -3486,10 +3539,13 @@ A particle system. - Unknown - Unknown - Unknown - If true, Particles are birthed into world space. If false, Particles are birthed into object space. + Unknown + Unknown + Unknown + If true, Particles are birthed into world space. If false, Particles are birthed into object space. + Unknown. Maybe World Space bool? + Unknown + Unknown The number of modifier references. The list of particle modifiers. @@ -3675,6 +3731,9 @@ Link to NiPSysSpawnModifier object? + + + Particle modifier that uses a NiNode to use as a "Bomb Object" to alter the path of particles. Link to a NiNode for bomb to function. @@ -3738,7 +3797,7 @@ Planar or Spherical type Adds a degree of randomness. Range for turbulence. - Unknown + Unknown @@ -3747,11 +3806,14 @@ Unknown. Time in seconds to fade out. Unknown. - Unknown + Unknown Particle emitter that uses points on a specified mesh to emit from. + Unknown byte. + Unknown. + Found in nifs from Black Prophecy game where this array if filled with 13 values of 0xBDBDBDBD. Is it some kind of pattern? The number of references to emitter meshes that follow. Links to meshes used for emitting. The way the particles get their initial direction and speed. @@ -3761,6 +3823,7 @@ Unknown. + Unknown. The number of object references that follow. Group of target NiNodes or NiTriShapes? @@ -3847,6 +3910,7 @@ Particle emitter that uses points within a sphere shape to emit from. The radius of the sphere shape + Unknown @@ -5123,10 +5187,10 @@ Bethesda-Specific (mesh?) Particle System Data. - Unknown - Unknown - Unknown - Unknown + Final value is computed as Max Point Count + 3, i.e. when value here is 0, Max Point Count for engine is 3. + Unknown + Unknown + Unknown @@ -6135,11 +6199,50 @@ + - + Has Kfm data? + Size of Kfm Data in bytes. + Complete Kfm data? + The number of controller sequence objects. + Refers to a list of NiControllerSequence object. + + + + Unknown. + Unknown. + Unknown. + Unknown. + Unknown. + Unknown. + Unknown. + + + + + + An index? + + Max = Num Animations -1? No transition from animation to itself. + + + + Refers to another animation + + + + + + + + + + + + Compressed collision mesh. From acbef025ef686131de1bd55b78cc7826251af265 Mon Sep 17 00:00:00 2001 From: ttl269 Date: Tue, 20 Jan 2015 14:04:37 +0100 Subject: [PATCH 2/3] XML version increment Increased niftoolsxml version to 0.7.2.0 due to changes in names in this branch. --- nif.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nif.xml b/nif.xml index e05b2ac..335b344 100644 --- a/nif.xml +++ b/nif.xml @@ -1,6 +1,6 @@ - + Refers to another animation - - - - + + + + + @@ -6243,6 +6247,11 @@ + + + + + Compressed collision mesh. @@ -6343,6 +6352,193 @@ Unknown Unknown - - + + + + Unknown. + Unknown + Unknown + Unknown. + Unknown + Unknown + Unknown + + + + Unknown. + Unknown + Unknown + Unknown. + Unknown + + + + Unknown. + Unknown + Has Kfm data? + Unknown. + Size of Kfm Data in bytes. + Complete Kfm data? + + + + Unknown. + Unknown + Unknown + Unknown. + Unknown + Unknown + + + + Unknown. + Unknown + Unknown + Unknown. + Unknown + Unknown + + + + + + Unknown + Unknown + Unknown + + + + Unknown + Unknown + + + + Unknown + Unknown + + + + Unknown + Unknown + + + + Unknown + Unknown + Unknown + + + + Unknown + Unknown + Unknown + + + + Unknown + Unknown + Unknown + Unknown + Unknown + Unknown + Unknown + + + + Unknown + Unknown + Unknown + Unknown + Unknown + Unknown + + + + Unknown + Unknown + + + + Unknown + Unknown + Unknown + Unknown + Unknown + Unknown + + + + Unknown + Unknown + Unknown + Unknown + Unknown + Unknown + + + + Unknown + Unknown + Unknown + + + + Unknown + Unknown + + + + Unknown + Unknown + + + + Unknown + Unknown + Unknown + Unknown + Unknown + Unknown + Unknown + Unknown + Unknown + Unknown + Unknown + Unknown + Unknown + Unknown + + + + Unknown + Unknown + + + + Unknown + Unknown + Unknown + Unknown + Unknown + Unknown + Unknown + + + + Unknown + Unknown + Unknown + Unknown + + + + Unknown + Unknown + Unknown + Unknown + Unknown + Unknown + + +