Core Rules
WoTC AD&D 2nd Edition -- Drakein API Reference
Loading...
Searching...
No Matches
IPart.h File Reference

Public interface for one CPart record (Parts.dat / PartsU.dat). More...

#include "API.h"

Classes

class  CoreRules::IPart
 One CPart record (a Weapon / Armor / NWP / Magic Item / Kit / etc.). More...
struct  CoreRules::IPart::ImageLoc
 Resolved image-file location for a part. More...

Namespaces

namespace  CoreRules

Functions

IPartCoreRules::CreatePart ()
void CoreRules::DestroyPart (IPart *p)

Detailed Description

Public interface for one CPart record (Parts.dat / PartsU.dat).

CPart is the most field-rich record in CoreRules. All 21 part-type arrays in Parts.dat share this single record format; each part type uses a DIFFERENT SUBSET of the fields. Fields outside a type's subset sit at default values and are still serialized for round-trip.

Type identification is by array position — which of Parts.dat's 21 per-Part_Type arrays the record lives in — NOT by an embedded record-type field on CPart itself.

The interface groups fields by SEMANTIC USAGE rather than disk-layout order. Most groups apply to a subset of part types – the group docstring notes the relevant types. See CoreRules_DataFiles.md section 4 (per-type field selection guide) for which fields each Part_Type uses.

Field categories (matching @name groups below):
  • Identity & common
  • Value, weight, money (per Skills & Powers + PHB rule systems)
  • Equipment categorization & ownership
  • Magical-item flags (IsMagicItem + 9 "functions-as" predicates)
  • Effects on character (ability score adjustments)
  • S&P sub-ability adjustments (12)
  • Saving throws (10 adjustments + 10 bonuses)
  • Rogue skill adjustments (13 percentages)
  • Equipment basics (wear, carry, containers)
  • Weapon-specific fields
  • Armor & shield-specific fields
  • Weapon / armor proficiency hints
  • NWP / proficiency cost fields
  • Spells & magic
  • Class ability progression
  • Psionics
  • Movement
  • Race-related restrictions
  • Social ranking
  • Trailing string lists
  • Related spells
  • Embedded Part Kit