Custom skins help

Discuss Chaos Strikes Back for Windows and Linux, an unofficial port of Chaos Strikes Back to PC by Paul Stevens, as well as CSBuild, an associated dungeon editor.

Moderator: Zyx

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Custom skins help

Post 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.
User avatar
Adamo
Italodance spammer
Posts: 1534
Joined: Fri Apr 22, 2005 11:59 am
Location: Poland
Contact:

Post 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 !!
Spoiler
(\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/)
Spoiler
(@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@)
Spoiler
(>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<)
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post 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)
User avatar
Adamo
Italodance spammer
Posts: 1534
Joined: Fri Apr 22, 2005 11:59 am
Location: Poland
Contact:

Post 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
Spoiler
(\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/)
Spoiler
(@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@)
Spoiler
(>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<)
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post 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
User avatar
Adamo
Italodance spammer
Posts: 1534
Joined: Fri Apr 22, 2005 11:59 am
Location: Poland
Contact:

Post by Adamo »

ooooook I get it! now everything works fine !!! thanx !!! :D
Spoiler
(\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/)
Spoiler
(@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@)
Spoiler
(>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<)
User avatar
Adamo
Italodance spammer
Posts: 1534
Joined: Fri Apr 22, 2005 11:59 am
Location: Poland
Contact:

Post 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 .. ?
Spoiler
(\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/)
Spoiler
(@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@)
Spoiler
(>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<)
Post Reply

Return to “Chaos Strikes Back for Windows & Linux (CSBWin) / CSBuild”