25 #ifndef ENGINES_NWN_CREATURE_H 26 #define ENGINES_NWN_CREATURE_H 249 float length = 0.0f,
float speed = 1.0f);
252 float length = 0.0f,
float speed = 1.0f);
318 std::list<Graphics::Aurora::TextureHandle>
textures;
409 std::vector<Class> &classes,
uint8 &hitDice);
445 void finishPLTs(
const std::list<Graphics::Aurora::TextureHandle> &plts);
458 #endif // ENGINES_NWN_CREATURE_H void setPosition(float x, float y, float z)
Set the creature's position.
uint32 idArmor
Index of the part variant when armour equipped.
Common::UString modelName
Name of the model.
void setGender(Gender gender)
Set the creature's gender.
uint32 _colorHair
The color of the creature's hair.
uint8 getHitDice() const
Returns the number of hit dice, which is effectively the total number of levels.
void setAbility(Ability ability, uint8 score)
Set the creature's ability score.
const Common::UString & getConvclass() const
Return the creature's class as needed in conversations, e.g.
Common::UString _partsSuperModelName
The supermodel used for parts-based creatures.
uint32 _colorCloth1
The 1. color of the creature's cloth armor.
uint32 getAge() const
Return the creature's age.
uint32 _colorCloth2
The 2. color of the creature's cloth armor.
Creature * _master
The creature's master.
void constructModelName(const Common::UString &type, uint32 id, const Common::UString &gender, const Common::UString &race, const Common::UString &phenoType, const Common::UString &phenoTypeAlt, Common::UString &model, Common::UString &texture)
Construct the resource name of a body part files.
bool _isCommandable
Is the creature commandable (has a modifiable action queue)?
std::list< Graphics::Aurora::TextureHandle > textures
Actual textures loaded by the part's model.
A class holding an UTF-8 string.
void hide()
Hide the creature's model.
void setSoundSet(uint32 soundSet)
Set the creature's sound set.
void setRace(uint32 race)
Set the creature's race.
virtual bool click(Object *triggerer=0)
The creature was clicked.
Common::PtrVector< Item > _equippedItems
The creature's equipped items.
bool hasFeat(uint32 feat) const
Does the creature have this feat?
static void loadPortrait(const Aurora::GFF3Struct &gff, Common::UString &portrait)
Load the creature's portrait.
uint32 _colorTattoo2
The 2. color of the creature's tattoo.
void load(const Aurora::GFF3Struct &creature)
Load from a creature instance.
bool isPC() const
Is the creature a player character?
uint8 domain2
Cleric's domain.
Basic Neverwinter Nights type definitions.
void setColorTatto1(uint32 colorTattoo1)
Set the creature's color tattoo 1.
void removeAssociate(Creature &ssociate)
Remove an associate (henchman, familiar, ...).
uint32 _colorSkin
The color of the creature's skin.
void setColorHair(uint32 colorHair)
Set the creature's color hair.
std::vector< std::vector< uint16 > > knownList
Known spells list.
uint8 getAbility(Ability ability) const
Return a creature's ability score.
Common::UString _subRace
The creature's subrace.
An area in Neverwinter Nights, holding all objects and room tiles within, as well as general area pro...
uint8 getGoodEvil() const
Get the creature's good-evil alignment.
void setPhenotype(uint32 phenotype)
Set the creature's phenotype.
void setLawChaos(uint8 lawfulness)
Set the creature's law-chaos alignment.
A handle to an Aurora texture.
bool isFemale() const
Is the creature female, do we need female dialogs tokens?
A simple scoped smart pointer template.
Common::UString textureName
Name of the texture.
uint32 _colorMetal2
The 2. color of the creature's metal armor.
A vector of pointer to objects, with automatic deletion.
bool _isPC
Is the creature a PC?
Class * findClass(uint32 classID)
Find the creature's class if any.
uint32 getXP() const
Return the creature's XP.
uint8 _goodEvil
The creature's good/evil value (0-100).
static void getPCListInfo(const Common::UString &bic, bool local, Common::UString &name, Common::UString &classes, Common::UString &portrait)
Return the information needed for a character list.
const Common::UString & getSubRace() const
Get the creature's subrace.
int8 getSkillRank(uint32 skill) const
Return the creature's rank in this skill.
static void loadClasses(const Aurora::GFF3Struct &gff, std::vector< Class > &classes, uint8 &hitDice)
Load the creature's classes.
static Aurora::GFF3File * openPC(const Common::UString &bic, bool local)
uint32 _lastChangedGUIDisplay
The time a GUI relevant property was changed last.
void setColorSkin(uint32 colorSkin)
Set the creature's color skin.
BodyPartType
Parts of a creature's body.
const Common::UString & getConvrace() const
Return the creature's lowercase race as needed in conversations, e.g.
Basic Aurora graphics types.
Common::UString _lastName
The creature's last name.
Creature * getAssociate(AssociateType type, size_t nth=1) const
Get this creature's nth's associate of a specific type.
bool isCommandable() const
Is this creature commandable (has a modifiable action queue)?
uint32 _colorLeather2
The 2. color of the creature's leather armor.
void setCommandable(bool commandable)
Set whether this creature commandable (has a modifiable action queue).
void setSchool(uint32 classID, uint8 school)
Set the creature's school.
uint16 level
Levels of that class.
void setPortrait(const Common::UString &portrait)
Set the creature's portrait.
const Common::UString & getDeity() const
Get the creature's deity.
void setArea(Area *area)
Set the area this creature is currently in.
uint8 school
Wizard's spell school.
const Common::UString & getConvRace() const
Return the creature's race as needed in conversations, e.g.
uint32 classID
Index into classes.2da.
std::vector< std::vector< uint16 > > memorizedList
Memorized spells list.
A GFF (generic file format) V3.2/V3.3 file, found in all Aurora games except Sonic Chronicles: The Da...
uint32 _phenotype
The creature's phenotype.
uint32 _age
The creature's age.
std::vector< Class > _classes
The creature's classes.
int32 _currentHP
The creature's current health points.
Creature * associate
The associate.
bool createTooltip(Tooltip::Type type)
Create an empty tooltip.
void setFeat(uint32 feat)
Append a feat to the creature.
void setDomains(uint32 classID, uint8 domain1, uint8 domain2)
Set clerical domains.
uint16 getClassLevel(uint32 classID) const
Get the creature's level for this class.
uint32 id
Index of the part variant.
std::vector< uint32 > _feats
The creature's feats.
void setHead(uint32 headID)
Set the creature's head.
Low-level type definitions to handle fixed width types portably.
Creature()
Create a dummy creature instance.
uint32 _appearanceID
The creature's general appearance.
uint8 _abilities[kAbilityMAX]
The creature's abilities.
A vector storing pointer to objects, with automatic deletion.
int32 getMaxHP() const
Return the max HP this creature can have.
const Common::UString & getFirstName() const
Return the creature's first name.
Common::ScopedPtr< Graphics::Aurora::Model > _model
The creature's model.
void init()
Init the creature.
void changeClassLevel(uint32 classID, int16 levelChange)
Set the creature's level for this class.
bool hasSpell(uint32 classID, size_t spellLevel, uint16 spell)
Do the creature know the spell?
Common::UString _firstName
The creature's first name.
Associate(AssociateType t=kAssociateTypeNone, Creature *a=0)
const Common::UString & getConvRaces() const
Return the creature's race plural as needed in conversations, e.g.
A part of a creature body.
uint8 _hitDice
The creature's hit dice.
std::list< Associate > _associates
The creature's associates.
uint8 _startingPackage
The package chosen at creature's creation.
const Common::UString & getLastName() const
Return the creature's last name.
void setKnownSpell(uint32 classID, size_t spellLevel, uint16 spell)
Set a creature's known spell.
void getClass(uint32 position, uint32 &classID, uint16 &level) const
Get the creature's class and level at that class slot position.
uint8 _lawChaos
The creature's law/chaos value (0-100).
uint32 _xp
The creature's experience.
uint8 domain1
Cleric's domain.
An object in a Neverwinter Nights area.
void getArmorModels()
Populate the armor info for body parts.
Basic type definitions to handle files used in BioWare's Aurora engine.
Common::UString getClassString() const
Return the creature's class description.
uint32 getRace() const
Return the creature's race value.
uint32 _colorLeather1
The 1. color of the creature's leather armor.
uint8 getLawChaos() const
Get the creature's law-chaos alignment.
void loadEquippedItems(const Aurora::GFF3Struct &gff)
int32 _baseHP
The creature's base maximum health points.
void loadCharacter(const Common::UString &bic, bool local)
Load from a character file.
void setGoodEvil(uint8 goodness)
Set the creature's good-evil alignment.
void addAssociate(Creature &associate, AssociateType type)
Add an associate (henchman, familiar, ...).
uint8 getStartingPackage() const
Return the creature's starting package.
uint32 _colorTattoo1
The 1. color of the creature's tattoo.
int32 getCurrentHP() const
Return the current HP this creature has.
Gender _gender
The creature's gender.
Gender getGender() const
Get the creature's gender.
virtual void highlight(bool enabled)
(Un)Highlight the creature.
void setOrientation(float x, float y, float z, float angle)
Set the creature's orientation.
const Common::UString & getPortrait() const
Get the creature's portrait.
void unloadModel()
Unload the creature's model.
void loadProperties(const Aurora::GFF3Struct &gff)
Load general creature properties.
FileType
Various file types used by the Aurora engine and found in archives.
void leave()
The cursor left the creature.
void show()
Show the creature's model.
Common::UString _deity
The creature's deity.
uint32 lastChangedGUIDisplay() const
Last time info was changed that's displayed in the GUI.
Creature * getMaster() const
Return the creature's master.
Common::UString _environmentMap
The environment map override to use on the model.
void loadModel()
Load the creature's model.
void playAnimation(const Common::UString &animation="", bool restart=true, float length=0.0f, float speed=1.0f)
Play a creature animation.
std::vector< int8 > _skills
The creature's skills.
AssociateType type
The associate's type.
void setColorTatto2(uint32 colorTattoo2)
Set the creature's color tatto 2.
bool isDM() const
Is the creature a dungeon master?
void setMemorizedSpell(uint32 classID, size_t spellLevel, uint16 spell)
Set a creature's memorized spell.
void setStartingPackage(uint8 package)
Set the creature's starting package.
void setMaster(Creature *master=0)
Set the creature's master.
void setAppearance(uint32 appearanceID)
Set the creature's appearance.
void getDomains(uint32 classID, uint8 &domain1, uint8 &domain2)
Get clerical domains.
void constructPartName(const Common::UString &type, uint32 id, const Common::UString &gender, const Common::UString &race, const Common::UString &phenoType, Common::UString &part)
Construct the resource name of a body part files.
void addEquippedItem(Item *item)
Add an equippement to the creature.
void getPartModels()
Construct all body part models' resource names.
uint32 _race
The creature's race.
void enter()
The cursor entered the creature.
const Common::UString & getConvClasses() const
Return the creature's class plural as needed in conversations, e.g.
bool _isDM
Is the creature a DM?
int32 _bonusHP
The creature's bonus health points.
void finishPLTs(const std::list< Graphics::Aurora::TextureHandle > &plts)
Finished those paletted textures.
const Common::UString & getConvClass() const
Return the creature's class as needed in conversations, e.g.
void setSkillRank(size_t skill, uint8 rank)
Set the creature's skill rank.
std::vector< BodyPart > _bodyParts
The creature's body parts.
uint32 _colorMetal1
The 1. color of the creature's metal armor.