CSBgraphics

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.
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

CSBgraphics

Post by Zyx »

The CSBgraphics.exe is great! I'm going to use it to store all the portraits and for some overlays

effects. Cleaner, smaller.
Some questions:

When importing a bmp, could you:
for the name, put by default the file name, without the extension?
for the ID, put by default the maxID+1?
for the file type, put by default the last imported type?

Would it be difficult to preview a stored bmp without exporting it?

When exporting, could the name of the file be name+.bmp?

what is the use of the edit menu?

I still don't understand what is the role of an .ovl file.


The CSBwin cannot load the confluxII graphics.dat anymore, it gives a "system error 44". But it can load the same dungeon with a classic graphics.dat.
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

Also, I created a DSA, entitled "water overlay", in the conflux dungeon. No problem.
When I add an actuator of DSA type and I want to choose the type of the DSA, with the button "select new DSA type" in the "edit DSA actuator window", I only got a list with:
0 ffff
1 ffff
2 ffff
etc, up to 31 ffff

I should read:
0 Water overlay
1
2
etc

I tried with a small dungeon and I had no problem creating a DSA and adding a DSA actuator.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

I want to choose the type of the DSA, with the button "select new DSA
Did you add it as one of the allowed DSAs on the level? Just as you must add
wall decorations, etc?

I will try to implement your suggestions for easier use of the graphics compiler.
It was thrown together quickly just to get the demonstration level working.
There is no .ovl file. I originally used the .ovl extension but decided against
it for several reasons. It became the CSBgraphics.dat file. Where do you see
the .ovl referenced? I should fix it.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

I posted a new OverlayDemo.rar that fixes the SystemError 44
when using Conflux graphics.

What happened is this: Some graphics are loaded initially into
static memory. They are not cached. I cannot tell you which graphics
they are without some work. At any rate, the Conflux graphics
were larger and did not fit into the space I had allocated. So I made it bigger.
I do not want to make it a lot bigger than is necessary because it is
allocated statically whether or not the design requires it. Perhaps
this can be fixed someday. It is not too big now (600K) but these things
start to add up on platforms like the PocketPC which has only 64Meg for
everything including the file system.
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

Paul Stevens wrote:Did you add it as one of the allowed DSAs on the level? Just as you must add
wall decorations, etc?
You're right, I missed this step (I wasn't aware of it). It works now. Thank you.

The .ovl is from an old overlay demo, since it's replaced by the csbgraphics.dat we can forget it.

And thank you for the fix.
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

Replacing a bmp in the CSBgraphics.dat with another hangs csbgraphics.exe.

Only 256 colors bmp are valid, right?

Could you order the items by their ID?
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

Yes, I can cause that hang, too. I'll look into it.

256 colors. Right.

The IDs need only be unique within their type. I thought that I ordered them first
by type and then by ID. Do you want the types all mixed together?
I guess I will add a menu selection for key. and the old key will become the
secondary key. Then you can have whatever you like.
User avatar
PaulH
Ghastly gastropod
Posts: 3763
Joined: Wed Aug 07, 2002 10:27 pm
Location: Level 6

Post by PaulH »

What is this 'csbgraphics.exe', and how does it work? I downloaded it a while ago and have just remebered it: all my .dat files are now csb graphics docs (including some files unrelated to DM) and the programme says 'this doesn't look like a csb graphics file' when I try and open this. Put in simple terms, I haven't a clue what I am doing.
User avatar
Gambit37
Should eat more pies
Posts: 13720
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post by Gambit37 »

I've just taken a look at this too, and am stumped! It seems like a great way of storing portraits, and I've just made a new csbgraphics.dat file with my portraits in, but now that I have it, I have no idea how to reference these portraits in CSBuild -- it's still expecting external files with a portraitnn.bmp file name.

Paul, can you shed some light on how to use this? Thanks.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

Zyx uses these, I think. He can probably speak from experience.
I will add an example to the 'overlayDemo.rar. But CSBGraphics.exe
crashed on me and I have to fix that first. So it will be a day or so
before I can provide an example.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

That was easier than I thought. THe new OverlayDemo at
dianneandpaul.net/CSBwin
has a sample of use of the portraits.

In the EditChampionPortrait dialog you simply specify
the 'Id' of the portrait you want to use.
User avatar
Gambit37
Should eat more pies
Posts: 13720
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post by Gambit37 »

