AR Logo

Index Thread Archive Apr-2001 Archive
 Main Index   Previous in ThreadNext in Thread   Previous in ArchiveNext in Archive   Index by Subject for Apr-2001Index by Author for Apr-2001Index by Date for Apr-2001   Index by Subject for ArchiveIndex by Author for ArchiveIndex by Date for Archive 
Subject: Forward: Dungeon Memory Locations
Author: Dan Pinal <danp--massmedia.com>
Date: 20-Apr-2001 17:51:52

Well the 8-bit source code is either lost or unrecoverable, so all I have
is my memory. Basically, there's this big block of memory in the character
data where all items go except for things like gold, copper, etc. All
items even the ones you drop are stored here.

A spell is just another type of item. Each item can be of variable
size. Somewhere in the header of the item is it's size and where the
"effects" are offset in it. The effects are a fixed size, something like
16 or 32 bytes. The effects fall into a few basic categories. "Get",
"Drop", "Use", "Unuse", "Poof" and probably others I've forgotten. Inside
the effect data is some pseudo code. The code can do things like add a
number to an offset in character data when "Used" set a timer etc. An item
could have multiple effects for Get, use, etc. A Strength spell when used
could have an immediate effect when "used" of adding 50 to Strength and
then starting an "Unuse" effect of subtracting 50 to Strength on a
countdown timer. These effects were queued and stored in another area of
memory.

Things like combat spells I believe stored a value in the character data
that was only looked at by the combat code. There were also a number of
specials that didn't just +/- character data. The spell % might be stored
in the effect area. I'd suggest looking for the name of the spell and then
searching for a number that matched its percentage. With a couple of
different spells to look at, it probably wouldn't be hard to spot.

A disease would also be another type of item. Invisible in your inventory
it would have a nasty effect when you "get" it and only something special
would allow you to "drop" it.

An improperly defined item might do something really cool with the code to
cancel its cool effect missing if it was destroyed rather than the item
dropped or unused. Then you could have permanent effects. As I recall,
they do exist.

Dan

This Thread
  Date   Author  
* 20-Apr-2001 Dan Pinal
20-Apr-2001 Mark
16-Apr-2001 Listmaster
This Author (Apr-2001)
  Subject   Date  
* Forward: Dungeon Memory Locations 20-Apr-2001