Nicotine Map
Nicotine | |
---|---|
aka Nicotine Map | |
Resource names | NicotineAssetMain NicotineAssetSurround |
Type ID | 0xA024 |
Category | Sound |
Memory distribution |
Main Memory only |
Editor available? |
No |
Nicotine maps are used for sound mixing. There is one for stereo and one for surround. They are directly related to Snapshot Data resources.
Structures
IMPORTANT: Fields often contain more than one value. The resource is entirely made up of 4-byte integers, but these actually hold much more data. Nearly everything is made up of multiple (currently mostly undocumented) bit fields.
Note: Nicotine resources begin with a Binary File header.
Note: Integers are used for offsets rather than pointers. This means there is no 64-bit variant of the resource.
Names are from ProStreet RU PS2 symbols.
stMixMapHeader
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x4 | int | MixMapID | Mix map ID | Always 0 |
0x4 | 0x4 | int | NumStates | Number of states | |
0x8 | 0x4 | int | StateTableOffset | States | Effectively stMixMapStateHdr** |
0xC | 0x4 | int | DynamicMapOffset | Dynamic map | Always -1 |
stMixMapStateHdr
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x4 | int | StateIndex | Index | Begins at 0x1F0000 |
0x4 | 0x4 | int | OffsetMixCtlData | Mix control data | See stMixCtlHdr |
0x8 | 0x4 | int | Offset3DMixCtlData | 3D mix control data | See st3DMixCtlHdr |
0xC | 0x4 | int | OffsetSubMixData | Submix data | See stMixChHdr |
0x10 | 0x4 | int | OffsetMasterMixData | Master mix data | See stMixChHdr |
0x14 | 0x4 | int | OffsetPresetData | Preset data | See preset data |
0x18 | 0x4 | int | OffsetEventCtlData | Event control data | See stMixEventHdr |
0x1C | 0x4 | int | Offset_Reserved_07 |
stMixCtlHdr
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x4 | int | NumMixCtls | Number of mix controls | |
0x4 | 0x4 | int | NumNewMixDataProcs | Number of new mix data processes | |
0x8 | 0x4 | int | NumMainMixDataProcs | Number of main mix data processes | |
0xC | 0x4 | int | NumMainMixCtlOut | Number of main mix controls out |
This is followed by an array of stMixCtlParams. The number of these depends on the value of NumMixCtls.
stMixCtlParams
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x4 | int | nINPUTID | ||
0x4 | 0x4 | int | nUScaleCntSwing |
This is followed by an array of unknown 4-byte values. The number of these depends on the value of the second byte in nUScaleCntSwing.
st3DMixCtlHdr
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x4 | int | Num3DMixCtls | ||
0x4 | 0x4 | int | NumMainMap3DMixCtls | ||
0x8 | 0x4 | int | Reserved_02 | ||
0xC | 0x4 | int | Reserved_03 |
This is followed by an array of st3DMixCtlParams. The number of these depends on the value of Num3DMixCtls.
st3DMixCtlParams
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x4 | int | nINPUTID | ||
0x4 | 0x18 | st3DStateParams | StateParams |
This is followed by an array of st3DStateParams. The number of these depends on the low nibble of the highest byte in nINPUTID. If 1, there are no additional state params (the included one counts).
st3DStateParams
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x4 | int | n3DSTATEINFOID | ||
0x4 | 0x4 | int | nCURVEID_DOPPLER | ||
0x8 | 0x4 | int | nQ0MinMax | ||
0xC | 0x4 | int | nQ1MinMax | ||
0x10 | 0x4 | int | nQ2MinMax | ||
0x14 | 0x4 | int | nQ3MinMax |
stMixChHdr
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x4 | int | NumMixChannels | ||
0x4 | 0x4 | int | NumUniqueSFXOBJs | ||
0x8 | 0x4 | int | NumMainIn | ||
0xC | 0x4 | int | NumSecIn |
This structure is used as a header for multiple state types. Depending on the type, it may be followed by an array of stSubMixChParams or stMasterMixChParams. The number of these depends on NumMixChannels.
stSubMixChParams
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x4 | int | MIXCHID | ||
0x4 | 0x4 | int | UpperLowerSwing |
This is followed by an array of stSubMixStateParams. The number of these depends on the second byte in MIXCHID.
stSubMixStateParams
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x4 | int | nOffsetSubMixProc |
stMasterMixChParams
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x4 | int | MIXCHID | ||
0x4 | 0x4 | int | MixData | ||
0x8 | 0x4 | int | SFXOBJID |
This is followed by an array of unknown 4-byte values. The number of these depends on the value of the second byte in MIXCHID.
Preset data
There is no header for preset data; instead, the stMixChHdr for the master mix data is used.
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x4 | int | ? |
This is followed by an array of unknown 4-byte values. The number of these depends on the value of the last byte in the int field.
stMixEventHdr
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x4 | int | NumEvents | ||
0x4 | 0x4 | int | Reserved_01 | ||
0x8 | 0x4 | int | Reserved_02 | ||
0xC | 0x4 | int | Reserved_03 |
This is followed by an array of stMixEvtParams. The number of these depends on the value of NumEvents.
stMixEvtParams
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x4 | int | nEVTCTLID | ||
0x4 | 0x4 | int | nUScaleCntSwing | ||
0x8 | 0x4 | int | nTriggerID | ||
0xC | 0x4 | int | nParam_00 | ||
0x10 | 0x4 | int | nParam_01 | ||
0x14 | 0x4 | int | nParam_02 |
This is followed by an array of unknown 4-byte values. The number of these depends on the value of the second byte in nUScaleCntSwing.