-
Notifications
You must be signed in to change notification settings - Fork 43
Release 0.9.0 #67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Release 0.9.0 #67
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Replaced "SkyrimMaterial" by "Unknown Int" in NiGeometryData (how it got there?) and bhkCompressedMeshShape as both seems not be havok material definitions.
Removed material definition and replaced by Unknown Int.
Fix/skyrim material removal
Changed definition of "Num UV Sets" (for >= 10.0.1.0 only) and get rid of "BS Num UV Sets". "Num UV Sets" defined as byte containing number of UV texture sets. Added definition of "Extra Vectors Flags" stored in byte. Only known function of that flags by that time is 4th bit representing flag for Tangents/Bitangents arrays - this is defined in bitflags type "ExtraVectorsFlags". As there is no certainity that number of UV Sets can be stored in all 8 bits, I have left AND function on line 2731 where "arr1" is getting a number of UV Sets only from lower 6 bits (i.e. max number of UV Sets is 63). There is a note about that on line 2725 (although it is for old version 4.0.0.2).
Changed type of ExtraVectorFlags from `bitflags` to `enum`.
Added billboard mode called "BS_ROTATE_ABOUT_UP" - it has value 5. It is used in Skyrim and Fallout 3 nifs. Also works in Oblivion.
added billboard mode BS_ROTATE_ABOUT_UP
Removed conditioned unknowns at end of NiSkinPartition block.
Num UV Sets split
Change `Unknown Float 2` to `Refraction Strength`
Updated BSShaderProperty, BSShaderLightingProperty, BSShaderNoLightingProperty, BSShaderPPLightingProperty and SkyShaderProperty blocks for Fallout3. Added BSShaderFlags2 and their meanings.
Reverted names of two Unknowns in BSShaderPPLightingProperty to "Unknown Float 4" and "Unknown Float 5". Also renamed "Envmap Scale" in BSShaderProperty to "Environment Map Scale" and added its description of funtionality - it is same as "Environment Map Scale" in BSLightingShaderProperty - controls the intesity of the environment map.
Fallout3 Shader Properties update
1. Added havok material definitions for Fallout 3. Only basic 31 materials defined. Function of other bits included in description. 2. Removed game prefix from havok material definitions. 3. Added havok layer definitions for Fallout 3. Conflicts: nif.xml
Corrected order of materials in list of Skyrim materials to be sorted ascending.
…pdate havok Materials and Layers update
NiSkinPartition unknowns removed
Added support for bhkRagdollTemplate block based on two .rdt files (.rdt file is a .nif file) located in Fallout3 directory "meshes/ragdollconstraint". It seems that game uses only file "Default.rdt". Second file "stiff.rdt" is unused and suspicious because in NiHeader it has User Version 2 set to 16 instead of 34 as all Fallout3 files (and also Default.rdt) have. Can anybody check Fallout New Vegas files if there are present any .rdt files? It would be good to have more than 2 files for decoding. Or exists other games with these files?
bhkRagdollTemplate support
Added structure of bhkBreakableConstraint. It seems that it is (and also bhkMalleableConstraint) some kind of "parent descriptor" for behavior for their "children" constraint which must be inserted within it. This inserted constraint in named "Sub Constraint", its type is determined by "Constraint Type" integer value. After this integer there is inserted complete constraint - one of allowed "common" constraints. And then there are inserted parameters specific for parent constrains (for example breakable one has "Threshold" and "Remove if Broken"). From vanilla nifs it seems that this "Sub Constraint" has always set its "Num Entities" to 2 but also both references to "Entities" are set to None. I think that this is probably because the relation between two rigid bodies this constraint is affecting is determined earlier - in "Entities" of parent constraint (bhkBreakableConstraint or bhkMalleableConstraint) and therefore it is not necessary (or it is forbidden?) to set references to entities also in "Sub Constraint".
1. Added PrismaticConstraint to list of available constraints in SubConstraint 2. Previously added enum "ConstraintType" renamed to "hkConstraintType"
bhkBreakableConstraint update
NiTimeController: - Added documentation for bit 5 and bit 6 of Flags. - Corrected documentation of bit 0 of Flags. - Added default value 1.0 to Frequency. BSBehaviorGraphExtraData - Changed type of "Controls Base Skeleton" from byte to bool.
value during export.
Add zero option to ExtraVectorsFlags to allow blender plugin to set the
Removal of extraneous or inaccurate "Unknown" descriptions, removal of unhelpful, repetitive and unnecessary descriptions. Clarification of many descriptions. Clarification of some names. Focus on more useful descriptions for particle system blocks.
Also some decoding and major corrections. NiParticlesData and NiPSysData were almost completely wrong. NiGeometryData was wrong. NiGeometry was wrong. This was mostly due to Bethesda changing or breaking inheritance for derived types. For Bethesda 20.2 NIFs NiParticlesData now inherits from NiObject directly. NiParticleSystem changes between BSGeometry or NiGeometry based on version. This resulted in NiPSysData and NiParticleSystem being almost completely wrong for later Bethesda versions. Also changed all misuses of `User Version` to differentiate Bethesda versions to `User Version 2`.
"Signed" turned into `signed` which is a reserved keyword in C++. A ref was missing a template.
nifdocsys will cast duplicate names as long as the types are integral and the largest type is first.
Use BSVertexDesc everywhere applicable. Now passing in the entire compound as an ARG. This means that a parser either has to treat BSVertexDesc as a uint64 and then shift to VF6-VF7, use & overloads for the class, or special case the class in some way. Changed BS Properties fixed-size link array to two flat Refs as they are always a Shader Property and an Alpha Property and are dealt with flatly in-engine as well.
Changed to be more in line with the real names. Combined the FO4 BSGeometrySegmentData with the old BSGeometrySegmentData in the same compound so that they would be the same type/variable for niflib on BSSubIndexTriShape and removed the suffix attr for it.
The mapping will now be done in nifdocsys.
Oblivion appears to use TransformA and TransformB just like FO3 and later but the orders of the vectors appear to be swapped for each transform. At least this makes the constraints render consistent with FO3+.
Narrow and correct the template types used for refs where possible. Give correct inheritance to shader properties for Skyrim and later.
Also flattened the hardcoded entity arrays since there has to be two anyway. This way changing the Num to incorrect number will not mess up the file writes. Reduced the 3 sets of Transform A and B rows to only two by changing the vercond.
With gen_niflib supporting the prefix attribute, enums can be shifted to using it where needed. In this case the name attributes of the bitflags take up a lot of space in the UI and removing the prefix compacts this. Also made them more consistent. FO3 is now F3SF1/F3SF2 and FO4 is F4SF1/F4SF2.
Missed field when transferring decoding from 010 templates.
The type was actually Bounding Volume, with the "unknown int" being the bound type. This compound already existed in the XML for other blocks.
Aids in proper creation of new blocks by having sound default values. Also splits Glossiness/Smoothness in BSLightingShaderProperty to have correct defaults and documentation on ranges. Unknown Float 1 was changed to Rimlight Power as well, and the next line, Backlight Power, relies on its value being FLT_MAX. So `Rimlight Power == 0x7F7FFFFF` is used as a `cond` for Backlight Power and this may require the parser to deal with a float to hex comparison.
The header conditions did not apply to 20.0.0.4.10 which is apparently present in Steam distributions. The correct files are 20.0.0.5.11 which is a newer format. Fixed a condition in NiParticlesData that was accidentally applying to non-Bethesda NIFs.
Combined GeomMaterialData and MaterialData into one compound and changed NiRenderObject and NiGeometry to compensate, since they used the exact same format for material data. Moved more rows into MaterialData as well which simplified the conditioning/duplication on NiGeometry greatly.
BSPackedCombinedGeomDataExtra is the version of precombined produced by the CK, whereas all vanilla precombined was BSPackedCombinedGeomDataExtra. The latter is much smaller because it only includes a reference to the geometry. The CK precombined bakes all geometry into the file.
Added NiSequenceData and NiEvaluator for 20.5.0.0+. In 20.5.0.0 NiSequenceData is an alias for NiControllerSequence. The XML does not handle this and will defer to parser support. It does not seem to happen in practice. For 20.5.0.1, NiSequenceData is a hybrid of old and new, pre-NiEvaluator. For 20.5.0.2+, NiEvaluator replaces NiInterpolator for everything. Data wise they are almost exactly the same. Also improved the default values for Blend and BSpline interpolators.
Instead of requiring all parsers to special-case the arg passing for BSVertexDesc, have just adopted the `\` syntax for compound member accessor. So at least for parsers that do not internalize BSVertexDesc to be `uint64_t` or equivalent to mirror the game, all you need to do is support `\`. For C++ this would go from `Vertex Desc\Vertex Attributes` to `vertexDesc.vertexAttributes` The period syntax was decided against because it is not very visible and `\` is familiar from filepaths / directory trees.
Rename LOD levels in BSLODTriShape to match BSMeshLODTriShape. Made NiMeshModifier abstract. Named NiGeometryData Group ID, which is never used but is at least known.
The game, Entropia Universe, only used Gamebryo between 2004 and 2009, when it switched to CryEngine 2. http://www.entropiawiki.com/Info.aspx?chart=VU&name=10.0
nifxml 0.9. Please read PR message for new features and required parser changes.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Release version 0.9.0
niflibtype
- generators must map this internally.<version>
New Attributes
prefix
forenum
/bitflags
. It is used for prepending to each enum option name where necessary.suffix
foradd
. It is appended to the name of theadd
where necessary.Required Parser Changes
arg
attribute, you must support\
to mean compound member accessor. For exampleVertex Desc\Vertex Attributes
for the compoundBSVertexDesc
.enum
/bitflags
.<add>
use the same name but the type differs per version. They are always exclusive by version but sometimes the type changes.