DynRPG v0.32 Unofficial
Plugin SDK
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
RPG::Actor Class Reference

Used for the data of actors which can be changed in-game. More...

#include <Actor.h>

Inheritance diagram for RPG::Actor:
RPG::Battler

Public Member Functions

std::string getDegree ()
 Returns the current degree.
 
std::string getCharsetFilename ()
 Returns the current charset filename.
 
int getCharsetId ()
 Returns the current charset ID.
 
int getCharsetTransparency ()
 Returns the current charset transparency.
 
std::string getFacesetFilename ()
 Returns the current faceset filename.
 
int getFacesetId ()
 Returns the current faceset ID.
 
int getBattleGraphicId ()
 Returns the current battle graphic ID.
 
int getBattleCommand (int index)
 Returns the current battle command on a certain position.
 
void addSkill (int skillId)
 Built-in RM2k3 function that adds a skill to a hero.
 
void removeSkill (int skillId)
 Built-in RM2k3 function that removes a skill from a hero.
 
bool isSkillKnown (int skillId)
 Built-in RM2k3 function that tests if a hero already knows a certain skill.
 
int getTwoWeaponAttack ()
 Returns the attack value if actor has two weapons equipped (one weapon is ignored)
 
int getTwoWeaponAgility ()
 Returns the agility value if actor has two weapons equipped (one weapon is ignored)
 
- Public Member Functions inherited from RPG::Battler
std::string getName ()
 Returns the name of the actor or monster.
 
int getMaxHp ()
 Returns the maximal HP.
 
int getMaxMp ()
 Returns the maximal MP.
 
int getAttack ()
 Returns the attack value.
 
int getDefense ()
 Returns the defense value.
 
int getIntelligence ()
 Returns the intelligence value.
 
int getAgility ()
 Returns the agility value.
 
void setRow (Row newRow)
 Sets the current row.
 
void damagePopup (int number, int color)
 Shows a damage popup with a number.
 
void damagePopup (std::string text)
 Shows a damage popup with a small text.
 
bool isMonster ()
 Checks whether the battler is a monster or an actor.
 
void flash (int r, int g, int b, int intensity, int duration)
 Flashes a battler in a certain color.
 
bool executeAction (bool skipPluginHandlers=false)
 Executes the action of a battler (highly experimental!)
 
int getAttributeResist (int id)
 Built-in RM2k3 function that returns the actual damage multiplier for when the battler would be hit with a certain attribute (considers the (Elemental) Resistance of equipment (max. one step towards dmgE) and the "Reduce / Increase Resistance" of skill effects)
 
int getAttackPower (RPG::Battler *target)
 Built-in RM2k3 function that returns the strength of an attack (not the final attack value) Rough formula (a lot still not taken into account): if (critical hit) atk*3, else if (charge up) atk*2.
 
int getSkillPower (int skillId, RPG::Battler *target)
 Built-in RM2k3 function that returns the strength of a skill on a certain target, however, it's before the miss probability based on agility and statuses is calculated.
 

Static Public Member Functions

static RPG::ActorpartyMember (int index)
 Returns a certain party member.
 

Public Attributes

DStringPtr name
 Name ("\x01" means database default)
 
DStringPtr degree
 Degree ("\x01" means database default)
 
DStringPtr charsetFilename
 Filename of the charset (empty means database default)
 
