xoreos  0.0.5
Classes | Enumerations | Functions | Variables
Engines::NWN2 Namespace Reference

Classes

class  Area
 An area in Neverwinter Nights 2, holding all objects, room tiles and terrain within, as well as general area properties like the current background music and ambient sounds. More...
 
class  Campaign
 
class  Console
 
class  Creature
 
class  Door
 
class  EngineProbe
 
class  Functions
 
class  Game
 
class  Location
 
class  Module
 
class  NWN2Engine
 
class  NWN2ModelLoader
 
class  Object
 An object within a NWN2 area. More...
 
class  ObjectContainer
 
class  ObjectDistanceSort
 A class able to sort objects by distance to a target object. More...
 
class  Placeable
 
class  ScriptContainer
 
struct  ScriptName
 
class  SearchType
 
class  Situated
 
class  TRXFile
 Loader for TRX, baked terrain files, found in Neverwinter Nights 2. More...
 
class  Waypoint
 

Enumerations

enum  ObjectType {
  kObjectTypeCreature = 1U << 0, kObjectTypeItem = 1U << 1, kObjectTypeTrigger = 1U << 2, kObjectTypeDoor = 1U << 3,
  kObjectTypeAreaOfEffect = 1U << 4, kObjectTypeWaypoint = 1U << 5, kObjectTypePlaceable = 1U << 6, kObjectTypeStore = 1U << 7,
  kObjectTypeEncounter = 1U << 8, kObjectTypeLight = 1U << 9, kObjectTypePlacedEffect = 1U << 10, kObjectTypeInvalid = 0x7FFF,
  kObjectTypeAll = 0x7FFF, kObjectTypeMAX = 0x7FFF, kObjectTypeArea = 1U << 29, kObjectTypeModule = 1U << 30,
  kObjectTypeSelf = 1U << 31
}
 Object type, matches the bitfield in nwscript.nss. More...
 
enum  Script {
  kScriptAcquireItem = 0, kScriptActiveItem, kScriptAttacked, kScriptBlocked,
  kScriptClick, kScriptClient, kScriptClosed, kScriptCutsceneAbort,
  kScriptDamaged, kScriptDeath, kScriptDialogue, kScriptDisarm,
  kScriptDisturbed, kScriptEndRound, kScriptEnter, kScriptExhausted,
  kScriptExit, kScriptFailToOpen, kScriptHeartbeat, kScriptLock,
  kScriptModuleLoad, kScriptModuleStart, kScriptNotice, kScriptOpen,
  kScriptPCLoaded, kScriptPlayerChat, kScriptPlayerDeath, kScriptPlayerDying,
  kScriptPlayerEquipItem, kScriptPlayerLevelUp, kScriptPlayerRespanw, kScriptPlayerRest,
  kScriptPlayerUnequipItem, kScriptRested, kScriptShout, kScriptSpawn,
  kScriptSpellCastAt, kScriptStoreClose, kScriptStoreOpen, kScriptTrapTriggered,
  kScriptUnaquireItem, kScriptUnlock, kScriptUsed, kScriptUserdefined,
  kScriptMAX
}
 
enum  Ability {
  kAbilityStrength = 0, kAbilityDexterity = 1, kAbilityConstitution = 2, kAbilityIntelligence = 3,
  kAbilityWisdom = 4, kAbilityCharisma = 5, kAbilityMAX
}
 
enum  Alignment {
  kAlignmentAll = 0, kAlignmentNeutral = 1, kAlignmentLawful = 2, kAlignmentChaotic = 3,
  kAlignmentGood = 4, kAlignmentEvil = 5
}
 
enum  Gender {
  kGenderMale = 0, kGenderFemale = 1, kGenderBoth = 2, kGenderOther = 3,
  kGenderNone = 4
}
 

Functions

void createEngineProbes (std::list< const ::Engines::EngineProbe *> &probes)
 
void createEngineProbes (std::list< const EngineProbe *> &probes)
 Create all probes for this engine and add them to the list. More...
 
static NWN2::Object kDefaultValueObjectInvalid (kObjectTypeInvalid)
 
static NWN2::Object kDefaultValueObjectSelf (kObjectTypeSelf)
 
