This is what I tried:
In .cof file creation ini there are offsets. This parameters define a rectangular bounding box that allow selection of the sprites.
# xmin is the horizontal displacment from the sprite pivot for the left border
# xmax is the horizontal displacment from the sprite pivot for the right border
# ymin is the vertical displacment from the sprite pivot for the upper border
# ymax is the vertical displacment from the sprite pivot for the bottom border
xmin = -512
xmax = 512
ymin = -512
ymax = 512
In vanilla cof files these offsets are very different. For example in BATNHTH.cof the offsets are:
xmin = -34
xmax = 34
ymin = -90
ymax = 8
Maybe I'm wrong but after some testing it seems that they don't do anything. I've found a few similar topics in the forums where people had the same problem some time ago, but it was never fixed. I really need help in fixing this. There's something I'm missing. I'm ready to send my.dcc and .cof files for check. This will be very disappoiting if I don't finish this project.
EDIT (25.08.2016 ):
After a lot of thinking I realized that the only possible problem could be in chars_cof.d2. This file has something to do with characters' cof files and this is the only file that I didn't modify. But I don't know what is this file for and how can I modify it. Is there a tool like Animdata.d2 editor? Can someone forward me to some resources about chars_cof.d2? Thanks
EDIT (26.08.2016):
I think I found the big problem!!!! Like I thought it was in Chars_cof.d2. I found D2_cof tool by Paul Siramy and created a .txt file of Chars_cof.d2. In there I found "Layer Priority" and guess what - it's different for EVERY DIRECTION AND EVERY FRAME! That's why layers on my character overlap only in a few direction and a few frames. Now that I know the problem - how do I fix this? I think it's not possible to change the info in the .txt version of Chars_cof.d2 and repack it (or am I wrong?). So i guess the only way to modify Chars_cof.d2 is to hexedit it.Since I don't understand programming at all - can someone give me a hand in this? I would really appreciate this. Thanks.
Code: Select all
=============
chars_cof.d2
=============
record 0...
tag1 & tag2 = -1 0
record size - 24 = 1906
cof name = soscbow
tag3 = -1
# layers = 8
# frames / dir = 14
# directions = 16
unknown 2 = 20
unknown bytes = 0 240 253 127
unknown dword = -82 54 -92 6
unknown bytes = 0 1 0 0
layer 0 : LG 01 01 00 00 hth 00
layer 1 : LA 01 01 00 00 bow 00
layer 2 : RA 01 01 00 00 bow 00
layer 3 : TR 01 01 00 00 hth 00
layer 4 : HD 01 01 00 00 hth 00
layer 5 : S1 01 01 00 00 hth 00
layer 6 : S2 01 01 00 00 hth 00
layer 7 : LH 01 01 00 00 bow 00
(frames / dir) unknown data : 00 00 00 00 00 00 00 01 00 00 00 00 00 00
layers priority :
direction 0
frame 0 : LG TR RA HD S1 LH LA S2
frame 1 : LG TR RA HD S1 LH LA S2
frame 2 : LG TR RA HD S1 LA S2 LH
frame 3 : RA LG TR LA HD S1 S2 LH
frame 4 : RA LG TR LA HD S1 S2 LH
frame 5 : RA LG TR LA HD S1 S2 LH
frame 6 : RA LG TR LA HD S1 S2 LH
frame 7 : RA LG TR LA HD S1 S2 LH
frame 8 : LG TR HD S2 S1 RA LA LH
frame 9 : LG TR HD S2 S1 RA LA LH
frame 10 : LG TR HD RA LA S1 S2 LH
frame 11 : LG TR HD RA LA S1 S2 LH
frame 12 : LG TR HD RA LA S1 S2 LH
frame 13 : LG TR HD RA LA S1 S2 LH
direction 1
frame 0 : LG TR RA HD S1 LH LA S2
frame 1 : LG TR RA HD S1 LH LA S2
frame 2 : LG TR RA HD S1 LA S2 LH
frame 3 : RA LG TR LA HD S1 S2 LH
frame 4 : RA LG TR LA HD S1 S2 LH
frame 5 : RA LG TR LA HD S1 S2 LH
frame 6 : RA LG TR LA HD S1 S2 LH
frame 7 : RA LG TR LA HD S1 S2 LH
frame 8 : LG TR HD RA S1 LA S2 LH
frame 9 : LG TR HD RA S1 LA S2 LH
frame 10 : LG TR HD RA S1 LA S2 LH
frame 11 : LG TR HD RA S1 LA S2 LH
frame 12 : LG TR HD RA LA S1 S2 LH
frame 13 : LG TR HD RA LA S1 S2 LH
direction 2
frame 0 : LG TR RA S1 HD LH LA S2
frame 1 : LG TR RA HD S1 LH LA S2
frame 2 : LG TR RA HD S1 LA S2 LH
frame 3 : RA LG TR LA HD S1 S2 LH
frame 4 : RA LG TR LA HD S1 S2 LH
frame 5 : RA LG TR LA HD S1 S2 LH
frame 6 : RA LG TR LA HD S1 S2 LH
frame 7 : RA LG TR LA S1 HD S2 LH
frame 8 : LG TR RA S1 HD LA S2 LH
frame 9 : LG TR RA S1 HD LA S2 LH
frame 10 : LG TR RA S1 HD LA S2 LH
frame 11 : LG TR RA S1 HD LA S2 LH
frame 12 : LG TR RA LA S1 HD S2 LH
frame 13 : LG TR RA LA S1 HD S2 LH
direction 3
frame 0 : RA LG TR LH LA S1 HD S2
frame 1 : RA LG TR LH LA S1 HD S2
frame 2 : RA LG TR LH LA S1 HD S2
frame 3 : RA LG TR LH LA S1 HD S2
frame 4 : RA LG TR S1 HD LH LA S2
frame 5 : RA LG TR LH LA S1 HD S2
frame 6 : RA LG TR S1 HD LA S2 LH
frame 7 : RA LG TR S1 HD S2 LA LH
frame 8 : LG TR RA S1 HD LA LH S2
frame 9 : LG TR RA S1 HD LH LA S2
frame 10 : LG TR RA S1 HD LH LA S2
frame 11 : LG TR RA S1 HD LH LA S2
frame 12 : RA LH LG TR LA S1 HD S2
frame 13 : RA LH LG TR LA S1 HD S2
direction 4
frame 0 : RA LH LG TR LA S1 HD S2
frame 1 : RA LH LG TR LA S1 HD S2
frame 2 : RA LH LG TR LA S1 HD S2
frame 3 : RA LH LG TR LA S1 HD S2
frame 4 : RA LG TR S1 HD LH LA S2
frame 5 : RA LG TR S1 HD LH LA S2
frame 6 : RA LG TR S1 HD LH S2 LA
frame 7 : LG TR RA S1 HD S2 LH LA
frame 8 : LG TR RA S1 HD LA LH S2
frame 9 : LG TR RA S1 HD LH LA S2
frame 10 : LG TR RA S1 HD LH LA S2
frame 11 : LG TR RA S1 HD LH LA S2
frame 12 : RA LH LG TR LA S1 HD S2
frame 13 : RA LH LG TR LA S1 HD S2
direction 5
frame 0 : RA LH LG TR LA S1 HD S2
frame 1 : RA LH LG TR LA S1 HD S2
frame 2 : RA LH LG TR LA S1 HD S2
frame 3 : RA LH LG TR LA S1 HD S2
frame 4 : RA LG TR LH LA S1 HD S2
frame 5 : RA LG TR LH LA S1 HD S2
frame 6 : LG TR RA S1 HD S2 LH LA
frame 7 : LG TR RA S1 HD S2 LH LA
frame 8 : LG TR RA S1 HD LA LH S2
frame 9 : LG TR RA S1 HD LH LA S2
frame 10 : LG TR RA S1 HD LH LA S2
frame 11 : LG TR RA S1 HD LH LA S2
frame 12 : RA LH LG TR LA S1 HD S2
frame 13 : RA LH LG TR LA S1 HD S2
direction 6
frame 0 : RA LH LG TR LA S1 HD S2
frame 1 : RA LH LG TR LA S1 HD S2
frame 2 : RA LH LG TR LA S1 HD S2
frame 3 : RA LH LG TR LA S1 HD S2
frame 4 : RA LG TR LH LA S1 HD S2
frame 5 : RA LG TR LH LA S1 HD S2
frame 6 : LG TR RA S1 HD S2 LH LA
frame 7 : LG TR RA S1 HD S2 LH LA
frame 8 : LG TR RA S1 HD LA LH S2
frame 9 : LG TR RA S1 HD LH LA S2
frame 10 : LG TR RA S1 HD LH LA S2
frame 11 : LG TR RA S1 HD LH LA S2
frame 12 : RA LH LG TR LA S1 HD S2
frame 13 : RA LH LG TR LA S1 HD S2
direction 7
frame 0 : RA LH LG TR LA S1 HD S2
frame 1 : RA LH LG TR LA S1 HD S2
frame 2 : RA LH LG TR LA S1 HD S2
frame 3 : RA LH LG TR LA S1 HD S2
frame 4 : RA LG TR LH LA S1 HD S2
frame 5 : RA LG TR LH LA S1 HD S2
frame 6 : LG TR RA S1 HD S2 LH LA
frame 7 : LG TR RA S1 HD S2 LH LA
frame 8 : LG TR RA S1 HD LA LH S2
frame 9 : LG TR RA S1 HD LH LA S2
frame 10 : LG TR RA S1 HD LH LA S2
frame 11 : LG TR RA S1 HD LH LA S2
frame 12 : RA LH LG TR LA S1 HD S2
frame 13 : RA LH LG TR LA S1 HD S2
direction 8
frame 0 : LH LA LG S2 TR RA S1 HD
frame 1 : LH LA LG S2 TR RA S1 HD
frame 2 : LH LA LG S2 TR RA S1 HD
frame 3 : LH LA LG S2 TR RA S1 HD
frame 4 : LA LG TR LH RA S2 S1 HD
frame 5 : LG TR LH LA S2 S1 RA HD
frame 6 : LG TR LH LA S2 S1 RA HD
frame 7 : LG TR LH LA S2 RA S1 HD
frame 8 : LG LH LA S2 TR RA S1 HD
frame 9 : LG LH LA S2 TR RA S1 HD
frame 10 : LG LH LA S2 TR RA S1 HD
frame 11 : LG LH LA S2 TR RA S1 HD
frame 12 : LH LA LG S2 TR RA S1 HD
frame 13 : LH LA LG S2 TR RA S1 HD
direction 9
frame 0 : LA LH LG S2 TR RA S1 HD
frame 1 : LA LH LG S2 TR RA S1 HD
frame 2 : LA LH LG S2 TR RA S1 HD
frame 3 : LA LH LG S2 TR RA S1 HD
frame 4 : LA LG TR RA LH S2 S1 HD
frame 5 : LG TR LA LH S2 S1 RA HD
frame 6 : LG TR LA LH S2 S1 RA HD
frame 7 : LG TR LA LH S2 RA S1 HD
frame 8 : LG LA LH S2 TR RA S1 HD
frame 9 : LG LA LH S2 TR RA S1 HD
frame 10 : LG LA LH S2 TR RA S1 HD
frame 11 : LG LA LH S2 TR RA S1 HD
frame 12 : LA LH LG S2 TR RA S1 HD
frame 13 : LA LH LG S2 TR RA S1 HD
direction 10
frame 0 : LA LH LG S2 TR RA S1 HD
frame 1 : LA LH LG S2 TR RA S1 HD
frame 2 : LA LH LG S2 TR RA S1 HD
frame 3 : LA LH LG S2 TR RA S1 HD
frame 4 : LA LG TR RA LH S2 S1 HD
frame 5 : LG TR LA LH S2 HD S1 RA
frame 6 : LG TR LA LH S2 HD S1 RA
frame 7 : LG TR LA LH S2 RA S1 HD
frame 8 : LG LA LH S2 TR RA S1 HD
frame 9 : LG LA LH S2 TR RA S1 HD
frame 10 : LG LA LH S2 TR RA S1 HD
frame 11 : LG LA LH S2 TR RA S1 HD
frame 12 : LA LH LG S2 TR RA S1 HD
frame 13 : LA LH LG S2 TR RA S1 HD
direction 11
frame 0 : LA LH LG S2 TR HD RA S1
frame 1 : LA LH LG S2 TR HD RA S1
frame 2 : LA LH LG S2 TR HD RA S1
frame 3 : LA LH LG S2 TR HD RA S1
frame 4 : LA LG TR RA LH S2 HD S1
frame 5 : LG TR LA LH S2 HD S1 RA
frame 6 : LG TR LA LH S2 HD S1 RA
frame 7 : LG TR LA LH S2 HD S1 RA
frame 8 : LG LA LH S2 TR HD S1 RA
frame 9 : LG LA LH S2 TR HD RA S1
frame 10 : LG LA LH S2 TR HD RA S1
frame 11 : LG LA LH S2 TR HD RA S1
frame 12 : LA LH LG S2 TR HD RA S1
frame 13 : LA LH LG S2 TR HD RA S1
direction 12
frame 0 : LG LA LH S2 TR HD RA S1
frame 1 : LG LA LH S2 TR HD RA S1
frame 2 : LG LA LH S2 TR HD RA S1
frame 3 : LG LA LH S2 TR HD RA S1
frame 4 : LA LG TR RA LH S2 HD S1
frame 5 : LG TR LA LH S2 HD S1 RA
frame 6 : LG TR LA LH S2 HD S1 RA
frame 7 : LG TR LA LH S2 HD S1 RA
frame 8 : LG LA LH S2 TR HD S1 RA
frame 9 : LG LA LH S2 TR HD RA S1
frame 10 : LG LA LH S2 TR HD RA S1
frame 11 : LG LA LH S2 TR HD RA S1
frame 12 : LG LA LH S2 TR HD RA S1
frame 13 : LG LA LH S2 TR HD RA S1
direction 13
frame 0 : LG TR RA HD S1 LA S2 LH
frame 1 : LG TR RA HD S1 LA S2 LH
frame 2 : LG TR RA HD S1 LA S2 LH
frame 3 : LG TR RA LA HD S1 S2 LH
frame 4 : LG TR LA HD S1 RA S2 LH
frame 5 : LG TR LA HD S1 RA S2 LH
frame 6 : LG TR LA HD S1 RA S2 LH
frame 7 : LG TR LA HD RA S1 S2 LH
frame 8 : LG TR LA S2 HD S1 RA LH
frame 9 : LG TR LA S2 HD RA S1 LH
frame 10 : LG TR LA S2 HD RA S1 LH
frame 11 : LG TR LA S2 HD RA S1 LH
frame 12 : LG TR HD RA LA S1 S2 LH
frame 13 : LG TR HD RA LA S1 S2 LH
direction 14
frame 0 : LG TR RA HD S1 LA S2 LH
frame 1 : LG TR RA HD S1 LA S2 LH
frame 2 : LG TR RA HD S1 LA S2 LH
frame 3 : LG TR RA LA HD S1 S2 LH
frame 4 : LG TR LA HD RA S1 S2 LH
frame 5 : LG TR LA HD RA S1 S2 LH
frame 6 : LG TR LA HD RA S1 S2 LH
frame 7 : LG TR LA HD RA S1 S2 LH
frame 8 : LG TR LA S2 HD S1 RA LH
frame 9 : LG TR LA S2 HD RA S1 LH
frame 10 : LG TR LA S2 HD RA S1 LH
frame 11 : LG TR LA S2 HD RA S1 LH
frame 12 : LG TR HD RA LA S1 S2 LH
frame 13 : LG TR HD RA LA S1 S2 LH
direction 15
frame 0 : LG TR RA HD S1 LH LA S2
frame 1 : LG TR RA HD S1 LH LA S2
frame 2 : LG TR RA HD S1 LA S2 LH
frame 3 : RA LG TR LA HD S1 S2 LH
frame 4 : LG TR LA HD RA S1 S2 LH
frame 5 : LG TR LA HD RA S1 S2 LH
frame 6 : LG TR LA HD RA S1 S2 LH
frame 7 : LG TR LA HD RA S1 S2 LH
frame 8 : LG TR LA S2 HD S1 RA LH
frame 9 : LG TR LA S2 HD RA S1 LH
frame 10 : LG TR LA S2 HD RA S1 LH
frame 11 : LG TR LA S2 HD RA S1 LH
frame 12 : LG TR HD RA LA S1 S2 LH
frame 13 : LG TR HD RA LA S1 S2 LH