I can't put an ID less than 24 in the Edit Portrait dialogue box as I get a warning saying it should be between 24 and 255. This means I have to make the IDs for portraits in the CSBgraphics start from 24. That's fair enough I suppose, but I've already made a file that starts from 1, so I guess I have to make it again.... It would be useful if you could put some notes about that in the Help menu of CSBGraphics.

Also, would it be possible to edit the portrait's information once they've been created? It's a one shot deal at the moment, and any mistakes mean creating the file from scratch.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

I can't put an ID less than 24 in the Edit Portrait dialogue box
The first 24 are for the standard portraits.
would it be possible to edit the portrait's information once they've been created
I think so. Won't happen today. Allowing 'Copy', 'Cut', and 'Paste' should probably
be the first things to implement.

Remember that this program is sorta in the 'Alpha' state. I threw it together
to solve the immediate problems that Zyx had maintaining dozens of portrait
files and the problem I had with 16 overlay files. I don't like having dozens
of files around. What it does seems to work but it is nowhre near as useful
as it should be (and will be if people like you keep pointing out weaknesses).
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

What it does seems to work
I take that back. I played with it a bit and one thing that it should
be able to do it cannot do. It cannot replace an existing portrait
entry.

You should also be able to do a 'New' operation to insert some sort of
default 'portrait' or 'overlay' which you could then either Edit, Paste Over,
or Replace.

I'll put some of these simple operations high on my list now that I hear
that someone is actually attempting to use the program.
User avatar
Gambit37
Should eat more pies
Posts: 13720
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post by Gambit37 »

Great! Thank you.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

I posted a new CSBgraphics.exe at
http://dianneandpaul.net/CSBwin
It seems a bit better. Double-Click on an item (or select it
and press Enter) to edit it. You can change the type, id, or
name. Select an item and press Control-X to delete it.

You can also replace an item by importing over the top of it.

So that should make most anything possible.

Please treat this as un-tested. Back up your file often. I'd not
like to hear that your only copy got destroyed.
User avatar
Gambit37
Should eat more pies
Posts: 13720
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post by Gambit37 »

I confirm that your changes appear to work fine. Thank you!
User avatar
Des
Um Master
Posts: 461
Joined: Wed Jun 11, 2003 11:58 pm
Location: Southampton, UK

Post by Des »

I've just been having a play with this, and I get an error. I have the feeling I've missed something obvious....

I downloaded the Overlay demo and tried to add a new portrait to the CSBgraphics.dat file. First I tried a new image, reducing it to 256 characters and resizing it to 32x29 in Paint Shop Pro.

As soon as I reached the portrait of "DO RE ME" it crashed with
System Error 15468 - Invalid Graphics File Signature.

So I removed the image and it worked again. I then tried making a small change to the original 16-colour image, loading that as portrait 26 and setting it as the character's portrait in CSBuild, but the same error returned.

I tried it both with the older CSBWin (9.8v8) that came with the overlay demo, and with the latest 9.8v16.

Any ideas what's wrong?
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

Maybe it's a palette issue? The portraits are restricted to 16 colors, already determined (the DM palette), while the overlay colors can use any 256 colors of your choice.
Where did the "original 16-colour image" come from?
I guess you exported it from the CSBgraphics.dat. That's what i did, then I made some changes, imported it to the file, and it worked fine.
User avatar
Des
Um Master
Posts: 461
Joined: Wed Jun 11, 2003 11:58 pm
Location: Southampton, UK

Post by Des »

The original 16-colour BMP was indeed from the CSBGraphics.dat from the overlay demo.

I tried re-exporting the file and importing it unedited but still got the same error. I also tried creating a new CSBGraphics file with just the unmodified image but it still crashed. I must be missing something somewhere. Oh and I'm using XP SP2.
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

You do have the last version (V 2.0)?
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

The OverlayDemo is not encrypted but it does specify the
signature of the graphics files. So you either must use the
original graphics files or you must edit dungeon.dat to remove
the signatures.

Releasing a dungeon like this is a bit silly because it is not
encrypted and so you can edit it and remove the signatures
or even change them so that your graphics files will work.
But I was testing the capability and left the sigatures in the
dungeon.dat as a demonstration of the capability. It allows
a designer to force you to use the proper graphics. Exactly
as you have discovered.....;-)
User avatar
Des
Um Master
Posts: 461
Joined: Wed Jun 11, 2003 11:58 pm
Location: Southampton, UK

Post by Des »

Ahhh, that's it. Thankyou. Encrypt on the File menu, set the CSBGraphics signature key to 0.

So to summarise, to create your own heroes for a dungeon (using CSBGraphics and CSBuild) you need to...

1. Export a valid portrait to get the correct 16-colour palette and image size.

