DynRPG v0.32 Unofficial
Plugin SDK
|
Used for the inventory data and statistics of the current game being played. More...
#include <Inventory.h>
Public Member Functions | |
int | getPartyIndex (int databaseId) |
Checks if a particular RPG::Actor is in the party. | |
bool | isItemOwned (int id) |
Built-in RM2k3 function checks the inventory to see if an item is owned. | |
void | addItem (int id, int amount) |
Built-in RM2k3 function that adds an item to the inventory. | |
void | removeItem (int id, int amount) |
Built-in RM2k3 function that removes an item to the inventory. | |
void | incrementItemUses (int id) |
Built-in RM2k3 function that increments an items use count by one if it's set to more than one use. | |
Public Attributes | |
DArray< short > | party |
Similarly to RPG::Actor::partyMember(index), this returns the database value of the hero, however, you can also use this DArray to retrieve the party's size (RPG::inventory->party.size) | |
DArray< short > | items |
Items in the inventory. Index is zero-based. | |
unsigned char * | itemAmount |
Amount of each item in the inventory. | |
unsigned char * | itemUses |
Uses count of each item in the inventory. | |
int | goldAmount |
Amount of gold the party holds. | |
Image * | partyFaceImage [4] |
Array for the facesets of the 4 party members. | |
int | timerOneTicks |
Number of ticks in the first timer. | |
bool | timerOneRunning |
Is the first timer running? | |
bool | timerOneVisible |
Is the first timer visible? | |
bool | timerOneBattle |
Can the first timer be displayed in battle? | |
int | numBattles |
Total number of battles. | |
int | numVictories |
Total number of victories. | |
int | numDefeats |
Total number of defeats. | |
int | numEscapes |
Total number of escapes. | |
int | numTurns |
Total number of battle turns? | |
int | numSteps |
Total umber of steps taken. | |
int | timerTwoTicks |
Number of ticks in the second timer. | |
bool | timerTwoRunning |
Is the second timer running? | |
bool | timerTwoVisible |
Is the second timer visible? | |
bool | timerTwoBattle |
Can the second timer be displayed in battle? | |
Used for the inventory data and statistics of the current game being played.
Built-in RM2k3 function that adds an item to the inventory.
id | The database ID of the item |
amount | Amount of the item to add |
Checks if a particular RPG::Actor is in the party.
databaseId | The database ID of the actor. |
Built-in RM2k3 function that increments an items use count by one if it's set to more than one use.
id | The database ID of the item |
Built-in RM2k3 function checks the inventory to see if an item is owned.
id | The database ID of the item |
Built-in RM2k3 function that removes an item to the inventory.
id | The database ID of the item |
amount | Amount of the item to add |
int RPG::Inventory::goldAmount |
Amount of gold the party holds.
Amount of each item in the inventory.
Uses count of each item in the inventory.
Assuming a Potion has 5 uses, and itemAmount is 3:
itemUses = 0 -- The potion hasn't been used yet itemUses = 1 -- It's been used once, itemAmount hasn't decreased yet itemUses = 2 -- It's been used twice, itemAmount hasn't decreased yet itemUses = 3 -- It's been used three times, itemAmount hasn't decreased yet itemUses = 4 -- It's been used four times, itemAmount hasn't decreased yet
On the fifth use, itemUses is reset to 0, and itemAmount decreases to 2.