This repository has been archived by the owner on Aug 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
nif_ffd
4608 lines (3969 loc) · 127 KB
/
nif_ffd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/**** BEGIN LICENSE BLOCK ****
BSD 3-Clause License
Copyright (c) 2023, the wind.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**** END LICENCE BLOCK ****/
// Origin: "nif.xml" checkout f265c56482c728c6877e45d5b5993d3bff83670a at
// https://github.com/niftools/nifxml.git
//
// Later modifications are ineligible and plain wrong IMHO. You could create
// independent projects for each one of the new versions you're interested in.
// Highlighter: C#
// https://github.com/corwinn/libwind-ffd/blob/main/formal_description
// Describe a .nif. This is the common ground from which the different variants
// shall be formed.
// The purpose of this file is to test the correctness of the "nif.xml"
// transformation and to update my libffd to deal with the new constructs
// required (or even make it more scalable by updating its design for custom
// extensions).
// Then this file shall be split into different .nif versions to the best of my
// ability. Then you can get these, or the big mess, and create projects for
// them; they shall remain as immutable templates in this project.
// Its way better to manage simple files, and let the code merge them on the
// fly - when needed: for example modifying version x FFD will no longer damage
// version y FFD.
//
// This instance is crafted by hand, because a parser generator at the 1st run
// will prevent me recalling "nif.xml". The funny thing is "github" is
// recognizing this text as C - I'm "flattered", but this ain't C; I created
// a "nif.xml" to C parser generator a long time ago - find it if you need
// read-only speed.
// There will be xml2ffd and ffd2xml for the ones who prefer XML - no worries :)
// Machine types ...............................................................
type uint 4
type int -4
type short -2
type ushort 2
type byte 1
type char byte
type bool byte (Version > 0x04010001)
type bool int (Version <= 0x04010001)
type float .4 //TODO implement me
type Flags ushort // bit-flags
type Ptr int // -ptr
type Ref int // +ptr
// enum .......................................................................
enum TextureAlphaFormat uint
NONE 0 //
BINARY 1 // Mask
SMOOTH 2 // Blend
DEFAULT 3
enum TextureApplyMode uint
REPLACE 0 // GL_REPLACE
DECAL 1 // GL_DECAL
MODULATE 2 // GL_MODULATE
HILIGHT 3 // "PS2 Only. Function Unknown."
HILIGHT2 4 // "Parallax Flag in some Oblivion meshes."
enum TextureType uint //REPLACE {TexType}
BASE 0 // diffuse
DARK 1 // "Used to darken the model with false lighting."
DETAIL 2 // "Combined with base map for added detail."
GLOSS 3 // specular
GLOW 4
BUMP 5
NORMAL 6
UNKNOWN2 7
DECAL_0 8
DECAL_1 9
DECAL_2 10
DECAL_3 11
enum AnimInterpolation uint
LINEAR 1
QUADRATIC 2
TBC 3 // "Tension Bias Continuity"
XYZ_ROTATION 4 // ! quaternion
CONST 5 // "Used for visibility keys in NiBoolData."
// "how vertex colors influence lighting"
enum LightMode uint
EMISSIVE 0
EMI_AMB_DIF 1 // "Emissive + Ambient + Diffuse."
//TODO to nif_tes4_ffd
enum OblivionHavokMaterial uint
STONE 0 //TODO the parser: code_repetition-- => pattern: table
CLOTH 1
DIRT 2
GLASS 3
GRASS 4
METAL 5
ORGANIC 6
SKIN 7
WATER 8
WOOD 9
ROCK 10
HEAVY_METAL 11
HEAVY_WOOD 12
CHAIN 13
SNOW 14
STONE_STAIRS 15 //LATER R&D: Whats with all the stairs? Check with the
CLOTH_STAIRS 16 // mod creation tool (can't recall its name)
DIRT_STAIRS 17
GLASS_STAIRS 18
GRASS_STAIRS 19
METAL_STAIRS 20
ORGANIC_STAIRS 21
SKIN_STAIRS 22
WATER_STAIRS 23
WOOD_STAIRS 24
HEAVY_STONE_STAIRS 25
HEAVY_METAL_STAIRS 26
HEAVY_WOOD_STAIRS 27
CHAIN_STAIRS 28
SNOW_STAIRS 29
ELEVATOR 30
RUBBER 31
//TODO to nif_fo3_ffd
/* "Bit 5: flag for PLATFORM (for values 32-63 -32 to know material number)
Bit 6: flag for STAIRS (for values 64-95: -64)
Bit 5+6: flag for STAIRS+PLATFORM (for values 96-127: -96)" */
enum Fallout3HavokMaterial uint
STONE
CLOTH
DIRT
GLASS
GRASS
METAL 5
ORGANIC
SKIN
WATER
WOOD
HEAVY_STONE 10
HEAVY_METAL
HEAVY_WOOD
CHAIN
BOTTLECAP
ELEVATOR 15
HOLLOW_METAL
SHEET_METAL
SAND
BROKEN_CONCRETE
VEHICLE_BODY 20
VEHICLE_PART_SOLID
VEHICLE_PART_HOLLOW
BARREL
BOTTLE
SODA_CAN 25
PISTOL
RIFLE
SHOPPING_CART
LUNCHBOX
BABY_RATTLE 30
RUBBER_BALL
//TODO to nif_tes5_ffd
enum SkyrimHavokMaterial uint
STONE 3741512247 // <- looks like a hash function;
CLOTH 3839073443
DIRT 3106094762
GLASS 3739830338
GRASS 1848600814
// METAL ?
ORGANIC 2974920155
SKIN 591247106
WATER 1024582599
WOOD 500811281
// other 1-word ones
GRAVEL 428587608
BOTTLE 493553910
BARREL 732141076
BASKET 790784366
ICE 873356572
BOOK 1264672850
CARPET 1286705471
MUD 1486385281
SAND 2168343821
DRAGON 2518321175
BONE 3049421844
COIN 3589100606
ARROW 3725505938
HEAVY_STONE 1570821952
HEAVY_METAL 2229413539
HEAVY_WOOD 3070783559
CHAIN 3074114406
SNOW 398949039
STAIRS_STONE 899511101 // Interesting
STONE_STAIRS 1886078335 //
STAIRS_BROKEN_STONE 2892392795
STAIRS_WOOD 1461712277 // ??
WOOD_STAIRS 1803571212 //
STAIRS_SNOW 1560365355
// new
BROKEN_STONE 131151687
SOLID_METAL 1288358971
CHAIN_METAL 438912228
LIGHT_WOOD 365420259
BOTTLE_SMALL 2025794648
CERAMIC_MEDIUM 781661019
SKIN_SMALL 2632367422
SKIN_LARGE 2965929619
//
BOULDER_SMALL 1550912982
BOULDER_LARGE 1885326971
BOULDER_MEDIUM 4283869410
//
BOWS_STAVES 1607128641
AXE_1HAND 1305674443
BLUNT_2HAND 3969592277
BLADE_2HAND 2022742644
BLADE_1HAND 1060167844
BLADE_1HAND_SMALL 2617944780
//
SHIELD_LIGHT 3448167928
SHIELD_HEAVY 3702389584
ARMOR_LIGHT 3424720541
ARMOR_HEAVY 3708432437
//
UNKNOWN_1 1028101969 // "draugr\character assets\skeletons.nif"
UNKNOWN_2 1440721808 // "draugr\draugrbootsfemale_go.nif"
UNKNOWN_3 1574477864 // "dragon\character assets\skeleton.nif"
UNKNOWN_4 1591009235 // "deer\character assets\skeleton.nif"
// Mesh color. "Anything higher than 57 is also null."
//TODO to nif_tes4_ffd
enum OblivionLayer byte
UNIDENTIFIED // white
STATIC // red
ANIM_STATIC // magenta
TRANSPARENT // light pink
CLUTTER // light blue
WEAPON // orange
PROJECTILE // light orange
SPELL // cyan
BIPED // green
TREES // light brown
PROPS // magenta
WATER // cyan
TRIGGER // light grey
TERRAIN // light yellow
TRAP // light grey
NONCOLLIDABLE // white
CLOUD_TRAP // greenish grey
GROUND //TODO "none"? - what color is this ?
PORTAL // green
STAIRS // white
CHAR_CONTROLLER // yellow
AVOID_BOX // dark yellow
UNKNOWN1 // white
UNKNOWN2 // white
CAMERA_PICK // white
ITEM_PICK // white
LINE_OF_SIGHT // white
PATH_PICK // white
CUSTOM_PICK_1 // white
CUSTOM_PICK_2 // white
SPELL_EXPLOSION // white
DROPPING_PICK // white
OTHER // white
HEAD
BODY
SPINE1
SPINE2
L_UPPER_ARM
L_FOREARM
L_HAND
L_THIGH
L_CALF
L_FOOT
R_UPPER_ARM
R_FOREARM
R_HAND
R_THIGH
R_CALF
R_FOOT
TAIL
SIDE_WEAPON
SHIELD
QUIVER
BACK_WEAPON
BACK_WEAPON2
PONYTAIL
WING
NULL // OblivionLayer
//TODO to nif_fo3_ffd
enum Fallout3Layer byte
UNIDENTIFIED // white
STATIC // red
ANIM_STATIC // magenta
TRANSPARENT // light pink
CLUTTER // light blue
WEAPON // orange
PROJECTILE // light orange
SPELL // cyan
BIPED // green
TREES // light brown
PROPS // magenta
WATER // cyan
TRIGGER // light grey
TERRAIN // light yellow
TRAP // light grey
NONCOLLIDABLE // white
CLOUD_TRAP // greenish grey
GROUND // none
PORTAL // green
DEBRIS_SMALL // white
DEBRIS_LARGE // white
ACOUSTIC_SPACE // white
ACTORZONE // white
PROJECTILEZONE // white
GASTRAP // yellowish green
SHELLCASING // white
TRANSPARENT_SMALL // white
INVISIBLE_WALL // white
TRANSPARENT_SMALL_ANIM // white
BIPED // green
CHARCONTROLLER // yellow
AVOIDBOX // orange
COLLISIONBOX // white
CAMERASPHERE // white
DOORDETECTION // white
CAMERAPICK // white
ITEMPICK // white
LINEOFSIGHT // white
PATHPICK // white
CUSTOMPICK1 // white
CUSTOMPICK2 // white
SPELLEXPLOSION // white
DROPPINGPICK // white
NULL // white
OTHER // white
HEAD
BODY
SPINE1
SPINE2
L_UPPER_ARM
L_FORE_ARM
L_HAND
L_THIGH
L_CALF
L_FOOT
R_UPPER_ARM
R_FORE_ARM
R_HAND
R_THIGH
R_CALF
R_FOOT
TAIL
SHIELD
QUIVER
WEAPON
PONYTAIL
WING
PACK
CHAIN
ADDONHEAD
ADDONCHEST
ADDONARM
ADDONLEG // Fallout3Layer
enum SkyrimLayer byte
UNIDENTIFIED
STATIC
ANIMSTATIC
TRANSPARENT
CLUTTER // "Object with this layer will float on water surface."
WEAPON
PROJECTILE
SPELL
BIPED
TREES
PROPS
WATER
TRIGGER
TERRAIN
TRAP
NONCOLLIDABLE
CLOUD_TRAP
GROUND
PORTAL
DEBRIS_SMALL
DEBRIS_LARGE
ACOUSTIC_SPACE
ACTORZONE
PROJECTILEZONE
GASTRAP
SHELLCASING
TRANSPARENT_SMALL
INVISIBLE_WALL
TRANSPARENT_SMALL_ANIM
WARD
CHARCONTROLLER
STAIRHELPER
DEADBIP
BIPED_NO_CC
AVOIDBOX
COLLISIONBOX
CAMERASHPERE
DOORDETECTION
CONEPROJECTILE
CAMERAPICK
ITEMPICK
LINEOFSIGHT
PATHPICK
CUSTOMPICK1
CUSTOMPICK2
SPELLEXPLOSION
DROPPINGPICK
NULL // SkyrimLayer
// "if MOPP Data is organized into chunks (PS3) or not (PC)"
enum MoppDataBuildType byte
CHUNK
NO_CHUNK
NOT_SET
enum MipMaps uint // Omitting "Texture" prefix, since the name implies it.
NO //TODO clarify: does this specify input or render texture state
YES
DEFAULT
// NiPixelData
enum PixelFormat uint
RGB8
RGBA8
PAL8 // NiPalette
DXT1 4
DXT5 // DXT3? - or some re-invented wheel?
DXT5_ALT //
// NiSourceTexture
enum PixelLayout uint
PAL8
HIGH_COLOR_16 // color-plane bits?
TRUE_COLOR_32 // color-plane bits?
COMPRESSED // format?
BUMPMAP // how many bits?
PAL4
DEFAULT
enum TextureClampMode uint //REPLACE {TexClampMode}
CLAMP_S_CLAMP_T
CLAMP_S_WRAP_T
WRAP_S_CLAMP_T
WRAP_S_WRAP_T
enum TextureFilter uint
NEAREST // GL_NEAREST
BILERP // GL_LINEAR
TRILERP
NEAREST_MIPNEAREST // GL_NEAREST_MIPMAP_NEAREST
NEAREST_MIPLERP // GL_NEAREST_MIPMAP_LINEAR
BILERP_MIPNEAREST // GL_LINEAR_MIPMAP_LINEAR
enum VertMode uint // vertex colors
IGNORE // "Source Ignore"
EMISSIVE // "Source Emissive"
AMB_DIF // "Source Ambient/Diffuse"
enum CycleType uint // "animation cycle behavior"
LOOP
REVERSE
CLAMP
enum FieldType uint // "force field's type"
WIND
POINT
enum BillboardMode ushort // the way a billboard reacts to a camera
ALWAYS_FACE_CAMERA
ROTATE_ABOUT_UP
RIGID_FACE_CAMERA
ALWAYS_FACE_CENTER
RIGID_FACE_CENTER
BSROTATE_ABOUT_UP
ROTATE_ABOUT_UP2 9
enum StencilCompareMode uint //TODO
NEVER
LESS
EQUAL
LEQUAL
GREATER
NEQUAL
GEQUAL
ALWAYS
enum ZCompareMode uint // depth
ALWAYS
LESS
EQUAL
LEQUAL
GREATER
NEQUAL
GEQUAL
NEVER
enum StencilAction uint
KEEP
ZERO
REPLACE
INCREMENT
DECREMENT
INVERT
enum FaceDrawMode uint
CCW_OR_BOTH
CCW
CW
DOUBLE_SIDED
/* "4 (Box) is used for everything movable.
7 (Keyframed) is used on statics and animated stuff." */
enum MotionSystem byte
INVALID
DYNAMIC /* "A fully-simulated, movable rigid body. At construction time the
engine checks the input inertia and selects SPHERE_INERTIA or
BOX_INERTIA as appropriate" */
SPHERE // "Simulation is performed using a sphere inertia tensor"
SPHERE_INERTIA /* This is the same as SPHERE, except that simulation of the
rigid body is "softened" */
BOX // "Simulation is performed using a box inertia tensor"
BOX_STABILIZED /* This is the same as BOX, except that simulation of the
rigid body is "softened" */
KEYFRAMED /* "Simulation is not performed as a normal rigid body. The
keyframed rigid body has an infinite mass when viewed by the rest
of the system. (used for creatures)" */
FIXED /* "This motion type is used for the static elements of a game scene,
e.g. the landscape. Faster than MO_SYS_KEYFRAMED at velocity 0. (used
for weapons)" */
THIN_BOX /* "A box inertia motion which is optimized for thin boxes and has
less stability problems" */
CHARACTER /* "A specialized motion used for character controllers" */
enum DeactivatorType byte
INVALID
NEVER // "This will force the rigid body to never deactivate"
SPATIAL /* "Tells Havok to use a spatial deactivation scheme. This makes use
of high and low frequencies of positional motion to determine when
deactivation should occur" */
/* "A list of possible solver deactivation settings. This value defines how the
solver deactivates objects. The solver works on a per object basis.
Note: Solver deactivation does not save CPU, but reduces creeping of
movable objects in a pile quite dramatically." */
enum SolverDeactivation byte
INVALID
OFF
LOW // "Very conservative deactivation, typically no visible artifacts"
MEDIUM // "no serious visible artifacts in most cases"
HIGH // "visible artifacts"
MAX // "visible artifacts"
enum MotionQuality byte
INVALID
FIXED // "fixed bodies"
KEYFRAMED // "moving objects with infinite mass"
DEBRIS
MOVING // "moving bodies, which should not leave the world"
CRITICAL /* "all objects, which you cannot afford to tunnel through the
world at all" */
BULLET // "very fast objects"
USER
CHARACTER // "character controllers"
KEYFRAMED_REPORT /* "Use this for moving objects with infinite mass which
should report contact points and Toi-collisions against all
other bodies, including other fixed and keyframed bodies"
*/
enum ForceType uint
PLANAR
SPHERICAL
UNKNOWN
// NiTextureTransformController
enum TextureTransform uint //REPLACE {TexTransform}
TRANSLATE_U
TRANSLATE_V
ROTATE
SCALE_U
SCALE_V
// NiPSysBombModifier
enum DecayType uint
NONE
LINEAR
EXPONENTIAL
// NiPSysBombModifier
enum SymmetryType uint
SPHERICAL
CYLINDRICAL
PLANAR
/* "Controls the way the a particle mesh emitter determines the starting speed
and direction of the particles that are emitted" */
enum VelocityType uint
NORMALS
RANDOM
DIRECTION
enum EmitFrom uint // mesh emitter
VERTICES
FACE_CENTER
EDGE_CENTER
FACE_SURFACE
EDGE_SURFACE
// NiTextureEffect
enum EffectType uint
PROJECTED_LIGHT
PROJECTED_SHADOW
ENVIRONMENT_MAP
FOG_MAP
enum TextureCoordGenType uint
WORLD_PARALLEL // planar
WORLD_PERSPECTIVE
SPHERE_MAP
SPECULAR_CUBE_MAP
DIFFUSE_CUBE_MAP
enum Endianess byte
BIG
LITTLE
// NiPoint3InterpControllers
enum TargetColor ushort
AMBIENT
DIFFUSE
SPECULAR
SELF_ILLUM
// NiGeometryData
enum ConsistencyType ushort
MUTABLE 0
STATIC 0x4000
VOLATILE 0x8000
enum SortingMode uint
INHERIT
OFF
enum PropagationMode uint
SUCCESS
FAILURE
ALWAYS
NEVER
enum CollisionMode uint
BOUNDING_BOX
TRIANGLES
ALTERNATE_BOUNDING_VOLUMES
NO_TEST
NIBOUND
enum BoundVolumeType int
BASE -1 //TODO EnumItem.Value could be < 0
SPHERE
BOX
CAPSULE
UNION
HALFSPACE
enum hkResponseType byte
INVALID
SIMPLE_CONTACT // "Do normal collision resolution"
REPORTING // "No collision resolution is performed but listeners are called"
NONE
//TODO to nif_tes5_ffd; to nif_fo3_ffd
/* "Biped bodypart data used for visibility control of triangles. Options are
Fallout 3, except where marked for Skyrim (uses SBP prefix)
Skyrim BP names are listed only for vanilla names, different creatures have
different defnitions for naming." */
enum BSBodyPartType ushort
BP_TORSO
BP_HEAD
BP_HEAD2
BP_LEFTARM
BP_LEFTARM2
BP_RIGHTARM
BP_RIGHTARM2
BP_LEFTLEG
BP_LEFTLEG2
BP_LEFTLEG3
BP_RIGHTLEG
BP_RIGHTLEG2
BP_RIGHTLEG3
BP_BRAIN
SBP_HEAD 30
SBP_HAIR
SBP_BODY
SBP_HANDS
SBP_FOREARMS
SBP_AMULET
SBP_RING
SBP_FEET
SBP_CALVES
SBP_SHIELD
SBP_TAIL
SBP_LONGHAIR
SBP_CIRCLET
SBP_EARS
SBP_DRAGON_BLOODHEAD_OR_MOD_MOUTH
SBP_DRAGON_BLOODWINGL_OR_MOD_NECK
SBP_DRAGON_BLOODWINGR_OR_MOD_CHEST_PRIMARY
SBP_DRAGON_BLOODTAIL_OR_MOD_BACK
SBP_MOD_MISC1
SBP_MOD_PELVIS_PRIMARY
SBP_DECAPITATEDHEAD
SBP_DECAPITATE
SBP_MOD_PELVIS_SECONDARY
SBP_MOD_LEG_RIGHT
SBP_MOD_LEG_LEFT
SBP_MOD_FACE_JEWELRY
SBP_MOD_CHEST_SECONDARY
SBP_MOD_SHOULDER
SBP_MOD_ARM_LEFT
SBP_MOD_ARM_RIGHT
SBP_MOD_MISC2
SBP_FX01
BP_SECTIONCAP_HEAD 101
BP_SECTIONCAP_HEAD2
BP_SECTIONCAP_LEFTARM
BP_SECTIONCAP_LEFTARM2
BP_SECTIONCAP_RIGHTARM
BP_SECTIONCAP_RIGHTARM2
BP_SECTIONCAP_LEFTLEG
BP_SECTIONCAP_LEFTLEG2
BP_SECTIONCAP_LEFTLEG3
BP_SECTIONCAP_RIGHTLEG
BP_SECTIONCAP_RIGHTLEG2
BP_SECTIONCAP_RIGHTLEG3
BP_SECTIONCAP_BRAIN
SBP_130_HEAD 130
SBP_131_HAIR
SBP_141_LONGHAIR 141
SBP_142_CIRCLET
SBP_143_EARS
SBP_150_DECAPITATEDHEAD 150
BP_TORSOCAP_HEAD 201
BP_TORSOCAP_HEAD2
BP_TORSOCAP_LEFTARM
BP_TORSOCAP_LEFTARM2
BP_TORSOCAP_RIGHTARM
BP_TORSOCAP_RIGHTARM2
BP_TORSOCAP_LEFTLEG
BP_TORSOCAP_LEFTLEG2
BP_TORSOCAP_LEFTLEG3
BP_TORSOCAP_RIGHTLEG
BP_TORSOCAP_RIGHTLEG2
BP_TORSOCAP_RIGHTLEG3
BP_TORSOCAP_BRAIN
SBP_230_HEAD 230
BP_TORSOSECTION_HEAD 1000
BP_TORSOSECTION_HEAD2 2000
BP_TORSOSECTION_LEFTARM 3000
BP_TORSOSECTION_LEFTARM2 4000
BP_TORSOSECTION_RIGHTARM 5000
BP_TORSOSECTION_RIGHTARM2 6000
BP_TORSOSECTION_LEFTLEG 7000
BP_TORSOSECTION_LEFTLEG2 8000
BP_TORSOSECTION_LEFTLEG3 9000
BP_TORSOSECTION_RIGHTLEG 10000
BP_TORSOSECTION_RIGHTLEG2 11000
BP_TORSOSECTION_RIGHTLEG3 12000
BP_TORSOSECTION_BRAIN 13000 // BSBodyPartType
// <bitflags/>
enum BSSegmentFlags uint //TODO reason?
BSSEG_WATER 9
//TODO to nif_tes(3|4|5)_ffd
// BSLightingShaderProperty
//REPLACE {BSLightingShaderPropertyShaderType}
enum BS_LS_ShaderType uint
Default
EnvironmentMap // "EnvMap Mask(TS6), EnvMap Scale"
GlowShader // "Glow(TS3)"
Heightmap // "Height(TS4)"
FaceTint // "SubSurface(TS3), Detail(TS4), Tint(TS7)"
SkinTint
HairTint
ParallaxOccMaterial // "Enables Height(TS4), Max Passes, Scale"
WorldMultitexture
WorldMap1
Unknown_10
MultiLayerParallax /* "Enables EnvMap Mask(TS6), Layer(TS7), Parallax Layer
Thickness, Parallax Refraction Scale, Parallax Inner
Layer U Scale, Parallax Inner Layer V Scale, EnvMap
Scale" */
Unknown_12
WorldMap2
SparkleSnow // "SparkleParams"
WorldMap3
Eye_Envmap // "EnvMap Mask(TS6), Eye EnvMap Scale"
Unknown_17
WorldMap4
WorldLODMultitexture
// BSEffectShaderProperty animated variable
enum EffectShaderControlledVariable uint
EmissiveMultiple
FalloffStartAngle // degress
FalloffStopAngle // degrees
FalloffStartOpacity
FalloffStopOpacity
Alpha
UOffset
UScale
VOffset
VScale
enum EffectShaderControlledColor uint
EmissiveColor
// BSLightingShaderProperty
enum LightingShaderControlledVariable uint
Refraction_Strength
EnvironmentMapScale 8
Glossiness
SpecularStrength
EmissiveMultiple
Alpha
UOffset 20
UScale
VOffset
VScale
// BSLightingShaderProperty
enum LightingShaderControlledColor uint
Specular
Emissive
enum ExtraVectorsFlags byte
None
Tangents_Bitangents 16
enum hkConstraintType uint
BallAndSocket
Hinge
Limited_Hinge
Prismatic 6
Ragdoll
StiffSpring
// "Furniture entry points. It specifies the direction(s) from where the actor
// is able to enter (and leave) the position."
enum FurnitureEntryPoints ushort // bitflags
Front
Behind
Right
Left
Up
// "Animation type used on this position. This specifies the function of this
// position."
enum AnimationType ushort
Sit 1
Sleep 2
Lean 4
// "Determines how the raw image data is stored in NiRawImageData"
enum ImageType uint
RGB 1
RGBA 2
// "Editor flags for the Body Partitions"
enum BSPartFlag ushort // bitflags
EDITOR_VISIBLE
START_NET_BONESET 8
enum ChannelType uint
RED
GREEN
BLUE
ALPHA
COMPRESSED
INDEX 16
EMPTY 19
enum ChannelConvention uint
FIXED
INDEX 3
COMPRESSED
EMPTY
enum BSShaderType uint
TALL_GRASS
DEFAULT
SKY 10
SKIN 14
WATER 17
LIGHTING30 29
TILE 32
NOLIGHTING
enum BSShaderFlags uint // bitflags
Specular
Skin
LowDetail
Vertex_Alpha
Unknown_1
Single_Pass
Empty
Environment_Mapping
Alpha_Texture
Unknown_2
FaceGen
Parallax_Shader_Index_15
Unknown_3
Non_Projective_Shadows
Unknown_4
Refraction
Fire_Refraction
Eye_Environment_Mapping
Hair
Dynamic_Alpha
Localmap_Hide_Secret
Window_Environment_Mapping
Tree_Billboard
Shadow_Frustum
Multiple_Textures
Remappable_Textures
Decal_Single_Pass
Dynamic_Decal_Single_Pass
Parallax_Occulsion
External_Emittance
Shadow_Map
ZBuffer_Test // BSShaderFlags
enum BSShaderFlags2 uint // bitflags
ZBuffer_Write
LOD_Landscape
LOD_Building
No_Fade
Refraction_Tint
Vertex_Colors
Unknown1
first_Light_is_Point_Light
second_Light
trhird_Light
Vertex_Lighting
Uniform_Scale
Fit_Slope
Billboard_and_Envmap_Light_Fade
No_LOD_Land_Blend
Envmap_Light_Fade
Wireframe
VATS_Selection
Show_in_Local_Map
Premult_Alpha
Skip_Normal_Maps
Alpha_Decal
No_Transparecny_Multisampling
Unknown2
Unknown3
Unknown4
Unknown5
Unknown6