Daggerfall Mod:DFRemake/Resource - Dungeon

Mod / Daggerfall: Daggerfall Mod: DFRemake(Redirected from Daggerfall:DFRemake/Resource - Dungeon)

The resource manager will hold the needed information for one dungeon at a time.

Design NotesEdit

  • Although in DF, a Dungeon is composed of multiple blocks, here a Dungeon is a collection of objects (and other records). Blocks are only needed during dungeon creation and it will be easier to store the objects individually.
  • Dungeon objects will be hidden/disabled when the player is not in the dungeon.

ObjectsEdit

Objects within the dungeon include any static 3d object such as walls, rooms, furniture, etc.... Dungeon objects will be stored in one list, RMDungeonObjects() with the following fields.

  • DWORD ObjectID: The DarkBasic object ID.
  • DWORD RefObjectID: The referenced object ID (dungeon objects will be instanced). The referenced ID is stored so that it can be

properly dereferenced once the dungeon is destroyed (for reference counting).

  • DWORD Flags: Various object parameters.


FlatsEdit

Flats will be stored in a separate list, RMDungeonFlats(), so they can be quickly accessed. They will use the same fields as objects.

ActionsEdit

Actions include things like switches, levers, and platforms that can move. Doors do not use action records.

  • DWORD ActionID: The unique value for this action.
  • DWORD SourceObjectID: The object that triggers this action.
  • DWORD TargetObjectID: This value is 0 if the action has no target object.
  • BYTE ActionType: Type of action to perform (translation, rotation, etc...)
  • DWORD Flags: Various flags depending on the action type.
  • float Duration: How long to perform the action (seconds).
  • float Delta: How much action to perform over the duration (depends on the action type).


LightsEdit

The list of lights in the dungeon, RMDungeonLights(), with the following fields.

  • DWORD LightID: The DarkBasic light identifier value.
  • DWORD Flags: Holds various light parameters.


ExitsEdit

A list of dungeon exits, RMDungeonExits(). Although there is usually only one exit in a dungeon, we'll use a list for flexability.

  • ObjectID?
  • Destination information (exterior location, X/Y/Z?)


FunctionsEdit