static const Aurora::NWScript::Variable kDefaultIntMinus1 ((int32) - 1)
 
static const Aurora::NWScript::Variable kDefaultInt0 ((int32) 0)
 
static const Aurora::NWScript::Variable kDefaultInt1 ((int32) 1)
 
static const Aurora::NWScript::Variable kDefaultInt9 ((int32) 9)
 
static const Aurora::NWScript::Variable kDefaultInt18 ((int32) 18)
 
static const Aurora::NWScript::Variable kDefaultInt50 ((int32) 50)
 
static const Aurora::NWScript::Variable kDefaultInt100 ((int32) 100)
 
static const Aurora::NWScript::Variable kDefaultInt4294901760 ((int32) 4294901760U)
 
static const Aurora::NWScript::Variable kDefaultInt4294967295 ((int32) 4294967295U)
 
static const Aurora::NWScript::Variable kDefaultFloatMinus1_0 (- 1.0f)
 
static const Aurora::NWScript::Variable kDefaultFloat0_0 (0.0f)
 
static const Aurora::NWScript::Variable kDefaultFloat0_5 (0.5f)
 
static const Aurora::NWScript::Variable kDefaultFloat1_0 (1.0f)
 
static const Aurora::NWScript::Variable kDefaultFloat2_0 (2.0f)
 
static const Aurora::NWScript::Variable kDefaultFloat5_0 (5.0f)
 
static const Aurora::NWScript::Variable kDefaultFloat30_0 (30.0f)
 
static const Aurora::NWScript::Variable kDefaultFloat40_0 (40.0f)
 
static const Aurora::NWScript::Variable kDefaultFloat180_0 (180.0f)
 
static const Aurora::NWScript::Variable kDefaultVector0 (0.0f, 0.0f, 0.0f)
 
static const Aurora::NWScript::Variable kDefaultStringEmpty (Common::UString(""))
 
static const Aurora::NWScript::Variable kDefaultACDodgeBonus ((int32) 0)
 
static const Aurora::NWScript::Variable kDefaultACVsDamageTypeAll ((int32) 4103)
 
static const Aurora::NWScript::Variable kDefaultAlignmentAll ((int32) 0)
 
static const Aurora::NWScript::Variable kDefaultAttackBonusMisc ((int32) 0)
 
static const Aurora::NWScript::Variable kDefaultCameraTransitionTypeSnap ((int32) 0)
 
static const Aurora::NWScript::Variable kDefaultClassTypeInvalid ((int32) 255)
 
static const Aurora::NWScript::Variable kDefaultDamagePowerNormal ((int32) 0)
 
static const Aurora::NWScript::Variable kDefaultDamageTypeMagical ((int32) 8)
 
static const Aurora::NWScript::Variable kDefaultDRTypeMagicBonus ((int32) 2)
 
static const Aurora::NWScript::Variable kDefaultFalse ((int32) 0)
 
static const Aurora::NWScript::Variable kDefaultGenderMale ((int32) 0)
 
static const Aurora::NWScript::Variable kDefaultIPConstUnlimitedAmmoBasic ((int32) 1)
 
static const Aurora::NWScript::Variable kDefaultMetaMagicAny ((int32) 4294967295U)
 
static const Aurora::NWScript::Variable kDefaultMissChanceTypeNormal ((int32) 0)
 
static const Aurora::NWScript::Variable kDefaultObjectTypeAll ((int32) 32767)
 
static const Aurora::NWScript::Variable kDefaultObjectTypeCreature ((int32) 1)
 
static const Aurora::NWScript::Variable kDefaultPackageInvalid ((int32) 255)
 
static const Aurora::NWScript::Variable kDefaultPersistentZoneActive ((int32) 0)
 
static const Aurora::NWScript::Variable kDefaultProjectilePathTypeDefault ((int32) 0)
 
static const Aurora::NWScript::Variable kDefaultSavingThrowTypeAll ((int32) 0)
 
static const Aurora::NWScript::Variable kDefaultSavingThrowTypeNone ((int32) 0)
 
static const Aurora::NWScript::Variable kDefaultSavingThrowWill ((int32) 3)
 