int charsetId
 ID of the sprite in the charset file (only valid if charsetFilename isn't empty)
 
int charsetTransparency
 Transparency of the charset (0 to 8, only valid if charsetFilename isn't empty)
 
DStringPtr facesetFilename
 Filename of the faceset (empty means database default)
 
int facesetId
 ID of the sprite in the faceset file (only valid if facesetFilename isn't empty)
 
int level
 Current level.
 
int exp
 Current experience points.
 
int maxHpDiff
 Difference from the default maximal HP.
 
int maxMpDiff
 Difference from the default maximal MP.
 
int attackDiff
 Difference from the default attack value.
 
int defenseDiff
 Difference from the default defense value.
 
int intelligenceDiff
 Difference from the default intelligence value.
 
int agilityDiff
 Difference from the default agility value.
 
DArray< shortlearnedSkills
 
short weaponId
 Database ID of the current weapon (zero for none)
 
short shieldId
 Database ID of the current shield (or second-hand weapon, zero for none)
 
short armorId
 Database ID of the current armor (zero for none)
 
short helmetId
 Database ID of the current helmet (zero for none)
 
short accessoryId
 Database ID of the current accessory (zero for none)
 
bool twoWeapons
 Can the actor hold two weapons?
 
bool lockEquipment
 Is the actor's equipment unchangable by the player?
 
bool aiControl
 Is the battle AI activated for this actor?
 
bool mightyGuard
 Is the "mighty guard" mode activated for this actor?
 
int battleGraphicId
 Database ID of the battle graphic (zero for database default)
 
bool customBattleCommands
 true if the battleCommands member is valid, otherwise the database default should be used
 
int battleCommands [7]
 The current battle commands for this actor (0 and -1 both mean "no command at this position")
 
bool classChanging
 Is the actor's class in the process of changing?
 
Imageposes [32]
 The pose images. These include each of the 3 frames of animation in the pose.
 
ImageposesMirrored [32]
 The mirrored pose images.
 
ImagefirstWeapon
 The weapon image for the battler's first equipped weapon.
 
ImagefirstWeaponMirrored
 The mirrored weapon image for the battler's first equipped weapon.
 
ImagefirstWeaponRanged
 The ranged weapon image for the battler's first equipped weapon.
 
ImagefirstWeaponRangedMirrored
 The mirrored ranged weapon image for the battler's first equipped weapon.
 
ImagesecondWeapon
 The weapon image for the battler's second equipped weapon (if applicable)
 
ImagesecondWeaponMirrored
 The mirrored weapon image for the battler's second equipped weapon (if applicable)
 
ImagesecondWeaponRanged
 The ranged weapon image for the battler's second equipped weapon (if applicable)
 
ImagesecondWeaponRangedMirrored
 The mirrored ranged weapon image for the battler's second equipped weapon (if applicable)
 
int graphicsUpdateValue
 allows graphics if remainder after division by 10 is < 5 ??
 
int battlerAnimFrame
 The animation frame of the battler (0-2)
 
int currentComboHit
 
int currentComboHitAlt
 
int attackDuration
 Affected by ranged speed.
 
int rangedWeaponX [8]
 When a ranged weapon hits multiple enemies, The x value of the image for each enemy.
 
int rangedWeaponY [8]
 When a ranged weapon hits multiple enemies, The y value of the image for each enemy.
 
int afterImageX
 Current X coordinate of the after image.
 
int afterImageY
 Current Y coordinate of the after image.
 
int afterImageOriginX
 Origin X coordinate of the after image.
 
int afterImageOriginY
 Origin Y coordinate of the after image.
 
int afterImageDestinationX
 Destination X coordinate of the after image.
 
int afterImageDestinationY
 Destination Y coordinate of the after image.
 
AnimationMoveBeforeAttack weaponMovement
 The weapon's movement before attacking (See RPG::AnimationMoveBeforeAttack)
 
bool weaponAddAfterImage
 "Add" the after image of the weapon?
 
WeaponNumberOfAttacks weaponNumAttacks
 Number of attacks for the weapon (See RPG::WeaponNumberOfAttacks)
 
bool isRangedWeapon
 Is ranged weapon?
 
WeaponRangedTrajectory weaponTrajectory
 If a ranged weapon, the weapons' trajectory (see RPG::WeaponRangedTrajectory)
 
WeaponRangedTargeting weaponTargetting
 If a ranged weapon, the weapons' target(s) (see RPG::WeaponRangedTargetting)
 
WeaponRangedAnimSpeed rangedAnimSpeed
 Ranged animation speed? (See RPG::WeaponRangedAnimSpeed)
 
WeaponSlotInUse usedWeaponSlot
 If actor uses two weapons, the slot of the weapon currently being used (See RPG::WeaponSlotInUse)
 
AnimationCurrentactorAnim
 The actor's battle animation data.
 
int actorAnimationId
 The ID of the actor's current battle animation. Can be battler or weapon anims.
 
int actorAnimationFrame
 The frame of the battle animation.
 
int comboUsedBattleCommand
 The battle command ID that was used (for use in "Enable Combo")
 
int comboBattleCommand
 The battle command ID that is expected (set in "Enable Combo")
 
int comboRepetitions
 Number of times to repeat combo (set in "Enable Combo")
 
DArray< shortitemsInBattle
 Items in the inventory only updated when accessing Item menu in battle. Index is zero-based. (See RPG::Inventory::items)
 
unsigned charitemAmountInBattle
 Item amounts in the inventory only updated when accessing Item menu in battle. Index is zero-based. (See RPG::Inventory::items)
 
bool isAutoBattle
 Is auto-battle enabled? (.
 
int maxHitNumber
 comboRepetitions * Weapon's hit #?
 
bool battlerSpawned
 Used internally at start of battler for loading.
 
- Public Attributes inherited from RPG::Battler
int id
 One-based ID of the battler.
 
bool notHidden
 false if the battler is currently hidden (but not dead)
 
Actionaction
 Current action of the battler.
 
int hp
 Current HP.
 
int mp
 Current MP.
 
int attackDiff
 Difference from the default attack value.
 
int defenseDiff
 Difference from the default defense value.
 
int intelligenceDiff
 Difference from the default intelligence value.
 
int agilityDiff
 Difference from the default agility value.
 
DArray< short, 1 > attributes
 Array for a battler's attributes.
 
DArray< short, 1 > conditions
 Turns elapsed in a certain condition (see details)
 
bool isCharging
 Is the battler (monster) currently using the "Charge Up" action.
 
int atbValue
 Current value of the ATB bar (0 to 300000 - see details)
 
bool mirrored
 true if the battler's image is mirrored
 
int frameCounter
 Internally used.
 
int animationId
 ID of the battle graphic pose (see details)
 
int x
 Current X coordinate (centered)
 
int y
 Current Y coordinate (centered)
 
int originX
 Origin X coordinate (used when an actor moves to attack)
 
int originY
 Origin Y coordinate (used when an actor moves to attack)
 
int destinationX
 Destination X coordinate (used when an actor moves to attack)
 
int destinationY
 Destination Y coordinate (used when an actor moves to attack)
 
Row rowAlt
 Internally used, I do not understand the difference from row yet.
 
Row row
 Current row (no visible effect on monsters)
 
int damagePopupTimer
 Frames left until damage popup has finished (zero: no damage popup active)
 
ImagedamageImage
 Pointer to the image of the damage pointer.
 
int flashR
 Red value for flashing the battler (0 to 31)
 
int flashG
 Green value for flashing the battler (0 to 31)
 
int flashB
 Blue value for flashing the battler (0 to 31)
 
double flashIntensity
 Intensity for flashing the battler (0 to 31 - will decrease until flashing is done)
 
int flashTimer
 Frames left until flashing the battler finished (zero: no flashing active)
 
int shakeStrength
 If the battler is being shaken, the strength of the shake.
 
int shakeSpeed
 If the battler is being shaken, the speed of the shake.
 
int shakeOffsetX
 If the battler is being shaken, the amount of pixels? to shake the battler left/right.
 
int shakeOffsetY
 If the battler is being shaken, the amount of pixels? to shake the battler up/down.
 
int shakeTimer
 Frames left until shaking the battler finished (zero: no shaking active)
 
int turnsTaken
 Turns taken by this battler.
 
ActionType actionType
 Whether the action is short, or long (skill is being cast or item is being used)
 
ActionStatus actionStatus
 Status of the current action.
 
int jobClassId
 The job class ID. -1 if it's the database default.
 
int displayedConditions [5]
 Conditions which will be displayed in the info window (see details)
 

Static Public Attributes

static RPG::AnimationInBattle *& animData
 Returns the battle animation information for when an animation is playing over an actor (being attacked or healed)
 

Detailed Description

Used for the data of actors which can be changed in-game.

Note
Many things are only stored in this class if they were changed and are now different from the default in the database, thus you should use the getter methods to access these things.

The members ending with Diff are "offsets" which are added to the default value (which is calculated from the current level, class and equipment).
See also
RPG::actors
RPG::DBActor
RPG::dbActors
RPG::Battler

Member Function Documentation

◆ addSkill()

void RPG::Actor::addSkill ( int skillId)

Built-in RM2k3 function that adds a skill to a hero.

Parameters
skillIdThe database ID of the skill

◆ getBattleCommand()

int RPG::Actor::getBattleCommand ( int index)

Returns the current battle command on a certain position.

Parameters
indexZero-based index of the available commands for this actor (0 to 6)
Returns
Database ID of the battle command on the given position or either 0 or -1 if there is none

◆ getBattleGraphicId()

int RPG::Actor::getBattleGraphicId ( )

Returns the current battle graphic ID.

Returns
Database ID of the current battle graphic

◆ getCharsetFilename()

std::string RPG::Actor::getCharsetFilename ( )

Returns the current charset filename.

Returns
Current charset filename
See also
getCharsetId
getCharsetTransparency

◆ getCharsetId()

int RPG::Actor::getCharsetId ( )

Returns the current charset ID.

Returns
ID of sprite in charsets
See also
getCharsetFilename
getCharsetTransparency

◆ getCharsetTransparency()

int RPG::Actor::getCharsetTransparency ( )

Returns the current charset transparency.

Returns
Transparency value (see RPG::Character::transparency documentation)
See also
getCharsetFilename
getCharsetId

◆ getDegree()

std::string RPG::Actor::getDegree ( )

Returns the current degree.

Returns
Current degree

◆ getFacesetFilename()

std::string RPG::Actor::getFacesetFilename ( )

Returns the current faceset filename.

Returns
Current faceset filename
See also
getFacesetId

◆ getFacesetId()

int RPG::Actor::getFacesetId ( )

Returns the current faceset ID.

Returns
ID of sprite in faceset
See also
getFacesetFilename

◆ getTwoWeaponAgility()

int RPG::Actor::getTwoWeaponAgility ( )

Returns the agility value if actor has two weapons equipped (one weapon is ignored)

Returns
Agility value when normally attacking with two weapons (see RPG::Actor::usedWeaponSlot)

◆ getTwoWeaponAttack()

int RPG::Actor::getTwoWeaponAttack ( )

Returns the attack value if actor has two weapons equipped (one weapon is ignored)

Returns
Attack value when normally attacking with two weapons (see RPG::Actor::usedWeaponSlot)

◆ isSkillKnown()

bool RPG::Actor::isSkillKnown ( int skillId)

Built-in RM2k3 function that tests if a hero already knows a certain skill.

Parameters
skillIdThe database ID of the skill

◆ partyMember()

static RPG::Actor * RPG::Actor::partyMember ( int index)
static

Returns a certain party member.

Parameters
indexZero-based party member index (0 to 3)
Returns
Pointer to the RPG::Actor object of the particular actor

◆ removeSkill()

void RPG::Actor::removeSkill ( int skillId)

Built-in RM2k3 function that removes a skill from a hero.

Parameters
skillIdThe database ID of the skill

Member Data Documentation

◆ animData

RPG::AnimationInBattle*& RPG::Actor::animData
static

Returns the battle animation information for when an animation is playing over an actor (being attacked or healed)

Returns
Pointer to the AnimationInBattle class for the actor party
See also
RPG::Monster::animData

◆ isAutoBattle

bool RPG::Actor::isAutoBattle

Is auto-battle enabled? (.

See also
RPG::BattleData::autoBattle )

The documentation for this class was generated from the following file: