Weight of chests (CSBwin)

Dead posts cluttering up the front page of certain non-RTC forums are kept here. Threads have the forum subject attached, except custom dungeon threads (which are obvious)
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:

Weight of chests (CSBwin)

Post by Zyx »

In CSBwin sources, I found the following code in Mouse.cpp:

Code: Select all

case dbCHEST: 
    {
      totalWeight = 50; // weight of chest itself
      DB9 *pDB9 = GetRecordAddressDB9(item);
      RN objContents = pDB9->contents();
      while (objContents != RNeof)
      {
        totalWeight += GetObjectWeight(objContents);
        objContents = GetDBRecordLink(objContents);

      };
      break;
    };
It seems the weight is hard coded. Could it be possible to put it as a parameter in the dungeon.dat with CSBuild? (by default, 50, of course)
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. We can do that.

I just formated my system hard drive and will be
spending a few days recovering all the software and
data. But I added a card to the pile.
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

Just out of interest are the size of slots and the chest hard-coded too?
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

size of slots and the chest hard-coded
Not sure what you want to know.

The slots don't have a 'size'. What do you mean?
The number of slots is CERTAINLY hard-coded.

Parse error: 'size of slots hard-coded' and 'chest hard-coded'.
or 'size of slots hard-coded' and 'size of chest hard-coded'

If the latter then do you mean the size of the
slots (measured in what units) and size of chest (measured
in hat units?).
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post by Gambit37 »

I'm sorry, I just can't take this thread seriously. Weight of Chests? Size of chest hard-coded? It's really making my mind wander...

Does it show that it's been a while since I've had a girlfriend....?
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

Funny, the chest question was making me think about the 'money' chest before I then saw Adamo's post. I would never dream of askign about the number of chest slots - for one thing, graphically and engine wise it owuld certainly be hard coded.

By size I meant the latter, parameter that allows certain items to go in certain places only. The pouch area cannot take large weapons, screamer slices, clothes etc , and the chest slots have a similar size limitation (they can take slices though). This parameter also applies to chests themselves, as you cannot put a chest in a chest in-game, nor put it in your quiver or pouch.

So, just like the giggler attack can be configured to go into more inventory areas than normal, I wondered if the chest can be re-configured to accept anything, or accept only small items. And similarly, if it's parameter could be changed so it could be placed in 'smaller' inventory slots including normal chests.
Personally I was thinking of a money/key box idea before
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 think the permitted locations of the items is
in the item descriptions in the 'graphics.dat'.
If anyone strongly disagrees, I can spend some time
determining the exact algorithm. I think it has
nothing to do with 'size'. For example, you cannot
put a Coin on your head, even though it is 'smaller'
that one of the Helmets.

We could probably write a 'generic' DSA that would
move a chest to your backpack. It could be activated
by a spell or pressurepad or whatever. Similarly
to move chests into chests, etc.
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post by Gambit37 »

Yes, that stuff's in the graphics.dat -- it's exposed by ADGE and CSBedit.

You were both wise to ignore my comment. It was very childish.
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

But you make up for it with your knowledge now : )
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

Each item in the game has some bits set or cleared determining where they can go (chest, head, pouch, legs, etc).
I don't know if there are unused bits.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

Hint: see Edit/Global.

CustomGraphicDemo2.zip demonstrates
a 2.5 Kg chest. Still quite a handful.
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

Nice! Thank you!
Post Reply