![]() |
Core Rules
WoTC AD&D 2nd Edition -- Drakein API Reference
|
Classes | |
| struct | AllowedClassInfo |
| struct | Char_Charisma_Attr |
| Derived Charisma stats. More... | |
| struct | Char_Constitution_Attr |
| Derived Constitution stats. More... | |
| struct | Char_Dexterity_Attr |
| Derived Dexterity stats. More... | |
| struct | Char_Intelligence_Attr |
| Derived Intelligence stats. More... | |
| struct | Char_Strength_Attr |
| Derived Strength stats for the character's current Strength (Core Rules) or Stamina + Muscle sub-abilities (Skills & Powers). More... | |
| struct | Char_Wisdom_Attr |
| Derived Wisdom stats. More... | |
| class | IAttackRecord |
| class | ICalendarEntryOb |
| class | ICalendarOb |
| class | ICalendarRecord |
| class | ICharacter_Adventure |
| class | ICharacter_Extension |
| class | ICharacter_Party |
| class | ICharacterIndex |
| class | ICharacterMiniOb |
| One roster entry (one row of Chars/index.chr). More... | |
| class | ICharacterPartyRecord |
| class | ICharacterRecord |
| Heavy per-character record (one row backing a Chars/*.dat file). More... | |
| class | IClassFreeSpellsOb |
| class | IClassMultiClassOb |
| class | IClassOb |
| class | IClassRecord |
| class | ICompanionOb |
| class | IConvertRecord |
| class | IConvertRecordOb |
| class | ICoreRulesTable |
| class | IDateOb |
| class | IDiaryEntryOb |
| class | IDiaryOb |
| class | IEncounterFreqTableOb |
| class | IEncounterFreqTableRecord |
| class | IEncounterMonHpOb |
| One per-monster HP roll. More... | |
| class | IEncounterMonsterPackageOb |
| One monster group inside an encounter. More... | |
| class | IEncounterNPCOb |
| Named NPC reference (name + race + 5-slot multi-class). More... | |
| class | IEncounterNPCPackageOb |
| One NPC group inside an encounter. More... | |
| class | IEncounterOb |
| One encounter record. More... | |
| class | IEncounterRecord |
| class | IEncTemplateItemPropertiesOb |
| One Item Properties row inside an encounter template. More... | |
| class | IEncTemplateMonsterPropertiesOb |
| One Monster Properties row inside an encounter template. More... | |
| class | IEncTemplateNPCPropertiesOb |
| One NPC Properties row inside an encounter template. More... | |
| class | IEncTemplateNumAppearOb |
| One escort/per-item monster entry (dice + monster reference). More... | |
| class | IEncTemplateOb |
| One encounter-template record. More... | |
| class | IEncTemplateRecord |
| class | IExportBuilder |
| class | IFamilyOb |
| class | IFamilyRecord |
| class | IImportReader |
| class | IInventory_Item |
| class | IInventoryBundle |
| class | IMonsterAttackOb |
| class | IMonsterOb |
| class | IMonsterRecord |
| class | IMonsterTypeOb |
| class | IMonsterTypeRecord |
| class | INumList |
| class | IPart |
| One CPart record (a Weapon / Armor / NWP / Magic Item / Kit / etc.). More... | |
| class | IPartIDOb |
| class | IPartKitBonusOb |
| class | IPartKitLevelOb |
| class | IPartKitOb |
| Character-kit definition (embedded in CPart records of type Character Kit). More... | |
| class | IPartsRecord |
| class | IParty_Inventory |
| class | IProgress |
| class | IPropertyOb |
| class | IPropertyRecord |
| class | IPsionicPowerOb |
| class | IPsionicRecord |
| class | IRaceOb |
| class | IRaceRecord |
| class | IReputationOb |
| class | ISpellPointsOb |
| class | ISpells |
| class | ISpellsOb |
| class | ISpellsRecord |
| class | ISpouseOb |
| class | ITableEntry |
| class | ITrapOb |
| class | ITrapRecord |
| class | ITreasureOb |
| class | ITreasureRecord |
| class | ITreasureSingleTableOb |
| class | ITreasureTableEntry |
| class | ITreasureTableRecord |
Enumerations | |
| enum class | ClassGroup : long { Warrior = 0 , Rogue = 1 , Priest = 2 , Wizard = 3 , Psionicist = 4 } |
| enum | DataVersion { DV_2_0 , DV_2_0x , DV_2_0xP5 } |
| Which Core Rules data release the loaded databases are in. More... | |
| enum class | ExportItemKind { Character , Class , PsionicPower , Trap , Race , WizardSpell , PriestSpell , Monster , Encounter , Template , TreasureBundle , MonsterType , Weapon , Armor , NonWeaponProf , RacialAbility , Language , Equipment , MagicItem , SchoolOfMagic , Trait , Disadvantage , GemOrArt , ClassAbility , CharacterKit , Currency , Count , Sphere , ProfantasyMap , MapMakerIIMap , _Count } |
| enum class | PartSection : int { None = 0 , Weapons = 1 , Armor = 2 , NonWeaponProf = 5 , RacialAbilities = 6 , Languages = 7 , Equipment = 8 , MagicItems = 9 , SchoolsOfMagic = 10 , Traits = 12 , Disadvantages = 13 , GemsAndArts = 14 , ClassAbilities = 15 , CharacterKits = 16 , Currency = 17 , Counts = 18 , Spheres = 19 , WeaponProficiencies = 23 } |
|
strong |
Which Core Rules data release the loaded databases are in.
Set INTERNALLY by LoadDatabases (the registry root on Windows, the INI version marker, or the explicit pCD/pBase argument). Consumers may QUERY it via GetDataVersion() but can never set it: changing the version after a load would let a 2.0 record be re-saved in 2.0x layout and corrupt the file for the original Core Rules engine. A record is always read AND written in its loaded version's exact byte layout (byte-exact round-trip).
| Enumerator | |
|---|---|
| DV_2_0 | Core Rules 2.0 (HKCU\...\Evermore\TSRP2). |
| DV_2_0x | 2.0 Extension (Evermore\TSRP3, no "version") |
| DV_2_0xP5 | 2.0 Extension + Patch 5 (Evermore\TSRP3, "version"=3502) |
|
strong |
|
strong |
| bool CoreRules::AnyDatabaseDirty | ( | ) |
Cross-table dirty query.
Returns true if ANY loaded record table has unsaved changes (any record modified, or any add/remove/rename of slots since last save). Walks every populated *_Record global and the Character_Index. Suitable for "Save All" toolbar enablement and app-exit "save before exiting?" prompts.
| bool CoreRules::CanAddToCategory | ( | const ICharacterRecord * | owner, |
| ICharacterRecord::InventorySlot | category, | ||
| const IInventory_Item * | item, | ||
| const char ** | reason = nullptr ) |
| bool CoreRules::CanAddToContainer | ( | const ICharacterRecord * | owner, |
| const IInventory_Item * | container, | ||
| const IInventory_Item * | item, | ||
| const char ** | reason = nullptr ) |
| ICalendarEntryOb * CoreRules::CreateCalendarEntryOb | ( | ) |
| ICalendarOb * CoreRules::CreateCalendarOb | ( | ) |
| ICharacter_Adventure * CoreRules::CreateCharacter_Adventure | ( | ) |
| ICharacter_Extension * CoreRules::CreateCharacter_Extension | ( | ) |
| ICharacter_Party * CoreRules::CreateCharacter_Party | ( | ) |
| ICharacterMiniOb * CoreRules::CreateCharacterMiniOb | ( | ) |
Factory for a standalone MiniOb (not in any roster).
| IClassFreeSpellsOb * CoreRules::CreateClassFreeSpellsOb | ( | ) |
| IClassMultiClassOb * CoreRules::CreateClassMultiClassOb | ( | ) |
| IClassOb * CoreRules::CreateClassOb | ( | ) |
| ICompanionOb * CoreRules::CreateCompanionOb | ( | ) |
| IConvertRecordOb * CoreRules::CreateConvertRecordOb | ( | ) |
| ICoreRulesTable * CoreRules::CreateCoreRulesTable | ( | ) |
| IDateOb * CoreRules::CreateDateOb | ( | ) |
| IDiaryEntryOb * CoreRules::CreateDiaryEntryOb | ( | ) |
| IDiaryOb * CoreRules::CreateDiaryOb | ( | ) |
| IEncounterFreqTableOb * CoreRules::CreateEncounterFreqTableOb | ( | ) |
| IEncounterMonHpOb * CoreRules::CreateEncounterMonHpOb | ( | ) |
Factory for a standalone HP-roll entry.
| IEncounterMonsterPackageOb * CoreRules::CreateEncounterMonsterPackageOb | ( | ) |
Factory for a standalone monster package.
| IEncounterNPCOb * CoreRules::CreateEncounterNPCOb | ( | ) |
Factory for a standalone NPC reference (not owned by any properties row).
| IEncounterNPCPackageOb * CoreRules::CreateEncounterNPCPackageOb | ( | ) |
Factory for a standalone NPC package.
| IEncounterOb * CoreRules::CreateEncounterOb | ( | ) |
Factory for a standalone encounter (not in any table).
| IEncTemplateItemPropertiesOb * CoreRules::CreateEncTemplateItemPropertiesOb | ( | ) |
Factory for a standalone Item Properties row.
| IEncTemplateMonsterPropertiesOb * CoreRules::CreateEncTemplateMonsterPropertiesOb | ( | ) |
Factory for a standalone Monster Properties row.
| IEncTemplateNPCPropertiesOb * CoreRules::CreateEncTemplateNPCPropertiesOb | ( | ) |
Factory for a standalone NPC Properties row.
| IEncTemplateNumAppearOb * CoreRules::CreateEncTemplateNumAppearOb | ( | ) |
Factory for a standalone NumAppear entry.
| IEncTemplateOb * CoreRules::CreateEncTemplateOb | ( | ) |
| IExportBuilder * CoreRules::CreateExportBuilder | ( | ) |
| IFamilyOb * CoreRules::CreateFamilyOb | ( | ) |
| IInventory_Item * CoreRules::CreateInventory_Item | ( | ) |
| IInventoryBundle * CoreRules::CreateInventoryBundle | ( | ) |
| IMonsterAttackOb * CoreRules::CreateMonsterAttackOb | ( | ) |
| IMonsterOb * CoreRules::CreateMonsterOb | ( | ) |
| IMonsterTypeOb * CoreRules::CreateMonsterTypeOb | ( | ) |
| INumList * CoreRules::CreateNumList | ( | ) |
| IPart * CoreRules::CreatePart | ( | ) |
| IPartIDOb * CoreRules::CreatePartIDOb | ( | ) |
| IPartKitBonusOb * CoreRules::CreatePartKitBonusOb | ( | ) |
| IPartKitLevelOb * CoreRules::CreatePartKitLevelOb | ( | ) |
| IPartKitOb * CoreRules::CreatePartKitOb | ( | ) |
Factory for a standalone kit (not embedded in any CPart).
| IParty_Inventory * CoreRules::CreateParty_Inventory | ( | ) |
| IPropertyOb * CoreRules::CreatePropertyOb | ( | ) |
| IPsionicPowerOb * CoreRules::CreatePsionicPowerOb | ( | ) |
| IRaceOb * CoreRules::CreateRaceOb | ( | ) |
| IReputationOb * CoreRules::CreateReputationOb | ( | ) |
| ISpellPointsOb * CoreRules::CreateSpellPointsOb | ( | ) |
| ISpells * CoreRules::CreateSpells | ( | ) |
| ISpellsOb * CoreRules::CreateSpellsOb | ( | ) |
| ISpouseOb * CoreRules::CreateSpouseOb | ( | ) |
| ITrapOb * CoreRules::CreateTrapOb | ( | ) |
| ITreasureOb * CoreRules::CreateTreasureOb | ( | ) |
| ITreasureSingleTableOb * CoreRules::CreateTreasureSingleTableOb | ( | ) |
| ITreasureTableEntry * CoreRules::CreateTreasureTableEntry | ( | ) |
| size_t CoreRules::DecodeDisplay | ( | const char * | raw, |
| char * | out, | ||
| size_t | out_capacity ) |
| void CoreRules::DestroyCalendarEntryOb | ( | ICalendarEntryOb * | p | ) |
| void CoreRules::DestroyCalendarOb | ( | ICalendarOb * | p | ) |
| void CoreRules::DestroyCharacter_Adventure | ( | ICharacter_Adventure * | p | ) |
| void CoreRules::DestroyCharacter_Extension | ( | ICharacter_Extension * | p | ) |
| void CoreRules::DestroyCharacter_Party | ( | ICharacter_Party * | p | ) |
| void CoreRules::DestroyCharacterMiniOb | ( | ICharacterMiniOb * | p | ) |
Release a MiniOb created by CreateCharacterMiniOb.
| void CoreRules::DestroyClassFreeSpellsOb | ( | IClassFreeSpellsOb * | p | ) |
| void CoreRules::DestroyClassMultiClassOb | ( | IClassMultiClassOb * | p | ) |
| void CoreRules::DestroyClassOb | ( | IClassOb * | p | ) |
| void CoreRules::DestroyCompanionOb | ( | ICompanionOb * | p | ) |
| void CoreRules::DestroyConvertRecordOb | ( | IConvertRecordOb * | p | ) |
| void CoreRules::DestroyCoreRulesTable | ( | ICoreRulesTable * | p | ) |
| void CoreRules::DestroyDateOb | ( | IDateOb * | p | ) |
| void CoreRules::DestroyDiaryEntryOb | ( | IDiaryEntryOb * | p | ) |
| void CoreRules::DestroyDiaryOb | ( | IDiaryOb * | p | ) |
| void CoreRules::DestroyEncounterFreqTableOb | ( | IEncounterFreqTableOb * | p | ) |
| void CoreRules::DestroyEncounterMonHpOb | ( | IEncounterMonHpOb * | p | ) |
Release a standalone HP-roll entry.
| void CoreRules::DestroyEncounterMonsterPackageOb | ( | IEncounterMonsterPackageOb * | p | ) |
Release a standalone monster package.
| void CoreRules::DestroyEncounterNPCOb | ( | IEncounterNPCOb * | p | ) |
Release a standalone NPC reference. Does NOT detach from a parent row.
| void CoreRules::DestroyEncounterNPCPackageOb | ( | IEncounterNPCPackageOb * | p | ) |
Release a standalone NPC package.
| void CoreRules::DestroyEncounterOb | ( | IEncounterOb * | p | ) |
Release a standalone encounter.
| void CoreRules::DestroyEncTemplateItemPropertiesOb | ( | IEncTemplateItemPropertiesOb * | p | ) |
Release a standalone Item Properties row.
| void CoreRules::DestroyEncTemplateMonsterPropertiesOb | ( | IEncTemplateMonsterPropertiesOb * | p | ) |
Release a standalone Monster Properties row.
| void CoreRules::DestroyEncTemplateNPCPropertiesOb | ( | IEncTemplateNPCPropertiesOb * | p | ) |
Release a standalone NPC Properties row.
| void CoreRules::DestroyEncTemplateNumAppearOb | ( | IEncTemplateNumAppearOb * | p | ) |
Release a standalone NumAppear entry.
| void CoreRules::DestroyEncTemplateOb | ( | IEncTemplateOb * | p | ) |
| void CoreRules::DestroyExportBuilder | ( | IExportBuilder * | ) |
| void CoreRules::DestroyFamilyOb | ( | IFamilyOb * | p | ) |
| void CoreRules::DestroyImportReader | ( | IImportReader * | ) |
| void CoreRules::DestroyInventory_Item | ( | IInventory_Item * | p | ) |
| void CoreRules::DestroyInventoryBundle | ( | IInventoryBundle * | p | ) |
| void CoreRules::DestroyMonsterAttackOb | ( | IMonsterAttackOb * | p | ) |
| void CoreRules::DestroyMonsterOb | ( | IMonsterOb * | p | ) |
| void CoreRules::DestroyMonsterTypeOb | ( | IMonsterTypeOb * | p | ) |
| void CoreRules::DestroyNumList | ( | INumList * | p | ) |
| void CoreRules::DestroyPart | ( | IPart * | p | ) |
| void CoreRules::DestroyPartIDOb | ( | IPartIDOb * | p | ) |
| void CoreRules::DestroyPartKitBonusOb | ( | IPartKitBonusOb * | p | ) |
| void CoreRules::DestroyPartKitLevelOb | ( | IPartKitLevelOb * | p | ) |
| void CoreRules::DestroyPartKitOb | ( | IPartKitOb * | p | ) |
Release a standalone kit.
| void CoreRules::DestroyParty_Inventory | ( | IParty_Inventory * | p | ) |
| void CoreRules::DestroyPropertyOb | ( | IPropertyOb * | p | ) |
| void CoreRules::DestroyPsionicPowerOb | ( | IPsionicPowerOb * | p | ) |
| void CoreRules::DestroyRaceOb | ( | IRaceOb * | p | ) |
| void CoreRules::DestroyReputationOb | ( | IReputationOb * | p | ) |
| void CoreRules::DestroySpellPointsOb | ( | ISpellPointsOb * | p | ) |
| void CoreRules::DestroySpells | ( | ISpells * | p | ) |
| void CoreRules::DestroySpellsOb | ( | ISpellsOb * | p | ) |
| void CoreRules::DestroySpouseOb | ( | ISpouseOb * | p | ) |
| void CoreRules::DestroyTrapOb | ( | ITrapOb * | p | ) |
| void CoreRules::DestroyTreasureOb | ( | ITreasureOb * | p | ) |
| void CoreRules::DestroyTreasureSingleTableOb | ( | ITreasureSingleTableOb * | p | ) |
| void CoreRules::DestroyTreasureTableEntry | ( | ITreasureTableEntry * | p | ) |
| size_t CoreRules::EncodeDisplay | ( | const char * | raw, |
| char * | out, | ||
| size_t | out_capacity ) |
| const char * CoreRules::GetConfigKey | ( | int | index | ) |
Key name at the given enumeration index, or "" when out of range.
Pointer ownership: same lifetime contract as GetConfigPath.
| int CoreRules::GetConfigKeyCount | ( | ) |
Number of keys available from the platform configuration.
| const char * CoreRules::GetConfigPath | ( | const char * | key | ) |
Read a configured path / value by key name.
Looks up key in the platform configuration source (registry on Windows, ~/.config/corerules.cfg on Linux) and returns the value.
| key | Name of the configuration key (e.g. "database", "bitmaps_portrait", "CDROM"). Case-sensitive. |
| DataVersion CoreRules::GetDataVersion | ( | ) |
Data release of the currently-loaded databases.
| ICharacterRecord::InventorySlot CoreRules::HomeSlotFor | ( | const IInventory_Item * | item | ) |
| bool CoreRules::LoadConvertDatabase | ( | ) |
| bool CoreRules::LoadConvertDatabase | ( | const char * | base_path, |
| const char * | user_path ) |
| bool CoreRules::LoadDatabases | ( | ) |
Load all CoreRules databases using auto-resolved paths.
Registry-based on Windows; falls back to ~/.config/corerules.cfg on Linux. After success, every *_Record global is populated.
| bool CoreRules::LoadDatabases | ( | const char * | pCD, |
| const char * | pBase ) |
Load all databases from explicit CD-ROM root + writable base.
| pCD | Read-only data root (e.g. the original CD's directory). Per-subdir fallback target when pBase/<dir> is missing. |
| pBase | Writable user data root. Probed first for each subdir. |
| bool CoreRules::LoadDatabases | ( | const char * | pCD, |
| const char * | pBase, | ||
| DataVersion | version ) |
Load from explicit CD-ROM root + base, specifying the data release.
Use when there is no registry/INI to detect from: the caller states which release the files are, so we know how to read them (and later write them back byte-exact). The unversioned overload above defaults to DV_2_0xP5.
| pCD | Read-only data root (e.g. the original CD's directory). Per-subdir fallback target when pBase/<dir> is missing. |
| pBase | Writable user data root. Probed first for each subdir. |
| version | The data release of the files at these paths. |
| bool CoreRules::LoadDatabases | ( | const char * | pCD, |
| const char * | pBase, | ||
| DataVersion | version, | ||
| IProgress * | progress ) |
| bool CoreRules::LoadDatabases | ( | const char * | pCD, |
| const char * | pBase, | ||
| IProgress * | progress ) |
| bool CoreRules::LoadDatabases | ( | const char * | pINI | ) |
Load all databases using paths from an explicit INI file.
| pINI | Path to a CoreRules INI file (same key layout as the Windows registry settings). |
| bool CoreRules::LoadDatabases | ( | const char * | pINI, |
| IProgress * | progress ) |
| bool CoreRules::LoadDatabases | ( | IProgress * | progress | ) |
| bool CoreRules::LoadEncTabDatabase | ( | const char * | user_path | ) |
| IImportReader * CoreRules::OpenImportReader | ( | const char * | path | ) |
| void CoreRules::ReleaseDatabases | ( | ) |
Free all in-memory CoreRules data.
Tears down everything LoadDatabases populated:
Idempotent: safe to call when nothing has been loaded, and safe to call multiple times in a row. Does NOT save anything – any unsaved edits are dropped. Call SaveDatabases first if you want them persisted.
| void CoreRules::ReleaseEncTabDatabase | ( | ) |
| bool CoreRules::SaveConvertDatabase | ( | ) |
| bool CoreRules::SaveConvertDatabase | ( | const char * | user_path | ) |
| bool CoreRules::SaveDatabases | ( | ) |
Save every dirty database back to auto-resolved paths.
Dirty-aware: clean catalogs are skipped (no file rewrite). Walks Character_Index and saves loaded+dirty per-character .chr / extension record files; rewrites index.chr if any character was saved or the index itself is dirty. Never touches base (read-only) files.
| bool CoreRules::SaveDatabases | ( | const char * | pCD, |
| const char * | pBase ) |
Save every dirty database to the explicit pBase path tree.
| pCD | CD-ROM root. Used only as a fallback locator (we never write to it). |
| pBase | Writable user data root. |
| bool CoreRules::SaveDatabases | ( | const char * | pCD, |
| const char * | pBase, | ||
| IProgress * | progress ) |
| bool CoreRules::SaveDatabases | ( | const char * | pINI | ) |
Save every dirty database using paths from an INI file.
| pINI | Path to the same INI file that drove LoadDatabases. |
| bool CoreRules::SaveDatabases | ( | const char * | pINI, |
| IProgress * | progress ) |
| bool CoreRules::SaveDatabases | ( | IProgress * | progress | ) |
| bool CoreRules::SaveEncTabDatabase | ( | const char * | out_path | ) |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |