CSBuild Version 0.789

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
Paul Stevens
CSBwin Guru
Posts: 4322
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

CSBuild Version 0.789

Post by Paul Stevens »

CSBuild Version 0.789 is at
http://dianneandpaul.net/CSBwin

===================================================
Version 0.789
--Ability to remove Orphaned Text records.
--Provide a warning when writing an Encrypted file.
--Allow lower-case in Scroll editor. Converts to Upper-case.
--Allow Text on Trick wall. Works very well...to my surprise.
--Disallow Compression of Encrypted files.
--Add right-side text to show monster possessions.
===================================================
User avatar
PicturesInTheDark
Arch Master
Posts: 1154
Joined: Mon Aug 26, 2002 4:47 pm
Location: Vienna, Austria

Re: CSBuild Version 0.789

Post by PicturesInTheDark »

Thanks for the start on orphans - repair on text works well, but the list does not get refreshed - I had to close the window and then re-check to see if the entry I repaired had gone. Also, would you think about a possibility to select multiple text entries of the same kind for repair ?

For example, "The black flame" has quite a lot of orphaned text and if more than one could be repaired in one go this would considerably shorten the time needed to do so - and if there's a lot of "orphaned object database's", it takes a while scrolling to select each individual text orphan to repair.

Regards, PitD
User avatar
Paul Stevens
CSBwin Guru
Posts: 4322
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Re: CSBuild Version 0.789

Post by Paul Stevens »

That is strange. When I 'Repair' an Orphaned Text
entry the list does get updated. The word 'Repaired'
appears in front of the entry I Repaired. Perhaps you
can provide a dungeon and explicit instructions as
to how to reproduce the behavior you describe.

As for the tedium of scrolling and selecting....this
release was in a bit of a rush because of a reported
problem with compressed and encrypted dungeons.
The interface will be easier to use when I get it the
way I want it.
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Re: CSBuild Version 0.789

Post by Zyx »

1) I know this has nothing to do with CSBuild... But maybe someone can help me...
If I change the size of a graphic in the graphics.dat, I obtain garbled graphics in CSBwin. However I changed the header of the graphic (=long word) to reflect the new width and height.
I'm using the DMextractor made by Rain. I know the graphics are correctly changed because if I extract them again they show correctly, even with modified dimensions.
I also checked the length in bytes in the definition list at the beginning of the graphics.dat. (this list appears twice I don't know why): the length is correct.
Maybe CSBwin reads the dimensions from elsewhere?

2) If I edit the graphics.dat file and modify the name of the falchion, then CSBwin says a message:
"Unknown SmartDiscard Object" FALCHION
Then it proceeds with the game and all is fine.
This happens with the dagger too.
But it doesn't happen for the majority of objects, weapons, potions, etc.

3) Paul, could you add an option to save all the texts into a file so we can check them easily? Also, they should go with their coordinates so we can find quickly where they are.

4) Monsters carrying clothes display "unknown name"

5) If I put a false wall on a pressure pad, a confirm dialog appears. If I press OK, the mouse will leave a trail of false walls until I click.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4322
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Re: CSBuild Version 0.789

Post by Paul Stevens »

1) I would like to be able to change the graphics.
The graphics handling is very complex and I never took
the time to understand it. If you send me the graphics
file that has the garbled graphic and tell me how to
see it perhaps I can tell you what is happening. But
that is not to say I can tell you how to fix it.

2) Yes, the code that figures out what to discard is
driven by the names of the objects. Once upon a time,
the table that drove the code was in the 'config.txt' file
and could be changed with a text editor. That is why I
used names. I will try to change CSBwin to use the
numbers instead of the names.

3) I can do something like that. Carded.

4) Carded.

5) Carded.
User avatar
Charlatan75
Apprentice
Posts: 59
Joined: Mon Nov 10, 2003 2:32 pm

Re: CSBuild Version 0.789

Post by Charlatan75 »

Hello Zyx :)

For the graphics, I think the information you need is in the file 0558 that you
extract from the graphics.dat file.

In this file "0558", there is all the data used by the game to draw items, missiles,
wall ornates and doors (coordinates, sizes, at all possible distances...), and
probably many other things as I only "explored" about the half of this file...