static const Aurora::NWScript::Variable kDefaultSpellAllSpells ((int32) - 1)
 
static const Aurora::NWScript::Variable kDefaultSpellSchoolGeneral ((int32) 0)
 
static const Aurora::NWScript::Variable kDefaultStandardFactionHostile ((int32) 0)
 
static const Aurora::NWScript::Variable kDefaultTalkVolumeTalk ((int32) 0)
 
static const Aurora::NWScript::Variable kDefaultTrue ((int32) 1)
 
static const Aurora::NWScript::Variable kDefaultVFXNone ((int32) - 1)
 
static const Aurora::NWScript::Variable kDefaultWeatherPowerMedium ((int32) 3)
 
static const Aurora::NWScript::Variable kDefaultFadeSpeedMedium (1.5f)
 
Alignment getAlignmentLawChaos (uint8 lawChaos)
 
Alignment getAlignmentGoodEvil (uint8 goodEvil)
 
bool readTint (const Aurora::GFF3Struct &gff, float t[3][4])
 
bool readTint (const Aurora::GFF3Struct &gff, const Common::UString &strct, float t[3][4])
 
Common::UString createDisplayName (const Common::UString &name)
 Strip text enclosed in {} from a string. More...
 

Variables

static const ScriptName kScriptNames []
 
static const Aurora::NWScript::Variable kDefaultObjectInvalid & kDefaultValueObjectInvalid
 
static const Aurora::NWScript::Variable kDefaultObjectSelf & kDefaultValueObjectSelf
 
static const uint32 kRaceInvalid = 28
 
static const uint32 kSubRaceInvalid = 255
 
static const uint32 kClassInvalid = 255
 

Enumeration Type Documentation

◆ Ability

Enumerator
kAbilityStrength 
kAbilityDexterity 
kAbilityConstitution 
kAbilityIntelligence 
kAbilityWisdom 
kAbilityCharisma 
kAbilityMAX 

Definition at line 106 of file types.h.

◆ Alignment

Enumerator
kAlignmentAll 
kAlignmentNeutral 
kAlignmentLawful 
kAlignmentChaotic 
kAlignmentGood 
kAlignmentEvil 

Definition at line 116 of file types.h.

◆ Gender

Enumerator
kGenderMale 
kGenderFemale 
kGenderBoth 
kGenderOther 
kGenderNone 

Definition at line 125 of file types.h.

◆ ObjectType

Object type, matches the bitfield in nwscript.nss.

Enumerator
kObjectTypeCreature 
kObjectTypeItem 
kObjectTypeTrigger 
kObjectTypeDoor 
kObjectTypeAreaOfEffect 
kObjectTypeWaypoint 
kObjectTypePlaceable 
kObjectTypeStore 
kObjectTypeEncounter 
kObjectTypeLight 
kObjectTypePlacedEffect 
kObjectTypeInvalid 
kObjectTypeAll 
kObjectTypeMAX 
kObjectTypeArea 

Fake value for an area object.

kObjectTypeModule 

Fake value for a module object.

kObjectTypeSelf 

Fake value to describe the calling object in a script.

Definition at line 35 of file types.h.

◆ Script

Enumerator
kScriptAcquireItem 
kScriptActiveItem 
kScriptAttacked 
kScriptBlocked 
kScriptClick 
kScriptClient 
kScriptClosed 
kScriptCutsceneAbort 
kScriptDamaged 
kScriptDeath 
kScriptDialogue 
kScriptDisarm 
kScriptDisturbed 
kScriptEndRound 
kScriptEnter 
kScriptExhausted 
kScriptExit 
kScriptFailToOpen 
kScriptHeartbeat 
kScriptLock 
kScriptModuleLoad 
kScriptModuleStart 
kScriptNotice 
kScriptOpen 
kScriptPCLoaded 
kScriptPlayerChat 
kScriptPlayerDeath 
kScriptPlayerDying 
kScriptPlayerEquipItem 
kScriptPlayerLevelUp 
kScriptPlayerRespanw 
kScriptPlayerRest 
kScriptPlayerUnequipItem 
kScriptRested 
kScriptShout 
kScriptSpawn 
kScriptSpellCastAt 
kScriptStoreClose 
kScriptStoreOpen 
kScriptTrapTriggered 
kScriptUnaquireItem 
kScriptUnlock 
kScriptUsed 
kScriptUserdefined 
kScriptMAX 

