Partial repost from the coding forum:A COF file handles what DCCs appear for a monster- the names, which body parts, etc. It may handle the relative X/Y position of body parts (head above torso), but it might not, that could also be done with the offsets in the DCC. It probably does handle the "Z" aspect of monsters (which DCC appears on top of the others: head must appear on top of torso, if torso appears on top then you'd see a wierd neck socket over part of the head) COFs do not tell the game how many frames to use- only AnimData.d2 and the SkillSeqs do that. But of course you better have enough frames in your DCC and COF to match or exceed the value in AnimData or else the game tries to draw nothing and errors. The COF and DCC need not have the same number of frames, so long as it is as much or less than the value in AnimData.d2.
For the Knights, I picked a monster graphic with only one component (TR), the quill bear. I write out the D1 files as TR and then adjusted the values in AnimData.d2. The COFs had as many or more frames than my DCCs so they worked fine, with the exception of the death animation. The death animation is 18h frames, which was more than the quill bear's COF could handle. However the Blunderbore or Pinhead (PN)'s death animation is 17h frames (it also happens to be a one-component TR monster), so I took the COF for the Pinhead's death animation, renamed it and put it in to replace the Quill Bear's death COF. I also changed the AnimData back to 17 frames (the 18h frame should really copied and used for the DD animation, which is the body left behind, but I haven't gotten around to that yet)
I only got this working because I also know a little about how cl2 and trn files work. In Diablo1, the directions of a monsters animations are stored in clockwise order, starting from down. So it goes D, LD, L, UL, U, UR, R, DR. However, 8-direction DCCs have a different order for their directions. They go DL, UL, UR, DR, D, L, U, R. So I had to hex-edit the CL2 file so the directions represented what they are in a DCC. You can probably achieve a similar effect by saving the CL2 as an animated GIF file and using some animator program to switch the frames around. I suggested Brian offer support for the D1 clockwise style and have his program convert it to DCC style (the D1 style is just more logical anyway) but he hasn't got around to it yet.
The Offsets are kindof important. I noticed that even though I had fixed the CL2s to match the DCC style directions, I was still getting attacked from odd angles. I tried running into the monster and noticed that the image of the monster was actually well displaced from it's location (you can tell because your character will run around the monsters true location rather than through it) This is what those offsets are for, you have to play with them until the image closely matches the monster's actual location. One way of testing is letting yourself be attacked from each side, if you have it right then the monster should be about equidistant no matter which way he attacks. If he is too close from one direction and too far in the opposite, adjust the offset a bit.
[This message has been edited by FoxBat (edited 02 November 2001).]