2. Create bitmaps for each of your heroes using the above.

3. Create a new CSBGraphics.dat file

4. Import your BMPs and number them from 25 onwards. Entries can be edited by double clicking the number on the list and deleted using CTRL / X.

5. If you want to "lock" the file to a dungeon use the Encrypt item on the File menu in CSBuild.

6. In CSBuild, when specifying an external portrait, if you have a CSBGraphics file you simply enter the id number - the name of the file does not matter.

7. Fiddle around with the characters' stats.
User avatar
Adamo
Italodance spammer
Posts: 1534
Joined: Fri Apr 22, 2005 11:59 am
Location: Poland
Contact:

Post by Adamo »

so I can use original 16-colour DM palette in external portraits only? is there a way to extend it to 256 colours, as it is in overlays?
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 »

I tried to make new external portrait files, but I have a problem now. While testing my external portraits in a dungeon, I get error:

Code: Select all

bitmap file error - filename = ... That is not 16-color bitmap
also, there appears "error" inscription on the picture frame.
Here what I did:"
-I resized several of my bitmaps in GIMP to 32x29 pixels (with .bmp extension) file each,
-I imported and exported each one bitmap via ADGE to get valid 16-colour bitmaps (with those files that uses "normal" colour palette). So the colours changed to 16 in DM`s order,
-I loaded changed bitmaps into my CSBgrapghics.dat, using names like "portrait024.bmp, portrait025.bmp, portrait026.bmp etc. setting portrait type with the same ID number,
-using CSBuild I added them as external filr portraits

where`s the problem? I`m 100% sure that I use 16 colour bitmap in each of the portraits. I checked colour palettes in GIMP and they`re exactly the same that I use in graphics.dat file. But the message says that it`s not 16-colours bitmap..

or maybe graphics.dat files and CSBgraphics.dat external portrait files has different colour indexation? is there a way to unify that or to make CSBgraphics.exe recognise "standard" (graphics.dat) colour index?
Spoiler
(\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/)
Spoiler
(@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@)
Spoiler
(>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<)
User avatar
Gambit37
Should eat more pies
Posts: 13720
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post by Gambit37 »

There are many variations of the header information in BMP images. Even photoshop has trouble recognising certain 'flavours' of BMP. It's possible that the tools only recognise certain flavours of BMP.

Try opening in MS Paint and resaving -- that'll give you a pretty standard header that most progs will recognise.
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

If you extract the portrait file using ADGE, then you know you have got the right colour palette with the correctly mapped colours. If you then comp and paste the portrait you are trying to play with into the portrait file, line up with one of the champions, then crop to the 32x29 size then you should have the correct colour, pallette and size...

Try it and see if it works anyway!
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

If you were to send your CSBgraphics.dat and your
dungeon in which they are used then I might be able
to either tell you what you have done wrong or,
if you did nothing wrong, to fix CSBwin.
User avatar
Adamo
Italodance spammer
Posts: 1534
Joined: Fri Apr 22, 2005 11:59 am
Location: Poland
Contact:

Post by Adamo »

ok, I think I know where`s the problem. Take a look at these two pictures:

Image

Image

the first picture (bigger one) is the "standard" DM palette (I resized avatars, then loaded them into ADGE and exported with changed colours). In GIMP you can see the "colour palette" as little 16-colour bricks. The second picture is original Paul`s portrait.bmp file (exported from CSBgraphics.dat from the "overlay demo"). The question is, why these portraits have the same colour formats (16 colours in DM`s order), but mapped in a different way, wchich is showed in GIMP`s "colour palette" window (Paul`s original portrait has bigger "colour bricks" in "colour palette" window)? it seems that CSBgraphics.exe uses different colour mapping system than ADGE / graphics.dat.

Well, never mind, I found a solution: I have to cut bmp picture from my portrait right to the original Paul`s portrait and save it as mine with changed name. In that case Paul`s colour mapping system (wchich is different from original - see my posts above) will be keeped.

However, I`ll send you two files (portrait1.bmp and portrait2.bmp) just to compare the differences, but IMHO there`s no need to fix it, since I found a solution.
Last edited by Adamo on Sun Apr 30, 2006 1:42 pm, edited 1 time in total.
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 »

uhh, I`ve got it: just checked attributes of these portraits and... these ones exported via ADGE has 8-bit depth, while Paul`s external portrait file from overlay demo has 4-bit depth, the proper one. I didn`t know ADGE is exporting like this.. is there a way to change depth of a picture without copying & pasting whole stuff?
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”