In PMD2, the file /EFFECT/effect.bin contains all VFX used for attack animations, cutscene props, and screen effects. Attack animations and cutscene props are both WAN files. Attack animations use WAN type 1 and 2, while cutscene props use WAN type 3.
While the format is WAN, there are some differences between it and the chara WAN format highlighted in the main WAN documentation:
This page serves as a supplement to highlight the differences between VFX WAN and CHARA WAN.
Particle Offset Table
This is completely unused and remains null for all vfx.
Color Data Block
Unk#5 represents the palette offset when the palette is loaded into memory.
Total colors appears to be in offset 0x12, but this value cannot be taken as is because it'd been known to miss some colors.
Instead, use ptrPaletteInfo - ptrPaletteDataBlock to calculate the true total colors.
Colors read in 256 color mode must have each of their RGB components rounded down to a multiple of 8, and that becomes the color that appears in the palette viewer. That palette viewer color is then multiplied by 32, and divided by 31. That is then the true color as it appears in-game.
Colors must also be written to the 16th slot of the palette, and have a length of 16 themselves. It's unknown why this is the case.
Meta-Frame Groups Block
Unlike chara wan, the metaframe format is completely different and is as follows:
Example Metaframe: FF FF 00 00 ED A1 E9 04 00 7C Sections: 00 00 11 22 33 44 55 66 77 89
Section 0: ALL FFFF
Section 1: ALL 00.
Section 2: 00 or FB. If set to FB will draw-behind the character.
Section 3: Y Offset
Section 4: Dimensions in Binary Flags: 0123 4567
01: 00 in Sharpen and Barrage, 10 in Embargo. May control flicker.
2: Unknown (ALL 1)
3: Mosaic Mode (ALL 0)
45: Unknown (ALL 00)
67: Upper Bits for Y offset
Section 5: X Offset
Section 6: Dimensions in Binary Flags: 0123 4567
01: Size; 00=8x8, 01=16x16, 10=32x32, 11=64x64
2: Flip Vertical
3: Flip Horizontal
4: Is Last Meta Frame in Group (1 in Sharpen and Barrage, SOMETIMES in Embargo)
56: Unknown (ALL 10)
7: Upper Bits for X Offset (SOMETIMES 1 in Embargo)
Section 7: Image Offset by blocks. 1 LSB = 2 8x8 textures. Examples:
+1 for 8x8 Sharpen (will skip 1 block; the game appears to add 1 block space to 1-block textures)
+1 for 8x16 Embargo (8x16 = 2 blocks)
+2 for 16x16 Barrage (16x16 = 4 blocks)
+2 for 16x16 Sharpen (16x16 = 4 blocks)
+8 for 32x32 Sharpen (32x32 = 16 blocks)
Section 8: Palette Index. Values of 0 to C all appear to exist outside the file. They reference a palette that, on runtime, remains static. Values at D and E seem to use custom palettes that may or may not exist in the current file.
Section 9: ALL C
Section 4 and Section 6 are not completely confirmed, but the flags for size, flip, and horizontal/vertical dimensions are the same. It's pretty much following the same pattern as WAN sprites, except it's LITTLE-endian. Even though there's no variable for image index, it looks like ti can still be figured out be reading Section 7, which deals with memory offsets.
Recommended Comments
There are no comments to display.