Page 1 of 1

Custom skins help

Posted: Mon Sep 12, 2005 10:17 pm
by Zyx
1) Put all the wallsets graphics into one single bmp. (example)

2) Define the zones corresponding to the 21 possible views of the dungeon (you may want to take notes or copy and paste them as new bmp) (zones)

3) Create the masks as bitmap, considering the SourceX must be a multiple of 16, so you may have to add some transparent strips to the left. Note the source coordinates, calculate the destination coordinates.

4) Transform you big bmp into a bin file with the picture header, as defined in the docs

5) Transform the masks bmp in .msk files, with the format specified in the docs

6) put all the msk files into a single one, with the index structure

7) add the bigpic.bin and the allmasks.msk (or whichever names you gave them) into the CSBgraphics.dat, using CSBgraphics.exe

8 Put the skincode, , using CSBgraphics.exe(example)

9) update your skin.bin file containing the skin definitions: add a new line with your new skins, referrencing the bigpic index and the allmasks index, the skincode, etc. Use an hex editor for that. (Or any future tool)

9) Put the skin.bin in the CSBgraphics.dat using CSBgraphics.exe

11) Put some skin layout in the dungeon with CSBuild (Menu->Edit->Skin Map)

12) Test

Note: for steps 3 to 6, Kentaro is developping new tools.

Posted: Wed Apr 19, 2006 1:24 pm
by Adamo
9) update your skin.bin file containing the skin definitions: add a new line with your new skins, referrencing the bigpic index and the allmasks index, the skincode, etc. Use an hex editor for that. (Or any future tool)
uhh.. I`ve got a serious problem with hex editing skin.bin file. I never hex-edited in my life. When I open skin file, there are some numbers, wchich I dont understand at all. How can I add these lines that Zyx talkes about? What I have to do to transform these numbers into a typical text file?? help !!

Posted: Wed Apr 19, 2006 1:26 pm
by beowuuf
Hex is simply the binary bytes writen neater

So the 0000 - 1111 of binary (0 -16) is instead writen as 0 -9 or a - f for 10 - 15. One charatcer for four

Hence each byte is actually written as a couplet from 00 - FF (0 - 255 in decimal, 00000000 - 11111111 in binary)

Posted: Wed Apr 19, 2006 1:41 pm
by Adamo
thanx for explanation Beo, but I still dont understand it at all. Is there a way to transform it into some human-readable text? all I want to do is to add a few new wallsets to the existing ones.

Long time ago, Zyx ported my custom wallsets to the csbgraphics.dat file using his masks. These wallsets were a big pictures, containing walls from all angles. Since I want to add new wallsets, I have to change skin.bin file, adding there new line with new skins, referrencing the bigpic index and the allmasks index, the skincode, etc.

While I was talking with Zyx on the chat, he adviced me:
"once you've got the .bin, add to Csbgraphics.dat through CSBgraphics.exe,
extract the skin.bin from your CSBgraphics.dat, hex edit it, and add a new line referring the ID of
the new .bin (the new wallset),
with the same values for the masks and skincode as the others, import your skin.bin to
CSBgraphics.dat again,a nd voila test in a dungeon where
you use the new skin".
I dont understand how to change the skin.bin file

Posted: Wed Apr 19, 2006 1:49 pm
by beowuuf
It isn't text, it's numbers! It's numbers indicatign the values zyx is talking about. There is no text to substitue anymore than you would asign words for the co-ordinates of a dungeon tile

If the new bicpicx index is say 5, then add the number 05 to the next line, if the allmasks index is, say, 255, then you would add the value FF.

I haven't done this myself, but this seems to be what he is indicating

Posted: Wed Apr 19, 2006 3:16 pm
by Adamo
ooooook I get it! now everything works fine !!! thanx !!! :D

Posted: Thu May 04, 2006 7:47 pm
by Adamo
anyone knows, what`s the total number of additional custom wallsets (backgrounds) in csbgraphics.dat file?
I guess they`re signed from 128 to .. ?