Multiple objects with text? CSBUILD

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. You may Image to help finance the hosting costs of this forum.
Post Reply
User avatar
Gambit37
Should eat more pies
Posts: 13773
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Multiple objects with text? CSBUILD

Post by Gambit37 »

Is it possible to have multiple objects on a wall using CSBuild, so that they both show up together?

I wanted to try and have text on some kind of stone plaque, but whenever I add both objects to the wall tile, only the text displays. The plaque displays fine without the text. But not both together.

Is this a limitation of the runtime engine? If so, can it be improved?
User avatar
Paul Stevens
CSBwin Guru
Posts: 4322
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

That is the way it is. The wall decoration is determined
by the last actuator on that wall. There is only one place
in the code to keep track of a decoration and so the last one
put there is what shows. Any others get overwritten.

There is a slight exception. The Picture Frame and
portrait are sort of independantly displayed. See ConfluxII.

Displaying two things might be possible if I work at it.
What should they be? The first and last? The last two?

I wrote it down but don't hold your breath.

Edit: Of course this will break all the Up/Down switches because
both will be displayed simultaneously. What do we do about
that?
User avatar
Gambit37
Should eat more pies
Posts: 13773
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post by Gambit37 »

Hmmm.... whatever is decided seems like a lot of work. I don't know what is best Paul, as I don't understand the technicalities enough. Is there a possibility of somehow duplicatin ght eportrait functionality, but making the frame a custom image and the portrait the text?
User avatar
beowuuf
Archmastiff
Posts: 20686
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

How does the portrait code work? Zyx has kept the extra portraits at the 64 x 64 size, but is this necessary? Could you create a 300x150 or whatever portrait? If so, that would be a screen capture image of the text. Then as normal the wall object behind is the stone plaque.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4322
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

We might make some special case for showing both text
and a Wall Decoration at the same time. That might
be feasible. But I wonder if you would be happy with the
result. The text is grey and is designed to look like it is
carved into the grey blocks of the wall. If you put it on
anything else it would probably look rather strange. And
it would probably look even stranger from a distance.

I don't like putting in things that are special-case and not
generally useful for everyone. What are you trying to
accomplish that cannot be done with ordinary wall text?
Perhaps somebody can think of something clever that will
accomplish your goal and satisfy me that my efforts will
be generally useful.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4322
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

Another thing we could do that might make someone happy.
We could provide a way to specify an arbitrary bitmap to
display. Now this gets a bit tricky because of the several
distances and angles from which it is viewed. Also, .BMP files
get big pretty fast and people could get carried away drawing
dozens of large pictures. We could wind up with games that
occupy multiple megabytes. Not very DM-like.

Who knows how the decorations are represented in graphics.dat?
How are the various angles and distances handled?
User avatar
Gambit37
Should eat more pies
Posts: 13773
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post by Gambit37 »

I'm trying to simply jazz up the text a bit, and also because I have designed new walls, the text doesn't show up so well. I want to be able to place the text over a stone plaque, so that it looks like it's carved into that, rather than the wall. I have already done screen tests in PhotoShop and it looks great, but simply doesn't work in the engine.

As for the grahics.dat, you only need the front view and the side view. Charlatan's information on file 0558 contains all the information on how to change all the offsets and measurements for all the views -- they are all generated and scaled from the 2 single images (one for front, one for side). I would prefer to do it this way rather than use external BMPs as it cuts down on the file size and only requires two images.

As Zyx did with Conflux 2, I've successfuly changed the hook into my stone plaque. Just can't put the text over it.

@Beo -- your suggestion wouldn't really work as you can't currently add new graphics to the .dat and if the dungeon has lots of text, you'd have to replace lots of decorations with the plaque/text graphics.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4322
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

Well, as I said: It will probably be possible to put a
decoration and a text on the same wall. I'll try it. The
original code is a bit haphazard, depending on side-effects
and such 'cheats'.
User avatar
beowuuf
Archmastiff
Posts: 20686
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

The idea was that you only alter one wall object for your wall plaque, and all the text was captured as portraits. CSBuild seemes to support about 460 externally referenced portraits, though I assume all at the 32x29 size just now.

There are currently around 150 portraits being used in Conflux II like this (look at the portrait folder) to create small differences in the graphics.

With portraits you only need the one view, when you are right ontop of it, which is all the text does. With some cunning lines on the wall object plaque behind, I'm sure the squashed version could look like faint writing from a distance, without it detracting from the real text when close up

edit: Paul's post wasn't there when I started...nm mine then!
User avatar
Gambit37
Should eat more pies
Posts: 13773
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post by Gambit37 »

Ah, right, I see what you mean. Yes this would be one way of doing ti, but not my preffered due to:

1) Probably 32x29 limit on portratis
2) The amount of effort required to create tens if not hundreds of text strings as bitmaps.... copying and pasting all the runic characters into sensible sentences isn't my idea of fun... ;)
User avatar
cowsmanaut
Moo Master
Posts: 4380
Joined: Fri Jun 30, 2000 12:53 am
Location: canada

Post by cowsmanaut »

annother possibility is to alter the font.

lets say you have a bronze plaque and so the background you are typing on is brown. If you were to leave a hole in the plaque and change the background colour of the text to brown (rather than the mask colour) then it would place blocks of brown with letters on it. Then all you need to do is be sure you put in enough spaces to fill in the areas where there is no text. otherwise you would see the wall through the hole in the plaque thus ruingin the illusion :)

moo
Post Reply

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