Here is what I know about this file (considering the first byte is byte number 1) :

- bytes 1 to 1156 : I know nothing :))) I started to explore the file somewhere in
the middle, because Paul Stevens wrote this comment : "... 6-byte RectPos for doors?"
somewhere in the source code of CSBWin9.3 (I don't remember in which file), so I
was pretty sure that whatever I would modify, I would see the result on a door ^^
(and in fact I saw the result on the small button of a door).

- bytes 1157 to 1456 give all the coordinates at which a visible item (on the floor
or in an alcove) will be drawn in the dungeon view. These coordinates are divided in
three groups, because the different items are not all drawn at the same height.

- bytes 1559 to 1642 describe the various missiles (dimensions of the picture, is
this missile a spell or a weapon?, will this missile spin when thrown (like an axe)?...)

- bytes 1643 to 2152 describe all the items (dimensions of the picture, is there a
"mirror effect" if this item is placed on the left or on the right? (for example,
put a dagger on the floor, on the left then on the right, no difference... now try
with a magic box, the "mirror effect" is applied ^^), is there a particular graphic
for this item if it is placed in an alcove? (example : the chest! in fact, only this
item uses an extra picture when it is placed in an alcove), which group of coordinates
will be used to display this item when it is on the floor or in an alcove?...)

- bytes 2153 to 2176 give the different coordinates (and sizes) at which the small
button of the doors will be drawn...

- bytes 2177 to 2248 give the different coordinates (and sizes) at which a door ornate
will be drawn in the dungeon view. These coordinates are divided in 4 groups, because
there are 4 different types of door ornates.

- bytes 2249 to 2410 give the different coordinates (and sizes) at which a floor
ornate will be drawn. These coordinates are divided in 3 groups, because there are
3 different types of floor ornates (the "Foot prints" are the only floor
ornate in group 1 ^^).

- byte 2411 to 3034 give the coordinates (and sizes) at which a wall ornate will be
drawn. These coordinates are divided in 8 groups (for example the "champion mirror" is
alone in group 5, and "Librasulus outside" in group 7 ^^).

- byte 3035 to 3058 tell how to draw the "unreadable texts on walls", where to draw
the readable text lines...

- byte 3059 to 3090 give the colors used to draw a door ornate at distance 2 and 3!

- byte 3091 to 3122 give the colors used to draw a wall ornate at distance 2 and 3!

- byte 3125 to 3136 say which group of coordinates will be used to display each door
ornate.

- byte 3137 to 3146 say which group of coordinates will be used to display each floor
ornate.

- byte 3147 to 3206 say which group of coordinates will be used to display each wall
ornate.

- byte 3207 to the end of the file : I know nothing.


It's been a few months I stopped looking in this file, because I had no time to go on :/
but I took a lot of notes (in text files) and If you're interested I can work a little
bit on those notes (so that they become nearly understandable ^^) and then put them
somewhere where you could download them.

Hmmm... Oh! A small detail... the notes I took are in french... (if I'm not wrong
you're french... but if I'm wrong I don't know if you will understand something ^^).

Charlatan75
User avatar
Paul Stevens
CSBwin Guru
Posts: 4322
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Re: CSBuild Version 0.789

Post by Paul Stevens »

Oh my goodnesss. What pain you must have endured
to have discovered all of this. Only love could drive a
person to do such hard work. I am in awe.
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Re: CSBuild Version 0.789

Post by Zyx »

Wow, you gave very good information! In fact, you allowed me to solve in only a few hours a problem that would have taken ages!
I took the part from 1643 to 2152. It seems it is a list of 6 bytes pieces of data. One byte is half the width (rounded up to multiple of 16, I guess), another is the height (maximum: 48, over that throwing an object thrown would make it disappear).
Thank you very much Charlatan!
I am still interested by your notes by the way. And yes, I'm french.
Now I am very close to release Conflux II! Only one level left to be tested, and a problem with texts to be fixed...
User avatar
PicturesInTheDark
Arch Master
Posts: 1154
Joined: Mon Aug 26, 2002 4:47 pm
Location: Vienna, Austria

Re: CSBuild Version 0.789

Post by PicturesInTheDark »

I could not reproduce described text phenomenon. Hmm. Something else though: What makes a text "orphaned" ? If I create a text in a dungeon (say on a wall) is there any way to specify a certain attribute/state within CSBuild to avoid the text being orphaned ?

If you get a round to making the "repairs" easier one suggestion would be to either work through them all and then show the rest left or a result. For the texts handling would be easier if the program jumped back to the line you were, otherwise it's scrolling all over again... but this is just a minor problem.

Something else: When I tried to correct some text orphans in Pauly Hayes' "The black flame" I also ran a check on monster (Result: "Not implemented") and decorations (Result: "Not implemented" and after clicking "ok" "No problem with decorations") I tried this with the unaltered file you can download from "New dungeons. Funnily enough, sometimes the message "not implemented" does not come up, but on other occasions it does. Very strange.

Regards, PitD
User avatar
Paul Stevens
CSBwin Guru
Posts: 4322
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Re: CSBuild Version 0.789

Post by Paul Stevens »

Some of your suggestions have already been
implemented in the next release.

Keep these problems and suggestions in mind. I
am going to ignore them right now. I am in crisis
mode as I have a rather terrible problem with text.
I do not know exactly how to proceed. Once that
is solved I will get back to listening again.
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Re: CSBuild Version 0.789

Post by beowuuf »

I think text orphans are created from deleting scrolls, are they not?
The text object referenced on the scroll will still exist in the ethers of the file whether the scroll itself exists or not
Was unable to (permenantly) kill off ian_scho (Haynuus), Ameena, oh_brother (Westian), money (Falkor), raixel (Petal) and Lord_Bones (Aurek) in the DM D&D game Time's Champions!

CONGRATULATIONS TO THOSE WHO MADE THE GAME WHAT IT WAS - GREAT!
User avatar
Paul Stevens
CSBwin Guru
Posts: 4322
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Re: CSBuild Version 0.789

Post by Paul Stevens »

Does deleting Scrolls cause Orphans? CSBuild should
never create Orphans or Clones where none existed
before. If it does, I will fix it.
-----
I posted CSBuild version 0.790.

It is a quick first response to a problem we discovered
with overflowing the text array. Code is present to
dump all the text to a file. It is a bit ugly but it works
and will help us survey the extent of the damage.

Code is also present to start the process of repairs.
But it is not working well enough to use.

Here is what is going on:
DM/CSB have text records that contain 13-bit pointers
into an array of 16-bit words. Each word can contain
3 characters. So we can have 8192 distinct pointers
and the array can be at most 8192 words long. That is
only 24576 characters.

Prior to version 0.790, CSBuild did not check for overflow
and 'wrapped around', putting new text on top of old text.
Very bad.....

===================================================
Version 0.790
--Dump all text to file named 'TextDump.txt'
User avatar
ChristopheF
Encyclopedist
Posts: 1589
Joined: Sun Oct 24, 1999 2:36 pm
Location: France
Contact:

Re: CSBuild Version 0.789

Post by ChristopheF »

Charlatan75, I am also interested by your notes.
They could make a fine addition to the file format specifications.
Could you send them to me (I am french too).
Thanks,
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Re: CSBuild Version 0.789

Post by beowuuf »

Sorry, i wasn't saying CSB4win did it, i was just suggesting a cause, since a scroll is like a chest for text - don't card it!
Was unable to (permenantly) kill off ian_scho (Haynuus), Ameena, oh_brother (Westian), money (Falkor), raixel (Petal) and Lord_Bones (Aurek) in the DM D&D game Time's Champions!

CONGRATULATIONS TO THOSE WHO MADE THE GAME WHAT IT WAS - GREAT!
User avatar
PicturesInTheDark
Arch Master
Posts: 1154
Joined: Mon Aug 26, 2002 4:47 pm
Location: Vienna, Austria

Re: CSBuild Version 0.789

Post by PicturesInTheDark »

There are CSBuild versions 791-794 at the download area which are all password protected - any special reason for that? Testing/Debugging ?

Regards, PitD
Post Reply

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