Class: Game_Party

Game_Party()

new Game_Party()

The game object class for the party. Information such as gold and items is included. Use as global variable $gameParty
Properties:
Name Type Description
ABILITY_ENCOUNTER_HALF Number [static]
ABILITY_ENCOUNTER_NONE Number [static]
ABILITY_CANCEL_SURPRISE Number [static]
ABILITY_RAISE_PREEMPTIVE Number [static]
ABILITY_GOLD_DOUBLE Number [static]
ABILITY_DROP_ITEM_DOUBLE Number [static]
_gold Number
_steps Number
_lastItem Game_Item
_menuActorId Number
_targetActorId Number
_actors Array.<Game_Actor>
_items Object {[itemId: number]: number}
_weapons Object {[itemId: number]: number}
_armors Object {[itemId: number]: number}

Extends

Methods

addActor(actorId)

Adds an actor to the party given the actor id.
Parameters:
Name Type Description
actorId Number

agility() → {Number}

Returns the agility of the unit.
Inherited From:
Returns:
Type
Number

aliveMembers() → {Array.<Game_Battler>}

Returns the list of alive battlers.
Inherited From:
Returns:
Type
Array.<Game_Battler>

allItems() → {Array.<RPG.BaseItem>}

Returns all items within the party's posession. Items can be of equip item, or item type.
Returns:
Type
Array.<RPG.BaseItem>

allMembers() → {Array.<Game_Actor>}

Returns:
Type
Array.<Game_Actor>

armors() → {Array.<RPG.Armor>}

Returns the party's armor.
Returns:
Type
Array.<RPG.Armor>

battleMembers() → {Array.<Game_Actor>}

Returns the battle members in the party.
Returns:
Type
Array.<Game_Actor>

canInput() → {Boolean}

Returns:
Type
Boolean

canUse(item) → {Boolean}

Returns true if the party can use the item.
Parameters:
Name Type Description
item RPG.BaseItem
Returns:
Type
Boolean

charactersForSavefile() → {Array.<Array.<*>>}

Returns the characters that go on the save life.
Returns:
Array of [{String}name, {Number}index]
Type
Array.<Array.<*>>

clearActions()

Clears the unit's actions.
Inherited From:

clearResults()

Clears the action results.
Inherited From:

consumeItem(item)

Has the party consume the given item.
Parameters:
Name Type Description
item RPG.BaseItem

deadMembers() → {Array.<Game_Battler>}

Returns the list of dead battlers.
Inherited From:
Returns:
Type
Array.<Game_Battler>

discardMembersEquip(item, amount)

Parameters:
Name Type Description
item RPG.EquipItem
amount Number

equipItems() → {Array.<RPG.EquipItem>}

Returns the party's equippable items.
Returns:
Type
Array.<RPG.EquipItem>

exists() → {Boolean}

Returns:
Type
Boolean

facesForSavefile() → {Array.<Array.<*>>}

Returns the actor faces for the save file.
Returns:
Type
Array.<Array.<*>>

gainGold(amount)

Increases the party gold given a specified amount.
Parameters:
Name Type Description
amount Number

gainItem(item, amount, includeEquip)

Parameters:
Name Type Description
item RPG.BaseItem
amount Number
includeEquip Boolean

gold() → {Number}

Returns party gold.
Returns:
Type
Number

hasCancelSurprise() → {Boolean}

Returns:
Type
Boolean

hasDropItemDouble() → {Boolean}

Returns true if the party has double drop item in effect.
Returns:
Type
Boolean

hasEncounterHalf() → {Boolean}

Returns true if the encounter rate is set to half.
Returns:
Type
Boolean

hasEncounterNone() → {Boolean}

Returns true if the encounter rate is set to none.
Returns:
Type
Boolean

hasGoldDouble() → {Boolean}

Returns true if the party has double gold in effect.
Returns:
Type
Boolean

hasItem(item, includeEquip) → {Boolean}

Returns true if the party has the given item; if includeEquip is set to true, this will also check party equipment.
Parameters:
Name Type Description
item RPG.BaseItem
includeEquip Boolean
Returns:
Type
Boolean

hasMaxItems(item) → {Boolean}

Parameters:
Name Type Description
item RPG.BaseItem
Returns:
Type
Boolean

hasRaisePreemptive() → {Boolean}

Returns true if the party has an increased chance of preemptive strike.
Returns:
Type
Boolean

highestLevel() → {Number}

Returns the highest level in the party.
Returns:
Type
Number

inBattle() → {Boolean}

Returns true if unit is in battle.
Inherited From:
Returns:
Type
Boolean

increaseSteps()

Increases the number of steps the party has taken.

initAllItems()

initialize()

Overrides:

isAllDead() → {Boolean}

Overrides:
Returns:
Type
Boolean

isAnyMemberEquipped(item) → {Boolean}