Definition at line 58 of file types.h.

Function Documentation

◆ createDisplayName()

Common::UString Engines::NWN2::createDisplayName ( const Common::UString name)

Strip text enclosed in {} from a string.

Definition at line 68 of file util.cpp.

References Common::UString::begin(), and Common::UString::end().

Referenced by Engines::NWN2::Area::loadARE().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ createEngineProbes() [1/2]

void Engines::NWN2::createEngineProbes ( std::list< const EngineProbe *> &  probes)

Create all probes for this engine and add them to the list.

◆ createEngineProbes() [2/2]

void Engines::NWN2::createEngineProbes ( std::list< const ::Engines::EngineProbe *> &  probes)

Definition at line 81 of file probes.cpp.

Referenced by createEngineProbes().

Here is the caller graph for this function:

◆ getAlignmentGoodEvil()

Alignment Engines::NWN2::getAlignmentGoodEvil ( uint8  goodEvil)

Definition at line 40 of file types.cpp.

References kAlignmentEvil, kAlignmentGood, and kAlignmentNeutral.

Referenced by Engines::NWN2::Functions::getAlignmentGoodEvil().

Here is the caller graph for this function:

◆ getAlignmentLawChaos()

Alignment Engines::NWN2::getAlignmentLawChaos ( uint8  lawChaos)

Definition at line 31 of file types.cpp.

References kAlignmentChaotic, kAlignmentLawful, and kAlignmentNeutral.

Referenced by Engines::NWN2::Functions::getAlignmentLawChaos().

Here is the caller graph for this function:

◆ kDefaultACDodgeBonus()

