DynRPG  v0.32 Unofficial
Plugin SDK
Public Attributes | List of all members
RPG::DBMonster Class Reference

Used for the default data of monsters which is defined in the database. More...

Public Attributes

int id
 ID of the monster. More...
 
DStringPtr name
 Monster's name. More...
 
DStringPtr filename
 Monster's filename. More...
 
unsigned int colorAlteration
 The color hue of the monster graphic. 0 represents the center of the slider. 0-180 is the right side, while 180-350 is the left side. More...
 
int maxHp
 The monster's Maximum HP. More...
 
int maxMp
 The monster's Maximum MP. More...
 
int attack
 The monster's attack value. More...
 
int defense
 The monster's defense value. More...
 
int intelligence
 The monster's intelligence value. More...
 
int agility
 The monster's agility value. More...
 
bool isTransparent
 Is the monster partially transparent? More...
 
int exp
 The amount of experience rewarded. More...
 
int gold
 The amount of gold rewarded. More...
 
int itemId
 The ID of the item rewarded (0 = no item) More...
 
int itemProbability
 The probability of getting the item (percentage) (0-100) More...
 
bool critFlag
 Can the monster perform a critical hit? More...
 
int critPercentage
 The probability of getting the critical hit (percentage) (0-100) More...
 
bool oftenMiss
 Does the monster often miss? More...
 
bool isFlying
 Is the monster flying? More...
 
DArray< DamageMultiplier_T, 1, 2 > conditions
 Condition Resistance Array (See RPG::DamageMultiplier) More...
 
DArray< DamageMultiplier_T, 1, 2 > attributes
 Attribute Resistance Array (See RPG::DamageMultiplier) More...
 
CatalogPtr< MonsterBehavior * > behavior
 Behavior Array (See RPG::MonsterBehavior) More...
 

Detailed Description

Used for the default data of monsters which is defined in the database.

Note
The members of this class either mean default values of a property or they are used for properties which aren't supposed to be changed in-game, thus the members won't be saved and loaded automatically (as it is the case with RPG::Actor and RPG::DBActor), but only loaded once at startup.

If you want to access a monster's data IN BATTLE, use the members and methods of RPG::Monster or RPG::Battler instead.
See also
RPG::dbMonsters
RPG::DamageMultiplier
RPG::MonsterBehavior
RPG::monsters

Definition at line 18 of file DBMonster.h.

Member Data Documentation

int RPG::DBMonster::id

ID of the monster.

Definition at line 21 of file DBMonster.h.

DStringPtr RPG::DBMonster::name

Monster's name.

Definition at line 22 of file DBMonster.h.

DStringPtr RPG::DBMonster::filename

Monster's filename.

Definition at line 23 of file DBMonster.h.

unsigned int RPG::DBMonster::colorAlteration

The color hue of the monster graphic. 0 represents the center of the slider. 0-180 is the right side, while 180-350 is the left side.

Definition at line 24 of file DBMonster.h.

int RPG::DBMonster::maxHp

The monster's Maximum HP.

Definition at line 25 of file DBMonster.h.

int RPG::DBMonster::maxMp

The monster's Maximum MP.

Definition at line 26 of file DBMonster.h.

int RPG::DBMonster::attack

The monster's attack value.

Definition at line 27 of file DBMonster.h.

int RPG::DBMonster::defense

The monster's defense value.

Definition at line 28 of file DBMonster.h.

int RPG::DBMonster::intelligence

The monster's intelligence value.

Definition at line 29 of file DBMonster.h.

int RPG::DBMonster::agility

The monster's agility value.

Definition at line 30 of file DBMonster.h.

bool RPG::DBMonster::isTransparent

Is the monster partially transparent?

Definition at line 31 of file DBMonster.h.

int RPG::DBMonster::exp

The amount of experience rewarded.

Definition at line 32 of file DBMonster.h.

int RPG::DBMonster::gold

The amount of gold rewarded.

Definition at line 33 of file DBMonster.h.

int RPG::DBMonster::itemId

The ID of the item rewarded (0 = no item)

Definition at line 34 of file DBMonster.h.

int RPG::DBMonster::itemProbability

The probability of getting the item (percentage) (0-100)

Definition at line 35 of file DBMonster.h.

bool RPG::DBMonster::critFlag

Can the monster perform a critical hit?

Definition at line 36 of file DBMonster.h.

int RPG::DBMonster::critPercentage

The probability of getting the critical hit (percentage) (0-100)

Definition at line 37 of file DBMonster.h.

bool RPG::DBMonster::oftenMiss

Does the monster often miss?

Definition at line 38 of file DBMonster.h.

bool RPG::DBMonster::isFlying

Is the monster flying?

Definition at line 39 of file DBMonster.h.

DArray<DamageMultiplier_T, 1, 2> RPG::DBMonster::conditions

Condition Resistance Array (See RPG::DamageMultiplier)

If at a certain point, the resistance of a condition and all conditions higher than it are C, the conditions.size will equal the number of the highest non-C condition.

Example:

Cond1: A
Cond2: B
Cond3: C
Cond4: C
Cond5: C

Because Cond3 is C, and those above it are C, conditions.size will be 2, because Cond2 is the last non-C condition.

Warning
This can be confusing, because if you need to use conditions[15], but check for conditions.size to be 15 first, it could be 10 if 11-15 are all C, so the check would be false. The solution would be to use RPG::conditions.count() for the check instead. This would resize the array once a condition higher than conditions.size is called, but because of the resizeValue in the template for RPG::DArray, conditions 11-15 would be correctly assigned to C

Definition at line 57 of file DBMonster.h.

DArray<DamageMultiplier_T, 1, 2> RPG::DBMonster::attributes

Attribute Resistance Array (See RPG::DamageMultiplier)

If at a certain point, the resistance of an attribute and all attributes higher than it are C, the attributes.size will equal the number of the highest non-C attribute.

Example:

Attr1: A
Attr2: B
Attr3: C
Attr4: C
Attr5: C

Because Attr3 is C, and those above it are C, attributes.size will be 2, because Attr2 is the last non-C attribute.

Warning
This can be confusing, because if you need to use attributes[15], but check for attributes.size to be 15 first, it could be 10 if 11-15 are all C, so the check would be false. The solution would be to use RPG::attributes.count() for the check instead. This would resize the array once an attribute higher than attributes.size is called, but because of the resizeValue in the template for RPG::DArray, attributes 11-15 would be correctly assigned to C

Definition at line 75 of file DBMonster.h.

CatalogPtr<MonsterBehavior *> RPG::DBMonster::behavior

Behavior Array (See RPG::MonsterBehavior)

Definition at line 76 of file DBMonster.h.