APE commands pertaining to Stats and Game Database Objects


Quest Commands

addnew_to_inventory <GDB name> :

Creates a new object and adds it to the party’s inventory. Call with one argument which is the GDB name of the object to be added to the party’s inventory

remove_from_inventory <GDB name>:

Removes an object from the party’s inventory and places it in the world inventory. Call with one argument, which is the GDB name of the object to be removed from the party’s inventory.

move_to_inventory <GDB name>:

Move an object from the world inventory to the party’s inventory. Call with one argument, which is the GDB name of the object to be removed from the party’s inventory.

is_in_inventory <GDB name> <result> :

Checks to see if the object is in the party’s inventory. Call with two arguments, first the GDB name of the object and secondly the gamevar that receives the result. ‘1’ if true, ‘0’ if false.

is_equipped <GDB name> <result>:

Checks if any character in the party is equipping an object. Call with two arguments, first the GDB name of the object and secondly the gamevar that receives the result. ‘1’ if true, ‘0’ if false.

add_npc_to_party <GDB character name> :

Adds the named NPC to the party (making him a PC, I guess :) . Call with one argument, the GDB name of the character to be added.

remove_npc_from_party <GDB character name>:

Moves a player character from the active party and places it in the list of passive party members. Call with one argument, the GDB name of the character to remove.

place_in_party <character name> <gamevar>

Checks the position of the character name you enter and returns their position in the party as 3,2,1, or 0 if they are not in it.

get_party_order <leadervar> <secondvar> <thirdvar> :

Returns 3 strings with the names of the character in that position (i.e. "extern get_party_order first$ second$ third$"

add_money <amount>:

Adds money to the party. Call with one numerical argument, indicating how many money units. To increase the party’s wealth with.

remove_money <amount>:

Removes money from the party. Same argument as add_money.

check_money <gamevar>

Retrieves how much money the party has and returns it to the Gamevar.

GetPlayerCurrentHP <player> <return_value> :

Gets the hit points of the player specified, [can be specifed by name, or PlayerChar# (i.e. "Boots" or "PlayerChar2")].

SetPlayerCurrentHP <player> <new health> :

Adjust the hit points of the player specified, [can be specifed by name, or PlayerChar# (i.e. "Boots" or "PlayerChar2")]. The hitpoints can be set by typing in just the number (i.e. "235"), you can add a value to the current hitpoints by using a "+" infront of the number (i.e. "+30"), and you can subtract from the current hitpoints by adding a "-" before the number (i.e. "-30).

Add_XP <player> <new XP> :

Adjust the experience points of the player specified. Use a positive number as the XP value to add experience, use a negative number to decrease it.

adjust_stat <character ID> <stat string> <amount>:

Modifies the specified stat for the specified character. Call with three arguments, first thecharacter identifier, secondly the name of the stat to be modified and thirdly the modify value. Names of the stats are "might", "agility", "wisdom", "xp", "hp", "nrg", "beatuse", "mysuse", "good" and "bad" . The "good" and "bad" stats are effects such as haste or poison. We need to specify what values to use for the various states.

check_stat <character ID> <stat string> <value gamevar>:

Check the value of a certain stat. Call with three arguments. First, the character identifier, secondly the stat string (see adjust_stat) and thirdly the gamevar that will receive the value of the

stat.

 set_party_leader <GDB character name>:

Swaps the current leader of the party to be the specified character. Call with one argument, the GDB name of the character you want to lead the party.

equip_item <GDB object name>:

Equips the specified item if it exists in the party’s inventory. This should probably be removed or modified as it operates on the leader in the party only. Call with one argument, the GDB name of the object to be equipped.

set_world_skill_level <skillname> <level>:

Sets a worldskill to a new level, 1 & 2 should be the only levels used in the first game. Accepted skillnames are ("picklock", "tractor", "yammer", "comptalk", "throwloonie", "analyze", "ragemight")

get_world_skill_level <skillname> <variable>:

Lookup the level of a worldskill. Accepted skillnames are ("picklock", "tractor", "yammer", "comptalk", "throwloonie", "analyze", "ragemight")

 

APE commands pertaining to Quests

add_quest <The Name of The Quest> :

will "activate" the quest and spawn all sub_quests. After "add_quest", the Quest will appear in the Fatima interface, etc.

complete_quest <The Name of The Quest> :

will forcefully finish the quest with success. This should, in the general case, not be used since the GameVars in the requirements-field should be enough, but might be needed if a plot twist fixes the quest in some other way.

cancel_quest <The Name of The Quest> :

will forcefully finish the quest with failure. Much like "complete_quest", but if you were to have a sub quest on Sunder that you haven't finished before the planet explodes, you should use cancel_quest.

is_quest_done <The Name of The Quest> <GAMEVAR> :

will check to see if you've finished the specified quest, and return a value to the GAMEVAR specified. All successfully finished quests will return 2, a quest "in progress" will return 1 and a quest you haven't received will return 0. NOTE that this can be kinda expensive to check, so it shouldn't be used to check every frame if the status of a Quest has changed from 1 to 2, or something like that. Use this call with care, and stick to checking the normal gamevars when possible.