static const Aurora::NWScript::Variable Engines::NWN2::kDefaultACDodgeBonus ( (int32 0)
static

◆ kDefaultACVsDamageTypeAll()

static const Aurora::NWScript::Variable Engines::NWN2::kDefaultACVsDamageTypeAll ( (int32 4103)
static

◆ kDefaultAlignmentAll()

static const Aurora::NWScript::Variable Engines::NWN2::kDefaultAlignmentAll ( (int32 0)
static

◆ kDefaultAttackBonusMisc()

static const Aurora::NWScript::Variable Engines::NWN2::kDefaultAttackBonusMisc ( (int32 0)
static

◆ kDefaultCameraTransitionTypeSnap()

static const Aurora::NWScript::Variable Engines::NWN2::kDefaultCameraTransitionTypeSnap ( (int32 0)
static

◆ kDefaultClassTypeInvalid()

static const Aurora::NWScript::Variable Engines::NWN2::kDefaultClassTypeInvalid ( (int32 255)
static

◆ kDefaultDamagePowerNormal()

static const Aurora::NWScript::Variable Engines::NWN2::kDefaultDamagePowerNormal ( (int32 0)
static

◆ kDefaultDamageTypeMagical()

static const Aurora::NWScript::Variable Engines::NWN2::kDefaultDamageTypeMagical ( (int32 8)
static

◆ kDefaultDRTypeMagicBonus()

static const Aurora::NWScript::Variable Engines::NWN2::kDefaultDRTypeMagicBonus ( (int32 2)
static

◆ kDefaultFadeSpeedMedium()

static const Aurora::NWScript::Variable Engines::NWN2::kDefaultFadeSpeedMedium ( 1.  5f)
static

◆ kDefaultFalse()

static const Aurora::NWScript::Variable Engines::NWN2::kDefaultFalse ( (int32 0)
static

◆ kDefaultFloat0_0()

static const Aurora::NWScript::Variable Engines::NWN2::kDefaultFloat0_0 ( 0.  0f)
static

◆ kDefaultFloat0_5()

static const Aurora::NWScript::Variable Engines::NWN2::kDefaultFloat0_5 ( 0.  5f)
static

◆ kDefaultFloat180_0()

static const Aurora::NWScript::Variable Engines::NWN2::kDefaultFloat180_0 ( 180.  0f)
static

◆ kDefaultFloat1_0()

static const Aurora::NWScript::Variable Engines::NWN2::kDefaultFloat1_0 ( 1.  0f)
static

◆ kDefaultFloat2_0()

static const Aurora::NWScript::Variable Engines::NWN2::kDefaultFloat2_0 ( 2.  0f)
static

◆ kDefaultFloat30_0()

static const Aurora::NWScript::Variable Engines::NWN2::kDefaultFloat30_0 ( 30.  0f)
static

◆ kDefaultFloat40_0()

static const Aurora::NWScript::Variable Engines::NWN2::kDefaultFloat40_0 ( 40.  0f)
static

◆ kDefaultFloat5_0()

static const Aurora::NWScript::Variable Engines::NWN2::kDefaultFloat5_0 ( 5.  0f)
static

◆ kDefaultFloatMinus1_0()

static const Aurora::NWScript::Variable Engines::NWN2::kDefaultFloatMinus1_0 ( - 1.  0f)
static

◆ kDefaultGenderMale()

static const Aurora::NWScript::Variable Engines::NWN2::kDefaultGenderMale ( (int32 0)
static

◆ kDefaultInt0()

static const Aurora::NWScript::Variable Engines::NWN2::kDefaultInt0 ( (int32 0)
static

◆ kDefaultInt1()

static const Aurora::NWScript::Variable Engines::NWN2::kDefaultInt1 ( (int32 1)
static

◆ kDefaultInt100()

static const Aurora::NWScript::Variable Engines::NWN2::kDefaultInt100 ( (int32 100)
static

◆ kDefaultInt18()

static const Aurora::NWScript::Variable Engines::NWN2::kDefaultInt18 ( (int32 18)
static

◆ kDefaultInt4294901760()

static const Aurora::NWScript::Variable Engines::NWN2::kDefaultInt4294901760 ( (int32 4294901760U)
static

◆ kDefaultInt4294967295()

static const Aurora::NWScript::Variable Engines::NWN2::kDefaultInt4294967295 ( (int32 4294967295U)
static

◆ kDefaultInt50()

static const Aurora::NWScript::Variable Engines::NWN2::kDefaultInt50 ( (int32 50)
static

◆ kDefaultInt9()

static const Aurora::NWScript::Variable Engines::NWN2::kDefaultInt9 ( (int32 9)
static

◆ kDefaultIntMinus1()

static const Aurora::NWScript::Variable Engines::NWN2::kDefaultIntMinus1 ( (int32) -  1)
static

◆ kDefaultIPConstUnlimitedAmmoBasic()

static const Aurora::NWScript::Variable Engines::NWN2::kDefaultIPConstUnlimitedAmmoBasic ( (int32 1)
static

◆ kDefaultMetaMagicAny()

static const Aurora::NWScript::Variable Engines::NWN2::kDefaultMetaMagicAny ( (int32 4294967295U)
static

◆ kDefaultMissChanceTypeNormal()

static const Aurora::NWScript::Variable Engines::NWN2::kDefaultMissChanceTypeNormal ( (int32 0)
static

◆ kDefaultObjectTypeAll()

static const Aurora::NWScript::Variable Engines::NWN2::kDefaultObjectTypeAll ( (int32 32767)
static

◆ kDefaultObjectTypeCreature()

static const Aurora::NWScript::Variable Engines::NWN2::kDefaultObjectTypeCreature ( (int32 1)
static

◆ kDefaultPackageInvalid()

static const Aurora::NWScript::Variable Engines::NWN2::kDefaultPackageInvalid ( (int32 255)
static

◆ kDefaultPersistentZoneActive()

static const Aurora::NWScript::Variable Engines::NWN2::kDefaultPersistentZoneActive ( (int32 0)
static

◆ kDefaultProjectilePathTypeDefault()

static const Aurora::NWScript::Variable Engines::NWN2::kDefaultProjectilePathTypeDefault ( (int32 0)
static

◆ kDefaultSavingThrowTypeAll()

static const Aurora::NWScript::Variable Engines::NWN2::kDefaultSavingThrowTypeAll ( (int32 0)
static

◆ kDefaultSavingThrowTypeNone()

static const Aurora::NWScript::Variable Engines::NWN2::kDefaultSavingThrowTypeNone ( (int32 0)
static

◆ kDefaultSavingThrowWill()

static const Aurora::NWScript::Variable Engines::NWN2::kDefaultSavingThrowWill ( (int32 3)
static

◆ kDefaultSpellAllSpells()

static const Aurora::NWScript::Variable Engines::NWN2::kDefaultSpellAllSpells ( (int32) -  1)
static

◆ kDefaultSpellSchoolGeneral()

static const Aurora::NWScript::Variable Engines::NWN2::kDefaultSpellSchoolGeneral ( (int32 0)
static

◆ kDefaultStandardFactionHostile()

static const Aurora::NWScript::Variable Engines::NWN2::kDefaultStandardFactionHostile ( (int32 0)
static

◆ kDefaultStringEmpty()

static const Aurora::NWScript::Variable Engines::NWN2::kDefaultStringEmpty ( Common::UString("")  )
static

◆ kDefaultTalkVolumeTalk()

static const Aurora::NWScript::Variable Engines::NWN2::kDefaultTalkVolumeTalk ( (int32 0)
static

◆ kDefaultTrue()

static const Aurora::NWScript::Variable Engines::NWN2::kDefaultTrue ( (int32 1)
static

◆ kDefaultValueObjectInvalid()

static NWN2::Object Engines::NWN2::kDefaultValueObjectInvalid ( kObjectTypeInvalid  )
static

◆ kDefaultValueObjectSelf()

static NWN2::Object Engines::NWN2::kDefaultValueObjectSelf ( kObjectTypeSelf  )
static

◆ kDefaultVector0()

static const Aurora::NWScript::Variable Engines::NWN2::kDefaultVector0 ( 0.  0f,
0.  0f,
0.  0f 
)
static

◆ kDefaultVFXNone()

static const Aurora::NWScript::Variable Engines::NWN2::kDefaultVFXNone ( (int32) -  1)
static

◆ kDefaultWeatherPowerMedium()

static const Aurora::NWScript::Variable Engines::NWN2::kDefaultWeatherPowerMedium ( (int32 3)
static

◆ readTint() [1/2]

bool Engines::NWN2::readTint ( const Aurora::GFF3Struct gff,
float  t[3][4] 
)

Definition at line 35 of file util.cpp.

References Common::UString::format(), Aurora::GFF3Struct::getStruct(), Aurora::GFF3Struct::getUint(), and Aurora::GFF3Struct::hasField().

Referenced by Engines::NWN2::Situated::loadProperties(), Engines::NWN2::Area::loadTile(), and readTint().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readTint() [2/2]

bool Engines::NWN2::readTint ( const Aurora::GFF3Struct gff,
const Common::UString strct,
float  t[3][4] 
)

Definition at line 61 of file util.cpp.

References Aurora::GFF3Struct::getStruct(), Aurora::GFF3Struct::hasField(), and readTint().

Here is the call graph for this function:

Variable Documentation

◆ kClassInvalid

const uint32 Engines::NWN2::kClassInvalid = 255
static

◆ kDefaultValueObjectInvalid

const Aurora::NWScript::Variable kDefaultObjectInvalid& Engines::NWN2::kDefaultValueObjectInvalid
static

Definition at line 101 of file function_tables.h.

◆ kDefaultValueObjectSelf

const Aurora::NWScript::Variable kDefaultObjectSelf& Engines::NWN2::kDefaultValueObjectSelf
static

Definition at line 102 of file function_tables.h.

◆ kRaceInvalid

const uint32 Engines::NWN2::kRaceInvalid = 28
static

◆ kScriptNames

const ScriptName Engines::NWN2::kScriptNames[]
static

Definition at line 47 of file container.cpp.

Referenced by Engines::NWN2::ScriptContainer::readScripts().

◆ kSubRaceInvalid

const uint32 Engines::NWN2::kSubRaceInvalid = 255
static

Definition at line 134 of file types.h.

Referenced by Engines::NWN2::Creature::init().