Returns true if any party member has the specified equip item.
Parameters:
Name Type Description
item RPG.EquipItem
Returns:
Type
Boolean

isEmpty() → {Boolean}

Returns:
Type
Boolean

itemContainer(item) → {Array.<RPG.BaseItem>}

Parameters:
Name Type Description
item RPG.BaseItem
Returns:
Type
Array.<RPG.BaseItem>

items() → {Array.<RPG.Item>}

Returns:
Type
Array.<RPG.Item>

lastItem() → {RPG.BaseItem}

Returns the last item selected by the game party.
Returns:
Type
RPG.BaseItem

leader() → {Game_Actor}

Returns the leader of the party.
Returns:
Type
Game_Actor

loseGold(amount)

Decreases the party gold given a specified amount.
Parameters:
Name Type Description
amount Number

loseItem(item, amount, includeEquip)

Parameters:
Name Type Description
item RPG.BaseItem
amount Number
includeEquip Boolean

makeActions()

Creates the action's of the game unit.
Inherited From:

makeMenuActorNext()

makeMenuActorPrevious()

maxBattleMembers() → {Number}

Returns the maximum battle members in the party.
Returns:
Type
Number

maxGold() → {Number}

Returns maximum gold of the party.
Returns:
Type
Number

maxItems(item) → {Number}

Returns the maximum number of items of the given item.
Parameters:
Name Type Description
item RPG.BaseItem
Returns:
Type
Number

members() → {Array.<Game_Actor>}

Returns all party members.
Overrides:
Returns:
Type
Array.<Game_Actor>
Returns the actor that will be used in the current menu; this is for menu scenes that target one actor.
Returns:
Type
Game_Actor

movableMembers() → {Array.<Game_Battler>}

Returns the list of movable members.
Inherited From:
Returns:
Type
Array.<Game_Battler>

name() → {String}

Returns:
Type
String

numItems(item) → {Number}

Returns the number of items in the possession of the party of the given item.
Parameters:
Name Type Description
item RPG.BaseItem
Returns:
Type
Number

onBattleEnd()

Handler for when battle has ended.
Inherited From:

onBattleStart()

Handler for when battle is started.
Inherited From:

onPlayerWalk()

Handler for when the player walks.

partyAbility(abilityId) → {Boolean}

Parameters:
Name Type Description
abilityId Number
Returns:
Type
Boolean

performEscape()

Performs escape motion for the entire party.

performVictory()

Performs victory motion for the entire party.

randomDeadTarget() → {Game_Battler}

Returns a random dead target from the game unit.
Inherited From:
Returns:
Type
Game_Battler

randomTarget() → {Game_Battler}

Returns a random target from the game unit.
Inherited From:
Returns:
Type
Game_Battler

ratePreemptive(troopAgi) → {Number}

Parameters:
Name Type Description
troopAgi Number
Returns:
Type
Number

rateSurprise(troopAgi) → {Number}

Parameters:
Name Type Description
troopAgi Number
Returns:
Type
Number

removeActor(actorId)

Removes an actor from the party given the actor id.
Parameters:
Name Type Description
actorId Number

removeBattleStates()

Remove battle states from all actors in the party.

requestMotionRefresh()

Refreshes the motion on all actors in the party.

reviveBattleMembers()

Revive the battle members of the party.

select(activeMember)

Selects a member of the unit given a battler.
Parameters:
Name Type Description
activeMember Game_Battler
Inherited From:

setLastItem(item)

Parameters:
Name Type Description
item RPG.BaseItem

setMenuActor(actor)

Parameters:
Name Type Description
actor Game_Actor

setTargetActor(actor)

Parameters:
Name Type Description
actor Game_Actor

setupBattleTest()

Sets up a test battle with the party.

setupBattleTestItems()

Sets up the battle test items.

setupBattleTestMembers()

Sets up the battle test members.

setupStartingMembers()

Sets up the starting party members.

size() → {Number}

Returns number of party member.
Returns:
Type
Number

smoothDeadTarget(index) → {Game_Battler}

Parameters:
Name Type Description
index Number
Inherited From:
Returns:
Type
Game_Battler

smoothTarget(index) → {Game_Battler}

Parameters:
Name Type Description
index Number
Inherited From:
Returns:
Type
Game_Battler

steps() → {Number}

Returns the number of steps the party has taken.
Returns:
Type
Number

substituteBattler() → {Game_Battler}

Inherited From:
Returns:
Type
Game_Battler

swapOrder(index1, index2)

Parameters:
Name Type Description
index1 Number
index2 Number

targetActor() → {Game_Actor}

Returns:
Type
Game_Actor

tgrSum() → {Number}

Inherited From:
Returns:
Type
Number

weapons() → {Array.<RPG.Weapon>}

Returns the weapons of the party.
Returns:
Type
Array.<RPG.Weapon>