Yay, finally a good one.
The enchants .. well, you should better make the icy effect with particles but if you want additional enchantment attachments ..
At
0x104 in your m2 is a integer. Its the number of attachments. Should be zero in a custom made item. Get it up to 5.
At
0x108 you got a integer again defining the offset to the attachment list. At this offset you got [
0x104] (5, as said above) entries of this structure (
0x30 bytes):
0x00 - uint32 - id (position of the record in block P)
0x04 - uint32 - bone
0x08 - float[3] - position
0x14 - AnimationBlock (int) - Data
0x30 - /
The easiest way would be copying it from a existing model. You should do that. Take one which fits the size best. Copy 0x104, copy the blocks at [0x108] to the end of your file. Correct the offset at 0x108. And:
The problem will be the
AnimationBlock. Its like this (
0x20 bytes):
0x00 - int16 - interpolation type
0x02 - int16 - global sequence ID or -1
0x04 - uint32 - number of (int, int) interpolation ranges
0x08 - uint32 - offset to interpolation ranges
0x0C - uint32 - number of (int) timestamps
0x10 - uint32 - offset to timestamps
0x14 - uint32 - number of values
0x18 - uint32 - offset to values
0x20 - /
You have to keep an eye on the offset to
x ones. Correct that offset to fit your new file. And copy the values on these offsets (they should be 0 all the time but its better you check it) too.
I hope you understood what I meant x) Ask if you didnt. I'd really love to see this being worked on more. Its fukken great. (+9 btw.)