-
Notifications
You must be signed in to change notification settings - Fork 0
/
NBNK-Reconstructed.bt
1016 lines (925 loc) · 23.1 KB
/
NBNK-Reconstructed.bt
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
//------------------------------------------------
//--- 010 Editor v10.0.2 Binary Template
//
// File:
// Authors: Silvris
// Version:
// Purpose:
// Category:
// File Mask:
// ID Bytes:
// History:
//------------------------------------------------
/*
**************************************************
Massive thanks to "bnnm" on GitHub for his "wwiser" project, having effectively mapped out all versions of bnk. If you're looking at this file for reference, use that instead.
*/
#include "Audiokinetics RIFF.bt"
local int i;
local int j;
local int k;
local int m;
typedef struct{
char dwTag[4];
uint dwChunkSize;
}ChunkHeader;
//BKHD
typedef struct(uint chunkSize){
uint dwBankGeneratorVersion; //should be 120 on a MHW nbnk
uint dwSoundbankID; //fnv hash, normally of the file name
uint dwLanguageID; //00 is SFX
uint bFeedbackInBank;
uint dwProjectID; // MHW = 1114
for(i=0;i<((chunkSize/4)-5);i++){
uint gap;
};
}BankHeader;
typedef struct{
uint id;
uint uOffset;
uint uSize;
}LoadedMedia;
//DIDX
typedef struct(uint dwChunkSize){
local uint pLoadedMedia = (dwChunkSize/12);
for(i=0;i<pLoadedMedia;i++){
LoadedMedia loadedMedia;
};
}MediaIndex;
//DATA
typedef struct(uint dwChunkSize){
local uint postHeaderOffset = FTell();
local uint abort = 0;
local uint riffsize = 0;
local uint media = 0;
while(abort==0&&media==0){
for(i=0;i<Block[1].DIDX.pLoadedMedia;i++){
FSeek(Block[1].DIDX.loadedMedia[i].uOffset+postHeaderOffset);
riffsize = ReadUInt(FTell()+4);
//Printf("%u\n",i);
if(riffsize > Block[1].DIDX.loadedMedia[i].uSize){ //on a proper wem, this should be 8 bytes less (for the RIFF magic and length)
Printf("RIFF Size: %u is greated than uSize:%u. Aborting wem reading....", riffsize, Block[1].DIDX.loadedMedia[i].uSize);
abort = 1;
}
else{
RIFF embeddedAudio<optimize=false>;
};
};
media=1;
}
if(abort){
//if it fails, just default to reading length like normal
//this guarantees that even if one wem fails, others may still work and you can read the rest of the file fine
FSeek(postHeaderOffset);
byte pLoadedMedia[dwChunkSize];
}
}DataChunk;
//INIT
typedef struct{
uint ulPluginID;
uint uStringSize;
string pDLLName;
}IAkPlugin;
typedef struct{
uint pluginCount;
for(i=0;i<pluginCount;i++){
IAkPlugin Plugin;
};
}PluginChunk;
//HIRC Common
typedef struct{
byte eHircType;
uint dwSectionSize;
uint ulID;
}HircHeader;
typedef struct(uint length){
byte datum[length];
}UnknData;
typedef struct{
byte uFXIndex;
uint fxID;
byte bIsShareSet;
byte bIsRendered;
}FXChunk;
typedef struct{
byte bIsOverrideParentFX;
byte uNumFX;
if(uNumFX) byte bitsFXBypass;
for(j=0;j<uNumFX;j++){
FXChunk Effect;
};
}NodeInitialFXParams;
typedef struct{
byte cProps;
for(i=0;i<cProps;i++){
byte pID;
};
for(i=0;i<cProps;i++){
if(pID[i]==0)uint pValue;
else float pValue;
};
}AkPropValue;
typedef struct{
byte cProps;
for(i=0;i<cProps;i++){
byte pID;
};
for(i=0;i<cProps;i++){
if(pID[i] == 2||pID[i] == 0){
float min;
float max;
}
else{
uint pValue;
Printf("%i", pValue);
};
};
}AkPropRangedValue;
typedef struct{
AkPropValue PropValues;
AkPropRangedValue RangedPropValues;
}NodeInitialParams;
typedef struct{
byte uBitsPositioning;
local byte has_positioning = (uBitsPositioning >> 0 ) & 1;
if(has_positioning)local byte has_3d = (uBitsPositioning >> 3) & 1;
else local byte has_3d = 0;
if(has_3d){
byte uBits3D;
uint attenuationID;
};
}PositioningParams;
typedef struct{
byte byBitVector;
local byte has_aux = byBitVector >> 2;
if(has_aux){
uint auxID1;
uint auxID2;
uint auxID3;
uint auxID4;
};
}AuxParams;
typedef struct{
byte byBitVector1;
byte eVirtualQueueBehavior;
uint16 uMaxNumInstance;
byte eBelowThresholdBehavior;
byte byBitVector2;
}AdvSettingsParams;
typedef struct{
uint StateFrom;
uint StateTo;
uint TranisitonTime;
}StateTransition;
typedef struct{
uint ulStateGroupID;
uint DefaultTransitionTime;
uint ulNumTransitions;
for(i=0;i<ulNumTransitions;i++){
StateTransition Transition;
};
}StateGroup;
typedef struct{
uint ulNumStateGroups;
for(i=0;i<ulNumStateGroups;i++){
uint ulStateGroupID;
byte eStateSyncType;
uint16 ulNumStates;
for(j=0;j<ulNumStates;j++){
uint ulStateID;
uint ulStateInstanceID;
};
};
}StateChunk;
typedef struct{
float To;
float From;
uint Interpolation;
}AkRTPCGraphPoint;
typedef struct{
uint uClipIndex;
uint eAutoType;
uint uNumPoints;
for(i=0;i<uNumPoints;i++){
AkRTPCGraphPoint RTPCGraphPoint;
};
}AkClipAutomation;
typedef struct{
uint RTPCID;
byte rtpcType;
byte rtpcAccum;
byte ParamID;
uint rtpcCurveID;
byte eScaling;
uint16 ulSize;
for(i=0;i<ulSize;i++){
AkRTPCGraphPoint RTPCGraphPoint;
};
}RTPC;
typedef struct{
uint16 ulInitialRTPC;
for(j=0;j<ulInitialRTPC;j++){
RTPC rtpc;
};
}InitialRTPC;
typedef struct{
NodeInitialFXParams FXParams;
byte bOverrideAttachmentParams;
uint OverrideBusID;
uint DirectParentID;
byte byBitVector;//interpret further later
NodeInitialParams IniParams;
PositioningParams Positioning;
AuxParams AuxParam;
AdvSettingsParams AdvSettings;
StateChunk States;
InitialRTPC RTPCs;
}NodeBaseParams;
typedef struct{
uint uNumChildren;
for(i=0;i<uNumChildren;i++){
uint ulChildID;
};
}Children;
//Decision Tree Attempt
struct hollowNode(uint currentDepth, uint MaxDepth){
local int ChildCount = 0;
uint key;
if(currentDepth == MaxDepth)
{
uint audioNodeId;
int16 Weight;
int16 Probability;
}
else{
uint16 childrenIdx;
uint16 childrenCount;
int16 Weight;
int16 Probability;
ChildCount = childrenCount;
}
};
struct Tree;
struct Tree(uint currentDepth, uint MaxDepth, hollowNode &node){
local int childMarker;
for(childMarker = 0; childMarker < node.ChildCount; childMarker++){
hollowNode hollow(currentDepth+1, MaxDepth);
};
if(node.ChildCount > 0){
for(childMarker = 0; childMarker < node.ChildCount; childMarker++){
Tree tn(currentDepth+1, MaxDepth,hollow[childMarker]);
};
};
};
struct DecisionTree(uint Depth){
hollowNode firstHollow(0,Depth);
Tree firstNode(0, Depth, firstHollow);
};
//HIRC 1
typedef struct{
byte cProps;
for(i=0;i<cProps;i++){
byte pID;
};
for(i=0;i<cProps;i++){
float pValue;
};
}State;
//HIRC 2
typedef struct{
uint sourceID;
uint uInMemoryMediaSize;
byte uSourceBits;
}AkMediaInformation;
typedef struct{
uint ulPluginID;
byte StreamType;
AkMediaInformation MediaInformation;
if((ulPluginID & 0x000000FF) == 2){
uint uSize;
};
}BankSourceData;
typedef struct{
BankSourceData BankData;
NodeBaseParams BaseParams;
}Sound;
//HIRC 3
typedef struct{
local int u;
uint ulExceptionListSize;
for(u=0;u<ulExceptionListSize;u++){
uint ulID;
byte bIsBus;
};
}ExceptParams;
typedef struct{
uint ulStateGroupID;
uint ulTargetStateID;
}StateActionParams;
typedef struct{
uint ulSwitchGroupID;
uint ulSwitchStateID;
}SwitchActionParams;
typedef struct{
byte byBitVector;
ExceptParams exceptions;
}ActiveActionParams;
typedef struct{
byte bBypassTransition;
byte eValueMeaning;
float base;
float min;
float max;
}GameParameterParams;
typedef struct{
byte eValueMeaning;
float base;
float min;
float max;
}PropActionParams;
typedef struct(uint16 ulActionType){
byte byBitVector;
if(ulActionType==0x1302)GameParameterParams SpecificParams;
if(ulActionType==0x1303)GameParameterParams SpecificParams;
if(ulActionType==0x0A02)PropActionParams SpecificParams;
if(ulActionType==0x0B02)PropActionParams SpecificParams;
if(ulActionType==0x0C02)PropActionParams SpecificParams;
if(ulActionType==0x0D02)PropActionParams SpecificParams;
uint ulExceptionListSize;
}ValueActionParams;
typedef struct{
byte eFadeCurve;
uint fileID;
}PlayActionParams;
typedef struct{
uint idExt;
byte idExt_4;
AkPropValue PropValues;
AkPropRangedValue RangedPropValues;
}ActionInitialParams;
typedef struct{
uint16 ulActionType;
ActionInitialParams InitialParams;
if(ulActionType == 0x1204)StateActionParams StateAction;
if(ulActionType == 0x0102)ActiveActionParams ActiveAction;
if(ulActionType == 0x0103)ActiveActionParams ActiveAction;
if(ulActionType == 0x0403)PlayActionParams PlayAction;
if(ulActionType == 0x1302)ValueActionParams ValueAction(ulActionType);
if(ulActionType == 0x1303)ValueActionParams ValueAction(ulActionType);
if(ulActionType == 0x0A02)ValueActionParams ValueAction(ulActionType);
if(ulActionType == 0x0B02)ValueActionParams ValueAction(ulActionType);
if(ulActionType == 0x0C02)ValueActionParams ValueAction(ulActionType);
if(ulActionType == 0x0D02)ValueActionParams ValueAction(ulActionType);
}Action;
//HIRC 4
typedef struct{
uint ulActionListSize;
for(i=0;i<ulActionListSize;i++){
uint ulActionID;
};
}Event;
//HIRC 5
typedef struct{
NodeBaseParams BaseParams;
uint16 sLoopCount;
uint16 sLoopModMin;
uint16 sLoopModMax;
float fTransitionTime;
float fTransitionTimeModMin;
float fTransitionTimeModMax;
uint16 wAvoidRepeatCount;
byte eTransitionMode;
byte eRandomMode;
byte eMode;
byte BitVector;
Children ChildrenList;
uint16 ulNumPlaylistItem;
for(j=0;j<ulNumPlaylistItem;j++){
uint ulPlayID;
int Weight;
};
}RandomSequence;
//HIRC 6
typedef struct{
uint ulSwitchID;
uint ulNumItems;
for(j=0;j<ulNumItems;j++){
uint NodeID;
};
}SwitchPackage;
typedef struct{
uint ulNodeID;
byte BitVector1;
byte BitVector2;
int FadeOutTime;
int FadeInTime;
}SwitchNodeParam;
typedef struct{
NodeBaseParams BaseParams;
byte eGroupType;
uint ulGroupID;
uint ulDefaultSwitch;//~!~!~!~!~!~!~!
byte bIsContinuousValidation;
Children ChildList;
uint ulNumSwitchGroups;
for(m=0;m<ulNumSwitchGroups;m++){
SwitchPackage Switches;
};
uint ulNumSwitchParams;
for(m=0;m<ulNumSwitchParams;m++){
SwitchNodeParam SwitchParam;
};
}Switch;
//HIRC 7
typedef struct{
NodeBaseParams BaseParams;
Children ChildList;
}ActorMixer;//somehow that's it?
//HIRC 8
typedef struct{
AkPropValue PropValues;
byte BitVector1;
byte BitVector2;
uint16 u16MaxNumInstance;
uint uChannelConfig;
byte BitVector3;
}BusInitialParams;
typedef struct{
byte uNumFX;
if(uNumFX)byte bitsFXBypass;
for(j=0;j<uNumFX;j++){
FXChunk pFXChunk;
};
uint fxID_0;
byte bIsShareSet_0;
}BusInitialFXParams;
typedef struct{
uint BusID;
float DuckVolume;
int FadeOutTime;
int FadeInTime;
byte eFadeCurve;
byte TargetProp;
}DuckInfo;
typedef struct{
uint OverrideBusID;
BusInitialParams InitialParams;
int RecoveryTime;
float fMaxDuckVolume;
uint ulDucks;
for(j=0;j<ulDucks;j++){
DuckInfo Duck;
};
BusInitialFXParams FXParams;
byte bOverrideAttachmentParams;
InitialRTPC RTPCs;
StateChunk States;
}AudioBus;
//HIRC 9
typedef struct{
uint ulAssociatedChildID;
uint ulCurveSize;
for(m=0;m<ulCurveSize;m++){
AkRTPCGraphPoint GraphPoint;
};
}CAssociatedChildData;
typedef struct{
uint ulLayerID;
InitialRTPC RTPCs;
uint RTPCId;
byte RTPCType;
uint ulNumAssoc;
for(j=0;j<ulNumAssoc;j++){
CAssociatedChildData ChildData;
};
}Layer;
typedef struct{
NodeBaseParams BaseParams;
Children ChildList;
uint ulNumLayers;
for(j=0;j<ulNumLayers;j++){
Layer Layers;
}
byte bIsContinuousValidation;
}LayerContain;
//HIRC 10
typedef struct{
double fGridPeriod;
double fGridOffset;
float fTempo;
byte uNumBeatsPerBar;//top number of time signature
byte uBeatValue;//bottom number of time signature
}AkMeterInfo;
typedef struct{
uint TriggerID;
uint SegmentID;
uint SyncPlayAt;
uint uCueFilterHash;
int DontRepeatTime;
uint numSegmentLookAhead;
}AkStinger;
typedef struct{
byte uFlags;
NodeBaseParams BaseParams;
Children ChildrenList;
AkMeterInfo MeterInfo;
byte bMeterInfoFlag;
uint uNumStingers;
for(i=0;i<uNumStingers;i++){
AkStinger Stinger;
};
}MusicNodeParams;
typedef struct{
uint id;
double fPosition;
uint uStringSize;
if(uStringSize > 0)string pMarkerName;
}MusicMarker;
typedef struct{
MusicNodeParams MusicParams;
double fDuration;
uint ulNumMarkers;
for(i=0;i<ulNumMarkers;i++){
MusicMarker WWiseMarker;
};
}MusicSegment;
//HIRC 11
typedef struct{
uint ulPluginID;
byte StreamType;
uint sourceID;
uint uInMemorySize;
byte uSourceBits;
}pSource;
typedef struct{
uint trackID;
uint sourceID;
double fPlayAt;
double fBeginTrimOffset;
double fEndTrimOffset;
double fSrcDuration;
}pPlaylist;
typedef struct{
byte eGroupType;
uint uGroupID;
uint uDefaultSwitch;
uint numSwitchAssoc;
for(i=0;i<numSwitchAssoc;i++){
uint ulSwitchAssoc;
};
}SwitchParams;
typedef struct{
int transitionTime;
uint eFadeCurve;
int iFadeOffset;
}FadeParams;
typedef struct{
FadeParams srcFadeParams;
uint eSyncType;
uint uCueHashFilter;
FadeParams destFadeParams;
}TransParams;
typedef struct{
byte uFlags;
uint numSources; //this seems promising to play with
for(i=0;i<numSources;i++){
pSource Source;
};
uint numPlaylistItem;
for(i=0;i<numPlaylistItem;i++){
pPlaylist Playlist;
};
if(numPlaylistItem>0) uint numSubTrack;//doesn't seem to have children?
uint numClipAutomationItem;
for(j=0;j<numClipAutomationItem;j++){
AkClipAutomation ClipAutomation;
};
NodeBaseParams BaseParams;
byte eTrackType;
if(eTrackType == 3){
SwitchParams SwitchParam;
TransParams TransParam;
};
int iLookAheadTime;
}MusicTrack;
//HIRC 12
typedef struct{
FadeParams FadeParam;
uint uCueFilterHash;
uint uJumpToID;
uint16 eEntryType;
byte bPlayPreEntry;
byte bDestMatchSourceCueName;
}AkMusicTransSrcRule;
typedef struct{
FadeParams FadeParam;
uint eSyncType;
uint uCueFilterHash;
byte bPlayPostExit;
}AkMusicTransDstRule;
typedef struct{
uint segmentID;
FadeParams fadeInParams;
FadeParams fadeOutParams;
byte PlayPreEntry;
byte PlayPostExit;
}AkMusicTransitionObject;
typedef struct{
uint uNumSrc;
for(i=0;i<uNumSrc;i++){
uint srcNumID;
};
uint uNumDst;
for(i=0;i<uNumDst;i++){
uint dstNumID;
};
AkMusicTransSrcRule SrcRule;
AkMusicTransDstRule DstRule;
byte AllocTransObjectFlag;
if(AllocTransObjectFlag){
AkMusicTransitionObject MusicTransition;
};
}MusicTransitionRule;
typedef struct{
MusicNodeParams MusicParams;
uint numRules;
for(j=0;j<numRules;j++){
MusicTransitionRule Rule;
};
}MusicTransNodeParams;
typedef struct{
uint ulGroup;
byte eGroupType;
}AkGameSync;
typedef struct{
MusicTransNodeParams MusicTransParams;
byte bIsContinuePlayback;
uint uTreeDepth;
for(i=0;i<uTreeDepth;i++){
AkGameSync Arguments;
};
uint uTreeSize;
byte bMode;
// byte decisionTree[uTreeSize];//it's a bit intricate, hard to do in 010 C
DecisionTree decisionTree(uTreeDepth);
}MusicSwitch;
//HIRC 13
struct pPlaylistItem;
struct pPlaylistItem{
uint SegmentID;
uint playlistItemID;
uint NumChildren;
uint eRSType;
int16 Loop;
int16 LoopMin;
int16 LoopMax;
uint Weight;
uint16 wAvoidRepeatCount;
byte bIsUsingWeight;
byte bIsShuffle;
//these technically have children, but NumPlaylistItems actually takes them into account
};
typedef struct{
MusicTransNodeParams MusicTransParams;
uint numPlaylistItems;
for(i=0;i<numPlaylistItems;i++){
pPlaylistItem playlistItem;
};
}MusicPlaylist;
//HIRC 14
typedef struct{
float fInsideDegrees;
float fOUtsideDegrees;
float fOutsideVolume;
float fLoPass;
float fHiPass;
}ConeParams;
typedef struct{
byte eScaling;
uint16 ulSize;
for(i=0;i<ulSize;i++){
AkRTPCGraphPoint RTPCGraphPoint;
};
}CAkConversionTable;
typedef struct{
ubyte bIsConeEnabled;
if(bIsConeEnabled){
ConeParams coneParams;
};
byte curveToUse[7];
byte NumCurves;
for(j=0;j<NumCurves;j++){
CAkConversionTable Curve;
};
uint16 ulNumRTPC; //to-do there is a for here, but not present in bgm_ingame_cmn
for(j=0;j<ulNumRTPC;j++){
InitialRTPC RTPCs;
};
}Attenuation;
//HIRC 18
typedef struct{
uint fxID;//determined by type and company
uint uSize;
byte pParamBlock[uSize];//WWiser doesn't even try to read this, I suppose it's different for each fx
byte uNumBankData;
InitialRTPC RTPCs;
uint16 ulNumInit;
//inits go here
}FxShareSet;
//HIRC 19
typedef struct{
uint fxID;//determined by type and company
uint uSize;
byte pParamBlock[uSize];//WWiser doesn't even try to read this, I suppose it's different for each fx
byte uNumBankData;
InitialRTPC RTPCs;
uint16 ulNumInit;
//inits go here
}FxCustom;
//HIRC 20
typedef struct{
//It's literally just an Audio Bus, but *technically* different
uint OverrideBusID;
BusInitialParams InitialParams;
int RecoveryTime;
float fMaxDuckVolume;
uint ulDucks;
for(j=0;j<ulDucks;j++){
DuckInfo Duck;
};
BusInitialFXParams FXParams;
byte bOverrideAttachmentParams;
InitialRTPC RTPCs;
StateChunk States;
}AuxiliaryBus;
//HIRC 22
typedef struct{
AkPropValue PropValues;
AkPropRangedValue RangedPropValues;
InitialRTPC RTPCs;
}EnvelopeModulator;
//HIRC Main
typedef struct{
HircHeader Header<bgcolor=0xFF00FF>;
switch(Header.eHircType){
case 1:
State Object<name="State",bgcolor=0xFF0000>;//honestly a little closer to being settings
break;
case 2:
Sound Object<name="Sound",bgcolor=0x0000FF>;
break;
case 3:
Action Object<name="Action",bgcolor=0xCFB3FF>;
break;
case 4:
Event Object<name="Event",bgcolor=0xD3FFB3>;
break;
case 5:
RandomSequence Object<name="Random/Sequence",bgcolor=0xB3D8FF>;
break;
case 6:
Switch Object<name="Switch",bgcolor=0xEAFFB3>;
break;
case 7:
ActorMixer Object<name="Actor-Mixer",bgcolor=0xFFCAB3>;
break;
case 8:
AudioBus Object<name="Audio Bus",bgcolor=0xFFBAB3>;
break;
case 9:
LayerContain Object<name="Layer Container",bgcolor=0xFFB3DA>;
break;
case 10:
MusicSegment Object<name="Music Segment",bgcolor=0x33FFBD>;
break;
case 11:
MusicTrack Object<name="Music Track",bgcolor=0xB3FFD0>;
break;
case 12:
MusicSwitch Object<name="Music Switch",bgcolor=0xB3FFB3>;
break;
case 13:
MusicPlaylist Object<name="Music Playlist",bgcolor=0xFF4040>;
break;
case 14:
Attenuation Object<name="Attenuation",bgcolor=0x40C2FF>;
break;
case 18:
FxShareSet Object<name="FX Share Set",bgcolor=0x7440FF>;
break;
case 19:
FxCustom Object<name="FX Custom",bgcolor=0x40FF9A>;
break;
case 20:
AuxiliaryBus Object<name="Auxiliary Bus",bgcolor=0x407AFF>;
break;
case 22:
EnvelopeModulator Object<name="Envelope Modulator",bgcolor=0x9900CC>;
break;
default:
UnknData Object(Header.dwSectionSize-4)<name="Unknown Data",bgcolor=0x000000>;
break;
};
}HircObject;
typedef struct{
uint NumReleasableHircItem;
for(k=0;k<NumReleasableHircItem;k++){
HircObject Object<name="Hirc Object">;
};
}ObjectHierarchy;
//STMG
typedef struct{
uint SwitchGroupID;
uint RTPCID;
byte RTPCType;
uint ulSize;//actually a count;
for(i=0;i<ulSize;i++){
AkRTPCGraphPoint GraphPoint;
};
}SwitchGroup;
typedef struct{
uint RTPC_ID;
float fValue;
uint rampType;
float fRampUp;
float fRampDown;
byte eBindToBuiltInParam;
}RTPCRamping;
typedef struct{
float fVolumeThreshold;
uint16 maxNumVoicesLimitInternal;
uint ulNumStateGroups;
for(j=0;j<ulNumStateGroups;j++){
StateGroup StateGroups;
};
uint ulNumSwitchGroup;
for(j=0;j<ulNumSwitchGroup;j++){
SwitchGroup SwitchGroups;
};
uint ulNumParams;
for(j=0;j<ulNumParams;j++){
RTPCRamping RTPCRamp;
};
uint ulNumTextures;
//we don't get to know what this does, unused by MHW
uint ulNumReverberator;
//same
}StateManager;
//ENVS
typedef struct{
byte bCurveEnabled;
byte eCurveScaling;
uint16 ulCurveSize;
for(i=0;i<ulCurveSize;i++){
AkRTPCGraphPoint GraphPoint;
};
}ObsOccCurve;
typedef struct{
ObsOccCurve ObsVol;
ObsOccCurve ObsLPF;
ObsOccCurve ObsHPF;
ObsOccCurve OccVol;
ObsOccCurve OccLPF;
ObsOccCurve OccHPF;
}EnvironmentSettings;
//PLAT
typedef struct{
uint uStringSize;
string pCustomPlatformName;
}CustomPlatform;
//File Main
struct FileBlock{
ChunkHeader Header<bgcolor=0xFFFF00>;
switch(Header.dwTag){
case "BKHD":
BankHeader BKHD(Header.dwChunkSize)<name="Bank Header",bgcolor=0x0000FF>;
break;
case "INIT":
PluginChunk INIT<name="Plugins",bgcolor=0x567890>;
break;
case "DIDX":
MediaIndex DIDX(Header.dwChunkSize)<name="Media Index",bgcolor=0xFF0000>;
break;
case "DATA":
DataChunk DATA(Header.dwChunkSize)<name="Data Chunk",bgcolor=0x00FF00>;
break;
case "HIRC":
ObjectHierarchy HIRC<name="Object Hierarchy",bgcolor=0x123456>;
break;
case "STMG":