E R F V 2 . 0 o K ÿÿÿÿc s c r i p t . l d f ° + s c r i p t . l d f à F ////////////////////////////////////////////////////////
//
// CScript
//
// Language definition file for the client-side
// scripting language.
//
// (c) BioWare Corp, 2007
//
////////////////////////////////////////////////////////
#define ENGINE_NUM_STRUCTURES 6
#define ENGINE_STRUCTURE_0 event
#define ENGINE_STRUCTURE_1 location
#define ENGINE_STRUCTURE_2 command
#define ENGINE_STRUCTURE_3 effect
#define ENGINE_STRUCTURE_4 itemproperty
#define ENGINE_STRUCTURE_5 player
#define WAITING_ALLOWED
#define SOURCE_FILE_EXTENSION nsc
#define COMPILED_FILE_EXTENSION ncc
#define DEBUGGER_FILE_EXTENSION ndc
//////////////////////////////////////////////////////////////////
// Constants
//////////////////////////////////////////////////////////////////
int TRUE = 1;
int FALSE = 0;
int ANIM_EVENT_ATTACK_IMPACT = 1;
int ANIM_EVENT_DONE = 13;
// LOG_CHANNEL
int LOG_CHANNEL_GENERAL = 0;
int LOG_CHANNEL_SNIFFTEST = 1;
int LOG_CHANNEL_QA = 2;
int LOG_CHANNEL_QA_REGRESSION = 3;
int LOG_CHANNEL_TEMP = 500;
// Ability
int ABILITY_INVALID = 0;
// Property Values
int PROPERTY_VALUE_TOTAL = 1;
int PROPERTY_VALUE_BASE = 2;
int PROPERTY_VALUE_CURRENT = 3;
int PROPERTY_VALUE_MODIFIER = 4;
// Property types
int PROPERTY_TYPE_INVALID = 0;
int PROPERTY_TYPE_ATTRIBUTE = 1;
int PROPERTY_TYPE_SIMPLE = 2;
int PROPERTY_TYPE_DEPLETABLE = 3;
int PROPERTY_TYPE_DERIVED = 4;
// Room Visibility
int ROOM_VISIBILITY_HIDDEN = 0;
int ROOM_VISIBILITY_FOGGED = 2;
int ROOM_VISIBILITY_VISIBLE = 1;
// GetItemsOptions
int GET_ITEMS_OPTION_ALL = 1;
int GET_ITEMS_OPTION_BACKPACK = 0;
int GET_ITEMS_OPTION_EQUIPPED = 2;
// Inventory slots
// These must match with Inventory.as, script.ldf, cscript.ldf,
// inventoryslots.h, ScriptSymbols.h, ToolsInventoryslots.h
int INVENTORY_SLOT_INVALID = 255;
int INVENTORY_SLOT_MAIN = 0;
int INVENTORY_SLOT_OFFHAND = 1;
int INVENTORY_SLOT_AMMO = 2;
//UNUSED: 3
int INVENTORY_SLOT_CHEST = 4;
int INVENTORY_SLOT_HEAD = 5;
int INVENTORY_SLOT_BOOTS = 6;
int INVENTORY_SLOT_GLOVES = 7;
int INVENTORY_SLOT_CLOAK = 8;
int INVENTORY_SLOT_RING1 = 9;
int INVENTORY_SLOT_RING2 = 10;
int INVENTORY_SLOT_NECK = 11;
int INVENTORY_SLOT_BELT = 12;
int INVENTORY_SLOT_BITE = 13;
int INVENTORY_SLOT_SHALE_SHOULDERS = 14;
int INVENTORY_SLOT_SHALE_CHEST = 15;
int INVENTORY_SLOT_SHALE_RIGHTARM = 16;
int INVENTORY_SLOT_SHALE_LEFTARM = 17;
int INVENTORY_SLOT_DOG_WARPAINT = 18;
int INVENTORY_SLOT_DOG_COLLAR = 19;
int INVENTORY_SLOT_PARTY_MEMBER = 20;
int EQUIPMENT_NUM_SLOTS = 21 ; // max number of above slot flags.
// Effect Types
int EFFECT_DURATION_TYPE_INVALID = 0;
int EFFECT_DURATION_TYPE_INSTANT = 1;
int EFFECT_DURATION_TYPE_TEMPORARY = 2;
int EFFECT_DURATION_TYPE_PERMANENT = 3;
int EFFECT_DURATION_TYPE_DEATH = 6;
//Effect Flags
int EFFECT_FLAG_DISABLE_MOVEMENT = 1;
int EFFECT_FLAG_DISABLE_TURNING = 2;
int EFFECT_FLAG_DISABLE_COMBAT = 4;
int EFFECT_FLAG_DISABLE_TALENTS = 8;
int EFFECT_FLAG_DISABLE_SPELLS = 16;
int EFFECT_FLAG_DISABLE_SKILLS = 32;
int EFFECT_FLAG_DISABLE_ITEMS = 64;
int EFFECT_FLAG_DISABLE_INPUT = 128;
int EFFECT_TYPE_INVALID = 0;
// Object types
int OBJECT_TYPE_INVALID = 0;
int OBJECT_TYPE_GUI = 1;
int OBJECT_TYPE_TILE = 2;
int OBJECT_TYPE_MODULE = 4;
int OBJECT_TYPE_AREA = 8;
int OBJECT_TYPE_STORE = 16;
int OBJECT_TYPE_CREATURE = 32;
int OBJECT_TYPE_ITEM = 64;
int OBJECT_TYPE_TRIGGER = 128;
int OBJECT_TYPE_PROJECTILE = 256;
int OBJECT_TYPE_PLACEABLE = 512;
int OBJECT_TYPE_AREAOFEFFECTOBJECT= 2048;
int OBJECT_TYPE_WAYPOINT = 4096;
int OBJECT_TYPE_SOUND = 16384;
int OBJECT_TYPE_PARTY = 32768;
int OBJECT_TYPE_MAPPATCH = 65536;
int OBJECT_TYPE_VFX = 131072;
int OBJECT_TYPE_MAP = 262144;
int OBJECT_TYPE_ALL = 4294967295;
int INVALID_WEAPON_SET = 4294967295;
//////////////////////////////////////////////////////////////////
// Automation
//////////////////////////////////////////////////////////////////
/** @brief
*
*Executes given console command.
*
* @param sCommand - String to be interpreted as a command
* @author Noel Borstad
*/
string ConsoleCommand(string sCommand) = 0;
/** @brief
*
*Returns TRUE if an area and player controled party exist.
*
* @author Noel Borstad
*/
int IsCampaignLoaded() = 1;
/** @brief
*
*Shuts down engine and returns to main menu.
*
* @author Noel Borstad
*/
void ShutDown() = 2;
/** @brief
*
*Will either exit to main menu or out of the game completely.
*
* @param nToMainMenuOnly - Set as 1 to exit to main menu, 0 to exit the game
* @author Noel Borstad
*/
void Exit(int nToMainMenuOnly, int nExitCode = 0) = 20;
/** @brief
*
*Possibly deprecated.
*
* @param fTime
* @author Noel Borstad
*/
void SetWaitTimeout(float fTime) = 10;
/** @brief
*
*Returns the current area name.
*
* @author Sam Johnson
*/
string GetAreaName() = 48;
/** @brief
*
*Returns TRUE if the palyer character is in dialog.
*
* @author Sam Johnson
*/
int IsInDialog() = 50;
/** @brief
*
*Used to determine the result of the WaitUnit() call, will return FALSE if the WaitUntil()
*call timeout is exceeded.
*
* @author Mark Brockington
*/
int GetWaitUntilResult() = 54;
/** @brief
*
*Returns the number of milliseconds since the machine has booted.
*
* @author Mike Wellman
*/
int GetTime() = 68;
/** @brief
*
*Returns true if the current area that is loaded or being loaded has finished
*
* @author Ross Gardner
*/
int GetIsLevelLoaded() = 72;
/** @brief
*
*Sends TPM Messages via Skynet - should only be called via wrappers in ctest_h
*
* @author Sam Johnson
*/
void SendTPMMessage(string sMessage) = 93;
//////////////////////////////////////////////////////////////////
// Basic Types
//////////////////////////////////////////////////////////////////
/** @brief
*
*Defines a variable of type Vector.
*
* @param x - Float value of x, default is 0.0f
* @param y - Float value of y, default is 0.0f
* @param z - Float value of z, default is 0.0f
* @author Noel Borstad
*/
vector Vector(float x=0.0f, float y=0.0f, float z=0.0f) = 4;
/** @brief
*
*Converts a vector type to a string.
*
* @param vVector - Vector type to convert to string
* @author Sam Johnson
*/
string VectorToString(vector vVector) = 49;
/** @brief
*
*Converts and integer value to a float.
*
* @param nValue - Integer value
* @author Sam Johnson
*/
float IntToFloat(int nValue) = 38;
/** @brief
*
*Converts an integer value to a string.
*
* @param nInteger - Integer value
* @author Noel Borstad
*/
string IntToString(int nInteger) = 27;
/** @brief
*
*Converts a float value to an integer.
*
* @param fValue - Float value
* @author Sam Johnson
*/
int FloatToInt(float fValue) = 39;
/** @brief
*
*Converts a float value to a string.
*
* @param fValue - Float value
* @param nWidth - Output string width
* @param nDecimals - Number of decimals
* @author Sam Johnson
*/
string FloatToString(float fValue, int nWidth, int nDecimals) = 61;
/** @brief
*
*Converts string data to an integer value.
*
* @param sCommand - String data
* @author Paul Roffel
*/
int StringToInt(string sCommand) = 21;
/** @brief
*
*Returns integer denoting number of elements in the given array.
*
* @param array - Any array
* @author Sam Johnson
*/
int GetArraySize(any array) = 62;
/** @brief
*
*Generates a random number.
*
* @param nMaxInteger - Max integer value of random outcome.
* @author Brenon Holmes - and copy-pasted by Sam
*/
int Random( int nMaxInteger ) = 63;
/** @brief
*
*Returns the square root of a given float value.
*
* @param fValue - Float value
* @author Sam Johnson
*/
float Sqrt( float fValue ) = 65;
/** @brief Retrieves a local integer variable stored on an object.
*
* Returns the value of the integer variable with the name sVarName which is stored
* on the object oObject. If no such variable is stored on the object oObject, 0 is
* returned. To change the value of a local integer value, use SetLocalInt().
*
* @param oObject - The Object the variable is stored on.
* @param sVarName - The name of the integer variable to retrieve.
* @returns Returns the value of the integer variable. Returns 0 on error.
* @sa SetLocalInt()
* @author Jon Cooper
*/
int GetLocalInt( object oObject, string sVarName ) = 89;
/** @brief Stores a local integer variable on an object.
*
* Sets the value of the local integer variable with the name sVarName on the object
* oObject to the integer value nValue. If no variable with that name is currently stored
* on the object oObject, the variable is created.
*
* @param oObject - Object to store the var on.
* @param sVarName - The name of the integer variable to store.
* @param nValue - The value of the integer to store.
* @sa GetLocalInt()
* @author Jon Cooper
*/
void SetLocalInt( object oObject, string sVarName, int nValue ) = 90;
/** @brief Gets a local floating point variable off of an object.
*
* Gets a local floating point variable sVarName on the specified
* object.
*
* @param oObject - Object to get the var on.
* @param sVarName - The name of the floating point variable to retrieve.
* @returns Returns the floating point variable, returns 0.0f on error.
* @sa SetLocalFloat()
* @author Jon Cooper
*/
float GetLocalFloat( object oObject, string sVarName ) = 91;
/** @brief Sets a local floating point variable on an object.
*
* Sets a local floating point variable sVarName on the specified
* object.
*
* @param oObject - Object to set the variable on.
* @param sVarName - The name of the floating point variable to set.
* @param fValue - The value of the variable to set.
* @sa GetLocalFloat()
* @author Jon Cooper
*/
void SetLocalFloat( object oObject, string sVarName, float fValue ) = 92;
/** @brief Gets a local string variable on an object.
*
* Gets a local string variable sVarName on the specified
* object.
*
* @param oObject - Object to get the variable from.
* @param sVarName - The name of the string variable to retrieve.
* @returns Returns the string variable, returns an empty string on error.
* @sa SetLocalString()
* @author Jon Cooper
*/
string GetLocalString( object oObject, string sVarName ) = 87;
/** @brief Sets a local string variable on an object.
*
* Sets a local string variable sVarName on the specified
* object.
*
* @param oObject - Object to set the variable on.
* @param sVarName - The name of the string variable to set.
* @param sValue - The value of the string variable.
* @sa GetLocalString()
* @author Jon Cooper
*/
void SetLocalString( object oObject, string sVarName, string sValue ) = 88;
/** @brief Retrieves a local integer variable stored on an object.
*
* Returns the value of the integer variable with the name sVarName which is stored
* on the object oObject. If no such variable is stored on the object oObject, 0 is
* returned. To change the value of a local integer value, use SetLocalInt().
*
* @param oObject - The Object the variable is stored on.
* @param nVarID - The ID of the integer variable to retrieve.
* @returns Returns the value of the integer variable. Returns 0 on error.
* @sa SetLocalInt()
* @author Jon Cooper
*/
int GetLocalInt_ID( object oObject, int nVarID ) = 182;
/** @brief Stores a local integer variable on an object.
*
* Sets the value of the local integer variable with the name sVarName on the object
* oObject to the integer value nValue. If no variable with that name is currently stored
* on the object oObject, the variable is created.
*
* @param oObject - Object to store the var on.
* @param nVarID - The ID of the integer variable to store.
* @param nValue - The value of the integer to store.
* @sa GetLocalInt()
* @author Jon Cooper
*/
void SetLocalInt_ID( object oObject, int nVarID, int nValue ) = 183;
/** @brief Gets a local floating point variable off of an object.
*
* Gets a local floating point variable sVarName on the specified
* object.
*
* @param oObject - Object to get the var on.
* @param nVarID - The ID of the floating point variable to retrieve.
* @returns Returns the floating point variable, returns 0.0f on error.
* @sa SetLocalFloat()
* @author Jon Cooper
*/
float GetLocalFloat_ID( object oObject, int nVarID ) = 184;
/** @brief Sets a local floating point variable on an object.
*
* Sets a local floating point variable sVarName on the specified
* object.
*
* @param oObject - Object to set the variable on.
* @param nVarID - The ID of the floating point variable to set.
* @param fValue - The value of the variable to set.
* @sa GetLocalFloat()
* @author Jon Cooper
*/
void SetLocalFloat_ID( object oObject, int nVarID, float fValue ) = 185;
/** @brief Gets a local string variable on an object.
*
* Gets a local string variable sVarName on the specified
* object.
*
* @param oObject - Object to get the variable from.
* @param nVarID - The ID of the string variable to retrieve.
* @returns Returns the string variable, returns an empty string on error.
* @sa SetLocalString()
* @author Jon Cooper
*/
string GetLocalString_ID( object oObject, int nVarID ) = 180;
/** @brief Sets a local string variable on an object.
*
* Sets a local string variable sVarName on the specified
* object.
*
* @param oObject - Object to set the variable on.
* @param nVarID - The ID of the string variable to set.
* @param sValue - The value of the string variable.
* @sa GetLocalString()
* @author Jon Cooper
*/
void SetLocalString_ID( object oObject, int nVarID, string sValue ) = 181;
//////////////////////////////////////////////////////////////////
// String Manipulation
//////////////////////////////////////////////////////////////////
/** @brief
*
*Returns integer denoting number of characters in a string.
*
* @param sString - String data
* @author Sam Johnson
*/
int GetStringLength(string sString) = 51;
/** @brief
*
*Parses a string from a given index and counter to return a substring.
*
* @param sString - String data to parse. Case sensitive.
* @param nStart - Character number, index, from which to begin parsing
* @param nCount - The number of characters from start point to include in substring
* @author Sam Johnson
*/
string SubString(string sString, int nStart, int nCount) = 52;
//////////////////////////////////////////////////////////////////
// Output
//////////////////////////////////////////////////////////////////
/** @brief
*
*Script interface to the eclips probe system. Talk to Sam before using this command.
*
* @param sOutput - String data to output
* @author Sam Johnson
* @author Sam Johnson
*/
void Probe(string sOutput, float fValue = 0) = 37;
/** @brief
*
*Will display a string message in the Log Window.
*
* @param sMessage - String data to output
* @author Henry Smith
*/
void PrintToLogWindow(string sMessage) = 41;
/** @brief
*
*Output string data to the console through the debug channel.
*
* @param sOutput - String data to output
* @author Noel Borstad
*/
void PrintToConsole(string sOutput) = 28;
/** @brief
*
*Fires an assertion if a given test value is 0 and will display a string error message.
*
* @param nTestValue - Test value, must be 0 or 1
* @param sErrormessage - String error message to output
* @author Noel Borstad
*/
void Assert(int nTestValue, string sErrorMessage) = 9;
/** @brief
*
*Writes an output string to log file using nLogChannel = 0.
*
* @param sOutput - String data to output
* @author Noel Borstad
*/
void PrintToLog(string sOutput, int nLogChannel = 0) = 8;
/** @brief
*
*Writes an output string to log file using nLogChannel = 0 and echos the output to the screen
*
* @param sOutput - String data to output
* @param nLogChannel
* @author Noel Borstad
*/
void PrintToScreen( string sOutput, int nLogChannel = 0 ) = 19;
//////////////////////////////////////////////////////////////////
// Tokens
//////////////////////////////////////////////////////////////////
/** @brief
*
*Evaluates the token that is passed in and if it is valid returns the token value as an integer. Otherwise it returns -1;
*
* @param sToken - Token to resolve
* @author Ross Gardner
*/
int GetIntToken(string sToken) = 29;
/** @brief
*
*Evaluates the token that is passed in and if it is valid returns the token value as a float. Otherwise it returns -1;
*
* @param sToken - Token to resolve
* @author Ross Gardner
*/
float GetFloatToken(string sToken) = 30;
/** @brief
*
*Evaluates the token that is passed in and if it is valid returns the token value as a string. Returns "" if token did not exist;
*
* @param sToken - Token to resolve
* @author Ross Gardner
*/
string GetStringToken(string sToken) = 31;
/** @brief
*
*Evaluates the token passed in and if it is valid then it sets it to the value of the integer passed in. Returns 1 if the token attribute was set, 0 if it could not resolve it.
*
* @param sToken - Token who's attribute is to be set
* @param nValue - Integer value to set to token attribute
* @author Ross Gardner
*/
int SetIntToken(string sToken, int nValue) = 32;
/** @brief
*
*Evaluates the token passed in and if it is valid then it sets the token to the float value passed in. Returns 1 if the token attribute was set, 0 if it could not resolve it.
*
* @param sToken - Token who's attribute is to be set
* @param fValue - Float value to set to token attribute
* @author Ross Gardner
*/
int SetFloatToken(string sToken, float fValue) = 33;
/** @brief
*
*Evaluates the token passed in and if it exists then it sets it to the string passed in. Returns 1 if the token attribute was set, 0 if it could not resolve it.
*
* @param sToken - Token who's attribute is to be set
* @param sString - String data to set to token attribute
* @author Ross Gardner
*/
int SetStringToken(string sToken, string sString) = 34;
//////////////////////////////////////////////////////////////////
// Animation
//////////////////////////////////////////////////////////////////
/** @brief
*
*Returns the length, in seconds, of an animation.
*
* @param sAnimation - Animation to get its length
* @author Jose Ilitzky
*/
float GetAnimationLength(string sAnimation) = 45;
/** @brief
*
*Returns the event time, in seconds, for the specified animation.
*
* @param sAnimation - Animation
* @param nAnimEventId - Animation event ID
* @author Jose Ilitzky
*/
float GetAnimationEventTime(string sAnimation, int nAnimEventId) = 46;
//////////////////////////////////////////////////////////////////
// Actions
//////////////////////////////////////////////////////////////////
/** @brief
*
*Command the player character to attack a target object.
*
* @param o - Target object to attack
* @author Noel Borstad, Jose Ilitzky
*/
void PerformAttack(object o) = 22;
/** @brief
*
*Command the player character to execute a given ability.
*
* @param oCharacter - Player character object
* @param nAbilityId - Ability indentifier value
* @param oTarget - Target object, default is no object (OBJECT_INVALID)
* @param vTarget - Target vector, default is [0.0, 0.0, 0.0]
* @author Noel Borstad
*/
void PerformAbility(object oCharacter, int nAbilityId, object oTarget=OBJECT_INVALID, vector vTarget=[0.0,0.0,0.0]) = 26;
/** @brief
*
*Command player character to initiate dialog with a given object.
*
* @param o - Object with which to initiate dialog
* @author Gabriel Moreno-Fortuny
*/
void PerformDialog(object o, string sDlgName = "") = 40;
/** @brief
*
*Give target object's loot to the party.
*
* @param oObject - Target object to loot
* @author Mike Wellman
*/
void PerformLootObject(object oObject) = 77;
/** @brief
*
*Command character to use target object.
*
* @param o - Character object that will use target object
* @param t - Target object
* @author Noel Borstad
*/
void PerformUseObject(object o, object t) = 18;
/** @brief
*
*Command the player character to move to a given vector position.
*
* @param vPos - Vector position
* @author Noel Borstad
*/
void PerformWalkTo( vector vPos ) = 3;
/** @brief
*
*Sends a dialog reply, nLine, to the client to simulate a dialog response in a conversation.
*
* @param nLine - Response simulation, this value is 0-based thus: response 1 == nLine 0
* @author None Specified
*/
int SendDialogReply(int nLine) = 42;
/** @brief
*
* Returns the Active WeaponSet on the active creature, 1 or 0
*
* @author Sam Johnson
*/
int GetActiveWeaponSet() = 75;
/** @brief
*
* Switches the WeaponSet on the active Creature
* @param nWeaponSet - Switch to the specified WeaponSet (0 or 1)
* @author Sam Johnson
*/
void SwitchWeaponSet( int nWeaponSet = INVALID_WEAPON_SET ) = 76;
//////////////////////////////////////////////////////////////////
// Object Related
//////////////////////////////////////////////////////////////////
/** @brief Returns the nth specified object with the appropriate tag
*
* Returns the nth specified object with the appropriate tag
*
* @param sTag - The tag reference to get the object by
* @param nNth - If there are multiple objects with the same tag, get the 'nth' specified object.
* @returns the desired object or OBJECT_INVALID on failure
* @author Brenon
*/
object GetObjectByTag(string sTag, int nNth = 0) = 15;
/** @brief
*
*Returns a float value designating the distance between two objects.
*
* @param oObjectA - Any object
* @param oObjectB - Any object
* @author Noel Borstad
*/
float GetDistanceBetweenObjects(object oObjectA, object oObjectB) = 16;
/** @brief
*
*Returns the current health of a given object.
*
* @param o - An object
* @author Noel Borstad
*/
int GetCurrentHealth(object o) = 23;
/** @brief
*
*Return armour rating of given object.
*
* @param o - An object
* @author Noel Borstad
*/
int GetArmour(object o) = 24;
/** @brief
*
*Returns TRUE if the given object is dead.
*
* @param o - An object
* @author Noel Borstad
*/
int GetIsDead(object o) = 25;
/** @brief Gets the item in a creature's equip slot. Returns invalid object if no such object, slot, or weapon set exists.
*
* @param nSlot - the equip slot to be examined
* @param oCreature - the creature to examine
* @param nWeaponSet - the weapon set
* @author Dave Schaefer
*/
object GetItemInEquipSlot(int nSlot, object oCreature=OBJECT_SELF, int nWeaponSet = 0) = 7;
/** @brief
*
*Returns TRUE if given object is valid.
*
* @param o - An object
* @author Noel Borstad
*/
int GetIsObjectValid(object o) = 13;
/** @brief Returns the orientation of the object.
*
* Returns the orientation of the object in vector format.
*
* @param oTarget - Object to get the orientation from.
* @returns Returns a vector representing the orientation of the target object. Returns an empty vector on error.
* @sa SetOrientation(), SetFacing(), GetFacing(), SetFacingPosition(), SetFacingObject()
* @author Jon Cooper
*/
vector GetOrientation( object oTarget ) = 108;
/** @brief Sets the orientation of the target object.
*
* Sets the orientation of the target object.
*
* @param oTarget - Object to set the orientation for.
* @param vOrientation - Vector orientation to set for the object.
* @remarks If the target object is invalid or does not have an orientation then the function
* will fail.
* @sa GetOrientation(), SetFacing(), GetFacing(), SetFacingPosition(), SetFacingObject()
* @author Jon Cooper
*/
void SetOrientation( object oTarget, vector vOrientation ) = 107;
/** @brief Returns the position of an object.
*
* Returns a position vector containting the xyz coordinates of the object oTarget.
*
* @param oTarget - The Object to get the position of.
* @return Returns a vector containing the position of the specified object. Returns an empty vector on error.
* @sa SetPosition()
* @author Jon Cooper
*/
vector GetPosition( object oTarget ) = 14;
/** @brief Sets the position of an object.
*
* Sets the position of the object oObject to the xyz coordinates contained in the vector
* vPosition. If bSafePosition is set to TRUE, then a safe position will be computed based
* off of the vector vPosition and this position will be used. A safe position is a valid
* position on the nearest walkable mesh.
*
* @param oObject - The Object to set the position of.
* @param vPosition - The position vector containing the new coordinates.
* @param bSafePosition - Specifies whether a safe position should be calculated and used.
* @remarks If an invalid object is specified then the function will fail.
* @remarks If a non-creature object is specified, a safe position can not be computed
* for the object so vPosition will be used, regardless of whether or not it is safe.
* @remarks If a safe position cannot be found and the bSafePosition flag is set to TRUE,
* the function will fail.
* @sa GetPosition()
* @author Jon Cooper
*/
void SetPosition( object oObject, vector vPosition, int bSafePosition = TRUE ) = 109;
/** @brief
*
*Get the current animation of a given object.
*
* @param o - An object
* @author Noel Borstad
*/
int GetCurrentAnimation(object o) = 17;
/** @brief
*
*Equip the designated item object to the designated creature object, in the given item slot.
*
* @param oidCharacter - Creature object
* @param oidItem - Item object
* @param nSlot - Integer value representing slot
* @author Noel Borstad
*/
void EquipItem(object oidCharacter, object oidItem, int nSlot) = 5;
/** @brief
*
*Unequip the designated item object. THIS COMMAND IS NOT CURRENTLY IMPLEMENTED.
*
* @param oidItem - Item object to unequip
* @author Noel Borstad
*/
void UnequipItem(object oidItem) = 6;
/** @brief
*
*Command target object to play given animation.
*
* @param oObject - Target object
* @param nAnimation - Animation to play
* @author Jose Ilitzky
*/
void PlayFireAndForgetAnimation(object oObject, int nAnimation) = 44;
/** @brief
*
*Set an animation state on an object.
*
* @param oObject - Object to state animation state
* @param nAnimation - Animation state value to set
* @author Jose Ilitzky
*/
void SetAnimation(object oObject, int nAnimation) = 43;
/** @brief
*
*Toggles combat state of given object.
*
* @param oObject - Object to set combat state
* @param bState - State, accepts either TRUE or FALSE
* @author Jose Ilitzky
*/
void SetCombatState(object oObject, int bState) = 47;
/** @brief
*
*Returns the combat state of the object. Will return TRUE for enabled and FALSE for disabled.
*
* @param oObject - Object to check combat state
* @author Sam Johnson
*/
int GetCombatState(object oObject) = 53;
/** @brief
*
*Returns the given object's current visibility state. Note that deactivating an object does not change its visiblity state - visibility is always calculated as though the object were active.
*
* @param oObject - An object
* @author Sam Johnson
*/
int GetIsVisible(object oObject) = 64;
/** @brief
*
*Return room ID that target object is in. Returns -1 on error or invalid room.
*
* @param oObject - Target object
* @author Sam Johnson
*/
int GetRoomID(object oObject) = 66;
/** @brief
*
*Returns visibility state of the given room. 1 is visible, 0 is NOT visible, -1 is error.
*
* @param nRoomID - Room ID of room to check
* @author Sam Johnson
*/
int GetRoomVisibility(int nRoomID) = 67;
void LoadWaypoints() = 69;
/** @brief
*
*Returns the object's tag. Invalid objects return an empty string.
*
* @param oObject - any valid object.
* @author Sam Johnson
*/
string GetObjectTag(object oObject) = 70;
int IsHostileToPlayer(object oObject) = 71;
/** @brief Returns the list of effects that are currently applied to an object.
*
* Returns the list of effects that are currently applied to an object. This includes both
* temporary and permanent effects. The order of the events inside the list is meaningless.
*
* @param oObject - The object from which we try to get the effects list.
* @param nEffectType - Optionally only return an array of a specified EffectType. Default setting returns all applied effects.
* @param nAbilityId - Optionally filter the returned array to include only effects with a matching ability id (0 means no filter).
* @param nEffectId - Optionally filter the array by EffectId (-1 means no filter).
* @param nDurationType - Optionally filter the array by DurationType (EFFECT_DURATION_TYPE_INVALID means no filter).
* @author Jon Cooper
*/
effect[] GetEffects(object oObject, int nEffectType = EFFECT_TYPE_INVALID, int nAbilityId = 0, object oCreator = OBJECT_INVALID, int nDurationType = EFFECT_DURATION_TYPE_INVALID, int nEffectId = -1) = 73;
/** @brief
*
* Returns whether an effects is on the object, as filtered by filtering parameters
*
* @param oObject - the object to get the effects for
* @param nEffectType - the type of effects to return
* @param nAbilityID - the ability ID of effects to return
* @param oCreator - the creator of the effects to return
* @param nDurationType - the type of duration of the effects to return
* @param nEffectID - the effect ID of the effects to return
* @author Mike W
*/
//effect[] GetHasEffect(object oObject, int nEffectType, int nAbilityID, object oCreator, int nDurationType, int nEffectID) = 74;
/** @brief Enables or disables an object in the engine, both server and client
*
* Each game engine object has a boolean enabled or disabled flag in the engine.
In a "disabled" state, the object will not appear on the client visually, and
will receive no AI updates. GameEffects will remain on the object but all commands
will be cleared upon disabling.
*
* @param oObject - The object to set status on
* @param nActive - Non-zero is active, zero is inactive
* @param nAnimation - The ID of an appear/disappear animation to play
* @param nVFX - The ID of a VFX to add while the animation is playing
* @param nNextLine - queues up the command to run as soon as the next conversation line begins
* @author Jon Cooper
*/
void SetObjectActive(object oObject, int nActive, int nAnimation = 0, int nVFX = 0, int nNextLine = 0) = 95;
/** @brief Queries the active status of an object
*
* Each game engine object has a boolean enabled or disabled flag in the engine.
In a "disabled" state, the object will not appear on the client visually, and
will receive no AI updates. Messages will continue to queue up so you are
able to assign actions before enabling the object.
*
* @param oObject - The object query status on
* @returns non-zero if active, zero if inactive
* @author Jon Cooper
*/
int GetObjectActive(object oObject) = 94;
/** @brief Gets the module object id
*
* Gets the module object id
*
* @returns module object id
* @author Jon Cooper
*/
object GetModule() = 84;
/** @brief Returns an array of hostile creatures
*
* Returns an array of hostile creatures
*
* @param oCreature - Creature to test against
* @param obHostile - Filter to only retrieve hostile creatures.
* @author Jon Cooper
*/
object[] GetPerceivedCreatureList( object oCreature, int bHostile = 0 ) = 96;
/** @brief Returns if CreatureA perceives CreatureB
*
* Returns true if CreatureB exists on CreatureA's perception list. This is a cheap check
* against the perception list, it does not perform expensive line of sight checking.
*
* Note: Returns FALSE if A or B are not creatures or invalid.
*
* @param oidA - Creature who is perceiving
* @param oidB - Creature who is being perceived (or not)
* @author Jon Cooper
*/
int IsPerceiving(object oidA, object oidB) = 106;
/** @brief Delete all entries in the perception list of a creature
*
* @param oPerceiver - The creature for which the perception list will be reset
* @author Jon Cooper
*/
void ClearPerceptionList(object oPerceiver) = 105;
/** @brief Get the specified attribute from oCreature
*
* Get oCreature's Property value.
* Property types have slightly different definitions of each of the 4 value types.
* A SIMPLE or DERIVED property has a BASE and TOTAL value as the same number and
* doesnt have CURRENT or MODIFIER.
* An ATTRIBUTE property has a BASE value and a MODIFIER value. Its TOTAL value
* is the clamped (between its min and max) sum of the BASE plues the MODIFIER.
* A DEPLETABLE property is similar to an ATTRIBUTE property but in addition has
* a CURRENT value, which must be between the property min and the TOTAL value.
* Properties are defined in Properties.xls.
*
* @param oCreature - the creature whose stat is being requested
* @param nProperty - the property (stat) we want to know about
* @param nValueType - the type of value of the property we want to know about (TOTAL, BASE, CURRENT, MODIFIER)
* @returns Returns oCreature's Attribute Value
* @author Jon Cooper
*/
float GetCreatureProperty( object oCreature, int nProperty, int nValueType = PROPERTY_VALUE_TOTAL ) = 97;
/** @brief Set the specified value of a given property on a oCreature
*
* Sets the specified value of the selected property on a creature.
* Doesnt work for TOTAL values. Use BASE instead. See GetCreatureProperty for more details
*
* @param oCreature - the creature whose property we want to set.
* @param nProperty - the property (stat) we want to modify.
* @param nValueType - the type of value of the property we want to modify (BASE, CURRENT, MODIFIER)
* @returns Returns oCreature's Attribute Value
* @author Jon Cooper
*/
void SetCreatureProperty( object oCreature, int nProperty, float fNewValue, int nValueType = PROPERTY_VALUE_BASE) = 98;
/** @brief Returns the position of a substring within a string.
*
* Returns the starting index of the first occurence of the substring sSubstring within the string sString
* beginning at position nStart. Returns -1 if the string sSubstring does not occur in the string sString
* after position nStart. The result is 0 indexed, meaning this function will return 0 if the substring
* occurs at the very beginning of the string.
*
* @param sString - The string to search.
* @param sSubString - The substring to search for.
* @param nStart - The position to start the search from.
* @returns Returns the position of the substring, returns -1 on error.
* @author Jon Cooper
*/
int FindSubString( string sString, string sSubString, int nStart = 0) = 83;
/** @brief Converts a string to uppercase.
*
* Returns a string that is exactly the same as sString except all letters are converted to upper case.
*
* @param sString - The string to convert to upper case.
* @returns Returns the string converted to uppercase. Returns an empty string on error.
* @author Jon Cooper
*/
string StringUpperCase( string sString ) = 85;
/** @brief Converts a string to lowercase.
*
* Returns a string that is exactly the same as sString except all letters are converted to lower case.
*
* @param sString - The string to convert.
* @returns Returns the string converted to lowercase, returns an empty string on error.
* @author Jon Cooper
*/
string StringLowerCase( string sString ) = 86;
/** @brief Returns the resref of the specified object
*
* Returns the resref of the specified object
*
* @param oObject - the object to get the resref off of
* @returns the resref of the object or an empty string on failure.
* @author Jon Cooper
*/
string GetResRef( object oObject ) = 111;
/** @brief This function gets the combat target of a creature
*
* This function gets the combat target of a creature. This target is set when using an attack or
* ability command and is cleared (to target invalid) when combat state is set to false.
*
* @param oCreature - the creature whose combat target we are querying
* @returns the id of the creature's target. Will be invalid if the creature has no target.
* @sa GetAttackTarget
* @author Jon Cooper
*/
object GetAttackTarget(object oCreature) = 112;
//////////////////////////////////////////////////////////////////
// Player
//////////////////////////////////////////////////////////////////
/** @brief
*
*Returns integer denoting the amount of members in the player's party.
*
* @author Sophia Smith
*/
int GetPartySize() = 35;
/** @brief
*
*Returns the currently selected character object.
*
* @author Noel Borstad
*/
object GetSelectedCharacter(int nChar = 0) = 11;
/** @brief
*
*Returns the currently controlled character object.
*
* @author Noel Borstad
*/
object GetControlledCharacer(int nChar = 0) = 12;
//////////////////////////////////////////////////////////////////
// 2DAs
//////////////////////////////////////////////////////////////////
/** @brief
*
*Returns a resource from a 2DA XLS file.
*
* @param n2DA - Constant referencing the desired 2DA XLS file
* @param sColumn - String referencing a column of the 2DA XLS file
* @param nRow - Integer value referencing a row of the 2DA XLS file
* @author Sam Johnson
*/
resource Get2DAResource( int n2DA, string sColumn, int nRow) = 55;
/** @brief
*
*Returns a string data from a 2DA XLS file.
*
* @param n2DA - Constant referencing the desired 2DA XLS file
* @param sColumn - String referencing a column of the 2DA XLS file
* @param nRow - Integer value referencing a row of the 2DA XLS file
* @author Sam Johnson
*/
string Get2DAString( int n2DA, string sColumn, int nRow) = 56;
/** @brief
*
*Returns an integer value from a 2DA XLS file.
*
* @param n2DA - Constant referencing the desired 2DA XLS file
* @param sColumn - String referencing a column of the 2DA XLS file
* @param nRow - Integer value referencing a row of the 2DA XLS file
* @author Sam Johnson
*/
int Get2DAInt( int n2DA, string sColumn, int nRow) = 57;
/** @brief
*
*Returns a float value from a 2DA XLS file.
*
* @param n2DA - Constant referencing the desired 2DA XLS file
* @param sColumn - String referencing a column of the 2DA XLS file
* @param nRow - Integer value referencing a row of the 2DA XLS file
* @author Sam Johnson
*/
float Get2DAFloat( int n2DA, string sColumn, int nRow) = 58;
/** @brief
*
*Returns the number of rows in a 2DA XLS file.
*
* @param n2DA - Constant referencing the desired 2DA XLS file
* @author Sam Johnson
*/
int Get2DARows(int n2DA) = 59;
/** @brief
*
*Returns the number of columns in a 2DA XLS file.
*
* @param n2DA - Constant referencing the desired 2DA XLS file
* @author Sam Johnson
*/
int Get2DAColumns(int n2DA) = 60;
/** @brief Returns a value from a 2DA in string format.
*
* Returns a 2DA string based on the specified Row and Column values.
*
* @param n2DA - The 2DA to access
* @param sColumn - The name of the column to access
* @param nRow - The 0 based index of the row to access
* @param s2da - (optional) if n2da is -1 and this is a valid resource, it will retrieve
* the 2da based on the name instead of the index. Note that this should be avoided
* when possible.
* @return Returns the string specified by the parameters. Returns an empty string on error.
* @author Jon Cooper
*/
string GetM2DAString( int n2DA, string sColumn, int nRow, string s2DA = "" ) = 99;
/** @brief Returns a resource from a 2DA.
*
* Returns a 2DA resource on the specified Row and Column values.
*
* @param n2DA - The 2DA to access
* @param sColumn - The name of the column to access
* @param nRow - The 0 based index of the row to access
* @param s2da - (optional) if n2da is -1 and this is a valid resource, it will retrieve
* the 2da based on the name instead of the index. Note that this should be avoided
* when possible.
* @return Returns a resource specified by the parameters.
* @author Jon Cooper
*/
resource GetM2DAResource( int n2DA, string sColumn, int nRow, string s2da = "" ) = 100;
/** @brief Returns a 2DA value in integer format.
*
* Returns a 2DA integer based on the specified Row and Column values.
*
* @param n2DA - The 2DA to access
* @param sColumn - The name of the column to access
* @param nRow - The 0 based index of the row to access
* @param s2da - (optional) if n2da is -1 and this is a valid resource, it will retrieve
* the 2da based on the name instead of the index. Note that this should be avoided
* when possible.
* @return Returns the int specified by the parameters. Returns 0.
* @sa Set2DAInt()
* @author Jon Cooper
*/
int GetM2DAInt( int n2DA, string sColumn, int nRow, string s2da = "" ) = 101;
/** @brief Returns a 2DA value in float format.
*
* Returns a 2DA integer based on the specified Row and Column values.
*
* @param n2DA - The 2DA to access
* @param sColumn - The name of the column to access
* @param nRow - The 0 based index of the row to access
* @param s2da - (optional) if n2da is -1 and this is a valid resource, it will retrieve
* the 2da based on the name instead of the index. Note that this should be avoided
* when possible.
* @return Returns the float specified by the parameters.
* @author Jon Cooper
*/
float GetM2DAFloat(int n2DA, string sColumn, int nRow, string s2DA = "") = 102;
/** @brief Returns the number of rows in the specified 2da.
*
* Returns the number of rows in the specified 2da.
*
* @param n2DA - The 2DA to access.
* @param s2da - (optional) if n2da is -1 and this is a valid resource, it will retrieve
* the 2da based on the name instead of the index. Note that this should be avoided
* when possible.
* @returns Returns the number of rows in the 2DA, returns 0 on error.
* @author Jon Cooper
*/
int GetM2DARows( int n2DA, string s2DA = "" ) = 103;
/** @brief Returns the number of columns in the specified 2da.
*
* Returns the number of columns in the specified 2da.
*
* @param n2DA - The 2DA to access.
* @returns Returns the number of columns in the 2DA, returns 0 on error.
* @sa Get2DARows()
* @author Jon Cooper
*/
int GetM2DAColumns( int n2DA ) = 104;
//////////////////////////////////////////////////////////////////
// GUIs
//////////////////////////////////////////////////////////////////
/** @brief
*
* Prints the entire movieclip hierarchy (starting at _root) of the
* given movie.
*
* @param sMovieName - The name of the movie to print the hierarchy of.
* @author Henry Smith
*/
void GUIPrintHierarchy(string sMovieName) = 78;
/** @brief
*
* Finds an element (movieclip) in the given movie by name or path.
* If the name has a dot in it, it is assumed to be a path.
*
* @param sMovieName - The name of the movie to search in.
* @param sElementNameOrPath - The name or path of the element to find.
* @author Henry Smith
*/
int GUIFindElement(string sMovieName, string sElementNameOrPath) = 79;
/** @brief
*
* Calls an ActionScript function in the given movie.
*
* @param sMovieName - The movie to call the function in.
* @param sElementNameOrPath - The element name or path to call the function on.
* @param sFunctionName - Name of the function to call.
* @author Henry Smith
*/
void GUICallFunction(string sMovieName, string sElementNameOrPath, string sFunctionName) = 80;
/** @brief Gets all items in an object inventory
*
* Provides access to a creature's or placeable's inventory and equipped items.
*
* @param oObject - A creature or placeable with an inventory
* @param nGetItemOptions - A GET_ITEMS_* constant. THIS IS NOT A BITFIELD!
* @param nBaseItemType - Return only items with base item type matching. 0 to disable this filter. (find types in \tag\main\data\Source\2DA\rules\BITM_base.xls)
* @param sFilterTag - Return only items with a matching tag. "" to disable this filter.
*
* @author Dave Schaefer
*/
object[] GetItemsInInventory( object oObject, int nGetItemsOptions = GET_ITEMS_OPTION_ALL, int nBaseItemType = 0, string sTagFilter = "") = 81;
/** @brief Converts an object to a string.
*
* Returns the unique ID number of the object oObject in string form.
*
* @param oObject - The object to convert.
* @returns Returns the string representation of the object. Returns an empty string on error.
* @author Brenon
*/
string ObjectToString( object oObject ) = 82;
/** @brief Returns the name of the currently executing script
*
* Returns the name of the currently executing script for debugging purposes.
*
* @return string with the name of the current script.
* @author Jon Cooper
*/
string GetCurrentScriptName() = 110;
/** @brief This function returns the size of an object command queue, note that the currently active command doesn't belong in the queue.
*
* This function returns the size of an object command queue, note that the currently active command doesn't belong in the queue.
*
* @param oObject - returns the size of this objects command queue
* @returns int
* @author Jon Cooper
*/
int GetCommandQueueSize(object oObject) = 113;
/** @brief This function adds the specified command to the object.
*
* This function adds the specified command to the object command queue.
* The command can be added to the back of the queue or to the front, and can also be
* flagged as static (must-finish command).
*
* @param oObject - the object to add the specified command
* @param cCommand - the command to add to the object
* @param bAddToFront - specifies if the command should be added to the front of the queue or not
* @param bStatic - whether or not the command will be added as a static command. Static commands are flagged in a special manner and cannot be removed via regular clearing functionality. An override must specifically be specified to remove static commands. As such, commands should only be specified as static if they absolutely must finish.
* @param nOverrideAddBehavior - replace the default add behavior by specifying a new behavior here
* @returns TRUE on success, FALSE on failure
* @remarks Any duplicate commands in the queue that are adjacent to one another are deleted.
* @author Jon Cooper
*/
int AddCommand( object oObject, command cCommand, int bAddToFront = FALSE, int bStatic = FALSE, int nOverrideAddBehavior = -1 ) = 114;
/** @brief This function is a move to object command constructor. The object executing the command will only use the position and disregard the target object orientation.
*
* This function is a move to object command constructor.
* It creates a move to object command which can then be added to any
* object's command queue. This command, when processed will attempt to
* move the creature to target object.
*
* @param oTarget - the object the command should move the creature to
* @param bRunToLocation - specifies whether the object should run or not
* @param fMinRange - The closest to the object we can be
* @param bUseOriginalPosition - Even if the target is moving, use the original position
* @returns a valid command
* @remarks Only creatures can move, non-creature objects that have a move command assigned to them will fail the command when attempting to process it.
* @author Jon Cooper
*/
command CommandMoveToObject( object oTarget, int bRunToLocation = TRUE, float fMinRange = 0.0f, int bUseOriginalPosition = FALSE ) = 115;
/** @brief Returns a random float.
*
* Returns a random floating point value between 0.0 and 1.0.
*
* @returns Returns a floating point value between 0.0 and 1.0.
* @author Jon Cooper
*/
float RandomFloat() = 116;
/** @brief Determines if a string is empty.
*
* Returns TRUE if the string sString is an empty string.
*
* @param sString - The string which may be empty.
* @returns Returns TRUE if the string is an empty string, FALSE otherwise.
* @author Jon Cooper
*/
int IsStringEmpty( string sString ) = 117;
/** @brief Gets the weapon style used by a creature
*
* @param oCreature - the creature whose weapon style we are querying
* @returns the weapon style (0 - none, 1 - single (with or without shield), 2 - dual, 3 - two handed)
* @sa GetWeaponStyle
* @author Jon Cooper
*/
int GetWeaponStyle(object oCreature) = 118;
/** @brief Modify creature's Stealth state
*
* @param oCreature - oid of creature we want to modify
* @param nEnabled - true or false
* @author Jon Cooper
**/
void SetStealthEnabled(object oCreature, int nEnabled) = 119;
/** @brief Returns creature's stealth state
*
* @param oCreature - oid of creature of interest
* @author Jon Cooper
**/
int GetStealthEnabled(object oCreature) = 127;
/** @brief Sets the tag of the object to the specified value.
*
* Sets the tag of the object to the specified value.
*
* @param oObject - the object to set the tag on
* @param sTag - the tag to set the object
* @author Jon Cooper
*/
void SetObjectTag( object oObject, string sTag ) = 120;
/** @brief Sets the state for a specified placeable object.
*
* Sets the state for this placeable, but only if the state is a valid one
* for the placeable itself as defined by the state controller. The placeable states are defined in the placeables.xls file in override.
*
* @param oPlaceable - The placeable to set the state on
* @param nState - The state to set on the placeable
* @sa GetPlaceableState()
* @author Jon Cooper
*/
void SetPlaceableState( object oPlaceable, int nState ) = 121;
/** @brief Gets the state of the specified placeable object.
*
* Returns the current state of a specified placeable object. The state
* will be a valid state defined by the state controller for the
* specified placeable. The placeable states are defined in the placeables.xls file in override.
*
* @param oPlaceable - The placeable to get the state of
* @returns Returns the state of the placeable object
* @sa SetPlaceableState()
* @author Jon Cooper
*/
int GetPlaceableState( object oPlaceable ) = 126;
/** @brief Determines if an object is in a trigger.
*
* Returns TRUE if the object oObject is within the trigger oTrigger, otherwise returns FALSE.
*
* @param oObject - The object which may be within the trigger.
* @param oTrigger - The trigger the object may be within.
* @returns TRUE if the object oObject is in the trigger oTrigger.
* @author Jon Cooper
*/
int InTrigger( object oObject, object oTrigger ) = 122;
/** @brief Determines if there is a line of sight between two objects.
*
* Returns TRUE if there is a clear line of sight between object oSource and object oTarget, otherwise returns FALSE.
* If the line is occluded by geometry then the function will return FALSE. If the two objects are not in the same
* area or if either object is invalid this function will return FALSE.
*
* @param oSource - The first object.
* @param oTarget - The second object.
* @returns Returns TRUE if there is a clear line of sight between the two objects. Returns FALSE if there is not.
* @remarks It should be noted that the function is somewhat expensive and should not be called in an inner loop of your script.
* @sa CheckLineOfSightVector()
* @author Jon Cooper
*/
int CheckLineOfSightObject( object oSource, object oTarget ) = 123;
/** @brief Adds the specified ability to oCreature
*
* Give oCreature the specified ability
*
* @param oCreature - the creature
* @param nAbilityID - the ability identifier
* @author Jon Cooper
*/
void AddAbility( object oObject, int nAbility, int bSendNotification = FALSE ) = 124;
/** @brief Determine whether oCreature has nAbilityID in their list of abilities
*
* Determine whether oCreature has nAbilityID in their list of abilities
*
* @param oCreature - the creature
* @param nAbilityID - the ability identifier
* @returns Returns TRUE if oCreature has the specified ability
* @author Jon Cooper
*/
int GetHasAbility( object oObject, int nAbility ) = 125;
/** @brief Returns the ID of an effect.
*
* Returns the internal unique ID of an effect.
*
* @param eEffect - The effect
* @author Jon Cooper
*/
int GetEffectID(effect eEffect) = 128;
/** @brief Is this effect valid?
*
* Tests to see if an effect is valid
*
* @param eEffect - the effect to be tested
* @author Jon Cooper
*/
int IsEffectValid(effect eEffect) = 129;
/** @brief Get the remaining time for an ability to be used
*
* @param oCreature - owner of the ability
* @param nAbilityId - ability to check the cooldown
* @param sSourceItemTag - if an item ability, specify the specific item providing the ability. If an empty string, the engine will grab the first item with this ability, this may not be the desired intention if the player has several items with the same ability.
* @returns 0.0f if the ability is ready to be used again
* @sa SetCooldown
* @author Jon Cooper
*/
float GetRemainingCooldown(object oCreature, int nAbilityId, string sSourceItemTag = "") = 130;
/** @brief Returns the the gore level of a creature as a float between 0 and 1
*
*
* @author Jon Cooper
*/
float GetCreatureGoreLevel( object oCreature ) = 131;
/** @brief Converts a string to a floating point number.
*
* Converts a string to a floating point number.
*
* @param sNumber - The string to convert.
* @returns Returns the floating point value in the specified string.
* @sa FloatToString(), StringToInt(), StringToVector()
* @author Jon Cooper
*/
float StringToFloat( string sNumber ) = 132;
/** @brief Returns the hero player
*
*
* @author Jon Cooper
*/
object GetHero() = 133;
/** @brief
*
*Returns an object reference for the area oObject is in.
*
* @param oObject - Target object
* @author Jon Cooper
*/
object GetArea( object oObject ) = 134;
/** @brief Sets an object to be unable to drop below 1 health
*
* NOTE: This is the engine function, you should not use it. Use cwrapper_h.SetImmortal intead
*
* @param oObject - The object to set the visibilty for.
* @param bImmortal - The state to set.
* @author Jon Cooper
*/
void Engine_SetImmortal( object oObject, int bImmortal ) = 135;
/** @brief Returns the cosine of an angle.
*
* Returns the cosine of the float fValue. fValue is an angle in radians.
*
* @param fValue - The angle in radians.
* @returns The cosine of the angle in radians.
* @sa sin(), tan(), acos(), asin(), atan()
* @author Jon Cooper
*/
float cos( float fValue ) = 136;
/** @brief Returns the sine of an angle.
*
* Returns the sine of the float fValue. fValue is an angle in radians.
*
* @param fValue - The angle in radians.
* @returns The sine of the angle in radians.
* @sa cos(), tan(), acos(), asin(), atan()
* @author Jon Cooper
*/
float sin( float fValue ) = 137;
/** @brief Returns the tangent of an angle.
*
* Returns the tangent of the float fValue. fValue is an angle in radians.
*
* @param fValue - The angle in radians.
* @returns The tangent of the angle in radians.
* @sa cos(), sin(), acos(), asin(), atan()
* @author Jon Cooper
*/
float tan( float fValue ) = 138;
/** @brief Returns the arccosine of an angle.
*
* Returns the arccosine of the float fValue. fValue is an angle in radians.
*
* @param fValue - The angle in radians.
* @returns The arccosine of the angle in radians.
* @sa cos(), sin(), tan(), asin(), atan()
* @author Jon Cooper
*/
float acos( float fValue ) = 139;
/** @brief Returns the arcsine of an angle.
*
* Returns the arcsine of the float fValue. fValue is an angle in radians.
*
* @param fValue - The angle in radians.
* @returns The arcsine of the angle in radians.
* @sa cos(), sin(), tan(), acos(), atan()
* @author Jon Cooper
*/
float asin( float fValue ) = 140;
/** @brief Returns the arctangent of an angle.
*
* Returns the arctangent of the float fValue. fValue is an angle in radians.
*
* @param fValue - The angle in radians.
* @returns The arctangent of the angle in radians.
* @sa cos(), sin(), tan(), acos(), asin()
* @author Jon Cooper
*/
float atan( float fValue ) = 141;
/** @brief Returns the party list for the creature
*
*
* @param oObject - The object to test for returning the party
* @author Jon Cooper
*/
object[] GetPartyList(object oCreature=-1) = 142;
/** @brief Gets the material type of an item
*
* returns the material type of an item
*
* @param oItem - An Item Object
* @author Jon Cooper
*/
int GetItemMaterialType( object oItem) = 143;
/** @brief Moves the entire party into an area
*
* This function will do an area transtion if the target area is within the same area
* list of the current area OR if the target area is in a different area list then
* it will unload the current area list and load into memory (with a loading bar)
* a new area list. The party will then be jumped to the specified waypoint (if it exists)
*
* @param sArea - tag of the target area
* @param sWaypointTag - tag of the target waypoint
* @returns 1 for success, 0 for failure (area list does not exist or area does not exist)
* @remarks this function will jump ALL party members
* @author Jon Cooper
*/
int DoAreaTransition( string sArea, string sWaypointTag ) = 144;
/** @brief Shows the Item upgrade GUI
* @author Jon Cooper
*/
void OpenItemUpgradeGUI() = 145;
/** @brief Get the treasure rank.
*
* @param oPlaceable - The placeable.
* @author Jon Cooper
*/
int GetPlaceableTreasureRank(object oPlaceable) = 146;
/** @brief Returns the rank of a creature
*
* Returns the CreatureRank of a creature, representing its relative combat difficulty.
*
* @param oCreature - The creature
* @returns The CREATURE_RANK_* constant associated with the creature.
* @author Jon Cooper
*/
int GetCreatureRank (object oCreature) = 147;
/** @brief Get amount of money a creature or placeable posseses
*
* Gets amount of money a creature or placeable posseses
*
* @param oTarget - the target creature or placeable
* @author Jon Cooper
*/
int GetMoney (object oTarget=OBJECT_SELF) = 148;
/** @brief Returns N nearest object of a specific type, with a specifc tag
*
* Returns N nearest object of a specific type, with a specifc tag
*
* @param * oObject - target Object
* @param * nObjectType - type for the objects to query for their distance
* @param * sTag - Tag for the objects to query
* @param * nNumberOfObjects (optional) - Number of objects to return
* @param * nCheckLiving (optional) - only returns objects if they are alive
* @param * nCheckPerceived (optional) - only returns objects if they are within the perception radius.
* @author Jon Cooper
*/
object[] GetNearestObjectByTag( object oObject, string sTag, int nObjectType = OBJECT_TYPE_ALL, int nNumberOfObjects = 1, int nCheckLiving = 0, int nCheckPerceived = 0, int nIncludeSelf = 0 ) = 149;
/** @brief Returns N nearest objects of a specific type
*
* Returns N nearest object of a specific type
*
* @param * oObject - target Object
* @param * nObjectType - type for the objects to query for their distance
* @param * nNumberOfObjects (optional) - Number of objects to return
* @param * nCheckLiving (optional) - only returns objects if they are alive
* @param * nCheckPerceived (optional) - only returns objects if they are within the perception radius.
* @author Jon Cooper
*/
object[] GetNearestObject( object oObject, int nObjectType = OBJECT_TYPE_ALL, int nNumberOfObjects = 1, int nCheckLiving = 0, int nCheckPerceived = 0, int nIncludeSelf = 0) = 150;
/** @brief Returns N nearest object of a specific type, with a specifc Group Id
*
* Returns N nearest object of a specific type, with a specifc Group Id
*
* @param * oObject - target Object
* @param * nObjectType - type for the objects to query for their distance
* @param * nGroupId - Group Id for the objects to query
* @param * nNumberOfObjects (optional) - Number of objects to return
* @param * nCheckLiving (optional) - only returns objects if they are alive
* @param * nCheckPerceived (optional) - only returns objects if they are within the perception radius.
* @author Jon Cooper
*/
object[] GetNearestObjectByGroup( object oObject, int nGroupId, int nObjectType = OBJECT_TYPE_ALL, int nNumberOfObjects = 1, int nCheckLiving = 0, int nCheckPerceived = 0, int nIncludeSelf = 0 ) = 151;
/** @brief Returns N nearest object of a specific type, with a specifc Hostility
*
* Returns N nearest object of a specific type, with a specifc Hostility
*
* @param * oObject - target Object
* @param * nObjectType - type for the objects to query for their distance
* @param * nHostility - Hostility for the objects to query (true/false)
* @param * nNumberOfObjects (optional) - Number of objects to return
* @param * nCheckLiving (optional) - only returns objects if they are alive
* @param * nCheckPerceived (optional) - only returns objects if they are within the perception radius.
* @author Jon Cooper
*/
object[] GetNearestObjectByHostility( object oObject, int nHostility, int nObjectType = OBJECT_TYPE_ALL, int nNumberOfObjects = 1, int nCheckLiving = 0, int nCheckPerceived = 0, int nIncludeSelf = 0 ) = 152;
/** @brief N nearest objects of a specific type to a Location
*
* Returns N nearest objects of a specific type to a Location
*
* @param * Location - target Location
* @param * nObjectType - type for the objects to query for their distance
* @param * nNumberOfObjects (optional) - Number of objects to return
* @author Jon Cooper
*/
object[] GetNearestObjectToLocation( location lLocation, int nObjectType = OBJECT_TYPE_ALL, int nNumberOfObjects = 1 ) = 153;
/** @brief Verifies of a target object is visible to the player
*
* Returns 1 if an object is visible, otherwise 0
*
* @param * oTarget - target object
* @author Jon Cooper
*/
int GetObjectVisibility( object oTarget ) = 154;
/** @brief Gets the ID of a visual effect
*
* Returns the id of a visual effect, otherwise 0
*
* @param effect VFX
* @author Jon Cooper
*/
int GetVisualEffectId( effect eVFX ) = 155;
/** @brief Fire a projectile from a specified source point to a target position
*
* @param nType the projectile type (see the PRJ 2da)
* @param vSourcePosition start position for the projectile
* @param vTargetPosition end position to hit
* @param nCrustEffectId crust vfx to apply to the projectile
* @param bWideAngle enable this to make the projectile follow a longer trajectory
* @param oEventTarget object to send the impact event to
* @returns projectile id
* @sa FireHomingProjectile, SetProjectileImpactEvent
* @author Jon Cooper
*/
object FireProjectile(int nType, vector vSourcePosition, vector vTargetPosition, int nCrustEffectId = 0, int bWideAngle = FALSE, object oEventTarget = OBJECT_INVALID) = 156;
/** @brief Fire a tracking projectile from a specified source point to a target object
*
* @param nType the projectile type (see the PRJ 2da)
* @param vSourcePosition start position for the projectile
* @param oTarget object to follow and hit
* @param nCrustEffectId crust vfx to apply to the projectile
* @param oEventTarget object to send the impact event to
* @returns projectile id
* @sa FireProjectile, SetProjectileImpactEvent
* @author Jon Cooper
*/
object FireHomingProjectile(int nType, vector vSourcePosition, object oTarget, int nCrustEffectId = 0, object oEventTarget = OBJECT_INVALID) = 157;
/** @brief Sets a tactic entry for a party member
*
* @author Jon
*/
void SetTacticEntry(object oCreature, int nIndex, int nEnabled, int nTargetType, int nCondition, int nCommandType, int nCommandParam = 0) = 158;
/** @brief Sets the number of tactics available.
*
* @param oCreature - the creature to query.
* @param nNumTactics - the number of tactics that can be set by the user.
* @author Jon
*/
void SetNumTactics(object oCreature, int nNumTactics, int bSendNotification = FALSE) = 159;
/** @brief Changes the primary controlled creature if they are in the active party.
* Calling this implicitly makes that creature controllable if it was
* previously set as uncontrollable.
* @author Jon
*/
void SetPrimaryControlled(object oFollower) = 160;
/** @brief Get the body bag placeable associated with this creature..
*
* @author Jon
*/
object GetCreatureBodyBag(object oCreature) = 161;
/** @Returns an array with all objects in an area.
*
* Returns an array with all objects in an area. You can also specify
* a tag so the array only has all objects with that tag in that area.
* Check the size afterwards with GetArraySize.
*
* @param oArea - an area object.
* @param sTag - If specified, only objects will this tag will be returned.
* @author Jon
*/
object[] GetObjectsInArea(object oArea, string sTag = "") = 162;
/** @brief Returns an object's type.
*
* Returns the object type of the object oObject. Object types are constants (OBJECT_TYPE_*). Returns OBJECT_TYPE_INVALID on failure.
*
* @param oObject - the object to get the type of
* @returns One of the object type constants (OBJECT_TYPE_*) or OBJECT_TYPE_INVALID on failure.
* @author Jon
*/
int GetObjectType( object oObject ) = 163;
/** @brief Returns whether the creature or placeable can be interacted with.
*
* @author Jon
*/
int GetObjectInteractive(object oObject) = 164;
/** @brief Gets the base type of the placeable.
*
* @param oPlaceable - The placeable to get the type from
* @author Jon
*/
int GetPlaceableBaseType(object oPlaceable) = 165;
/** @brief Gets the BaseItemType of an item
*
* returns the base item type of an item as BASE_ITEM_*
*
* @param oItem - An Item Object
* @author Jon
*/
int GetBaseItemType(object oItem) = 166;
/** @brief Get the treasure category.
*
* @param oCreature - The creature.
* @author Jon
*/
int GetCreatureTreasureCategory(object oCreature) = 167;
/** @brief Get the treasure category.
*
* @param oPlaceable - The placeable.
* @author Jon
*/
int GetPlaceableTreasureCategory(object oPlaceable) = 168;
/** @brief Retrive the base value of an item.
*
* @author Jon
*/
int GetItemValue(object oItem) = 169;
/** @brief Gets a creature's racial type
*
* Gets a creature's racial type.
*
* @param oCreature - The creature whose racial type we get
* @author Jon
*/
int GetCreatureRacialType( object oCreature ) = 170;
/** @brief Returns whether or not the player has unlocked the specified achievement.
*
* @author Jon
*/
int GetHasAchievementByID(int nID) = 171;
/** @brief Opens a log file for output from WriteToLogFile command.
* Note: Use / for path separators.
*
* @author Paul R
*/
void OpenLogFile(string sFilePath) = 172;
/** @brief Writes out a log entry to the log. The Channels are for Deja. (0,1,3,500)
*
* @author Paul R
*/
void WriteToLogFile(string sLogEntry, int nChannel = 0) = 173;
////////////////////////////////////////////////////////
//
// SCRIPT.LDF
//
// The list of actions and pre-defined constants.
//
// (c) BioWare Corp, 2007
//
////////////////////////////////////////////////////////
// Mark Says: Do not mess with these defines...
#define ENGINE_NUM_STRUCTURES 6
#define ENGINE_STRUCTURE_0 event
#define ENGINE_STRUCTURE_1 location
#define ENGINE_STRUCTURE_2 command
#define ENGINE_STRUCTURE_3 effect
#define ENGINE_STRUCTURE_4 itemproperty
#define ENGINE_STRUCTURE_5 player
#define SOURCE_FILE_EXTENSION nss
#define COMPILED_FILE_EXTENSION ncs
#define DEBUGGER_FILE_EXTENSION ndb
// Constants
int TRUE = 1;
int FALSE = 0;
float PI = 3.141592f;
// Facing directions
float DIRECTION_NORTH = 180.0f;
float DIRECTION_EAST = 270.0f;
float DIRECTION_SOUTH = 0.0f;
float DIRECTION_WEST = 90.0f;
// Weapon Styles
int WEAPONSTYLE_NONE = 0;
int WEAPONSTYLE_SINGLE = 1;
int WEAPONSTYLE_DUAL = 2;
int WEAPONSTYLE_TWOHANDED = 3;
// Area of effect shapes
int SHAPE_INVALID = 0;
int SHAPE_SPHERE = 1;
int SHAPE_CONE = 2;
int SHAPE_RECTANGLE = 3;
// Object types
int OBJECT_TYPE_INVALID = 0;
int OBJECT_TYPE_GUI = 1;
int OBJECT_TYPE_TILE = 2;
int OBJECT_TYPE_MODULE = 4;
int OBJECT_TYPE_AREA = 8;
int OBJECT_TYPE_STORE = 16;
int OBJECT_TYPE_CREATURE = 32;
int OBJECT_TYPE_ITEM = 64;
int OBJECT_TYPE_TRIGGER = 128;
int OBJECT_TYPE_PROJECTILE = 256;
int OBJECT_TYPE_PLACEABLE = 512;
int OBJECT_TYPE_AREAOFEFFECTOBJECT= 2048;
int OBJECT_TYPE_WAYPOINT = 4096;
int OBJECT_TYPE_SOUND = 16384;
int OBJECT_TYPE_PARTY = 32768;
int OBJECT_TYPE_MAPPATCH = 65536;
int OBJECT_TYPE_VFX = 131072;
int OBJECT_TYPE_MAP = 262144;
int OBJECT_TYPE_ALL = 4294967295;
// Variable Types
int VARIABLE_TYPE_INVALID = 0;
int VARIABLE_TYPE_INTEGER = 1;
int VARIABLE_TYPE_FLOAT = 2;
int VARIABLE_TYPE_STRING = 4;
int VARIABLE_TYPE_OBJECT = 8;
int VARIABLE_TYPE_LOCATION = 16;
int VARIABLE_TYPE_PLAYER = 32;
int VARIABLE_TYPE_DATASET = 64;
int VARIABLE_TYPE_EVENT = 128;
int VARIABLE_TYPE_COMMAND = 256;
int VARIABLE_TYPE_EFFECT = 512;
int VARIABLE_TYPE_ITEMPROPERTY = 1024;
int VARIABLE_TYPE_ALL = 4294967295;
// Event Types
// Object Scripting Events
int EVENT_TYPE_INVALID = 0;
int EVENT_TYPE_SPELLCASTAT = 1;
int EVENT_TYPE_DAMAGED = 2;
int EVENT_TYPE_SPAWN = 3;
int EVENT_TYPE_DEATH = 4;
int EVENT_TYPE_MELEE_ATTACK_START = 5;
int EVENT_TYPE_INVENTORY_ADDED = 6;
int EVENT_TYPE_INVENTORY_REMOVED = 7;
int EVENT_TYPE_ENTER = 8;
int EVENT_TYPE_EXIT = 9;
// Creature Scripting Events
int EVENT_TYPE_BLOCKED = 10;
int EVENT_TYPE_EQUIP = 11;
int EVENT_TYPE_UNEQUIP = 12;
int EVENT_TYPE_FAILTOOPEN = 13;
// Placeable Scripting Events
int EVENT_TYPE_USE = 14;
int EVENT_TYPE_CLICK = 15;
int EVENT_TYPE_TRAP_TRIGGERED = 16;
int EVENT_TYPE_TRAP_DISARMED = 17;
// Other Events
int EVENT_TYPE_CONVERSATION = 18;
int EVENT_TYPE_MODULE_START = 19;
int EVENT_TYPE_MODULE_LOAD = 20;
int EVENT_TYPE_LISTENER = 21;
int EVENT_TYPE_LOCKED = 22;
int EVENT_TYPE_UNLOCKED = 23;
int EVENT_TYPE_PLAYERLEVELUP = 24;
int EVENT_TYPE_MODULE_GETCHARSTAGE = 63;
// Perception Events
int EVENT_TYPE_PERCEPTION_APPEAR = 25;
int EVENT_TYPE_PERCEPTION_DISAPPEAR = 26;
// Plot Events
int EVENT_TYPE_SET_PLOT = 27;
int EVENT_TYPE_GET_PLOT = 28;
// Attack Events
int EVENT_TYPE_ATTACK_IMPACT = 29;
int EVENT_TYPE_COMBAT_INITIATED = 30;
// Ability Events
int EVENT_TYPE_ABILITY_CAST_IMPACT = 31;
int EVENT_TYPE_ABILITY_CAST_START = 32;
// Rules Events
int EVENT_TYPE_APPLY_EFFECT = 33;
int EVENT_TYPE_REMOVE_EFFECT = 34;
// AI Events
int EVENT_TYPE_COMMAND_PENDING = 35;
int EVENT_TYPE_COMMAND_COMPLETE = 36;
// Area load events
int EVENT_TYPE_GAMEOBJECTSLOADED = 37;
int EVENT_TYPE_AREALOAD_PRELOADEXIT = 38;
int EVENT_TYPE_AREALOAD_POSTLOADEXIT = 39;
int EVENT_TYPE_AREALOAD_SPECIAL = 40;
int EVENT_TYPE_AREALOADSAVE_SPECIAL = 41;
int EVENT_TYPE_AREALOADSAVE_PRELOADEXIT = 42;
int EVENT_TYPE_AREALOADSAVE_POSTLOADEXIT = 43;
// Character Creation
int EVENT_TYPE_CHARGEN_START = 44;
int EVENT_TYPE_CHARGEN_SCREEN_ENTERED = 45;
int EVENT_TYPE_CHARGEN_SELECT_RACE = 46;
int EVENT_TYPE_CHARGEN_SELECT_CLASS = 47;
int EVENT_TYPE_CHARGEN_SELECT_SOUNDSET = 48;
int EVENT_TYPE_CHARGEN_SELECT_NAME = 49;
int EVENT_TYPE_CHARGEN_ASSIGN_ATTRIBUTES = 50;
int EVENT_TYPE_CHARGEN_ASSIGN_ABILITIES = 51;
int EVENT_TYPE_CHARGEN_SELECT_LEVELUP_CLASS = 52;
int EVENT_TYPE_CHARGEN_IMPORT_HERO = 53;
int EVENT_TYPE_CHARGEN_SELECT_GENDER = 54;
int EVENT_TYPE_CHARGEN_SELECT_BACKGROUND = 55;
int EVENT_TYPE_CHARGEN_END = 59;
int EVENT_TYPE_GAMEMODE_CHANGE = 60;
int EVENT_TYPE_DEATH_RES_PARTY = 61;
int EVENT_TYPE_MODULE_PRESAVE = 62;
int EVENT_TYPE_MANA_STAM_DEPLETED = 64;
int EVENT_TYPE_ITEM_ONHIT = 65;
int EVENT_TYPE_PARTYMEMBER_ADDED = 66;
int EVENT_TYPE_PARTYMEMBER_DROPPED = 67;
int EVENT_TYPE_USE_PLOTACTION = 68;
int EVENT_TYPE_CHANTERS_DONATION = 69;
int EVENT_TYPE_ITEM_ONTEST_USABLE = 70;
int EVENT_TYPE_PARTYPICKER_CLOSED = 71;
int EVENT_TYPE_LEVEL_OF_THE_WEEK = 72;
int EVENT_TYPE_ABILITY_ACQUIRED = 73;
int EVENT_TYPE_AOE_HEARTBEAT = 74;
int EVENT_TYPE_WORLD_MAP_CLOSED = 75;
int EVENT_TYPE_POPUP_RESULT = 76;
int EVENT_TYPE_PLACEABLE_COLLISION = 77;
int EVENT_TYPE_PLACEABLE_ONCLICK = 78;
int EVENT_TYPE_REACHED_WAYPOINT = 79;
int EVENT_TYPE_AREALIST_POSTLOAD = 80;
int EVENT_TYPE_HEARTBEAT2 = 81;
int EVENT_TYPE_GIFT_ITEM = 82;
int EVENT_TYPE_LOAD_TACTICS_PRESET = 83;
int EVENT_TYPE_GUI_OPENED = 84;
int EVENT_TYPE_INVENTORY_FULL = 85;
int EVENT_TYPE_CREATURE_ENTERS_CONVERSATION = 86;
int EVENT_TYPE_RUBBER_BAND = 87;
int EVENT_TYPE_GIVE_UP = 88;
int EVENT_TYPE_ON_SELECT = 89;
int EVENT_TYPE_ON_ORDER_RECEIVED = 90;
int EVENT_TYPE_BEGIN_TRAVEL = 91;
int EVENT_TYPE_WORLDMAP_PRETRANSITION = 92;
int EVENT_TYPE_ABILITY_PROJECTILE_LAUNCHED = 93;
int EVENT_TYPE_PLAYER_COMMAND_ADDED = 94;
int EVENT_TYPE_CHAR_RECORD_OPENED = 95;
int EVENT_TYPE_OPTIONS_CHANGED = 96;
int EVENT_TYPE_ROAM_DIST_EXCEEDED = 97;
int EVENT_TYPE_PLOT_COMPLETED = 98;
int EVENT_TYPE_PARTY_MONEY_CHANGED = 99;
int EVENT_TYPE_CODEX_CHANGED = 100;
int EVENT_TYPE_USE_ABILITY_IMMEDIATE = 101;
int EVENT_TYPE_CRAFT_ITEM = 102;
int EVENT_TYPE_WORLDMAP_POSTTRANSITION = 103;
int EVENT_TYPE_PARTYPICKER_INIT = 104;
int EVENT_TYPE_USE_BEST_HEALTH_POTION = 105;
int EVENT_TYPE_SWITCH_WEAPON_SETS = 106;
int EVENT_TYPE_TOGGLE_HOLD_PARTY = 107;
int EVENT_TYPE_INVENTORY_JUNK_ITEM = 108;
int EVENT_TYPE_RADIAL_MENU_OPEN_MODAL_MENU = 109;
int EVENT_TYPE_ABILITY_ONTEST_USABLE = 110;
int EVENT_TYPE_CHOOSE_BASIC_ATTACK = 111;
int EVENT_TYPE_ABILITY_ANIM_CANCELLABLE = 112;
int EVENT_TYPE_AOE_TARGETING_GUI_OPENED = 113;
// EVENT_TYPE_GUI_OPENED constants
int GUI_CHARACTER_RECORD = 0;
int GUI_CHAR_GEN = 1;
int GUI_CONTAINER_INVENTORY = 2;
int GUI_CONTEXT_MENU = 3;
int GUI_CONVERSATION = 4;
int GUI_CUTSCENE = 5;
int GUI_DEBUG = 6;
int GUI_MAIN = 7;
int GUI_INVENTORY = 8;
int GUI_JOURNAL = 9;
int GUI_SPELLS_TALENTS = 10;
int GUI_SPELLS = 11;
int GUI_TALENTS = 12;
int GUI_SKILLS = 13;
int GUI_LOADING = 14;
int GUI_MAP = 15;
int GUI_WORLD_MAP = 16;
int GUI_OPTIONS = 17;
int GUI_START_MENU = 18;
int GUI_DEATH_SCREEN = 19;
int GUI_MAIN_MENU = 20;
int GUI_SAVE_LOAD = 21;
int GUI_CHANTERS = 22;
int GUI_TACTICS = 23;
int GUI_GENERAL_SCOREBOARD = 24;
int GUI_CHAMPIONSHIP_SCOREBOARD = 25;
int GUI_TOURNAMENT_SCOREBOARD = 26;
int GUI_PARTY_PICKER = 27;
int GUI_ARMYCONTROL = 28;
int GUI_DEBUG_OPTIONS = 29;
int GUI_POPUP_LAYER = 30;
int GUI_FADE_MAP = 31;
int GUI_STORE = 32;
int GUI_LIGHT_LOADING = 33;
int GUI_FADETOBLACK_LOADING = 34;
int GUI_CUSTOM_LOADING = 35;
int GUI_SAVING = 36;
int GUI_ITEM_UPGRADE = 37;
int GUI_CRAFTING = 38;
int GUI_LOGIN = 39;
int GUI_NAVBAR = 40;
int GUI_QUICKBAR = 41;
int GUI_MINIMAP = 42;
int GUI_PORTRAITS = 43;
int GUI_NOTIFICATIONS = 44;
int GUI_TOOLTIPS = 45;
int GUI_LEVEL_UP = 46;
int GUI_FLOATY_LAYER = 47;
int GUI_SLIDESHOW = 48;
int GUI_LOGIN_CONNECTING = 49;
int GUI_LOGIN_CONNECTED = 50;
int GUI_LOGIN_NEW_ACCOUNT = 51;
int GUI_CONTENTMANAGER = 52;
int GUI_LOGIN_TOS = 53;
int GUI_SCREENSHOTS = 54;
int GUI_ACHIEVEMENT_UNLOCKED = 55;
int GUI_COMMUNITY_FEATURES = 56;
int GUI_CONTENT_INSTALLING = 57;
int GUI_ITEM_EXAMINE = 58;
int GUI_BOOK_BACK = 59;
int GUI_BOOK_FRONT = 60;
int GUI_PURCHASING_CONTENT = 61;
int GUI_CREDITS = 62;
int GUI_BATTLE_MENU = 63;
int GUI_RADIAL_MENU = 64;
int GUI_LOGIN_INFO_SHARING = 65;
int GUI_GRAPHICS_DEBUGGER = 66;
int GUI_WARNING_LIGHTS = 67;
int GUI_PRE_START_MENU = 68;
int GUI_NEW_GAME = 69;
// Gender Types
int GENDER_INVALID = 0;
int GENDER_MALE = 1;
int GENDER_FEMALE = 2;
int GENDER_OTHER = 3;
// GetItemsOptions
int GET_ITEMS_OPTION_ALL = 1;
int GET_ITEMS_OPTION_BACKPACK = 0;
int GET_ITEMS_OPTION_EQUIPPED = 2;
// Creature Types (Combatant Types)
int CREATURE_TYPE_COMBATANT = 0;
int CREATURE_TYPE_AMBIENT_COMBATANT = 1;
int CREATURE_TYPE_NON_COMBATANT = 2;
// LOG_CHANNEL
int LOG_CHANNEL_GENERAL = 0;
int LOG_CHANNEL_TEMP = 1;
int LOG_CHANNEL_QA = 2;
int LOG_CHANNEL_QA_REGRESSION = 3;
int LOG_CHANNEL_DESIGN_SCRIPTERROR = 50;
int LOG_CHANNEL_DESIGN_TODO = 51;
int LOG_CHANNEL_DESIGN_HACK = 52;
int LOG_CHANNEL_AI = 100;
int LOG_CHANNEL_THREAT = 101;
int LOG_CHANNEL_THREAT_DATA = 102;
int LOG_CHANNEL_LOOT = 200;
int LOG_CHANNEL_PLOT = 300;
int LOG_CHANNEL_CONVERSATION = 400;
int LOG_CHANNEL_EVENTS = 500;
int LOG_CHANNEL_EVENTS_PLACEABLES = 501;
int LOG_CHANNEL_SYSTEMS = 600;
int LOG_CHANNEL_SYSTEMS_WRAPPERS = 601;
int LOG_CHANNEL_SYSTEMS_TLKTRIGGER = 602;
int LOG_CHANNEL_SYSTEMS_PLACEABLES = 603;
int LOG_CHANNEL_SYSTEMS_TRAPS = 604;
int LOG_CHANNEL_EFFECTS = 700;
int LOG_CHANNEL_CHARACTER = 800;
int LOG_CHANNEL_CHARACTER_STATS = 801;
int LOG_CHANNEL_REWARDS = 802;
int LOG_CHANNEL_COMBAT = 1000;
int LOG_CHANNEL_COMBAT_ABILITY = 1001;
int LOG_CHANNEL_COMBAT_GORE = 1002;
int LOG_CHANNEL_COMBAT_DEATH = 1003;
int LOG_CHANNEL_COMBAT_DAMAGE = 1004;
int LOG_CHANNEL_COMBAT_TOHIT = 1005;
int LOG_CHANNEL_AMBIENT_AI = 1100;
int LOG_CHANNEL_COMMANDS = 1105;
int LOG_CHANNEL_RESISTANCES = 1106;
int LOG_CHANNEL_AUTOBALANCE= 1107;
int LOG_CHANNEL_EVENTS_PERCEPTION = 1108;
int LOG_CHANNEL_EVENTS_CHARGEN = 1110;
int LOG_CHANNEL_SOUNDSETS = 1111;
int LOG_CHANNEL_UIMESSAGES = 1112;
// Effect Types
int EFFECT_TYPE_INVALID = 0;
int EFFECT_DURATION_TYPE_INVALID = 0;
int EFFECT_DURATION_TYPE_INSTANT = 1;
int EFFECT_DURATION_TYPE_TEMPORARY = 2;
int EFFECT_DURATION_TYPE_PERMANENT = 3;
int EFFECT_DURATION_TYPE_DEATH = 6;
//Effect Flags
int EFFECT_FLAG_DISABLE_MOVEMENT = 1;
int EFFECT_FLAG_DISABLE_TURNING = 2;
int EFFECT_FLAG_DISABLE_COMBAT = 4;
int EFFECT_FLAG_DISABLE_TALENTS = 8;
int EFFECT_FLAG_DISABLE_SPELLS = 16;
int EFFECT_FLAG_DISABLE_SKILLS = 32;
int EFFECT_FLAG_DISABLE_ITEMS = 64;
int EFFECT_FLAG_DISABLE_INPUT = 128;
// Game Modes
int GM_INVALID = -1;
int GM_EXPLORE = 0;
int GM_COMBAT= 1;
int GM_DEAD = 2;
int GM_GUI = 3;
int GM_CONVERSATION = 4;
int GM_FLYCAM = 5;
int GM_FIXED = 6;
int GM_PREGAME = 7;
int GM_LOADING = 8;
int GM_MOVIE = 9;
int GM_CHARGEN = 10;
int GM_PARTYPICKER = 11;
// Combat Results
int COMBAT_RESULT_INVALID = 0;
int COMBAT_RESULT_HIT = 1;
int COMBAT_RESULT_CRITICALHIT = 2;
int COMBAT_RESULT_MISS = 3;
int COMBAT_RESULT_DEATHBLOW = 4;
int COMBAT_RESULT_BLOCKED = 5;
int COMBAT_RESULT_BACKSTAB = 9;
// Command types
int COMMAND_TYPE_INVALID = 0;
int COMMAND_TYPE_ATTACK = 1;
int COMMAND_TYPE_DO_FUNCTION = 6;
int COMMAND_TYPE_JUMP_TO_OBJECT = 9;
int COMMAND_TYPE_JUMP_TO_LOCATION = 10;
int COMMAND_TYPE_WAIT = 13;
int COMMAND_TYPE_PLAY_ANIMATION = 14;
int COMMAND_TYPE_START_CONVERSATION = 18;
int COMMAND_TYPE_MOVE_TO_LOCATION = 20;
int COMMAND_TYPE_MOVE_TO_OBJECT = 21;
int COMMAND_TYPE_RECOVER = 22;
int COMMAND_TYPE_USE_ABILITY = 25;
int COMMAND_TYPE_EQUIP_ITEM = 29;
int COMMAND_TYPE_UNEQUIP_ITEM = 30;
int COMMAND_TYPE_USE_OBJECT = 31;
int COMMAND_TYPE_DRIVE = 33;
//int COMMAND_TYPE_DO_EVENT = 36;
int COMMAND_TYPE_INTERACT = 37;
int COMMAND_TYPE_DEATHBLOW = 38;
int COMMAND_TYPE_SWITCH_WEAPON_SETS = 40;
int COMMAND_TYPE_FLY = 42;
// Command priorities
int COMMAND_PRIORITY_INVALID = 0;
// Command result values
int COMMAND_RESULT_INVALID = 0;
int COMMAND_RESULT_SUCCESS = 1;
int COMMAND_RESULT_FAILED_NO_RESOURCES = -1;
int COMMAND_RESULT_FAILED_NO_VALID_TARGET = -2;
// Command Completed Error values
//////////////////////////////////////////////////////
// Note 1: In the engine these are defined as ACTION_FAILED
// instead of COMMAND_FAILED because they are a result of the subactions.
// Note 2: The value 0 is reserved for "Command in progress"
//////////////////////////////////////////////////////
int COMMAND_FAILED_TIMEOUT = -10;
int COMMAND_FAILED_PATH_ACTION_REQUIRED = -9;
int COMMAND_FAILED_DISABLED = -8;
int COMMAND_FAILED_TARGET_DESTROYED = -7;
int COMMAND_FAILED_NO_LINE_OF_SIGHT = -6;
int COMMAND_FAILED_NO_SPACE_IN_MELEE_RING = -5;
int COMMAND_FAILED_INVALID_PATH = -4;
int COMMAND_FAILED_INVALID_DATA = -3;
int COMMAND_FAILED_COMMAND_CLEARED = -2;
int COMMAND_FAILED = -1;
int COMMAND_SUCCESSFUL = 1;
int COMMAND_LOOPING = 2;
// Command add behaviors
int COMMAND_ADDBEHAVIOR_DONTCLEAR = 0;
int COMMAND_ADDBEHAVIOR_SOFTCLEAR = 1;
int COMMAND_ADDBEHAVIOR_HARDCLEAR = 2;
// Resistance Check constants
int RESISTANCE_CHECK_SUCCESS = TRUE;
int RESISTANCE_CHECK_FAILURE = FALSE;
int RESISTANCE_CHECK_INVALID = -1;
// Projectile target nodes
int PROJECTILE_TARGET_INVALID = 0;
int PROJECTILE_TARGET_HEAD = 5;
int PROJECTILE_TARGET_NECK = 6;
int PROJECTILE_TARGET_UPPERTORSO = 8;
int PROJECTILE_TARGET_MIDTORSO = 9;
int PROJECTILE_TARGET_LOWERTORSO = 4;
int PROJECTILE_TARGET_CLAVICLE_R = 10;
int PROJECTILE_TARGET_CLAVICLE_L = 14;
int PROJECTILE_TARGET_UPPERARM_R = 11;
int PROJECTILE_TARGET_UPPERARM_L = 15;
int PROJECTILE_TARGET_LOWERARM_R = 12;
int PROJECTILE_TARGET_LOWERARM_L = 16;
int PROJECTILE_TARGET_UPPERLEG_R = 18;
int PROJECTILE_TARGET_UPPERLEG_L = 21;
int PROJECTILE_TARGET_LOWERLEG_R = 19;
int PROJECTILE_TARGET_LOWERLEG_L = 22;
// Ability
int ABILITY_INVALID = 0;
// Property Values
int PROPERTY_VALUE_TOTAL = 1;
int PROPERTY_VALUE_BASE = 2;
int PROPERTY_VALUE_CURRENT = 3;
int PROPERTY_VALUE_MODIFIER = 4;
// Party follower states
int FOLLOWER_STATE_INVALID = 0;
int FOLLOWER_STATE_ACTIVE = 1;
int FOLLOWER_STATE_AVAILABLE = 2;
int FOLLOWER_STATE_UNAVAILABLE = 3;
int FOLLOWER_STATE_SUSPENDED = 5;
int FOLLOWER_STATE_LOADING = 6;
int FOLLOWER_STATE_LOCKEDACTIVE = 7;
// Placeable types
int PLACEABLE_TYPE_INVALID = 0;
int PLACEABLE_TYPE_DOOR = 1;
int PLACEABLE_TYPE_CHEST = 2;
int PLACEABLE_TYPE_BAG = 3;
int PLACEABLE_TYPE_LEVER = 4;
int PLACEABLE_TYPE_ART = 5;
int PLACEABLE_TYPE_FLIPCOVER = 6;
// Placeable actions
int PLACEABLE_ACTION_INVALID = 0;
int PLACEABLE_ACTION_OPEN = 1;
int PLACEABLE_ACTION_CLOSE = 2;
int PLACEABLE_ACTION_UNLOCK = 3;
int PLACEABLE_ACTION_DESTROY = 4;
int PLACEABLE_ACTION_USE = 5;
int PLACEABLE_ACTION_EXAMINE = 6;
int PLACEABLE_ACTION_DISARM = 7;
int PLACEABLE_ACTION_FLIP_COVER = 8;
int PLACEABLE_ACTION_USE_COVER = 9;
int PLACEABLE_ACTION_CONVERSATION = 10;
int PLACEABLE_ACTION_OPEN_INVENTORY = 11;
int PLACEABLE_ACTION_TRIGGER_TRAP = 12;
int PLACEABLE_ACTION_TOPPLE = 13;
int PLACEABLE_ACTION_LEAVE_COVER = 14;
int PLACEABLE_ACTION_AREA_TRANSITION = 15;
int PLACEABLE_ACTION_TURN_LEFT = 16;
int PLACEABLE_ACTION_TURN_RIGHT = 17;
// Inventory slots
// These must match with Inventory.as, script.ldf, cscript.ldf,
// inventoryslots.h, ScriptSymbols.h, ToolsInventoryslots.h
int INVENTORY_SLOT_INVALID =255;
int INVENTORY_SLOT_MAIN = 0;
int INVENTORY_SLOT_OFFHAND = 1;
int INVENTORY_SLOT_RANGEDAMMO = 2;
int INVENTORY_SLOT_CHEST = 4;
int INVENTORY_SLOT_HEAD = 5;
int INVENTORY_SLOT_BOOTS = 6;
int INVENTORY_SLOT_GLOVES = 7;
int INVENTORY_SLOT_CLOAK = 8;
int INVENTORY_SLOT_RING1 = 9;
int INVENTORY_SLOT_RING2 = 10;
int INVENTORY_SLOT_NECK = 11;
int INVENTORY_SLOT_BELT = 12;
int INVENTORY_SLOT_BITE = 13;
int INVENTORY_SLOT_SHALE_SHOULDERS = 14;
int INVENTORY_SLOT_SHALE_CHEST = 15;
int INVENTORY_SLOT_SHALE_RIGHTARM = 16;
int INVENTORY_SLOT_SHALE_LEFTARM = 17;
int INVENTORY_SLOT_DOG_WARPAINT = 18;
int INVENTORY_SLOT_DOG_COLLAR = 19;
int INVENTORY_SLOT_PARTY_MEMBER = 20;
int INVALID_WEAPON_SET = 4294967295;
int DEATHBLOW_NORMAL = 1;
int DEATHBLOW_SWORDANDSHIELD = 2;
int DEATHBLOW_DECAP = 3;
// Floaty styles
int FLOATY_MESSAGE = 0;
int FLOATY_HIT = 1;
int FLOATY_CRITICAL_HIT = 2;
// Floaty effects (GUI animations)
int FLOATY_EFFECT_CRITICAL_HIT = 0;
int FLOATY_EFFECT_RESIST = 1;
int FLOATY_EFFECT_BREAK_COMBO = 2;
// World map location states
int WM_LOCATION_INACTIVE = 1; // not shown at all
int WM_LOCATION_ACTIVE = 2; // visible and usable
int WM_LOCATION_GRAYED_OUT = 3; // grayed out, unusable
int WM_LOCATION_UNLOCKED = 4; // must be unlocked somehow, unusable
int WM_LOCATION_COMPLETE = 5; // 'complete', for fade map puzzle
int WM_LOCATION_DESTROYED = 6; // Destroyed - unusable, cannot return here
// WorldMapGUIStatus
int WM_GUI_STATUS_NO_USE = 0;
int WM_GUI_STATUS_READ_ONLY = 1;
int WM_GUI_STATUS_USE = 2;
// PartyPickerGUIStatus
int PP_GUI_STATUS_NO_USE = 0;
int PP_GUI_STATUS_READ_ONLY = 1;
int PP_GUI_STATUS_USE = 2;
// Platforms
int PLATFORM_UNKNOWN = 0;
int PLATFORM_PC = 1;
int PLATFORM_XBOX360 = 2;
int PLATFORM_PS3 = 4;
// Plot Assist Game Options.
int GAME_PLOT_ASSIST_OFF = 0;
int GAME_PLOT_ASSIST_EXPLORED_AREAS = 1;
int GAME_PLOT_ASSIST_ALL_AREAS = 2;
string sLanguage = "nwscript";
/*****************************************************************/
// Prints / Logs
/*****************************************************************/
/** @addtogroup printlog Print & Log Functions
*
* Functions to print to the log and to print specific value types.
*/
/** @{*/
/** @brief Prints an integer to the log file.
*
* Prints the integer nInteger to the log file. If bPrepend is TRUE, then 'PRINTINTEGER'
* will be prepended onto the text outputted to the log file.
*
* @param nInteger - The integer value to print out to the log.
* @param bPrepend - Specifies if the type of value should be prepended on to the log string.
* @sa PrintFloat(), PrintString(), PrintObject(), PrintVector(), PrintToLog()
* @author Brenon
*/
void PrintInteger( int nInteger, int bPrepend = FALSE ) = 0;
/** @brief Prints a float to the log file.
*
* Prints the float fFloat to the log file based on the nWidth and nDecimal specifications.
* If bPrepend is TRUE, then 'PRINTFLOAT' will be prepended onto the text outputted to the
* log file.
*
* @param fFloat - The float value to print out to the log.
* @param nWidth - The size of the value before the decimal. Must be a value between 0 and 18 inclusive.
* @param nDecimals - The number of decimal places. Must be a value between 0 and 9 inclusive.
* @param bPrepend - Specifies if the type of value should be prepended on to the log string.
* @sa PrintInteger(), PrintString(), PrintObject(), PrintVector(), PrintToLog()
* @author Brenon
*/
void PrintFloat( float fFloat, int nWidth = 18, int nDecimals = 9, int bPrepend = FALSE ) = 1;
/** @brief Prints a string to the log file.
*
* Prints the string sString to the log file. If bPrepend is TRUE, then 'PRINTSTRING' will
* be prepended onto the text outputted to the log file.
*
* @param sString - The string value to print out to the log.
* @param bPrepend - Specifies if the type of value should be prepended on to the log string.
* @sa PrintInteger(), PrintFloat(), PrintObject(), PrintVector(), PrintToLog()
* @author Brenon
*/
void PrintString( string sString, int bPrepend = FALSE ) = 2;
/** @brief Prints an object to the log file.
*
* Prints the object oObject's unique ID to the log file. If bPrepend is TRUE, then
* 'PRINTOBJECT' will be prepended onto the text outputted to the log file.
*
* @param oObject - The object to be printed to the log.
* @param bPrepend - Specifies if the type of value should be prepended on to the log string.
* @sa PrintInteger(), PrintFloat(), PrintString(), PrintVector(), PrintToLog()
* @author Brenon
*/
void PrintObject( object oObject, int bPrepend = FALSE ) = 3;
/** @brief Prints a vector to the log file.
*
* Prints the vector vVector to the log file. If bPrepend is TRUE then 'PRINTVECTOR'
* will be prepended onto the text outputted to the log file.
*
* @param vVector - The vector to be printed to the log.
* @param bPrepend - Specifies if the type of value should be prepended on to the log string.
* @sa PrintInteger(), PrintFloat(), PrintString(), PrintObject(), PrintToLog()
* @author Brenon
*/
void PrintVector( vector vVector, int bPrepend = FALSE ) = 4;
/** @brief Prints a timestamped entry to the log file.
*
* Prints a timestamped string entry to the log file. Note this will only be visible if Script logging is enabled. To enable, edit \\tag\main\build\bin_release\ECLog.ini and set Script=1 in the [LogTypes] section.
*
* @param sLogEntry - The string entry to print to the log file.
* @sa PrintInteger(), PrintFloat(), PrintString(), PrintObject(), PrintVector()
* @author Brenon
*/
void PrintToLog(string sMessage) = 5;
/** @brief DejaInsight Enabled log writer
*
* Prints a timestamped string entry to the log file.
*
* @param nChannel - LOG_CHANNEL_* constant for use with Deja
* @param sLogEntry - The string entry to print to the log file.
* @param oTarget - The target of the debugged function.
* @author Georg
*/
void LogTrace(int nChannel = LOG_CHANNEL_GENERAL, string sLogEntry="", object oTarget = OBJECT_INVALID) = 143;
/** @brief Prints a resource to the log file.
*
* Prints the resource rResource to the log file. If bPrepend is TRUE, then 'PRINTRESOURCE' will
* be prepended onto the text outputted to the log file.
*
* @param rResource - The resource value to print out to the log.
* @param bPrepend - Specifies if the type of value should be prepended on to the log string.
* @sa PrintInteger(), PrintFloat(), PrintObject(), PrintVector(), PrintToLog(), PrintString()
* @author Paul
*/
void PrintResource( resource rResource, int bPrepend = FALSE ) = 733;
/** @brief Prints a timestamped entry to the log file and flushes it. Very expensive.
*
* @param sLogEntry - The string entry to print to the log file.
* @sa PrintToLog
* @author Jacques Lebrun
*/
void PrintToLogAndFlush( string sLogEntry) = 130;
/** @brief Shows a warning.
*
* Shows a warning with the specified string.
*
* @param sWarning - The warning string.
* @author Jose
*/
void Warning( string sWarning ) = 674;
/** @brief Sends a string to the probe system.
*
* Sends a string to the probe system.
*
* @param sOutput - name of the stat to track
* @param fValue - The value of stat to track (optional)
* @author Jose
*/
void Probe(string sOutput, float fValue = 0 ) = 680;
/** @brief Gets the current world time - used for logging
*
* Gets the current world time
*
* @author Sophia
*/
int GetTime() = 705;
/** @brief Gets the current system tick count.
*
* Gets an int32 representing the system tick count. This is useful to create unique timestamps for
* logging purposes
*
* @author Georg
*/
int GetLowResTimer() = 176;
/** @brief Prints a string to all the client screens.
*
* Prints the string sString to the screen in all the available clients.
*
* @param sString - The string value to print out to the screen.
* @param nPosFromTop - Where to output the string on the client's screen.
* @param fLife - life for the string in seconds
* @author Adriana
*/
void DEBUG_PrintToScreen(string sString, int nPosFromTop = 10, float fLife = 10.0) = 81;
/** @brief Prints a string to the onscreen log window provided by the GUI.
*
* Prints a string to the onscreen log window provided by the GUI.
*
* @param sString - The string to print.
* @author Henry
*/
void PrintToLogWindow(string sString, string sLogType = "LogWindow") = 82;
/** @brief Sends a message to the Designer Run Database.
*
* If the string is less than 960 characters, this will send it as a message
* to the database. Be sure to format it in such a way that it makes sence
* to the db itself.
* If your name is not Georg, you should not use this function.
*
* @param sString - The string to print.
* @author Paul
*/
void SendToRunDatabase(string sString) = 174;
/** @brief Submits a game event to the Designer Run Database
*
* Submits a 'game event' to the designer run database
*
* If your name is not Georg, you should not use this function.
*
* @param nEventId - The event to submit.
* @param oidObject - The event owner
* @param oidTarget - The event target
* @param nParam1 - optional Event Parameter 1
* @param nParam2 - optional Event Parameter 2
* @param sParam1 - optional String Parameter 1
* @param sParam2 - optional String Parameter 2
* @param sType - optional Message Type override
*
* @author Georg
*/
void SendGameEventRunDatabase(int nEventId, object oidObject = OBJECT_SELF, object oidTarget = OBJECT_INVALID, int nParam1 = 0, int nParam2 = 0, string sParam1 = "", string sParam2= "", string sType = "xE") = 175;
/** @brief Saves a screenshot
*
*
* @param sPath - optional path. This uses forward slashes, not backslashes(as used in windows). Example: c:\screenshots\ or \\bioware\share\da
* @param sFileName - optional FileName
*
* @author Sam
*/
void Screenshot(string sFileName = "", string sPath = "", int bHideConsole = FALSE) = 820;
/** @brief Returns 1 if debug helpers are turned on.
*
* @author Jacques
*/
int GetDebugHelpersEnabled() = 331;
/** @brief Returns 1 if ((nInt & nFlag) == nFlag)
*
* @author Noel
*/
int hasflag(int nInt, int nFlag) = 420;
int min(int a, int b) = 421;
int max(int a, int b) = 422;
float minf(float a, float b) = 423;
float maxf(float a, float b) = 424;
/** @} */
/*****************************************************************/
/*****************************************************************/
// Actions / System
/*****************************************************************/
/** @addtogroup actionsys Action & System Functions
*
* Functions to add and delay actions to objects as well as generic
* system functions.
*/
/** @{*/
/** @brief Assigns the target object to run the specified function.
*
* Assigns the target object to run the specified function. It should
* be noted that a 'function' is any void returning function, including user
* defined functions.
*
* @param oTarget - Specifies which object the function should be run on
* @param fnFunction - The void returning function to run on the target object
* @sa DelayFunction()
* @remarks If the object does not exist or the specified function is not a
* void returning function, this call will fail. If a non-void returning
* function is specified an error will be generated.
* @author Brenon
*/
//void AssignFunction( object oTarget, function fnFunction ) = 6;
/** @brief Delays a function call.
*
* Calls the function fnFunction after a delay of float fSeconds. The function fnFunction
* can be any void returning function including user defined functions.
*
* @param fSeconds - The amount of time in seconds to delay the function call by.
* @param fnFunction - The void returning function to run after the delay.
* @sa AssignFunction()
* @remarks If the time value is equal to or smaller than 0, the action will run on the next AI update.
* If the function specified is not a void returning function then DelayFunction() will fail.
* If a non-void returning function is specified an error will be generated.
* It should be noted that this scripting function is not blocking, execution will continue and
* the specified fnFunction will be run separately after the appropriate amount of time has elapsed.
* @author Brenon
*/
//void DelayFunction( float fSeconds, function fnFunction ) = 7;
/** @brief Executes a script.
*
* Deprecated, do not use -- Georg.
* Runs the script with the name specified by the string sScript on the object oTarget.
* Note that this will happen immediately from the execution point in the current script.
* The current script will continue only after the new script has finished executing.
*
* @param rScript - The name of the script to run (*.ncs)
* @param oTarget - The object to run the script on.
* @remarks If the specified script or object does not exist then the call to ExecuteScript() will fail.
* @author Brenon
*/
void Deprecated_ExecuteScript( resource rScript, object oTarget ) = 8;
/** @brief Returns a value from a 2DA in string format.
*
* Returns a 2DA string based on the specified Row and Column values.
*
* @param n2DA - The 2DA to access
* @param sColumn - The name of the column to access
* @param nRow - The 0 based index of the row to access
* @param s2da - (optional) if n2da is -1 and this is a valid resource, it will retrieve
* the 2da based on the name instead of the index. Note that this should be avoided
* when possible.
* @return Returns the string specified by the parameters. Returns an empty string on error.
* @author Brenon, Georg
*/
string GetM2DAString( int n2DA, string sColumn, int nRow, string s2DA = "" ) = 9;
/** @brief Returns a resource from a 2DA.
*
* Returns a 2DA resource on the specified Row and Column values.
*
* @param n2DA - The 2DA to access
* @param sColumn - The name of the column to access
* @param nRow - The 0 based index of the row to access
* @param s2da - (optional) if n2da is -1 and this is a valid resource, it will retrieve
* the 2da based on the name instead of the index. Note that this should be avoided
* when possible.
* @return Returns a resrouce specified by the parameters.
* @author Georg
*/
resource GetM2DAResource( int n2DA, string sColumn, int nRow, string s2da = "" ) = 13;
/** @brief Returns a 2DA value in integer format.
*
* Returns a 2DA integer based on the specified Row and Column values.
*
* @param n2DA - The 2DA to access
* @param sColumn - The name of the column to access
* @param nRow - The 0 based index of the row to access
* @param s2da - (optional) if n2da is -1 and this is a valid resource, it will retrieve
* the 2da based on the name instead of the index. Note that this should be avoided
* when possible.
* @return Returns the int specified by the parameters. Returns 0.
* @sa Set2DAInt()
* @author Brenon, Georg
*/
int GetM2DAInt( int n2DA, string sColumn, int nRow, string s2da = "" ) = 667;
/** @brief Returns a 2DA value in float format.
*
* Returns a 2DA integer based on the specified Row and Column values.
*
* @param n2DA - The 2DA to access
* @param sColumn - The name of the column to access
* @param nRow - The 0 based index of the row to access
* @param s2da - (optional) if n2da is -1 and this is a valid resource, it will retrieve
* the 2da based on the name instead of the index. Note that this should be avoided
* when possible.
* @return Returns the float specified by the parameters.
* @author Georg
*/
float GetM2DAFloat(int n2DA, string sColumn, int nRow, string s2DA = "") = 138;
/** @brief Returns the number of rows in the specified 2da.
*
* Returns the number of rows in the specified 2da.
*
* @param n2DA - The 2DA to access.
* @param s2da - (optional) if n2da is -1 and this is a valid resource, it will retrieve
* the 2da based on the name instead of the index. Note that this should be avoided
* when possible.
* @returns Returns the number of rows in the 2DA, returns 0 on error.
* @author Brenon, Georg
*/
int GetM2DARows( int n2DA, string s2DA = "" ) = 11;
/** @brief Returns the number of columns in the specified 2da.
*
* Returns the number of columns in the specified 2da.
*
* @param n2DA - The 2DA to access.
* @returns Returns the number of columns in the 2DA, returns 0 on error.
* @sa Get2DARows()
* @author Brenon
*/
int GetM2DAColumns( int n2DA ) = 12;
/** @brief Returns a 2DA value (by hashed column and row) in integer format.
*
* Returns a 2DA integer based on the specified Row and Column values. Use GetM2DAInt
* if you don't know the hashed value of the column.
*
* @param n2DA - The 2DA to access
* @param nColumn - The hashed name of the column
* @param nRow - The 0 based index of the row to access
* @return Returns the int specified by the parameters. Returns 0 if row/column is bad or not an integer.
* @sa GetHashedM2DAInt()
* @author MarkB
*/
int GetHashedM2DAInt( int n2DA, int nColumnHash, int nRow ) = 841;
/** @brief Returns a bool 2DA value (by hashed column and row) in integer format.
*
* Returns a bool 2DA as integer (1 = true, 0 = false) based on the specified Row and Column values.
*
* @param n2DA - The 2DA to access
* @param nColumn - The hashed name of the column
* @param nRow - The 0 based index of the row to access
* @return Returns the int specified by the parameters. Returns 0 if row/column is bad or not an integer.
* @sa GetHashedM2DABool()
* @author NicolasN
*/
int GetHashedM2DABool( int n2DA, int nColumnHash, int nRow ) = 883;
/** @brief Returns a 2DA value (by hashed column and row) in float format.
*
* Returns a 2DA float based on the specified Row and Column values. Use GetM2DAFloat
* if you don't know the hashed value of the column.
*
* @param n2DA - The 2DA to access
* @param nColumn - The hashed name of the column
* @param nRow - The 0 based index of the row to access
* @return Returns the float specified by the parameters. Returns 0.0 if the row/column is bad or not a float.
* @sa GetHashedM2DAFloat()
* @author MarkB
*/
float GetHashedM2DAFloat( int n2DA, int nColumnHash, int nRow ) = 864;
/** @brief Returns the combined 2DA value of this abillity and its upgrades
*
* Returns the combined 2DA value of this abillity and its upgrades if the target creature has them
*
* @author NicolasN
*/
int GetUpgradableAbilityHashedM2DAInt( object oTarget, int nColumnHash, int nAbilityId ) = 875;
/** @brief Returns the combined 2DA value of this abillity and its upgrades
*
* Returns the combined 2DA value of this abillity and its upgrades if the target creature has them
*
* @author NicolasN
*/
float GetUpgradableAbilityHashedM2DAFloat( object oTarget, int nColumnHash, int nAbilityId ) = 876;
/** @brief Returns a 2DA value (by hashed column and row) as a string.
*
* Returns a string based on the specified Row and Column values. Use GetM2DAString
* if you don't know the hashed value of the column.
*
* @param n2DA - The 2DA to access
* @param nColumn - The hashed name of the column
* @param nRow - The 0 based index of the row to access
* @return Returns the string specified by the parameters. Returns "" if the row/column is bad or not a string.
* @sa GetHashedM2DAString()
* @author MarkB
*/
string GetHashedM2DAString( int n2DA, int nColumnHash, int nRow ) = 865;
/** @brief Returns a 2DA value (by hashed column and row) as a resource.
*
* Returns a resource based on the specified Row and Column values. Use GetM2DAResource
* if you don't know the hashed value of the column.
*
* @param n2DA - The 2DA to access
* @param nColumn - The hashed name of the column
* @param nRow - The 0 based index of the row to access
* @return Returns the resource specified by the parameters. Returns "" if the Row/column is bad or not a resrouce.
* @sa GetHashedM2DAResource()
* @author MarkB
*/
resource GetHashedM2DAResource( int n2DA, int nColumnHash, int nRow ) = 866;
/** @brief Returns the row ID for the given row index
*
* Returns the value of the ID column for the given 2DA row index
*
* @param n2DA - The 2DA to access
* @param nRowIndex - Index in the 2DA for which we want to know the ID
* @author Nicolas Ng Man Sun
*/
int GetM2DARowIdFromRowIndex( int n2DA, int nRowIndex, string s2DA = "" ) = 856;
/** @brief Returns a string from the tlk table.
*
* Returns a string from the tlk table based on the specified
* strref (String reference) and gender. It should be noted
* that there may be multiple genders in the tlk table depending
* on how the specific tlk table is generated.
*
* @param nStrRef - The string reference to get from the tlk table
* @param nGender - The gender variation of the string
* @return Returns the string specified by the string reference. Returns an empty string on error.
* @author Brenon
*/
string GetTlkTableString( int nStrRef, int nGender = GENDER_MALE ) = 14;
/** @brief Returns the current difficulty of the game.
*
* Returns the current difficulty of the game.
*
* @returns Returns a game difficulty constant GAME_DIFFICULTY_*
* @author Brenon
*/
int GetGameDifficulty() = 15;
/** @brief Returns the graphics detail level of the currently running session.
*
* Returns the graphics detail level of the currently running session.
*
* @returns Returns a game difficulty constant GRAPHICS_DETAIL_LEVEL_*
* @author MarkB
*/
int GetGraphicsDetailLevel() = 851;
/** @brief Debug command to spawn the script debugger.
*
* Debug command to spawn the script debugger. If the script
* has not been compiled with debug information, then this function
* will do nothing.
*
* @remarks To use this function you must have generated debug information for
* the script you are attempting to debug.
* @author Brenon
*/
void DebugSpawnScriptDebugger() = 16;
/** @brief Execute console command.
*
* Execute a given console command.
*
* @remarks This is debug only as it executes console command directly instead of sending a message to the client
* @param sArg - The console command to execute, including arguments.
* @return Returns the string that the console command returns.
* @author Yuri
*/
string DEBUG_ConsoleCommand( string sArg ) = 704;
/** @brief Returns the name of the currently executing script
*
* Returns the name of the currently executing script for debugging purposes.
*
* @return string with the name of the current script.
* @author Georg Zoeller
*/
string GetCurrentScriptName() = 145;
/** @brief Returns a resource matching the currently running ncs.
*
* Returns the currently executing script resource .
*
* @return ncs resource for current script.
* @author Georg Zoeller
*/
resource GetCurrentScriptResource() = 308;
/** @} */
/*****************************************************************/
/*****************************************************************/
// Position / Orientation
/*****************************************************************/
/** @addtogroup posorient Position & Orientation Functions
*
* Functions to modify and access position and orientation.
*/
/** @{ */
/** @brief Returns the direction an object is facing.
*
* Returns the direction the object oTarget is currently facing in degrees. The direction
* an object is facing is expressed as an incrementing clockwise degree value
* starting from the south. Related constants are: DIRECTION_NORTH, DIRECTION_EAST,
* DIRECTION_SOUTH and DIRECTION_WEST.
*
* @param oTarget - The object to get the facing direction of.
* @return Returns the direction the object is facing in degrees. Returns -1.0f on error.
* @sa SetFacing(), SetFacingPosition(), SetFacingObject(), SetOrientation(), GetOrientation()
* @author Brenon
*/
float GetFacing( object oTarget ) = 17;
/** @brief Sets the direction an object is facing.
*
* Sets the direction the object oTarget is currently facing in degrees. The direction
* an object is facing is expressed as an incrementing clockwise degree value
* starting from the south. Related constants are: DIRECTION_NORTH, DIRECTION_EAST,
* DIRECTION_SOUTH and DIRECTION_WEST.
*
* @param oTarget - The Object to set the facing direction of.
* @param fFacing - The direction the object will face.
* @remarks If the specified object is invalid or does not have an orientation then the
* function will fail.
* @sa GetFacing(), SetFacingPosition(), SetFacingObject(), SetOrientation(), GetOrientation()
* @author Brenon
*/
void SetFacing( object oTarget, float fFacing ) = 18;
/** @brief Returns the orientation of the object.
*
* Returns the orientation of the object in vector format.
*
* @param oTarget - Object to get the orientation from.
* @returns Returns a vector representing the orientation of the target object. Returns an empty vector on error.
* @sa SetOrientation(), SetFacing(), GetFacing(), SetFacingPosition(), SetFacingObject()
* @author Brenon
*/
vector GetOrientation( object oTarget ) = 656;
/** @brief Sets the orientation of the target object.
*
* Sets the orientation of the target object.
*
* @param oTarget - Object to set the orientation for.
* @param vOrientation - Vector orientation to set for the object.
* @remarks If the target object is invalid or does not have an orientation then the function
* will fail.
* @sa GetOrientation(), SetFacing(), GetFacing(), SetFacingPosition(), SetFacingObject()
* @author Brenon
*/
void SetOrientation( object oTarget, vector vOrientation ) = 657;
/** @brief Returns the position of an object.
*
* Returns a position vector containting the xyz coordinates of the object oTarget.
*
* @param oTarget - The Object to get the position of.
* @return Returns a vector containing the position of the specified object. Returns an empty vector on error.
* @sa SetPosition()
* @author Brenon
*/
vector GetPosition( object oTarget) = 21;
/** @brief Sets the position of an object.
*
* Sets the position of the object oObject to the xyz coordinates contained in the vector
* vPosition. If bSafePosition is set to TRUE, then a safe position will be computed based
* off of the vector vPosition and this position will be used. A safe position is a valid
* position on the nearest walkable mesh.
*
* @param oObject - The Object to set the position of.
* @param vPosition - The position vector containing the new coordinates.
* @param bSafePosition - Specifies whether a safe position should be calculated and used.
* @param bForceCameraReset - Force a camera position reset to the new creature position; ignored
* if oObject is not the player controlled creature.
* @remarks If an invalid object is specified then the function will fail.
* @remarks If a non-creature object is specified, a safe position can not be computed
* for the object so vPosition will be used, regardless of whether or not it is safe.
* @remarks If a safe position cannot be found and the bSafePosition flag is set to TRUE,
* the function will fail.
* @sa GetPosition()
* @author Brenon
*/
void SetPosition( object oObject, vector vPosition, int bSafePosition = TRUE, int bForceCameraReset = TRUE ) = 22;
/** @brief Sets an object to face a given position.
*
* Sets the object oObject to face the position contained in vector vPosition.
*
* @param oObject - Object to set the facing for.
* @param vPosition - Vector position to face towards.
* @remarks If the target object is invalid the function will fail.
* @sa SetFacing(), GetFacing(), SetFacingObject()
* @author Brenon
*/
void SetFacingPosition( object oObject, vector vPosition ) = 23;
/** @brief Sets the target to face a given object.
*
* Sets the target object to face a given object.
*
* @param oObject - Object to set the facing for.
* @param oTarget - Object to face.
* @param bInvert - This flag is very confusing, currently when set to FALSE it will invert. Why?
* @param bInstant - By default an object will change its facing gradually, set this to true
* to change facing immediately.
* @remarks If the object or the target object are invalid, the function will fail.
* @sa SetFacing(), GetFacing(), SetFacingPosition()
* @author Brenon
*/
void SetFacingObject( object oObject, object oTarget, int bInvert = TRUE, int bInstant = FALSE ) = 24;
/** @brief Gets the angle between two objects
*
* Returns the angle (in degrees) between the direction objectA is facing and
* the vector formed between objectA and objectB. The angle follows a
* counterclockwise sequence, starting from the front. If a objectB is derectly in front
* of objectA, the angle will be 0. If object B is exactly to the left, the angle will be
* 90 degrees. If object B is behind object A, the angle will be 180, and if object B is
* to the right, the angle will be 270.
*
* @param oObjectA - Object that has a facing direction.
* @param oObjectB - Object that is positioned relative to object A.
* @author Gabo.
*/
float GetAngleBetweenObjects( object oObjectA, object oObjectB ) = 161;
/** @} */
/*****************************************************************/
/*****************************************************************/
// Math
/*****************************************************************/
/** @addtogroup math Math Functions
*
* Math, vector and LOS related functions.
*/
/** @{ */
/** @brief Returns a random integer.
*
* Returns a random integer between 0 and nMaxInteger - 1 inclusive.
*
* @param nMaxInteger - The exclusive upper limit on the random number generated.
* @returns Returns a value between 0 and nMaxInteger - 1. Returns 0 on an error.
* @author Brenon
*/
int Random( int nMaxInteger ) = 25;
/** @brief Returns a random float.
*
* Returns a random floating point value between 0.0 and 1.0.
*
* @returns Returns a floating point value between 0.0 and 1.0.
*/
float RandomFloat() = 767;
/** @brief Returns the absolute value of an integer.
*
* Returns the absolute value of integer nValue.
*
* @param nValue - The integer to get the absolute value of.
* @returns Returns the absolute value of nValue. There is no error return.
* @sa fabs()
* @author Brenon
*/
int abs( int nValue ) = 26;
/** @brief Returns the absolute value of a float.
*
* Returns the absolute value of the float fValue.
*
* @param fValue - The float to get the absolute value of.
* @returns The absolute value of the float fValue. There is no error return.
* @sa abs()
* @author Brenon
*/
float fabs( float fValue ) = 27;
/** @brief Returns the cosine of an angle.
*
* Returns the cosine of the float fValue. fValue is an angle in radians.
*
* @param fValue - The angle in radians.
* @returns The cosine of the angle in radians.
* @sa sin(), tan(), acos(), asin(), atan()
* @author Brenon
*/
float cos( float fValue ) = 28;
/** @brief Returns the sine of an angle.
*
* Returns the sine of the float fValue. fValue is an angle in radians.
*
* @param fValue - The angle in radians.
* @returns The sine of the angle in radians.
* @sa cos(), tan(), acos(), asin(), atan()
* @author Brenon
*/
float sin( float fValue ) = 29;
/** @brief Returns the tangent of an angle.
*
* Returns the tangent of the float fValue. fValue is an angle in radians.
*
* @param fValue - The angle in radians.
* @returns The tangent of the angle in radians.
* @sa cos(), sin(), acos(), asin(), atan()
* @author Brenon
*/
float tan( float fValue ) = 30;
/** @brief Returns the arccosine of an angle.
*
* Returns the arccosine of the float fValue. fValue is an angle in radians.
*
* @param fValue - The angle in radians.
* @returns The arccosine of the angle in radians.
* @sa cos(), sin(), tan(), asin(), atan()
* @author Brenon
*/
float acos( float fValue ) = 31;
/** @brief Returns the arcsine of an angle.
*
* Returns the arcsine of the float fValue. fValue is an angle in radians.
*
* @param fValue - The angle in radians.
* @returns The arcsine of the angle in radians.
* @sa cos(), sin(), tan(), acos(), atan()
* @author Brenon
*/
float asin( float fValue ) = 32;
/** @brief Returns the arctangent of an angle.
*
* Returns the arctangent of the float fValue. fValue is an angle in radians.
*
* @param fValue - The angle in radians.
* @returns The arctangent of the angle in radians.
* @sa cos(), sin(), tan(), acos(), asin()
* @author Brenon
*/
float atan( float fValue ) = 33;
/** @brief Returns the log of a float.
*
* Returns the natural logarithm of the float fValue.
*
* @param fValue - The floating point number to calculate the natural log of.
* @returns Returns the natural log of fValue, 0 on error.
* @remarks The log function only exists for values > 0.0f, a value of 0.0f or less will return 0.0f.
* @author Brenon
*/
float log( float fValue ) = 34;
/** @brief Returns a base value to an exponent.
*
* Returns the float fValue raised to the power of float fExponent.
*
* @param fValue - Base value.
* @param fExponent - Exponent value.
* @returns The value of fValue raised to the power of fExponent.
* @sa sqrt()
* @author Brenon
*/
float pow( float fValue, float fExponent ) = 35;
/** @brief Returns the square root of a float.
*
* Returns the square root of float fValue. fValue must be positive or 0.0f will be returned.
*
* @param fValue - The floating point value to take the square root of.
* @returns The square root of fValue. Returns 0.0f on error.
* @remarks fValue must be a positive number.
* @sa pow()
* @author Brenon
*/
float sqrt( float fValue ) = 36;
/** @brief Returns the distance between two objects.
*
* Returns the distance between object oObjectA and object oObjectB. Distance is measured through
* three dimmensional space and not just along the xy plane, so the height component of each object's location
* is relevant. If creatures, we assume that A is attacking B, so we use the closest interaction point on B relative to A.
*
* @param oObjectA - The first object. (attacker)
* @param oObjectB - The second object. (being attacked by B)
* @param bSubtractPersonalSpace - Removes personal spaces of A and B from the returned distance
* @returns Returns the distance between the two objects. Returns -1.0f on error.
* @sa GetDistanceBetweenLocations()
* @author Nicolas
*/
float GetDistanceBetween( object oObjectA, object oObjectB, int bSubtractPersonalSpace = 0) = 37;
/** @brief Returns the distance between two locations.
*
* Returns the distance between location lLocationA and location lLocationB Distance is measured through
* three dimmensional space and not just along the xy plane, so the hieght component of each object's location
* is relevant.
*
* @param lLocationA - The first location.
* @param lLocationB - The second location.
* @returns Returns the distance between the two locations. Returns -1.0f on error.
* @sa GetDistanceBetween()
* @author Brenon
*/
float GetDistanceBetweenLocations( location lLocationA, location lLocationB ) = 38;
/** @brief Determines if an object is in a trigger.
*
* Returns TRUE if the object oObject is within the trigger oTrigger, otherwise returns FALSE.
*
* @param oObject - The object which may be within the trigger.
* @param oTrigger - The trigger the object may be within.
* @returns TRUE if the object oObject is in the trigger oTrigger.
* @author Brenon
*/
int IsInTrigger( object oObject, object oTrigger ) = 39;
/** @brief Determines if a vector is empty.
*
* Returns TRUE if the vector vVector is empty, otherwise returns FALSE. An empty vector is a vector with
* x, y and z values of 0.0f.
*
* @param vVector - The vector which may be empty.
* @returns Returns TRUE if the vector vVector is empty, FALSE if it is not.
* @author Brenon
*/
int IsVectorEmpty( vector vVector ) = 40;
/** @brief Creates a vector.
*
* Returns a new vector with the specified x,y and z values.
*
* @param x - x value for the vector.
* @param y - y value for the vector.
* @param z - z value for the vector.
* @returns Returns a vector with the specified x, y, and z values.
* @sa GetVectorMagnitude(), GetVectorNormalize()
* @author Brenon
*/
vector Vector( float x = 0.0f, float y = 0.0f, float z = 0.0f ) = 41;
/** @brief Returns the magnitude of a vector.
*
* Returns the magnitude of the vector vVector. This is also known as the length of the vector.
*
* @param vVector - The vector to calculate the magnitude of.
* @returns Returns the floating point magnitude of the vector.
* @sa Vector(), GetVectorNormalize()
* @author Brenon
*/
float GetVectorMagnitude( vector vVector ) = 42;
/** @brief Normalizes a vector.
*
* Returns a normalized version of the vector vVector.
*
* @param vVector - The vector to normalize.
* @returns Returns a normalized vector. Returns an empty vector on error.
* @sa Vector(), GetVectorMagnitude()
* @author Brenon
*/
vector GetVectorNormalize( vector vVector ) = 43;
/** @brief Converts an angle to a vector.
*
* Converts the specified angle (in degrees) to a vector.
*
* @param fAngle - The angle to convert to a vector.
* @returns Returns a vector representation of the angle specified.
* @sa VectorToAngle()
* @author Brenon
*/
vector AngleToVector( float fAngle ) = 44;
/** @brief Converts a vector to an angle.
*
* Converts the specified vector to an angle (in degrees).
*
* @param vVector - The vector to convert to an angle.
* @returns Returns a floating point degree value.
* @sa AngleToVector()
* @author Brenon
*/
float VectorToAngle( vector vVector ) = 45;
/** @brief Determines if there is a line of sight between two objects.
*
* Returns TRUE if there is a clear line of sight between object oSource and object oTarget, otherwise returns FALSE.
* If the line is occluded by geometry then the function will return FALSE. If the two objects are not in the same
* area or if either object is invalid this function will return FALSE.
*
* @param oSource - The first object.
* @param oTarget - The second object.
* @returns Returns TRUE if there is a clear line of sight between the two objects. Returns FALSE if there is not.
* @remarks It should be noted that the function is somewhat expensive and should not be called in an inner loop of your script.
* @sa CheckLineOfSightVector()
* @author Brenon
*/
int CheckLineOfSightObject( object oSource, object oTarget ) = 46;
/** @brief Determines if there is a line of sight between two positions.
*
* Returns TRUE if there is a line of sight between the position contained in vector vSource and the position contained
* in vector vTarget, otherwise returns FALSE. If the line is occluded by geometry then the function will return FALSE.
* Both vectors are assumed to refer to positions in the area the object running this function is currently in, therefore
* this function must be run on an object which is in the area in which you wish to test the line of sight.
*
* @param vSource - The first position vector.
* @param vTarget - The second position vector.
* @returns Returns TRUE if there is a clear line of sight between the two positions. Returns FALSE if there is not.
* @remarks This function must be run on a valid object in the area, ie: a creature, placeable... etc.
* @remarks It should be noted that the function is somewhat expensive and should not be called in an inner loop of your script.
* @sa CheckLineOfSightObject()
* @author Brenon
*/
int CheckLineOfSightVector( vector vSource, vector vTarget ) = 47;
/** @}*/
/*****************************************************************/
/*****************************************************************/
// Conversions
/*****************************************************************/
/** @addtogroup conversions Conversion Functions
*
* Functions to convert from one data type or unit of measurement
* to another.
*/
/** @{*/
/** @brief Converts an integer to a floating point number.
*
* Returns the integer nInteger in floating point format.
*
* @param nInteger - The integer to convert.
* @returns A floating point representation of the integer nInteger.
* @sa FloatToInt(), IntToString(), IntToString(), IntToHexString(), IntToChar()
* @author Brenon
*/
float IntToFloat( int nInteger ) = 48;
/** @brief Converts a floating point number to an integer.
*
* Returns the float fFloat in integer format. Any digits after the decimal point are dropped.
*
* @param fFloat - The floating point number to convert.
* @returns An integer representation of the float fFloat.
* @sa IntToFloat(), FloatToString()
* @author Brenon
*/
int FloatToInt( float fFloat ) = 49;
/** @brief Converts an integer to a string.
*
* Returns the integer nInteger in string format.
*
* @param nInteger - The integer to convert.
* @returns A string representation of the specified integer. Returns an empty string on error.
* @sa StringToInt(), IntToFloat(), IntToString(), IntToHexString(), IntToChar()
* @author Brenon
*/
string IntToString( int nInteger ) = 50;
/** @brief Converts any int, float or object into a string
*
* Objects passed in will be converted into their tag
*
* @param anyData - The variable to convert.
* @returns A string representation of the specified variable
* @sa StringToInt(), IntToFloat(), IntToString(), IntToHexString(), IntToChar()
* @author Georg Zoeller
*/
string ToString( any anyData) = 149;
/** @brief Converts a string to an integer.
*
* Returns the integer at the start of the string sNumber. This function will stop parsing the string
* when it encounters a non-numeric character.
*
* @param sNumber - The string to convert.
* @returns Returns the integer value in the specified string.
* @sa IntToString(), StringToFloat(), StringToVector()
* @author Brenon
*/
int StringToInt( string sNumber ) = 51;
/** @brief Converts a floating point number to a string.
*
* Returns the float fFloat in string format. The string Will include nWidth number of digits before the decimal
* place and nDecimals number of digits after the decimal place.
*
* @param fFloat - The float value to convert.
* @param nWidth - The size of the value before the decimal, must be a value between 0 and 18 inclusive.
* @param nDecimals - The number of decimal places, must be a value between 0 and 9 inclusive.
* @returns Returns a string representation of the specified floating point number.
* @sa StringToFloat(), FloatToInt()
* @author Brenon
*/
string FloatToString( float fFloat, int nWidth = 18, int nDecimals = 9 ) = 52;
/** @brief Converts a string to a floating point number.
*
* Converts a string to a floating point number.
*
* @param sNumber - The string to convert.
* @returns Returns the floating point value in the specified string.
* @sa FloatToString(), StringToInt(), StringToVector()
* @author Brenon
*/
float StringToFloat( string sNumber ) = 53;
/** @brief Converts an object to a string.
*
* Returns the unique ID number of the object oObject in string form.
*
* @param oObject - The object to convert.
* @returns Returns the string representation of the object. Returns an empty string on error.
* @author Brenon
*/
string ObjectToString( object oObject ) = 54;
/** @brief Converts a vector to a string.
*
* Returns the vector vVector in string format. This string will be of the form "x y z" where x,y and z
* are the x,y and z floats contained in the vector vVector.
*
* @param vVector - The vector to convert.
* @returns Returns the string representation of the vector. Returns an empty string on error.
* @sa StringToVector()
* @author Brenon
*/
string VectorToString( vector vVector ) = 55;
/** @brief Converts a string to a vector.
*
* Returns a new vector from the string sString. The format must be "x y z" where x, y and z are floating point numbers.
*
* @param sString - The string to convert.
* @returns Returns the vector contained in the string. Returns an empty vector on error.
* @sa VectorToString(), StringToInt(), StringToFloat()
* @author Brenon
*/
vector StringToVector( string sString ) = 56;
/** @brief Converts an integer to a hexadecimal string.
*
* Returns the integer nInteger int hexadecimal string form.
*
* @param nInteger - The integer to convert.
* @returns Returns a hexadecimal string representation of the specified integer.
* @sa HexStringToInt(), IntToFloat(), IntToString(), IntToString(), IntToChar()
* @author Brenon
*/
string IntToHexString( int nInteger ) = 57;
/** @brief Converts a hexadecimal string to an integer.
*
* Converts a hexadecimal string to an integer.
*
* @param sString - The string to convert.
* @returns Returns the integer representation of the hexadecimal value in the string.
* @sa IntToHexString()
* @author Brenon
*/
int HexStringToInt( string sString ) = 58;
/** @brief Converts a character to an integer value.
*
* Returns the ascii value of the first character in the string string.
*
* @param sString - The string character to convert.
* @returns Returns the integer value of the character in the string.
* @remarks If a string with more than one character is passed in, the function will only convert the first character in the string.
* @sa IntToChar()
* @author Brenon
*/
int CharToInt( string sString ) = 59;
/** @brief Converts an integer to a character.
*
* Returns a string containing a single character for which nInteger is the ascii value. Any bits in the binary representation
* of nInteger beyond the lowest 8 bits are ignored.
*
* @param nInteger - The integer to convert.
* @returns Returns a single character in the string, representing the specified integer.
* @sa CharToInt(), IntToFloat(), IntToString(), IntToString(), IntToHexString()
* @author Brenon
*/
string IntToChar( int nInteger ) = 60;
/** @brief Converts feet to meters.
*
* Returns the float fFeet in meters. There are 0.3048 meters in a foot.
*
* @param fFeet - The number of feet to convert.
* @returns Returns fFeet in meters.
* @sa YardsToMeters()
* @author Brenon
*/
float FeetToMeters( float fFeet ) = 61;
/** @brief Converts yards to meters.
*
* Returns the float fYards in meters. There are 0.9114 meters in a yard.
*
* @param fYards - The number of yards to convert.
* @returns Returns meters.
* @sa FeetToMeters()
* @author Brenon
*/
float YardsToMeters( float fYards ) = 62;
/** @brief Converts a resource type into a string.
*
* Returns the string.
*
* @param sResource - The resource to convert.
* @returns Returns a string.
* @author Paul
*/
string ResourceToString( resource rRes ) = 732;
/** @}*/
/*****************************************************************/
/*****************************************************************/
// Vars
/*****************************************************************/
/** @addtogroup vars Variable Functions
*
* Functions to manage variables on objects.
*/
/** @{*/
/** @brief Retrieves a local integer variable stored on an object.
*
* Returns the value of the integer variable with the name sVarName which is stored
* on the object oObject. If no such variable is stored on the object oObject, 0 is
* returned. To change the value of a local integer value, use SetLocalInt().
*
* @param oObject - The Object the variable is stored on.
* @param nVarName - The ID of the integer variable to retrieve.
* @returns Returns the value of the integer variable. Returns 0 on error.
* @sa SetLocalInt()
* @author Brenon
*/
int GetLocalInt( object oObject, int nVarName ) = 63;
/** @brief Stores a local integer variable on an object.
*
* Sets the value of the local integer variable with the name sVarName on the object
* oObject to the integer value nValue.
*
* @param oObject - Object to store the var on.
* @param nVarName - The ID of the integer variable to store.
* @param nValue - The value of the integer to store.
* @sa GetLocalInt()
* @author Brenon
*/
void SetLocalInt( object oObject, int nVarName, int nValue ) = 64;
/** @brief Retrieves a global integer variable stored in the user's profile.
*
* Returns the value of the integer variable with the given ID which is stored
* in the user's profile. To change the value of a local integer value, use SetGlobalMaxInt().
*
* @param nID - The id of the integer variable to retrieve.
* @returns Returns the value of the integer variable. Returns 0 on error.
* @sa SetGlobalMaxInt()
* @author Owen
*/
int GetGlobalMaxInt( int nID ) = 527;
/** @brief Stores a global integer variable in the user's profile.
*
* Sets the value of the global integer variable with the given ID in the user's
* profile to the integer value nValue as long as nValue is larget than the stored
* value.
*
* @param nID - The id of the integer variable to store.
* @param nValue - The value of the integer to store.
* @sa GetGlobalMaxInt()
* @author Owen
*/
void SetGlobalMaxInt( int nID, int nValue ) = 528;
/** @brief Increment a global integer variable stored in the user's profile.
*
* Increments and returns the new value of the global integer with given ID
* which is stored in the user's profile.
*
* @param nID - The id of the integer variable to retrieve.
* @returns Returns the value of the integer variable. Returns 0 on error.
* @sa GetGlobalIncrementalInt()
* @author Owen
*/
int IncrementGlobalInt( int nID, int nByValue ) = 599;
/** @brief Retrieves a global integer variable stored in the user's profile.
*
* Returns the value of the integer variable with the given ID which is stored
* in the user's profile. To change the value of a local integer value, use SetGlobalMaxInt().
*
* @param nID - The id of the integer variable to retrieve.
* @returns Returns the value of the integer variable. Returns 0 on error.
* @sa IncrementGlobalInt()
* @author Owen
*/
int GetGlobalIncrementalInt( int nID ) = 631;
/** @brief Retrieves a global unlock from the user's profile.
*
* Returns the state of the global unlock with the given ID which is stored
* in the user's profile. To set the global unlock, use SetGlobalUnlock().
*
* @param nID - The id of global unlock to retrieve.
* @returns Returns the state of the global unlock. Returns 0 on error.
* @sa SetGlobalUnlock()
* @author Owen
*/
int GetGlobalUnlock( int nID ) = 556;
/** @brief Sets a global unlock in the user's profile.
*
* Sets the state to true for the global unlock with the given ID in the user's profile.
*
* @param nID - The id of the global unlock to set.
* @sa GetGlobalUnlock()
* @author Owen
*/
void SetGlobalUnlock( int nID ) = 557;
/** @brief Retrieves the playthrough ID.
*
* Returns the playthrough ID for the current game
*
* @returns Returns the playthrough ID.
* @author Owen
*/
int GetPlaythroughID() = 648;
/** @brief Returns 1 if the user has been online and owns the Entitlement.
*
* Returns true if the user has been online and owns the Entitlement.
*
* @param sGroup - The group for the entitlement
* @param sName - The name of the entitlement
* @returns Returns 1 if the user has been online and owns the Entitlement
* @sa SetEntitlement(Group, Name)
* @author Owen
*/
int GetEntitlement( string sGroup, string sName ) = 411;
/** @brief Tries to set an Entitlement on the player
*
* Tries to grant an entitlement to the user. User must be online and Entitlement
* must be in the Whitelisted group
*
* @param sGroup - The group for the entitlement
* @param sName - The name of the entitlement
* @sa GetEntitlement()
* @author Owen
*/
void SetEntitlement( string sGroup, string sName ) = 412;
/** @brief Gets a local floating point variable off of an object.
*
* Gets a local floating point variable sVarName on the specified
* object.
*
* @param oObject - Object to get the var on.
* @param nVarName - The ID of the floating point variable to retrieve.
* @returns Returns the floating point variable, returns 0.0f on error.
* @sa SetLocalFloat()
* @author Brenon
*/
float GetLocalFloat( object oObject, int nVarName ) = 66;
/** @brief Sets a local floating point variable on an object.
*
* Sets a local floating point variable sVarName on the specified
* object.
*
* @param oObject - Object to set the variable on.
* @param nVarName - The ID of the floating point variable to set.
* @param fValue - The value of the variable to set.
* @sa GetLocalFloat()
* @author Brenon
*/
void SetLocalFloat( object oObject, int nVarName, float fValue ) = 67;
/** @brief Gets a local string variable on an object.
*
* Gets a local string variable sVarName on the specified
* object.
*
* @param oObject - Object to get the variable from.
* @param nVarName - The ID of the string variable to retrieve.
* @returns Returns the string variable, returns an empty string on error.
* @sa SetLocalString()
* @author Brenon
*/
string GetLocalString( object oObject, int nVarName ) = 69;
/** @brief Sets a local string variable on an object.
*
* Sets a local string variable sVarName on the specified
* object.
*
* @param oObject - Object to set the variable on.
* @param nVarName - The ID of the string variable to set.
* @param sValue - The value of the string variable.
* @sa GetLocalString()
* @author Brenon
*/
void SetLocalString( object oObject, int nVarName, string sValue ) = 70;
/** @brief Gets a local object variable on an object.
*
* Gets a local object variable sVarName on the specified
* object.
*
* @param oObject - Object to get the variable from.
* @param nVarName - The ID of the object variable to retrieve.
* @returns Returns the object variable, returns an invalid object on error.
* @sa SetLocalObject()
* @author Brenon
*/
object GetLocalObject( object oObject, int nVarName ) = 72;
/** @brief Sets a local object variable on an object.
*
* Sets a local object variable sVarName on the specified
* object.
*
* @param oObject - Object to set the variable on.
* @param nVarName - The ID of the object variable to set.
* @param oValue - The value of the object variable.
* @sa GetLocalObject()
* @author Brenon
*/
void SetLocalObject( object oObject, int nVarName, object oValue ) = 73;
/** @brief Gets a local location variable on an object.
*
* Gets a local location variable sVarName on the specified
* object.
*
* @param oObject - Object to get the variable from.
* @param nVarName - The ID of the variable to retrieve.
* @returns Returns the location variable, returns an invalid location on error.
* @sa SetLocalLocation()
* @author Brenon
*/
location GetLocalLocation( object oObject, int nVarName ) = 75;
/** @brief Sets a local location variable on an object.
*
* Sets a local location variable sVarName on the specified
* object.
*
* @param oObject - Object to set the variable on.
* @param nVarName - The ID of the variable to set.
* @param lValue - The value of the location variable.
* @sa GetLocalLocation()
* @author Brenon
*/
void SetLocalLocation( object oObject, int nVarName, location lValue ) = 76;
/** @brief Gets a local player variable on an object.
*
* Gets a local player variable sVarName on the specified
* object.
*
* @param oObject - Object to get the variable from.
* @param nVarName - The ID of the variable to retrieve.
* @returns Returns the player variable, returns an invalid player on error.
* @sa SetLocalPlayer()
*
* @warning It is very important to note that a player is not a reference to a specific
* player, but rather is a reference to a player slot (player1, player2, player3... etc). So the
* values will not necessarily refer to the same players across a save/load.
* @author Brenon
*/
player GetLocalPlayer( object oObject, int nVarName ) = 78;
/** @brief Sets a local player variable on an object.
*
* Sets a local player variable sVarName on the specified
* object.
*
* @param oObject - Object to set the variable on.
* @param nVarName - The ID of the variable to set.
* @param pPlayer - The value of the player variable.
* @sa GetLocalPlayer()
*
* @warning It is very important to note that a player is not a reference to a specific
* player, but rather is a reference to a player slot (player1, player2, player3... etc). So the
* values will not necessarily refer to the same players across a save/load.
* @author Brenon
*/
void SetLocalPlayer( object oObject, int nVarName, player pPlayer ) = 79;
/** @brief Gets a local event variable on an object.
*
* Gets a local event variable sVarName on the specified
* object.
*
* @param oObject - Object to get the variable from.
* @param nVarName - The ID of the variable to retrieve.
* @returns Returns the event variable, returns an invalid event on error.
* @sa SetLocalEvent()
* @author Brenon
*/
event GetLocalEvent( object oObject, int nVarName ) = 84;
/** @brief Sets a local event variable on an object.
*
* Sets a local event variable sVarName on the specified
* object.
*
* @param oObject - Object to set the variable on.
* @param nVarName - The ID of the variable to set.
* @param evEvent - The value of the event variable to set.
* @sa GetLocalEvent()
* @author Brenon
*/
void SetLocalEvent( object oObject, int nVarName, event evEvent ) = 85;
/** @brief Gets a local command variable on an object.
*
* Gets a local command variable sVarName on the specified
* object.
*
* @param oObject - Object to get the variable from.
* @param nVarName - The ID of the variable to retrieve.
* @returns Returns a command variable, returns an invalid command on error.
* @sa SetLocalCommand()
* @author Brenon
*/
command GetLocalCommand( object oObject, int nVarName ) = 87;
/** @brief Sets a local command variable on an object.
*
* Sets a local command variable sVarName on the specified
* object.
*
* @param oObject - Object to set the variable on.
* @param nVarName - The ID of the variable to set.
* @param cCommand - The value of the variable to set.
* @sa GetLocalCommand()
* @author Brenon
*/
void SetLocalCommand( object oObject, int nVarName, command cCommand ) = 88;
/** @brief Gets a local effect variable on an object.
*
* Gets a local effect variable sVarName on the specified
* object.
*
* @param oObject - Object to get the variable from.
* @param nVarName - The ID of the variable to retrieve.
* @returns Returns an effect variable, returns an invalid effect on error.
* @sa SetLocalEffect()
* @remarks It should be noted that effects taken from current effects on an object are
* just copies of those effects, not references to them.
* @author Brenon
*/
effect GetLocalEffect( object oObject, int nVarName ) = 90;
/** @brief Sets a local effect variable on an object.
*
* Sets a local effect variable sVarName on the specified
* object.
*
* @param oObject - Object to set the variable on.
* @param nVarName - The ID of the variable to set.
* @param eEffect - The value of the effect variable to set.
* @sa GetLocalEffect()
* @remarks It should be noted that effects taken from current effects on an object are
* just copies of those effects, not references to them.
* @author Brenon
*/
void SetLocalEffect( object oObject, int nVarName, effect eEffect ) = 91;
/** @brief Gets a local itemproperty variable on an object.
*
* Gets a local itemproperty variable sVarName on the specified
* object.
*
* @param oObject - Object to get the variable from.
* @param nVarName - The ID of the variable to retrieve.
* @returns Returns an itemproperty variable, returns an invalid itemproperty on error.
* @sa SetLocalItemProperty()
* @remarks It should be noted that item properties taken from current list on an object are
* just copies of those item properties, not references to them.
* @author Brenon
*/
itemproperty GetLocalItemProperty( object oObject, int nVarName ) = 93;
/** @brief Sets a local itemproperty variable on an object.
*
* Sets a local itemproperty variable sVarName on the specified
* object.
*
* @param oObject - Object to set the variable on.
* @param nVarName - The ID of the variable to set.
* @param iItemProperty - The value of the itemproperty variable to set.
* @sa GetLocalItemProperty()
* @remarks It should be noted that item properties taken from current list on an object are
* just copies of those item properties, not references to them.
* @author Brenon
*/
void SetLocalItemProperty( object oObject, int nVarName, itemproperty iItemProperty ) = 94;
/** @brief Get a local variable of type resource on an object
*
* Gets a local variable of type resource on the specified object
*
* @param oObject The object from which to get the variable
* @param nVarName The ID of the variable
* @returns Returns the value of the variable or an empty resource name on error.
* @sa SetLocalResource()
* @author Hesky
*/
resource GetLocalResource(object oObject, int nVarName) = 736;
/** @brief Sets a local variable of type resource on an object
*
* Sets the value of a local variable of type resource on the specified object
*
* @param oObject The object on which to set the variable
* @param nVarName The ID of the variable
* @param sResource The new value of the variable
* @sa GetLocalResource()
* @author Hesky
*/
void SetLocalResource(object oObject, int nVarName, resource sResource) = 737;
/** @brief Gets an integer (or boolean) value from the world vault
*
* @param nVaultId The VaultID of the variable that you want.
* @author David Robinson
*/
int GetVaultInt(int nVaultId) = 417;
/** @brief Gets a float value from the world vault
*
* @param nVaultId The VaultID of the variable that you want.
* @author David Robinson
*/
float GetVaultFloat(int nVaultId) = 418;
/** @brief Gets a string value from the world vault
*
* @param nVaultId The VaultID of the variable that you want.
* @author David Robinson
*/
string GetVaultString(int nVaultId) = 419;
/** @brief Sets an integer value in the world vault
*
* @param nVaultId The VaultID of the variable that you want.
* @author David Robinson
*/
void SetVaultInt(int nVaultId, int nValue) = 413;
/** @brief Sets a float value in the world vault
*
* @param nVaultId The VaultID of the variable that you want.
* @author David Robinson
*/
void SetVaultFloat(int nVaultId, float fValue) = 414;
/** @brief Sets a string value in the world vault
*
* @param nVaultId The VaultID of the variable that you want.
* @author David Robinson
*/
void SetVaultString(int nVaultId, string sValue) = 415;
/** @}*/
/*****************************************************************/
/*****************************************************************/
// Strings
/*****************************************************************/
/** @addtogroup strings String Functions
*
* Functions to manipulate strings.
*/
/** @{*/
/** @brief Returns the length of a string.
*
* Returns the number of characters in the string sString.
*
* @param sString - The string to get the length of.
* @returns Returns the length of the string. Returns -1 on error.
* @author Brenon
*/
int GetStringLength( string sString ) = 96;
/** @brief Converts a string to uppercase.
*
* Returns a string that is exactly the same as sString except all letters are converted to upper case.
*
* @param sString - The string to convert to upper case.
* @returns Returns the string converted to uppercase. Returns an empty string on error.
* @author Brenon
*/
string StringUpperCase( string sString ) = 97;
/** @brief Converts a string to lowercase.
*
* Returns a string that is exactly the same as sString except all letters are converted to lower case.
*
* @param sString - The string to convert.
* @returns Returns the string converted to lowercase, returns an empty string on error.
* @author Brenon
*/
string StringLowerCase( string sString ) = 98;
/** @brief Truncates a string from the right.
*
* Returns a string that is the first nCount characters of the string sString from the right.
*
* @param sString - The string to truncate.
* @param nCount - The number of letters to truncate the string to.
* @returns Returns the truncated string, returns an empty string on error.
* @author Brenon
*/
string StringRight( string sString, int nCount ) = 99;
/** @brief Truncates the string from the left.
*
* Returns a string that is the last nCount characters of the string sString from the left.
*
* @param sString - The string to truncate.
* @param nCount - The number of letters to truncate the string to.
* @returns Returns the truncated string, returns an empty string on error.
* @author Brenon
*/
string StringLeft( string sString, int nCount ) = 100;
/** @brief Inserts a string into another string.
*
* Returns a string which is the string sDestination with the string sString insered at the position index
* nPosition. This index is 0 indexed, so if nPosition = 0 the string sString will be added to the front of
* the string sDestination.
*
* @param sDestination - The destination string.
* @param sString - The string to insert.
* @param nPosition - The position in the destination string to insert at.
* @returns The modified string. Returns an empty string on error.
* @author Brenon.
*/
string InsertString( string sDestination, string sString, int nPosition ) = 101;
/** @brief Returns a substring of a string.
*
* Returns nCount number of sequential characters from the string sString starting at character number nStart.
* Like all string operations, the index is 0 based.
*
* @param sString - The string to extract the substring from.
* @param nStart - The start of the range to extract.
* @param nCount - The number of letters to use in the substring.
* @returns Returns the specified substring, returns an empty string on error.
* @author Brenon
*/
string SubString( string sString, int nStart, int nCount ) = 102;
/** @brief Returns the position of a substring within a string.
*
* Returns the starting index of the first occurence of the substring sSubstring within the string sString
* beginning at position nStart. Returns -1 if the string sSubstring does not occur in the string sString
* after position nStart. The result is 0 indexed, meaning this function will return 0 if the substring
* occurs at the very beginning of the string.
*
* @param sString - The string to search.
* @param sSubString - The substring to search for.
* @param nStart - The position to start the search from.
* @returns Returns the position of the substring, returns -1 on error.
* @author Brenon
*/
int FindSubString( string sString, string sSubString, int nStart = 0) = 103;
/** @brief Determines if a string is empty.
*
* Returns TRUE if the string sString is an empty string.
*
* @param sString - The string which may be empty.
* @returns Returns TRUE if the string is an empty string, FALSE otherwise.
* @author Brenon
*/
int IsStringEmpty( string sString ) = 104;
/** @brief Returns a string matching a string id
*
* Returns a string matching a string id or an empty string if the string id is not used.
* Note that this will always get the 'male' string for talktables that have additional
* female entries in the talktable
*
* @param nId The String Id.
* @returns String.
* @author Georg
*/
string GetStringByStringId( int nId) = 179;
/** @}*/
/*****************************************************************/
/*****************************************************************/
// Events
/*****************************************************************/
/** @addtogroup events Event Functions
*
* Functions to manipulate and handle events.
*/
/** @{*/
/** @brief Signals the event to the specified object.
*
* Signals the specified event to the target object.
*
* @param oObject - The object to signal the event to.
* @param evEvent - The event to signal.
* @sa SignalEventToDataSet()
* @author Brenon
*/
void SignalEvent( object oObject, event evEvent, int bProcessImmediate = 0 ) = 105;
/** @brief Signals a delayed event to the specified object.
*
* Signals a delayed event to the target object.
*
* @param fSeconds - The number of seconds for which to delay the event.
* @param oObject - The object to signal the event to.
* @param evEvent - The event to signal.
* @param scriptname - If specified overides the default script
* @remarks With a negative or zero time in fSeconds, the event will run on the next AI update.
*
* @author MarkB
*/
void DelayEvent( float fSeconds, object oObject, event evEvent, string scriptname = "") = 128;
/** @brief Builds an IndividualAbilityImpact from a SpellImpact struct and signals it
*
* Signals a delayed event to the target object.
*
* @param fSeconds - The number of seconds for which to delay the event.
* @param oObject - The object to signal the event to.
* @param evEvent - The event to signal.
* @param scriptname - If specified overides the default script
* @param nEventType - Type of event
* @param oCaster - Caster using the ability.
* @param oTarget - Target of the Ability.
* @param nAbility - The Ability ID.
*
* @author Carson Fee
*/
void ConstructAbilityImpactandDelayEvent( float fSeconds, object oObject, string a_scriptname, int nEventType, object oCaster, object oTarget, object oItem, object oTarget2, float fDamage, int nAbility, int nCombatResult, int nHit, int nHand, int nDamage, vector lTarget ) = 890;
/** @brief Creates an event of the specified type.
*
* Creates an event of the specified type.
*
* @param nEventType - The type of event to create.
* @returns Returns an event of the specified type, returns an invalid event on error.
* @author Brenon
*/
event Event( int nEventType ) = 106;
/** @brief Returns TRUE if the event is valid.
*
* Returns TRUE if the specified event is a valid
* event.
*
* @param evEvent - The event to test.
* @returns Returns TRUE if the event is valid, FALSE if it is not.
* @author Brenon
*/
int IsEventValid( event evEvent ) = 107;
/** @brief Gets the current event for the event script.
*
* Gets the current event for the event script that was just fired.
* This function should only be used in the event script.
*
* @returns Returns the current event.
* @remarks Using this function outside of the event script might result
* in odd behaviour as the event returned might be invalid.
* @sa HandlevEvent()
* @author Brenon
*/
event GetCurrentEvent() = 108;
/** @brief Gets the current type of the event for the event script.
*
* Gets the type of current event for the event script that was just fired
* without needing to access it, which is slightly faster
* This function should only be used in the event script.
*
* @returns Returns the type of the current event.
* @author Noel
*/
int GetCurrentEventType() = 654;
/** @brief Gets event creator.
*
* Returns the creator of the specified event.
* This function is deprecated. Please use GetEventCreatorRef() instead.
*
* @param evEvent - The event to check.
* @returns Returns the creator object of the event, returns an invalid object on error.
* @sa SetEventCreator()
* @author Brenon
*/
object GetEventCreator( event evEvent ) = 109;
/** @brief Sets the event creator.
*
* Sets the creator of the specified event.
* This function is deprecated. Please use SetEventCreatorRef() instead.
*
* @param evEvent - The event to set the creator on.
* @param oCreator - The object to set as the creator of the event.
* @returns Returns the modified event, returns an invalid event on error.
* @warning Overriding the creator object on existing events can have adverse effects.
* @sa GetEventCreator()
* @author Brenon
*/
event SetEventCreator( event evEvent, object oCreator ) = 110;
/** @brief Gets the type of event.
*
* Returns the type of the specified event.
* This function is deprecated. Please use GetEventTypeRef() instead.
*
* @param evEvent - The event to check.
* @returns Returns the type of the specified event.
* @sa SetEventType()
* @author Brenon
*/
int GetEventType( event evEvent ) = 111;
/** @brief Sets the type of event.
*
* Sets the type of the specified event.
* This function is deprecated. Please use SetEventTypeRef() instead.
*
* @param evEvent - The event to set the type of.
* @param nType - The type of the event.
* @returns Returns the modified event, returns an invalid event on error.
* @warning Overriding event types on existing events can have adverse effects.
* @sa GetEventType()
* @author Brenon
*/
event SetEventType( event evEvent, int nType ) = 112;
/** @brief Gets the specified integer on the event.
*
* Gets the specified integer on the event.
* This function is deprecated. Please use GetEventIntegerRef() instead.
*
* @param evEvent - The event to get the integer off of.
* @param nIndex - The index of the integer to get.
* @returns Returns the specified integer, returns -1 on error.
* @sa SetEventInteger()
* @author Brenon
*/
int GetEventInteger( event evEvent, int nIndex ) = 113;
/** @brief Sets the specified integer on the event.
*
* Sets the specified integer on the event.
* This function is deprecated. Please use SetEventIntegerRef() instead.
*
* @param evEvent - The event to set the integer on.
* @param nIndex - The index of the integer to set.
* @param nValue - The value of the integer to set.
* @returns Returns the modfied event, returns an invalid event on error.
* @remarks It should be noted that there is no maximum number of values
* on an event, as the array of values on the event expands as needed.
* @sa GetEventInteger()
* @author Brenon
*/
event SetEventInteger( event evEvent, int nIndex, int nValue ) = 114;
/** @brief Gets the specified float on the event.
*
* Gets the specified floating point number on the event.
* This function is deprecated. Please use GetEventFloatRef() instead.
*
* @param evEvent - The event to get the float off of.
* @param nIndex - The index of the float to get.
* @returns Returns the specified float, returns -1.0f on error.
* @sa SetEventFloat()
* @author Brenon
*/
float GetEventFloat( event evEvent, int nIndex ) = 115;
/** @brief Sets the specified float on the event.
*
* Sets the specified floating point value on the event.
* This function is deprecated. Please use SetEventFloatRef() instead.
*
* @param evEvent - The event to set the float on.
* @param nIndex - The index of the float to set.
* @param fValue - The value of the float to set.
* @returns Returns the modified event, returns an invalid event on error.
* @remarks It should be noted that there is no maximum number of values
* on an event, as the array of values on the event expands as needed.
* @sa GetEventFloat()
* @author Brenon
*/
event SetEventFloat( event evEvent, int nIndex, float fValue ) = 116;
/** @brief Gets the specified object on the event.
*
* Gets the specified object on the event.
* This function is deprecated. Please use GetEventObjectRef() instead.
*
* @param evEvent - The event to get the object off of.
* @param nIndex - The index of the object to get.
* @returns Returns the specified object, returns an invalid object on error.
* @sa SetEventObject()
* @author Brenon
*/
object GetEventObject( event evEvent, int nIndex ) = 117;
/** @brief Sets the specified object on the event.
*
* Sets the specified object on the event.
* This function is deprecated. Please use SetEventObjectRef() instead.
*
* @param evEvent - The event to set the object on.
* @param nIndex - The index of the object to set.
* @param oValue - The value of the object to set.
* @returns Returns the modified event, returns an invalid event on error.
* @remarks It should be noted that there is no maximum number of values
* on an event, as the array of values on the event expands as needed.
* @sa GetEventObject()
* @author Brenon
*/
event SetEventObject( event evEvent, int nIndex, object oValue ) = 118;
/** @brief Gets the specified string on the event.
*
* Gets the specified string on the event.
* This function is deprecated. Please use GetEventStringRef() instead.
*
* @param evEvent - The event to get the string from.
* @param nIndex - The index of the string to get.
* @returns Returns the specified string, returns an empty string on error.
* @sa SetEventString()
* @author Brenon
*/
string GetEventString( event evEvent, int nIndex ) = 119;
/** @brief Sets the specified string on the event.
*
* Sets the specified string on the event.
* This function is deprecated. Please use SetEventStringRef() instead.
*
* @param evEvent - The event to set the string on.
* @param nIndex - The index of the string to set.
* @param sValue - The value of the string to set.
* @returns Returns the modified event, returns an invalid event on error.
* @remarks It should be noted that there is no maximum number of values
* on an event, as the array of values on the event expands as needed.
* @author Brenon
*/
event SetEventString( event evEvent, int nIndex, string sValue ) = 120;
/** @brief Gets the specified resource on the event.
*
* Gets the specified resource on the event.
* This function is deprecated. Please use GetEventResourceRef() instead.
*
* @param evEvent - The event to get the resource from.
* @param nIndex - The index of the resource to get.
* @returns Returns the specified resource, returns an empty resource on error.
* @sa SetEvenResource()
* @author Paul
*/
resource GetEventResource( event evEvent, int nIndex ) = 735;
/** @brief Sets the specified resource on the event.
*
* Sets the specified resource on the event.
* This function is deprecated. Please use SetEventResourceRef() instead.
*
* @param evEvent - The event to set the resource on.
* @param nIndex - The index of the resource to set.
* @param sValue - The value of the resource to set.
* @returns Returns the modified event, returns an invalid event on error.
* @remarks It should be noted that there is no maximum number of values
* on an event, as the array of values on the event expands as needed.
* @author Paul
*/
event SetEventResource( event evEvent, int nIndex, resource rValue ) = 734;
/** @brief Gets the specified location on the event.
*
* Gets the specified location on the event.
* This function is deprecated. Please use GetEventVectorRef() instead.
*
* @param evEvent - The event to get the location from.
* @param nIndex - The index of the location to get.
* @returns Returns the specified vector - returns an empty location on error.
* @sa GetEventVector
* @author Adriana
*/
vector GetEventVector( event evEvent, int nIndex ) = 131;
/** @brief Sets the specified vector on the event.
*
* Sets the specified vector on the event.
* This function is deprecated. Please use SetEventVectorRef() instead.
*
* @param evEvent - The event to set the location on.
* @param nIndex - The index of the vector to set.
* @param vValue - The value of the vector to set.
* @returns Returns the modified event, returns an invalid event on error.
* @remarks It should be noted that there is no maximum number of values
* on an event, as the array of values on the event expands as needed.
* @author Adriana
*/
event SetEventVector( event evEvent, int nIndex, vector vValue ) = 132;
/** @brief Gets event creator.
*
* Returns the creator of the specified event.
*
* @param evEvent - The event to check.
* @returns Returns the creator object of the event, returns an invalid object on error.
* @sa SetEventCreatorRef()
* @author MarkB
*/
object GetEventCreatorRef( ref event evEvent ) = 912;
/** @brief Sets the event creator.
*
* Sets the creator of the specified event.
*
* @param evEvent - The event to set the creator on.
* @param oCreator - The object to set as the creator of the event.
* @warning Overriding the creator object on existing events can have adverse effects.
* @sa GetEventCreatorRef()
* @author Brenon
*/
void SetEventCreatorRef( ref event evEvent, object oCreator ) = 913;
/** @brief Gets the type of event.
*
* Returns the type of the specified event.
*
* @param evEvent - The event to check.
* @returns Returns the type of the specified event.
* @sa SetEventTypeRef()
* @author MarkB
*/
int GetEventTypeRef( ref event evEvent ) = 914;
/** @brief Sets the type of event.
*
* Sets the type of the specified event.
*
* @param evEvent - The event to set the type of.
* @param nType - The type of the event.
* @returns Returns the modified event, returns an invalid event on error.
* @warning Overriding event types on existing events can have adverse effects.
* @sa GetEventTypeRef()
* @author MarkB
*/
void SetEventTypeRef( ref event evEvent, int nType ) = 915;
/** @brief Gets the specified integer on the event.
*
* Gets the specified integer on the event.
*
* @param evEvent - The event to get the integer off of.
* @param nIndex - The index of the integer to get.
* @returns Returns the specified integer, returns -1 on error.
* @sa SetEventIntegerRef()
* @author MarkB
*/
int GetEventIntegerRef( ref event evEvent, int nIndex ) = 916;
/** @brief Sets the specified integer on the event.
*
* Sets the specified integer on the event.
*
* @param evEvent - The event to set the integer on.
* @param nIndex - The index of the integer to set.
* @param nValue - The value of the integer to set.
* @remarks It should be noted that there is no maximum number of values
* on an event, as the array of values on the event expands as needed.
* @sa GetEventIntegerRef()
* @author MarkB
*/
void SetEventIntegerRef( ref event evEvent, int nIndex, int nValue ) = 917;
/** @brief Gets the specified float on the event.
*
* Gets the specified floating point number on the event.
*
* @param evEvent - The event to get the float off of.
* @param nIndex - The index of the float to get.
* @returns Returns the specified float, returns -1.0f on error.
* @sa SetEventFloatRef()
* @author MarkB
*/
float GetEventFloatRef( ref event evEvent, int nIndex ) = 918;
/** @brief Sets the specified float on the event.
*
* Sets the specified floating point value on the event.
*
* @param evEvent - The event to set the float on.
* @param nIndex - The index of the float to set.
* @param fValue - The value of the float to set.
* @remarks It should be noted that there is no maximum number of values
* on an event, as the array of values on the event expands as needed.
* @sa GetEventFloatRef()
* @author MarkB
*/
void SetEventFloatRef( ref event evEvent, int nIndex, float fValue ) = 919;
/** @brief Gets the specified object on the event.
*
* Gets the specified object on the event.
*
* @param evEvent - The event to get the object off of.
* @param nIndex - The index of the object to get.
* @returns Returns the specified object, returns an invalid object on error.
* @sa SetEventObjectRef()
* @author MarkB
*/
object GetEventObjectRef( ref event evEvent, int nIndex ) = 920;
/** @brief Sets the specified object on the event.
*
* Sets the specified object on the event.
*
* @param evEvent - The event to set the object on.
* @param nIndex - The index of the object to set.
* @param oValue - The value of the object to set.
* @returns Returns the modified event, returns an invalid event on error.
* @remarks It should be noted that there is no maximum number of values
* on an event, as the array of values on the event expands as needed.
* @sa GetEventObjectRef()
* @author MarkB
*/
void SetEventObjectRef( ref event evEvent, int nIndex, object oValue ) = 921;
/** @brief Gets the specified string on the event.
*
* Gets the specified string on the event.
*
* @param evEvent - The event to get the string from.
* @param nIndex - The index of the string to get.
* @returns Returns the specified string, returns an empty string on error.
* @sa SetEventStringRef()
* @author MarkB
*/
string GetEventStringRef( ref event evEvent, int nIndex ) = 922;
/** @brief Sets the specified string on the event.
*
* Sets the specified string on the event.
*
* @param evEvent - The event to set the string on.
* @param nIndex - The index of the string to set.
* @param sValue - The value of the string to set.
* @remarks It should be noted that there is no maximum number of values
* on an event, as the array of values on the event expands as needed.
* @author MarkB
*/
void SetEventStringRef( ref event evEvent, int nIndex, string sValue ) = 923;
/** @brief Gets the specified resource on the event.
*
* Gets the specified resource on the event.
*
* @param evEvent - The event to get the resource from.
* @param nIndex - The index of the resource to get.
* @returns Returns the specified resource, returns an empty resource on error.
* @sa SetEventResourceRef()
* @author MarkB
*/
resource GetEventResourceRef( ref event evEvent, int nIndex ) = 926;
/** @brief Sets the specified resource on the event.
*
* Sets the specified resource on the event.
*
* @param evEvent - The event to set the resource on.
* @param nIndex - The index of the resource to set.
* @param sValue - The value of the resource to set.
* @remarks It should be noted that there is no maximum number of values
* on an event, as the array of values on the event expands as needed.
* @author MarkB
*/
void SetEventResourceRef( ref event evEvent, int nIndex, resource rValue ) = 927;
/** @brief Gets the specified location on the event.
*
* Gets the specified location on the event.
*
* @param evEvent - The event to get the location from.
* @param nIndex - The index of the location to get.
* @returns Returns the specified vector - returns an empty location on error.
* @sa SetEventVectorRef()
* @author MarkB
*/
vector GetEventVectorRef( ref event evEvent, int nIndex ) = 924;
/** @brief Sets the specified vector on the event.
*
* Sets the specified vector on the event.
*
* @param evEvent - The event to set the location on.
* @param nIndex - The index of the vector to set.
* @param vValue - The value of the vector to set.
* @remarks It should be noted that there is no maximum number of values
* on an event, as the array of values on the event expands as needed.
* @author MarkB
*/
void SetEventVectorRef( ref event evEvent, int nIndex, vector vValue ) = 925;
/** @brief Handles the event.
*
* Handles the specified event by passing it to the specified
* script for processing. You can access the event in the script
* by calling GetCurrentEvent() and doing all of your processing
* there. This function is executed inline.
*
* You should use HandleEventRef instead. It's faster.
*
* @param evEvent - The event to handle.
* @param rScriptName - The script that will handle the event (*.ncs). If no script is specified
* then the object's default script will be run
* @sa GetCurrentEvent()
* @author Brenon
*/
void HandleEvent( event evEvent, resource rScriptName=R"" ) = 121;
/** @brief Handles the event.
*
* Handles the specified event by passing a reference to it to the specified
* script for processing. You can access the event in the script
* by calling GetCurrentEvent() and doing all of your processing
* there. This function is executed inline. This Ref version is faster
* than the basic version, because no stack copy is required.
*
* @param evEvent - The event to handle.
* @param rScriptName - The script that will handle the event (*.ncs). If no script is specified
* then the object's default script will be run
* @sa GetCurrentEvent()
* @author Noel
*/
void HandleEventRef( ref event evEvent, resource rScriptName=R"" ) = 717;
void HandleEvent_String( event evEvent, string sName = "" ) = 133;
/** @brief Sets the default script for handling events.
*
* Sets the default script for handling events. This is the
* script that will be fire for all event types, specifically
* for engine level events. It should be noted that this can also
* be called on Player Characters - though to get players firing events
* properly, the specified events must first be enabled using EnablevEvent().
*
* @param oObject - The object to set the event script on.
* @param rScriptName - The name of the script to use for default event handling (*.ncs)
* @sa EnablevEvent()
* @author Brenon
*/
void SetEventScript( object oObject, resource rScriptName ) = 122;
/** @brief Enables or disables the specified event for the target object.
*
* Enables or disables the specified event for the target object. It should
* be noted that this function can be used on player characters to enable
* events that by default do not fire for players. By default, events fire
* all the time for NPC's and not at all for PC's.
*
* @param oObject - The object to enable/disable the event type for.
* @param bEnable - Enable or disable the event type.
* @param nEventType - The type of event to enable/disable.
* @sa SetEventScript()
* @author Brenon
*/
void EnablevEvent( object oObject, int bEnable, int nEventType ) = 123;
/** @brief Registers an object to listen to the specified event type on the target object.
*
* Registers an object to listen to the specified event type on the target object.
* When an object is registered as a listener for an event type, whenever the target
* object receives an event of that type a listener event will be fired to the
* listening object with the event data that the listening object can then process.
*
* @param oTarget - The object to listen to.
* @param oListener - The object to register as a listener.
* @param nEventType - The type of event to listen for.
* @remarks It is not possible to listen for other listener events, or for event types
* other than the ones defined in the scripting language.
* @sa UnregisterEventLister(), GetEventTarget()
* @author Brenon
*/
void RegisterEventListener( object oTarget, object oListener, int nEventType ) = 124;
/** @brief Unregisters an object from the listener list.
*
* Unregisters an object from the listener list. for the specific event type on the
* target object. It should be noted that objects will be removed automatically if the
* listening object does not exist.
*
* @param oTarget - The object to unregister from.
* @param oListener - The object to unregister as a listener.
* @param nEventType - The event type to unregister for.
* @sa RegisterEventListener(), GetEventTarget()
* @author Brenon
*/
void UnregisterEventListener( object oTarget, object oListener, int nEventType ) = 125;
/** @brief Returns the target of a specific event.
*
* Returns the intended target object of a specific event. It should be noted
* that this function should only be used with listener events as in other
* cases the target may not be specified correctly.
* GetEventTargetRef() should be used instead- it's faster
*
* @param evEvent - The event to get the target from.
* @returns Returns the target of the specified event, returns an invalid object on error.
* @author Brenon
*/
object GetEventTarget( event evEvent ) = 126;
/** @brief Returns the target of a specific event.
*
* Returns the intended target object of a specific event. It should be noted
* that this function should only be used with listener events as in other
* cases the target may not be specified correctly.
*
* @param evEvent - The event to get the target from.
* @returns Returns the target of the specified event, returns an invalid object on error.
* @author Noel
*/
object GetEventTargetRef( ref event evEvent ) = 756;
/** @}*/
/*****************************************************************/
/*****************************************************************/
// Objects
/*****************************************************************/
/** @addtogroup objects Object Functions
*
* Functions to manage objects (create, destroy, copy and retreive data from them)
*/
/** @{*/
/** @brief Determines if an object exists and is valid.
*
* Returns TRUE if the object oObject exists and is a valid object, FALSE otherwise.
*
* @param oObject - The object which may be valid.
* @returns Returns TRUE if the object exists and is valid, FALSE otherwise.
* @remarks This function is very similiar to checking whether an object is not equal to
* the OBJECT_INVALID constant, but this is a more robust check. An object that has been
* passed as a paramater in a delayed function call or has been stored as a local object
* will not equal the OBJECT_INVALID constant if the object has been destroyed since it was
* stored or passed. This function however will return FALSE in those circumstances. There
* is no instance where an object is equal to the OBJECT_INVALID constant and this function
* will return TRUE.
* @author Brenon
*/
int IsObjectValid( object oObject ) = 206;
/** @brief Returns an object's type.
*
* Returns the object type of the object oObject. Object types are constants (OBJECT_TYPE_*). Returns OBJECT_TYPE_INVALID on failure.
*
* @param oObject - the object to get the type of
* @returns One of the object type constants (OBJECT_TYPE_*) or OBJECT_TYPE_INVALID on failure.
* @author Brenon
*/
int GetObjectType( object oObject ) = 207;
/** @brief Returns the resref of the specified object
*
* Returns the resref of the specified object
*
* @param oObject - the object to get the resref off of
* @returns the resref of the object or an empty string on failure.
* @author Brenon
*/
string GetResRef( object oObject ) = 208;
/** @brief Returns the strref of the given object's name
*
* Returns the strref of the given object's name
*
* @param oObject - the object whose name we want the strref of
* @returns the strref of the given object's name
* @author Pauls
*/
int GetNameStrref( object oObject ) = 838;
/** @brief Returns the tag of the specified object
*
* Returns the tag of the specified object
*
* @param oObject - the object to get the tag off of
* @returns the tag of the object or an empty string on failure.
* @author Brenon
*/
string GetTag( object oObject ) = 209;
/** @brief Sets the tag of the object to the specified value.
*
* Sets the tag of the object to the specified value.
*
* @param oObject - the object to set the tag on
* @param sTag - the tag to set the object
* @author Brenon
*/
void SetTag( object oObject, string sTag ) = 210;
/** @brief Returns the nth specified object with the appropriate tag
*
* Returns the nth specified object with the appropriate tag
*
* @param sTag - The tag reference to get the object by
* @param nNth - If there are multiple objects with the same tag, get the 'nth' specified object.
* @returns the desired object or OBJECT_INVALID on failure
* @author Brenon
*/
object GetObjectByTag( string sTag, int nNth = 0 ) = 211;
/** @brief Create a pool of creatures while loading an area. It should be used under EVENT_TYPE_AREALOAD_PRELOADEXIT. When creatures die or are set inactive they will automatically return to the pool.
*
* @param rTemplate - The template to use
* @param nPoolSize - Number of creatures of this type to create
* @returns TRUE if successful
* @sa CreateObject, SetObjectActive
* @author Jose
*/
int CreatePool( resource rTemplate, int nPoolSize ) = 213;
/** @brief Create an object in the specified location. Will attempt to use a corresponding pool if one exists.
*
* @param nObjectType - The object type (placeable, creature, etc)
* @param rTemplate - The template to use
* @param lLoc - Location of the object
* @param sOverrideScript - Script assigned to the object. If empty, the engine will use the template script
* @param bSpawnActive - Whether or not this object is enabled at spawn time
* @param bNoPermDeath - Set to TRUE to avoid destroying the object permanently (only valid for pool creatures)
* @param oAppearanceCopy - Set to the object which you want to copy appearance data from (*** ONLY USE THIS WITH APPROVAL FROM PROGRAMMING FOR SPECIFIC HITCHING ISSUES ***)
* @returns The new object, OBJECT_INVALID on failure
* @sa CreatePool, DestroyObject
* @author Jose
*/
object CreateObject( int nObjectType, resource rTemplate, location lLoc, string sOverrideScript = "", int bSpawnActive = TRUE, int bNoPermDeath = FALSE, object oAppearanceCopy = OBJECT_INVALID ) = 306;
/** @brief Destroy the specified object. !!GEORG SAYS: DO NOT USE. EVER. Use core_h.Safe_Destroy_Object instead!!
*
* @param oObject - Object to destroy
* @param nDelay - Time in milliseconds to delay the destruction of the object. Immediate destruction by default
* @sa CreateObject
* @author Jose
*/
void DestroyObject( object oObject, int nDelay = 0 ) = 214;
/** @brief Creates an item at a specific location
*
* Creates an item using the specified file name at lLocation. If the object is a creature
then it will also attempt to use an appear animation if the flag is set. If an invalid object type
is specified, the file name does not exist or the location is bad an invalid object will be returned.
* NOTE: As with all commands that add items to a container, this command will reset the container (if a placeable)
* to interactive not matter it's previous state.
*
* @param rItemFileName - The file name of the object to create (*.uti)
* @param oTarget - The item will be created inside the invetory of this object
* @param nStackSize - Stack size of the item to be created
* @param sTag - Optional tag for the new item
* @param bSuppressNotification - if true, the "Item Acquired" notification will not be displayed
* @param bDroppable - if true, the item can be looted when the target creature dies
* @returns a valid new object or OBJECT_INVALID on error
* @author Brenon
*/
object CreateItemOnObject( resource rItemFileName, object oTarget, int nStackSize = 1, string sTag = "", int bSuppressNotification = FALSE, int bDroppable = TRUE ) = 212;
/** @brief Enables or disables an object in the engine. Creatures that belong to a pool will automatically return to it when set inactive.
*
* Each game engine object has a boolean enabled or disabled flag in the engine.
In a "disabled" state, the object will not appear on the client visually, and
will receive no AI updates. GameEffects will remain on the object but all commands
will be cleared upon disabling.
*
* @param oObject - The object to set status on
* @param nActive - Non-zero is active, zero is inactive
* @param nAnimation - The ID of an appear/disappear animation to play
* @param nVFX - The ID of a VFX to add while the animation is playing
* @param nNextLine - queues up the command to run as soon as the next conversation line begins
* @author Derek Beland
*/
void SetObjectActive(object oObject, int nActive, int nAnimation = 0, int nVFX = 0, int nNextLine = 0) = 140;
/** @brief Queries the active status of an object
*
* Each game engine object has a boolean enabled or disabled flag in the engine.
In a "disabled" state, the object will not appear on the client visually, and
will receive no AI updates. Messages will continue to queue up so you are
able to assign actions before enabling the object.
*
* @param oObject - The object query status on
* @returns non-zero if active, zero if inactive
* @author Derek Beland
*/
int GetObjectActive(object oObject) = 141;
/** @brief Sets an object as always being visible.
*
* The engine normally culls out objects that are too far or can't be seen,
this can override this behavior to always show the object as visible.
WARNING: limit the use this function for performance reasons.
*
* @param oObject - The object to set the visibilty for.
* @param bAlwaysVisible - The state to set.
* @author Jacques Lebrun
*/
void SetObjectAlwaysVisible(object oObject, int bAlwaysVisible) = 187;
int IsDestroyable( object oObject ) = 215;
void SetDestroyable( object oObject, int bDestroyable ) = 216;
int IsPlot( object oObject ) = 217;
void SetPlot( object oObject, int bPlot ) = 218;
int IsImmortal( object oObject ) = 219;
/** @brief Sets an object to be unable to drop below 1 health
*
* NOTE: This is the engine function, you should not use it. Use core_h.SetImmortal intead
*
* @param oObject - The object to set the visibilty for.
* @param bImmortal - The state to set.
* @author Georg
*/
void Engine_SetImmortal( object oObject, int bImmortal ) = 220;
int GetAILevel( object oObject ) = 221;
void SetAILevel( object oObject, int nAILevel ) = 222;
/** @brief
*
*Returns an object reference for the area oObject is in.
*
* @param oObject - Target object
* @author Brenon Holmes
*/
object GetArea( object oObject ) = 223;
object GetModule() = 224;
// int IsItemIdentified( object oItem, int nProperty ) = 226;
// void SetItemIdentified( object oItem, int nProperty, int bIdentified ) = 227;
// int GetIdentifyLoreDifficulty() = 228;
// void SetIdentifyLoreDifficulty() = 229;
// void RestoreObject() = 230;
// int GetCreatureStealthMode() = 231;
// int IsCreatureSkillSuccessful() = 232;
/** @brief checks if the specified object is currently conjuring a spell
*
* @param oObject The object to check the conjure state
* @returns TRUE if the object is conjuring
* @author Jose
*/
int IsConjuring(object oObject) = 731;
/** @brief set how long to hold aim for the next projectile to be fired (control speed for archers & ranged combat in general)
*
* @param oObject The object to set the duration for
* @param fDuration Duration of the aim loop (in seconds)
* @author Jose
*/
void SetAimLoopDuration(object oObject, float fDuration) = 394;
/** @brief Specifies the length that attacks will take
*
* @param oObject The object to set the duration for
* @param fDuration_s Duration of the attack (in seconds)
* @author Gabo
*/
void SetAttackDuration(object oObject, float fDuration_s) = 353;
/** @brief return an array of objects enclosed by the specified shape
*
* Returns all objects enclosed by a specific shape.
*
* Parameter Info for generic parameters fA, fB, fC:
*
* SPHERE: fA = radius (meters)
* CONE: fA = radius (meters), fB = angle (degrees)
* RECTANGLE fA = length, fB = width
*
* @param nObjectTypeMask Which objects to look for
* @param nShapeId the shape to use
* @param lLocation origin and direction for this shape
* @param fA floating point generic parameter
* @param fB optional floating point generic parameter
* @param fC optional floating point generic parameter
* @param bExcludeDead filter out dead objects if necessary
* @author Jose
*/
object[] GetObjectsInShape(int nObjectTypeMask, int nShapeId, location lLocation, float fA, float fB = 0.0f, float fC = 0.0f, int bExcludeDead = FALSE) = 673;
/** @brief filter an array of objects enclosed by the specified shape
*
* Filter an array of objects enclosed by the specified shape
*
* Parameter Info for generic parameters fA, fB, fC:
*
* SPHERE: fA = radius (meters)
* CONE: fA = angle (degrees), fB = length (meters)
* CYLINDER: fA = radius (meters), fB = length (meters)
*
* @param aObjects array of objects to filter based on the shape
* @param nObjectTypeMask Which objects to look for
* @param nShapeId the shape to use
* @param lLocation origin and direction for this shape
* @param fA floating point generic parameter
* @param fB optional floating point generic parameter
* @param fC optional floating point generic parameter
* @param bExcludeDead filter out dead objects if necessary
* @sa GetObjectsInShape
* @author Jose
*/
object[] FilterObjectsInShape(object[] aObjects, int nObjectTypeMask, int nShapeId, location lLocation, float fA, float fB = 0.0f, float fC = 0.0f, int bExcludeDead = FALSE) = 197;
/** @brief return an array of creatures contained in the melee ring for the given angles
*
* @param nRingOwnerId id of the creature for which to query the melee ring
* @param fStartAngle the angle where the search should start (supported ranges 0->360 or -180->180)
* @param fEndAngle angle where the search should stop (fEndAngle >= fStartAngle)
* @param bOnlyHostiles set to TRUE if the array should only contain hostile creatures
* @param nRingIndex the ring to query. By default the main ring will respond to the query (ring index 0)
* @author Jose
*/
object[] GetCreaturesInMeleeRing(object nRingOwnerId, float fStartAngle, float fEndAngle, int bOnlyHostiles = FALSE, int nRingIndex = 0) = 205;
/** @brief return the position of a melee ring
*
* @param nRingOwnerId id of the creature for which to query the melee ring
* @param nRingIndex the ring to query. By default the main ring will respond to the query (ring index 0)
* @author Jose
*/
vector GetMeleeRingPosition(object nRingOwnerId, int nRingIndex = 0) = 606;
/** @brief play an animation on top of the current base animation
*
* @param nObjectId id of the object in which to play the animation
* @param nAnimation animation id (must be an additive or override animation)
* @param bForceRestart play the animation again from the start even if it's already playing
* @author Jose
*/
void PlayAdditiveAnimation(object nObjectId, int nAnimation, int bForceRestart = FALSE) = 196;
/** @brief stops an additive animation playing on top of the current base animation
*
* @param nObjectId id of the object in which to stop the animation
* @param nAnimation animation id (must be an additive or override animation)
* @author Noel
*/
void StopAdditiveAnimation(object nObjectId, int nAnimation) = 932;
/** @brief Fire a projectile from a specified source point to a target position
*
* @param nType the projectile type (see the PRJ 2da)
* @param vSourcePosition start position for the projectile
* @param vTargetPosition end position to hit
* @param nCrustEffectId crust vfx to apply to the projectile
* @param bWideAngle enable this to make the projectile follow a longer trajectory
* @param oEventTarget object to send the impact event to
* @returns projectile id
* @sa FireHomingProjectile, SetProjectileImpactEvent
* @author Jose
*/
object FireProjectile(int nType, vector vSourcePosition, vector vTargetPosition, int nCrustEffectId = 0, int bWideAngle = FALSE, object oEventTarget = OBJECT_INVALID) = 193;
/** @brief Fire a tracking projectile from a specified source point to a target object
*
* @param nType the projectile type (see the PRJ 2da)
* @param vSourcePosition start position for the projectile
* @param oTarget object to follow and hit
* @param nCrustEffectId crust vfx to apply to the projectile
* @param oEventTarget object to send the impact event to
* @returns projectile id
* @sa FireProjectile, SetProjectileImpactEvent
* @author Jose
*/
object FireHomingProjectile(int nType, vector vSourcePosition, object oTarget, int nCrustEffectId = 0, object oEventTarget = OBJECT_INVALID) = 370;
/** @brief Replace the default event with a custom event to be reported on projectile impact
*
* @param oProjectile the projectile in which to replace the impact event
* @param eCustom the event to report on impact
* @sa FireProjectile, FireHomingProjectile
* @author Jose
*/
void SetProjectileImpactEvent(object oProjectile, event eCustom) = 371;
/** @brief Get the projectile associated with the given item
*
* @param oItem the item
* @returns projectile type
*/
int GetProjectileFromItem(object oItem) = 428;
/** @}*/
/*****************************************************************/
/*****************************************************************/
// Threat System
/*****************************************************************/
/** @addtogroup threatsystem Threat System Functions
*
* Interface to the Threat System
*/
/** @{*/
/** @brief Change the threat value for a given enemy
*
* @param oCreature - owner of the threat table
* @param oEnemy - enemy for which the value should be updated
* @param fThreatChange - threat delta
* @author Jose
*/
void UpdateThreatTable(object oCreature, object oEnemy, float fThreatChange) = 204;
/** @brief Remove the threat entry for the given enemy
*
* @param oCreature - owner of the threat table
* @param oEnemy - enemy for which the entry should be removed
* @author Jose
*/
void ClearEnemyThreat(object oCreature, object oEnemy) = 203;
/** @brief Clear all threat entries
*
* @param oCreature - owner of the threat table
* @param bRemoveAllEntries - true = delete all entries from table; false = reset all entries to their minimum values but don't remove any of them
* @author Jose
*/
void ClearThreatTable(object oCreature, int bRemoveAllEntries = TRUE) = 202;
/** @brief Get the number of entries in the threat table
*
* @param oCreature - owner of the threat table
* @returns table size
* @author Jose
*/
int GetThreatTableSize(object oCreature) = 201;
/** @brief Get the enemy id on a specific index of the threat table
*
* @param oCreature - owner of the threat table
* @param i - index
* @returns enemy id
* @author Jose
*/
object GetThreatEnemy(object oCreature, int i) = 200;
/** @brief Get the threat value on a specific index of the table
*
* @param oCreature - owner of the threat table
* @param i - index
* @returns threat value
* @author Jose
*/
float GetThreatValueByIndex(object oCreature, int i) = 199;
/** @brief Get the threat value for a specific enemy on the table
*
* @param oCreature - owner of the threat table
* @param oEnemy - enemy id
* @returns threat value
* @author Jose
*/
float GetThreatValueByObjectID(object oCreature, object oEnemy) = 198;
/** @}*/
/*****************************************************************/
/*****************************************************************/
// Stats
/*****************************************************************/
/** @addtogroup stats Stats Functions
*
* Functions to manage game stats (health, abilities etc')
*/
/** @{*/
/** @brief Get object's current health
*
* Get object's current health
*
* @param oObject - the object that we are checking
* @returns Returns the health of the object. Returns -1 if the object isn't valid
* @author Noel
*/
int GetHealth( object oObject ) = 233;
/** @brief Set a placeable's current health
*
* Set object's current health.
* Bizarre things might happen if you set their health below zero without applying a death effect
*
* @param oPlc - the placeable object that we are modifying
* @param nHealth - the new health value for the object
* @author Noel
*/
void SetPlaceableHealth( object oPlc, int nHealth ) = 234;
/** @brief Get object's maximum health
*
* Get object's maximum health
*
* @param oObject - the object that we are checking
* @returns Returns the maximum health of the object. Returns -1 if the object isn't valid
* @author Noel
*/
int Deprecated_GetMaxHealth( object oObject ) = 235;
/** @brief Set object's maximum health
*
* Set object's maximum health.
*
* @param oObject - the object that we are modifying
* @param nHealth - the new maximum health value for the object
* @author Noel
*/
void SetMaxHealth( object oObject, int nHealth ) = 236;
/** @brief Is this object dead?
*
* Is this object dead?
*
* @param oObject - the object that we are checking
* @returns Returns TRUE if the object's dead flag is set to true or its health is 0 or less, otherwise FALSE
* @author Noel
*/
int IsDead( object oObject=OBJECT_SELF ) = 237;
/** @brief Is this object dying or dead?
*
* If a creature has a death effect then it has already started dying or is already dead.
* This can be used to know if a creature has already started a deathblow animation but its
* hit points have not been updated.
*
* @param oObject - the creature that we are checking
* @returns Returns TRUE if the object has a death effect
* @author Gabo
*/
int HasDeathEffect( object oObject=OBJECT_SELF, int bCheckForDeathEvent = FALSE) = 326;
/** @brief Set the object's dead flag
*
*
* @param oObject - the object who's death we are defining
* @author Gabo.
*/
void SetDead( object oObject, int bDeadFlagValue ) = 729;
/** @brief Get the specified attribute from oCreature
*
* Get oCreature's Attribute/Property value in an int form.
* See GetCreatureProperty for more details
*
* @param oCreature - the creature whose stat is being requested
* @param nAttribute - the property (stat) we want to know about
* @param nValueType - the type of value of the property we want to know about (TOTAL, BASE, CURRENT, MODIFIER)
* @returns Returns oCreature's Attribute Value
* @author Gabo
*/
int GetCreatureAttribute( object oCreature, int nAttribute, int nValueType = PROPERTY_VALUE_TOTAL ) = 248;
/** @brief Get the specified attribute from oCreature
*
* Get oCreature's Property value.
* Property types have slightly different definitions of each of the 4 value types.
* A SIMPLE or DERIVED property has a BASE and TOTAL value as the same number and
* doesnt have CURRENT or MODIFIER.
* An ATTRIBUTE property has a BASE value and a MODIFIER value. Its TOTAL value
* is the clamped (between its min and max) sum of the BASE plues the MODIFIER.
* A DEPLETABLE property is similar to an ATTRIBUTE property but in addition has
* a CURRENT value, which must be between the property min and the TOTAL value.
* Properties are defined in Properties.xls.
*
* @param oCreature - the creature whose stat is being requested
* @param nProperty - the property (stat) we want to know about
* @param nValueType - the type of value of the property we want to know about (TOTAL, BASE, CURRENT, MODIFIER)
* @returns Returns oCreature's Attribute Value
* @author Gabo
*/
float GetCreatureProperty( object oCreature, int nProperty, int nValueType = PROPERTY_VALUE_TOTAL ) = 738;
/** @brief Get the specified attribute from oCreature
*
* Gets the type of property for a given property index.
* The property types are: ATTRIBUTE, SIMPLE, DEPLETABLE and DERIVED.
* The property type definitions are found at the top of this file (script.ldf).
*
* @param oCreature - the creature whose property type is requested
* @param nProperty - the property (stat) we want to know about
* @returns Returns the selected property's type.
* @author Gabo
*/
int GetCreaturePropertyType( object oCreature, int nProperty ) = 739;
/** @brief Set the specified value of a given property on a oCreature
*
* Sets the specified value of the selected property on a creature.
* Doesnt work for TOTAL values. Use BASE instead. See GetCreatureProperty for more details
*
* @param oCreature - the creature whose property we want to set.
* @param nProperty - the property (stat) we want to modify.
* @param nValueType - the type of value of the property we want to modify (BASE, CURRENT, MODIFIER)
* @returns Returns oCreature's Attribute Value
* @author Gabo
*/
void SetCreatureProperty( object oCreature, int nProperty, float fNewValue, int nValueType = PROPERTY_VALUE_BASE) = 740;
/** @brief Update the specified attribute base value on a oCreature
*
* Updates (adds the given value to the current value) the specified value of the
* selected property of a creature.
* Only works for MODFIER and CURRENT values. See GetCreatureProperty for more details
*
* @param oCreature - the creature whose property will be updated
* @param nProperty - the property (stat) whose value we want to update
* @param nValueType - the type of value of the property we want to update (CURRENT, MODIFIER)
* @returns Returns oCreature's Attribute Value
* @author Gabo
*/
void UpdateCreatureProperty( object oCreature, int nProperty, float fNewValue, int nValueType) = 741;
/** @brief Clears all the properties on a creature
*
* Health will be set to 1. All other properties will be set to 0.
* This function will NOT generate any events due to the properties changing.
* It is a hard coded function meant to be used when creating a character.
*
* @param oCreature - the creature whose properties will be cleared.
* @author Gabo
*/
void ClearCreatureProperties( object oCreature) = 333;
/** @brief Determine whether oCreature has nAbilityID in their list of abilities
*
* Determine whether oCreature has nAbilityID in their list of abilities
*
* @param oCreature - the creature
* @param nAbilityID - the ability identifier
* @returns Returns TRUE if oCreature has the specified ability
* @author Sophia, Jose
*/
int HasAbility( object oCreature, int nAbility ) = 252;
/** @brief Determine whether oCreature could spend a point on ability nAbilityID
*
* @param oCreature - the creature
* @param nAbilityID - the ability identifier
* @returns Returns TRUE if oCreature meets the prerequisites for nAbility
* @author Paul Schultz
*/
int IsAbilityAvailable( object oCreature, int nAbility ) = 610;
/** @brief Gives the number of abilities a creature has of a specified type and GUI type
*
* @param oCreature - the creature
* @param nType - The type of ability to count (if type is 0, all abilities are counted)
* @param nGUIType - The GUI type to filter the count (if GUI type is 0, there is no GUI type filtering)
* @returns Returns TRUE if oCreature meets the prerequisites for nAbility
* @author Gabo
*/
int GetAbilityCount( object oCreature, int nType = 0, int nGUIType = 0) = 615;
/** @brief Returns a list of ability IDs for non-item abilities active on the given creature.
*
* @param oCreature - the creature to query
* @param nType - the type of ability to query for. INVALID (0) returns all non-item abilities.
* @param bOnlyCoolingDown - return only abilities that are currently cooling down
* @returns Returns a list of integer ability IDs.
* @author Sebastian Hanlon
*/
int[] GetAbilityList( object oCreature, int nType = ABILITY_INVALID, int bOnlyCoolingDown = FALSE ) = 646;
/** @brief Adds the specified ability to oCreature
*
* Give oCreature the specified ability
*
* @param oCreature - the creature
* @param nAbilityID - the ability identifier
* @author Sophia
*/
void AddAbility( object oObject, int nAbility, int bSendNotification = FALSE ) = 253;
/** @brief Removes the specified ability from oCreature
*
* Takes from oCreature the specified ability
*
* @param oCreature - the creature
* @param nAbilityID - the ability identifier
* @author Sophia
*/
void RemoveAbility( object oObject, int nAbility ) = 254;
/** @brief Returns the current stamina of a creature
*
* Returns the current stamina of a creature
*
* @param oCreature - the creature whose stamina we get
* @returns Returns the creature's current stamina.
* @author Sam
*/
int GetCreatureStamina( object oCreature ) = 238;
/** @brief Sets the current stamina of a creature
*
* Sets the current stamina of a creature
*
* @param oCreature - the creature whose stamina we set
* @param nStamina - the new value for the creature's current stamina
* @author Sam
*/
void SetCreatureStamina( object oCreature, int nStamina ) = 239;
/** @brief Returns the max stamina of a creature
*
* Returns the max stamina of a creature
*
* @param oCreature - the creature whose stamina we get
* @returns Returns the creature's current stamina.
* @author Sam
*/
int GetCreatureMaxStamina( object oCreature ) = 240;
/** @brief Sets the max stamina of a creature
*
* Sets the max stamina of a creature
*
* @param oCreature - the creature whose stamina we set
* @param nStamina - the new value for the creature's max stamina
* @author Sam
*/
void SetCreatureMaxStamina( object oCreature, int nMaxStamina ) = 241;
/** @brief Returns the current mana of a creature
*
* Returns the current mana of a creature
*
* @param oCreature - the creature whose mana we get
* @returns Returns the creature's current mana.
* @author Sam
*/
int GetCreatureMana( object oCreature ) = 242;
/** @brief Sets the current mana of a creature
*
* Sets the current mana of a creature
*
* @param oCreature - the creature whose mana we set
* @param nMana - the new value for the creature's current mana
* @author Sam
*/
void SetCreatureMana( object oCreature, int nMana ) = 243;
/** @brief Returns the max mana of a creature
*
* Returns the max mana of a creature
*
* @param oCreature - the creature whose mana we get
* @returns Returns the creature's max mana.
* @author Sam
*/
int GetCreatureMaxMana( object oCreature ) = 244;
/** @brief Sets the max mana of a creature
*
* Sets the max mana of a creature
*
* @param oCreature - the creature whose mana we set
* @param nMana - the new value for the creature's max mana
* @author Sam
*/
void SetCreatureMaxMana( object oCreature, int nMaxMana ) = 245;
// int HasSpell( object oObject, int nSpell ) = 249;
// void AddSpell( object oObject, int nSpell ) = 250;
// void RemoveSpell( object oObject, int nSpell ) = 251;
// int GetCreatureSkillRank( object oCreature, int nSkill ) = 255;
// int SetCreatureSkillRank( object oCreature, int nSkill, int nSkillRank ) = 256;
// void SetCreatureXP( object oCreature, int nXP ) = 257;
// int GetCreatureXP( object oCreature ) = 258;
// void AddCreatureXP( object oCreature, int nXP ) = 259;
// void RemoveCreatureXP( object oCreature, int nXP ) = 260;
// int GetCreatureAlignment( object oCreature ) = 261;
// void SetCreatureAlignment( object oCreature, int nAlignment ) = 262;
/** @}*/
/*****************************************************************/
/*****************************************************************/
// Bio / Appearance
/*****************************************************************/
/** @addtogroup bio_appearanc Appearance Functions
*
* Functions that edit creature's stats (gender, size, name etc')
*/
/** @{*/
int GetCreatureGender( object oCreature ) = 263;
/** @brief Set the gender of a creature
*
* Sets the gender of a creature to a GENDER_* const. To be used only in
* Character Creation
*
* @param oCreature - the creature whose gender is to be set.
* @param nGender - GENDER_ const.
* @author Georg
*/
void SetCreatureGender( object oCreature, int nGender ) = 264;
// int GetCreatureSize( object oCreature ) = 265;
// void SetCreatureSize( object oCreature, int nSize ) = 266;
// int GetCreatureSpeed( object oCreature ) = 267;
// void SetCreatureSpeed( object oCreature, int nSpeed ) = 268;
int GetCreatureRacialType( object oCreature ) = 269;
/** @brief Sets a creature's racial type
*
* Sets a creature's racial type. This has far reaching implications and should
* not be called outside of character creation
* @param oCreature - the creature whose racial type we set
* @author Georg
*/
void SetCreatureRacialType( object oCreature, int nRacialType) = 270;
// int GetCreatureAge( object oCreature ) = 271;
// void SetCreatureAge( object oCreature, int nAge ) = 272;
// int GetCreatureAppearance( object oCreature ) = 273;
// void SetCreatureAppearance( object oCreature, int nAppearance ) = 274;
/** @brief Gets an object's name.
*
* Gets an object's name. The non-localized name is returned if it is set, otherwise
* the localized name will be returned.
*/
string GetName( object oidObject) = 275;
/** @brief Sets an object's non-localized name.
*
* Overrides an object's name with non-localized text. Non-localized names have
* a higher priority than localized names.
*/
void SetName( object oObject, string sName ) = 276;
/** @brief Sets an object's localized name.
*
* Sets an object's localized name.
*/
void SetLocName( object oObject, int nStringIndex ) = 307;
/** @brief Stores the party dog's name
*
* This also updates the value of designer tag "". It does not however update
* any specific creature's name. This must be done using SetName().
*/
void StoreDogName( string sName ) = 429;
/** @brief Returns the party dog's name
*
* Returns the value previously stored using StoreDogName()
*/
string RecallDogName() = 430;
// string GetRandomName() = 277;
float GetCreatureGoreLevel( object oCreature ) = 719;
void SetCreatureGoreLevel( object oCreature, float fGoreLevel ) = 720;
/*
@brief Gets the heraldic sign for item oItem
Will return zero for items that do not support heraldry
*/
int GetItemHeraldry(object oItem) = 171;
/*
@brief Sets the heraldic sign for item oItem to nHeraldry .
Will autofail for items that do not support heraldry
*/
void SetItemHeraldry(object oItem, int nHeraldry) = 172;
/** @brief Update a creature's appearance and inventory from a template
*
* @author Jacques Lebrun
*/
void LoadItemsFromTemplate(object oCreature, string sTemplate, int bReplaceInventory = FALSE) = 340;
/** @brief Gets the AppearanceType of a creature
*
* Gets the AppearanceType of a creature
*
* @param oCreature - A creature
* @author Georg Zoeller
*/
int GetAppearanceType(object oCreature) = 150;
/** @brief Sets the AppearanceType of a creature. Can be used for character generation and shape shifting
*
* Sets the AppearanceType of a creature. Can be used character generation and shape shifting
*
* @param oCreature - A creature
* @param nAppearanceId - Appearance 2da row index. Use -1 to return to original appearance
* @param bSetAsOriginal - Specifying TRUE will set the given id as the original appearance type
* @author Georg Zoeller, Jose
*/
void SetAppearanceType(object oCreature, int nApperanceId, int bSetAsOriginal = FALSE) = 178;
/** @brief Sets the head morph file to use for the creature
*
* @param oCreature - The creature to affect
* @param headmorphname - New head morph to use
* @author Nicolas Ng Man Sun
*/
void SetHeadMorphName(object oCreature, string headmorphname) = 887;
/** @brief Gets the ambient activity pattern for the creature
*
* @param oCreature - The creature to evaluate
* @author Gavin Burt
*/
int GetCreatureAmbientActivityPattern(object oCreature) = 670;
/** @brief Sets the ambient activity pattern for the creature
*
* @param oCreature - The creature to affect
* @param nAmbientActivityPattern - The value to set
* @author Gavin Burt
*/
void SetCreatureAmbientActivityPattern(object oCreature, int nAmbientActivityPattern) = 671;
/** @brief Gets the ambient movement pattern for the creature
*
* @param oCreature - The creature to evaluate
* @author Gavin Burt
*/
int GetCreatureAmbientMovementPattern(object oCreature) = 678;
/** @brief Sets the ambient movement pattern for the creature
*
* @param oCreature - The creature to affect
* @param nAmbientMovementPattern - The value to set
* @author Gavin Burt
*/
void SetCreatureAmbientMovementPattern(object oCreature, int nAmbientMovementPattern) = 679;
/** @}*/
/*****************************************************************/
/*****************************************************************/
// Areas
/*****************************************************************/
/** @addtogroup area Area Functions
*
* Functions that manage areas
*/
/** @{*/
// int GetAreaProperties( int nProperty ) = 278;
// int SetAreaProperties( int nProperty, int nValue ) = 649;
/** @brief Moves the entire party into an area
*
* This function will do an area transtion if the target area is within the same area
* list of the current area OR if the target area is in a different area list then
* it will unload the current area list and load into memory (with a loading bar)
* a new area list. The party will then be jumped to the specified waypoint (if it exists)
*
* @param sArea - tag of the target area
* @param sWaypointTag - tag of the target waypoint
* @returns 1 for success, 0 for failure (area list does not exist or area does not exist)
* @remarks this function will jump ALL party members
* @author Ross
*/
int DoAreaTransition( string sArea, string sWaypointTag ) = 745;
/** @}*/
/*****************************************************************/
/*****************************************************************/
// Area Of Effects
/*****************************************************************/
/** @addtogroup aoe Area of Effect Functions
*
* Functions that handle AOE effects
*/
/** @{*/
/** @brief Gets the bit flags of an AOE object
*
* @param oAOE - The AOE that has the flags
* @returns The flags values
* @author Gabo
*/
int GetAOEFlags( object oAOE ) = 334;
/** @brief Sets the bit flags of an AOE object
*
* @param oAOE - The AOE that has the flags
* @param nFlags - The flag values tha will be set on the AOE
* @author Gabo
*/
void SetAOEFlags( object oAOE, int nFlags ) = 335;
/** @brief Indicates if a creature is in an AOE
*
* @param oCreature - The creature being checked
* @param oAOE - The AOE that the creature may be in
* @returns True if the creature is in the AOE
* @author Gabo
*/
int IsInAOE( object oCreature, object oAOE ) = 336;
/** @brief Returns a list of creatures within an AOE
*
* @param oAOE - The AOE that is being queried
* @returns an array of creatures that are in the AOE
* @author Gabo
*/
object[] GetCreaturesInAOE( object oAOE ) = 337;
// object GetAreaOfEffectCreator( object oAreaOfEffect ) = 280;
/** @brief Returns a list of ability IDs for each AOE in which a creature is in.
*
* @param oCreature - The creature being queried
* @returns an array of ability ids.
* @author Gabo
*/
int[] GetAbilitiesDueToAOEs( object oCreature) = 389;
/** @brief Individual "impact" events for each object within an Area of Effect.
*
* Assembles (and delays for 0-149 milliseconds) an individual impact event
* associated with an area of effect to ensure that they don't all happen simultaneously.
* This is called directly by the Area of Effect object itself, thus we don't need to know
* anything about its center location (except in the case of fireball, hence the fourth
* parameter).
*
* @param oCaster - The person responsible for the area of effect.
* @param oTarget - The person who will run the effect.
* @param nAbility - The ability that should be cast.
* @param lTarget - The location of the target of the event (used for fireball and other
* abilities that can be cast at the ground.
* @param nBaseDelay - The base delay is 0 milliseconds; however, some cone effects
* require more than a random 150 millisecond delay to make crusts
* hit simultaneously with the cone. Use BaseDelay for this purpose.
*
* @returns Nothing. Creates the event internally, and stores it on the queue.
* @author MarkB
*/
void SetIndividualImpactAOEEvent(object oCaster, object oTarget, int nAbility, location lTarget, int nBaseDelay = 0) = 845;
/** @}*/
/*****************************************************************/
/*****************************************************************/
// Placeables
/*****************************************************************/
/** @addtogroup placeables Placeable Object Functions
*
* Functions to access, set and interact with placeable objects.
*
*/
/** @{*/
// int GetPlaceableOpenState( object oPlaceable ) = 281;
// int IsPlaceableUseable( object oPlaceable ) = 282;
// void SetPlaceableUseable( object oPlaceable, int bUseable ) = 283;
// int IsPlaceableContainer( object oPlaceable ) = 284;
// void SetPlaceableContainer( object oPlaceable, int bContainer ) = 285;
/** @brief Gets the state of the specified placeable object.
*
* Returns the current state of a specified placeable object. The state
* will be a valid state defined by the state controller for the
* specified placeable. The placeable states are defined in the placeables.xls file in override.
*
* @param oPlaceable - The placeable to get the state of
* @returns Returns the state of the placeable object
* @sa SetPlaceableState()
* @author Paul
*/
int GetPlaceableState( object oPlaceable ) = 286;
/** @brief Gets the state controller ID of the specified placeable object.
*
* @author Nicolas Ng Man Sun
*/
int GetPlaceableStateController( object oPlaceable ) = 134;
/** @brief Sets the state for a specified placeable object.
*
* Sets the state for this placeable, but only if the state is a valid one
* for the placeable itself as defined by the state controller. The placeable states are defined in the placeables.xls file in override.
*
* @param oPlaceable - The placeable to set the state on
* @param nState - The state to set on the placeable
* @sa GetPlaceableState()
* @author Paul
*/
void SetPlaceableState( object oPlaceable, int nState ) = 287;
/** @brief Sets the result of a placeable action.
*
* @param oPlaceable - The placeable to report results from.
* @param nAction - The use action to report on.
* @param bSuccess - Whether the action succeeded or not.
* @param bVariation - Whether to use the default transition or the variation. Only applies when the action succeded.
* @author Jacques Lebrun
*/
void SetPlaceableActionResult(object oPlaceable, int nAction, int bSuccess, int bVariation = FALSE) = 151;
/** @brief Gets the current use action on the placeable.
*
* @param oPlaceable - The placeable to get the action from
* @author Jacques Lebrun
*/
int GetPlaceableAction(object oPlaceable) = 152;
/** @brief Gets the base type of the placeable.
*
* @param oPlaceable - The placeable to get the type from
* @author Jacques Lebrun
*/
int GetPlaceableBaseType(object oPlaceable) = 153;
/** @brief Gets whether the key should be removed automatically when used.
*
* @param oPlaceable - The placeable.
* @author Jacques Lebrun
*/
int GetPlaceableAutoRemoveKey(object oPlaceable) = 154;
/** @brief Gets whether a key is required to use this placeable.
*
* @param oPlaceable - The placeable.
* @author Jacques Lebrun
*/
int GetPlaceableKeyRequired(object oPlaceable) = 155;
/** @brief Gets the object tag of the key required to use this placeable
*
* @param oPlaceable - The placeable.
* @author Jacques Lebrun
*/
string GetPlaceableKeyTag(object oPlaceable) = 156;
/** @brief Get the treasure rank.
*
* @param oPlaceable - The placeable.
* @author Jacques Lebrun
*/
int GetPlaceableTreasureRank(object oPlaceable) = 818;
/** @brief Get the treasure category.
*
* @param oPlaceable - The placeable.
* @author Jacques Lebrun
*/
int GetPlaceableTreasureCategory(object oPlaceable) = 817;
/** @brief Get the Popup text
*
* @param oPlaceable - The placeable.
* @author John Fedrokiw
*/
string GetPlaceablePopupText(object oPlaceable) = 356;
/** @brief Set a creature's ranks in a class
*
* @param oCreature - The creature
* @param nClass - The class to set rank in
* @param nRanks - The rank the creature should have
* @author Paul Schultz
*/
void SetClassRank(object oCreature, int nClass, int nRank) = 325;
/** @brief Get a creature's ranks in a class
*
* @param oCreature - The creature
* @param nClass - The class you're querying
* @author Paul Schultz
*/
int GetClassRank(object oCreature, int nClass) = 623;
/** @brief Get the treasure category.
*
* @param oCreature - The creature.
* @author Adriana Lopez
*/
int GetCreatureTreasureCategory(object oCreature) = 315;
// location GetTransitionTarget( object oPlaceable ) = 288;
// void SetTransitionTarget( object oPlaceable, location lLocation ) = 289;
// int IsDoorCommandPossible( object oPlaceable ) = 290;
/** @}*/
/*****************************************************************/
/*****************************************************************/
// Items
/*****************************************************************/
/** @addtogroup items Items Functions
*
* Functions to access, set and interact with items.
*
*/
/** @{*/
// int GetItemType( object oItem ) = 292;
// int GetItemDefenseValue( object oItem ) = 293;
// int IsWeaponRanged( object oItem ) = 294;
// int IsItemDroppable( object oItem ) = 295;
// void SetItemDroppable( object oItem, int bDroppable ) = 296;
// int IsItemStolen( object oItem ) = 297;
// void SetItemStolen( object oItem, int bStolen ) = 298;
// void SetMaxItemStackSize( object oItem, int nMaxStackSize ) = 651;
// int HasItemProperty( object oItem, int nItemProperty ) = 302;
/** @brief Gets the maximum stack Size of an item
*
* Returns an integer representing the maximum stack size of an item.
*
* @param oItem - An Item Object
* @returns 0 if the item is invalid; defauts to 1 if the item is not stackable.
* @author Georg
*/
int GetMaxItemStackSize( object oItem ) = 299;
/** @brief Gets the stack Size of an item
*
* Returns an integer representing the current stack size of an item.
*
* @param oItem - An Item Object
* @returns 0 if the item is invalid; defauts to 1 if the item is not stackable.
* @author Georg
*/
int GetItemStackSize( object oItem ) = 300;
/** @brief Sets the stack Size of an item
*
* Sets the stack size of item oItem to nStackSize. Clamps it between 1 and MaxStackSize.
*
* @param oItem An Item
* @param nStackSize The new StackSize.
* @author Georg
*/
void SetItemStackSize( object oItem, int nStackSize ) = 301;
/** @brief Enumerates items attached to this item
*
* An empty array means there are no slots available to attach items
* A non-empty array enumerates all slots. Empty slots will have
* OBJECT_INVALID, filled slots will have the OBJECT_ID of the
* attached items
*
* @param oItem An Item
* @author Georg
*/
object[] GetItemSubItems( object oItem ) = 821;
/** @brief Adds sub-item (rune) to a given item
*
*
* @param oMainItem An Item
* @param oSubItem A sub-item
* @param nSlotNumber sub-item slot to put the sub-item into
* @author Georg
*/
void AddItemSubItem(object oMainItem, object oSubItem, int nSlotNumber ) = 822;
/** @brief removes sub-item (rune) from a given item
*
*
* @param oMainItem An Item with sub-item slots
* @param nSlotNumber sub-item slot to remove an item from
* @param nPreserveSubItem Set to 1 if the rune should not be deleted.
* @author Georg
*/
void RemoveItemSubItem(object oMainItem, int nSlotNumber, int nPreserveSubItem = 0 ) = 823;
/** @brief Gets the BaseItemType of an item
*
* returns the base item type of an item as BASE_ITEM_*
*
* @param oItem - An Item Object
* @author Georg
*/
int GetBaseItemType(object oItem) = 135;
/** @brief Gets the material type of an item
*
* returns the material type of an item
*
* @param oItem - An Item Object
* @author Georg
*/
int GetItemMaterialType( object oItem) = 136;
/** @brief Sets the material type of an item
*
* @param oItem - An Item Object
* @param nMaterialType - The MATERIAL_TYPE to set the item to
* @author Georg
*/
void SetItemMaterialType( object oItem, int nMaterialType) = 137;
/** @brief Gets all items in an object inventory
*
* Provides access to a creatures or placeables inventory and equipped items.
*
* @param oObject - A creature or placeable with an inventory
* @param nGetItemOptions - A GET_ITEMS_* constant. THIS IS NOT A BITFIELD!
* @param nBaseItemType - Return only items with base item type matching. 0 to disable this filter.
* @param sFilterTag - Return only items with a matching tag. "" to disable this filter.
*
* @author Georg
*/
object[] GetItemsInInventory( object oObject, int nGetItemsOptions = GET_ITEMS_OPTION_ALL, int nBaseItemType = 0, string sTagFilter = "", int bIgnorePlotItems = FALSE ) = 180;
/** @brief Get the ability_id associated with an item
*
* An items ability id (if != ABILITY_INVALID) is the one active ability an item will grant when equipped to the quickbar.
*
* @param oItem - An item
* @returns an index into ABI_BASE.xls
*
* @author Georg
*/
int GetItemAbilityId(object oItem) = 190;
/** @brief Set the ability_id associated with an item
*
* An items ability id (if != ABILITY_INVALID) is the one active ability an item will grant when equipped to the quickbar.
*
* CORE_FUNCTION. Do not use unless you are Georg or Yaron. Do not use on equipped items. Ever. Use the Wrapper.
*
* @param oItem - An item
* @param nAbility - an index into an item ability defined in ABI_BASE.xls
* @param nPower - An optional power value for the item. Default is 1
*
* @author Georg
*/
void SetItemAbilityId(object oItem, int nAbilityId, int nPower = 1) = 191;
/** @}*/
/*****************************************************************/
/*****************************************************************/
// Inventory / Equip Slots
/*****************************************************************/
/** @addtogroup inventory Inventory & Equip Slot Functions
*
* Functions to access creature and player inventory/equip slots.
*/
/** @{*/
// const INT CVirtualMachineCommands::COMMAND_GETITEMINEQUIPSLOT = 401;
// const INT CVirtualMachineCommands::COMMAND_ADDITEMTOINVENTORY = 402;
// const INT CVirtualMachineCommands::COMMAND_ISLOOTABLE = 404;
// const INT CVirtualMachineCommands::COMMAND_SETLOOTABLE = 405;
// const INT CVirtualMachineCommands::COMMAND_REMOVEGOLD = 407;
/** @brief Gets the item in a creature's equip slot
*
* Returns the item in the specified equip slot for a creature
*
* @param nSlot - the equip slot to be examined
* @param oCreature - the creature to examine
* @author Noel
*/
object GetItemInEquipSlot( int nSlot, object oCreature=OBJECT_SELF, int nWeaponSet = INVALID_WEAPON_SET ) = 401;
/** @brief Removes item(s) from its container
*
* Removes the given item(s) from its container/inventory.
*
* @param oItem - the item to remove
* @param nNumItems - the number of items to be removed from the stack (if applicable).
* Use -1 to remove all items in stack.
* @author Henry
*/
void RemoveItem( object oItem, int nNumItems = -1 ) = 403;
/** @brief Removes item(s) from its container
*
* Removes the matching item(s) from its container/inventory.
*
* @param oPossessor - The placeable or creature to remove items from.
* @param nNumItems - The number of items to be removed. Use -1 to remove all matching items.
* @author Henry
*/
void RemoveItemsByTag( object oPossessor, string sTag, int nNumItems = -1 ) = 379;
/** @brief Counts items with the given tag in the given container/inventory.
*
* Counts items with the given tag in the given container/inventory.
*
* @param oPossessor - The placeable or creature to count items in.
* @param sTag - The tag of the items to count.
* @author Henry
*/
int CountItemsByTag( object oPossessor, string sTag ) = 380;
/** @brief Add money to a creature
*
* Add money to a creature
*
* @param nCoppers - The amount to give, in copper pieces
* @param oCreature - The creature receiving the money
* @param bNotify - Notify the player his money amount changed
* @author EricP
*/
void AddCreatureMoney ( int nCoppers, object oCreature=OBJECT_SELF, int bNotify=TRUE) = 406;
/** @brief Get amount of money a creature posseses
*
* Gets amount of money a creature posseses
*
* @param oCreature - the creature receiving the money
* @author EricP
*/
int GetCreatureMoney (object oCreature=OBJECT_SELF) = 408;
/** @brief Gives money to a creature
*
* Gives money to a creature
*
* @param nCoppers - The amount to give, in copper pieces
* @param oCreature - The creature receiving the money
* @param bNotify - Notify the player his money amount changed
* @author EricP
*/
void SetCreatureMoney ( int nCoppers, object oCreature=OBJECT_SELF, int bNotify=TRUE) = 409;
/** @brief Opens the inventory of an object for a target player.
*
* A player can view their own inventory or that of one of their party, a
* container, a store or a stash.
*
* @param oObject - the object to be opened
* @param oPlayer - the player doing the opening
* @author Sophia
*/
void OpenInventory( object oObject, object oPlayer, int bCanAddItems=FALSE ) = 410;
/** @brief Returns an item possessed by an object (creature or placeable) with the given tag
*
* Returns an item possessed by an object (creature or placeable) with the given tag
*
* @param oObject - the object with an inventory
* @param sTag - tag for the item to return
* @author Noel
*/
object GetItemPossessedBy( object oObject, string sTag ) = 675;
/** @brief Switches the current weapon set with the given weapon set.
*
* Makes the active weapon set become the one that is given in the input
* and generates all the necessary equip events for the new weapons. If
* the current weapon set is the one requested, this does nothing. There
* are only two weapon sets so the input value can only be 0 or 1. If no
* weapon set is given, the command will switch to the next set.
*
* @param oObject - The object to have its weapon set switched.
* @param mWeaponSet - The weapon set number, it can be 0 or 1.
* @author Gabo.
*/
void SwitchWeaponSet( object oObject, int nWeaponSet = INVALID_WEAPON_SET) = 273;
/** @brief Returns the active weaponset on a creature
*
* Returns the weaponset currently active by oCreature.
*
* 0 - WeaponSet 1 (1 in the Toolset)
* 1 - Weaponset 2 (2 in the Toolset)
*
* Warning: Returns 0 also on failure (oObject not a creature..)
*
* @param oObject The creature the check the weapon set on
* @author Georg Zoeller
*/
int GetActiveWeaponSet( object oObject) = 167;
/** @brief Equips an item on a creature
*
* Equips an item from the inventory into the equiped slots.
* If no equipment slot is given, the item will be equipped where it
* best fits. If the equip slot is in the weapon set it will be equipped
* in the weapon set number that is given. If no weapon set number is given
* the active weapon set will be used.
* If an incorrect slot is given or an invalid object is given
* the function will return 0.
*
* @param oObject - The object to have its weapon set switched.
* @param nEquipSlot - The optinal equip slot number. Use the INVENTORY_SLOT constants to specify a particular slot.
* @param nWeaponSet - The optinal weapon set number, it can be 0 or 1.
* @author Gabo.
*/
int EquipItem( object oObject, object oItem, int nEquipSlot = INVENTORY_SLOT_INVALID, int nWeaponSet = INVALID_WEAPON_SET ) = 392;
/** @brief Unequips an item from a creature
*
* Removes an item from the equip slots and puts it in the inventory.
* If there is any kind of error, this will return 0.
*
* @param oObject - The object to have its weapon set switched.
* @param mWeaponSet - The weapon set number, it can be 0 or 1.
* @author Gabo.
*/
int UnequipItem( object oObject, object oItem ) = 393;
/** @brief Enables/disables equipment access
*
* Enables or disables equipment access for a particular party member.
* NOTE: This command will not work in EVENT_TYPE_AREALOAD_PRELOADEXIT.
*
* @param oCreature - The creature.
* @param bEnabled - 1 to enable, 0 to disable.
* @author Henry
*/
void SetCanChangeEquipment( object oCreature, int bCanChange ) = 391;
/** @brief Enables/disables equipment access for a particular slot
*
* Enables or disables equipment access for a particular party member
* for a particular slot
* NOTE: This command will not work in EVENT_TYPE_AREALOAD_PRELOADEXIT.
*
* @param oCreature - The creature.
* @param nSlotID - the 0-indexed slot to enable or disable
* @param bEnabled - 1 to enable, 0 to disable.
* @author Paul Schultz
*/
void SetCanChangeEquipmentSlot( object oCreature, int nSlotID, int bEnabled ) = 872;
/** @brief Tells whether or a creature can change equipment for a given slot
*
* Tells whether or a creature can change equipment for a given slot
*
* @param oCreature - The creature.
* @param nSlotID - the 0-indexed slot we're interested in
* @returns 1 if the slot can be changed, 0 if it cannot
* @author Paul Schultz
*/
int GetCanChangeEquipmentSlot( object oCreature, int nSlotID ) = 873;
/** @brief Gets the max size of the party's inventory (ie. number of slots)
*
* Gets the max size of the creature's inventory (ie. number of slots)
*
* @param oCreature - The creature ID (defaults to player)
* @author Henry
*/
int GetMaxInventorySize(object oCreature = OBJECT_INVALID) = 404;
/** @brief Sets the max size of the party's inventory (ie. number of slots)
*
* Sets the max size of the creature's inventory (ie. number of slots)
*
* @param nMaxSize - The total number of slots
* @param oCreature - The creature ID (defaults to player)
* @author Henry
*/
void SetMaxInventorySize( int nMaxSize, object oCreature = OBJECT_INVALID ) = 405;
/** @brief Store the party inventory on a placeable
*
* Store the party inventory on a placeable
* NOTE: As with all commands that add items to a container, this command will reset the container (placeable)
* to interactive not matter it's previous state.
*
* @param oPlaceable - Target placeable
* @author Gavin Burt
*/
void StorePartyInventory( object oPlaceable ) = 345;
/** @brief Store a follower inventory on a placeable
*
* Store a follower inventory on a placeable
* NOTE: As with all commands that add items to a container, this command will reset the container (placeable)
* to interactive not matter it's previous state.
*
* @param oFollower - Source creature
* @param oPlaceable - Target placeable
* @author Gavin Burt
*/
void StoreFollowerInventory( object oFollower, object oTarget ) = 346;
/** @brief Restore the party inventory from a placeable
*
* Restore the party inventory from a placeable (previously set by StorePartyInventory)
*
* @param oPlaceable - Source placeable
* @author Gavin Burt
*/
void RestorePartyInventory( object oPlaceable ) = 347;
/** @brief Restore a follower inventory from a placeable
*
* Restore a follower inventory from a placeable (previously set by StoreFollowerInventory)
*
* @param oFollower - Target creature
* @param oPlaceable - Source placeable
* @author Gavin Burt
*/
void RestoreFollowerInventory( object oFollower, object oPlaceable ) = 348;
/** @brief Move an item from one object to another.
*
* Move an item from one object to another.
*
* @param oSource - Source object
* @param oTarget - Target object
* @param oItem - Item to be moved
* @author Gavin Burt
*/
void MoveItem( object oSource, object oTarget, object oItem ) = 349;
/** @brief Move all items from one object to another.
*
* Move all items from one object to another.
*
* @warning This only moves items from the default location to another default
* location. This means that when moving items from a creature it is only
* moving items from the back to the other backpack (equipped items are not considered).
*
* @param oSource - Source object
* @param oTarget - Target object
* @author Gavin Burt
*/
void MoveAllItems( object oSource, object oTarget ) = 350;
/** @brief Displays a text message over a Players portrait
*
* Displays a text message or number over a player portrait
*
* @param oPlayerCreature - The creature to display the floaty over.
* @param sMessage - The text of the message.
* @param nColour - The text colour, in hex (eg. 0xff0000 is red).
* @author John Fedorkiw
*/
void DisplayPortraitMessage( object oPlayerCreature, string sMessage, int nColour = 16777215 ) = 770;
/** @brief Displays a floating message over a creature
*
* Displays an animated message or number floating over a creature
* indicating damage taken, critical hits, etc.
*
* @param oCreature - The creature to display the floaty over.
* @param sMessage - The text of the message.
* @param nStyle - The visual style of the floaty.
* @param nColour - The text colour, in hex (eg. 0xff0000 is red).
* @param nDuration - If specified, the floaty will be displayed for the indicated seconds. Note: If the time is zero, the floaty message is still displayed momentarily, as there is a fade in and fade out animation. Also If the floaty message sports a style of "FLOATY_HIT" or "FLOATY_CRITICAL_HIT" the duration is completely ignored, this is controlled through ActionScript!
* @author Henry
*/
void DisplayFloatyMessage( object oCreature, string sMessage, int nStyle = FLOATY_MESSAGE, int nColour = 16777215, float nDuration = 0.5 ) = 744;
/** @brief Plays a floaty effect on the floaty capsule of the target.
*
* @param nFloatyEffect - The type of effect to play.
* @param oTarget - The owner of the floaty capsule to play the effect on.
* @author Jacques
*/
void PlayFloatyEffect(int nFloatyEffect, object oTarget) = 933;
/** @brief Indicate to the engine that the TARGET creature has taken damage from the SOURCE creature. This is so the GUI can display indicators when PC's take damage from off screen enemies.
*
* @param oSource - The creature that inflicted the damage
* @param oTarget - The creature that was damaged
* @author John Fedorkiw
*/
void SignalDamage( object oSource, object oTarget ) = 359;
/** @brief Starts the character generation or level up process
* Do not use, use the functions in ui_h instead!!
* Starts the character generation or level up process.
*
* @param oCreature - The creature to generate.
* @param nMode - 0 = char gen, 1 = level up
* @param bImportEnabled - applicable to chargen only, allows importing a hero from an existing save file (in addition to
* the option of creating a new character.
* @author Henry
*/
void StartCharGen( object oCreature, int nMode = 0, int nImportEnabled = FALSE ) = 746;
/** @brief Preloads resources needed to run chargen smoothly.
*
* @author Jacques
*/
void PreloadCharGen() = 390;
/** @brief Displays a status message in the middle of the screen
*
* Displays a status message in the middle of the screen
*
* @param sMessage - The text of the message.
* @param nColour - The text colour, in hex (eg. 0xff0000 is red)
* @author Henry
*/
void DisplayStatusMessage( string sMessage, int nColour = 16777215 ) = 747;
/** @brief Sets or clears an ability in a creature's quickslot.
*
* Sets or clears an ability in a creature's quickslot.
*
* @param oCreature - The creature.
* @param nSlot - The index of the slot to set, or -1 to use the first empty slot.
* @param nAbilityID - The ability ID to put in the slot (or 0 to clear).
* @param sItemTag - An item tag in case the ability is linked to a specific item.
* @param nPlaySound - if TRUE plays the GUI sound associated with adding an ability ot the quickslot.
* @author Henry
*/
void SetQuickslot( object oCreature, int nSlot, int nAbilityID, string sItemTag = "", int nPlaySound = 0 ) = 748;
/** @brief Get the ability ID for the ability in the given quickslot
*
* Gets the ability in the given quickslot
*
* @param oCreature - The creature.
* @param nSlot - The index of the slot to set.
*
* @returns The ID of the ability currently in the slot (or zero if it is empty)
* @author Fedorkiw
*/
int GetQuickslot( object oCreature, int nSlot) = 330;
/** @brief Changes the quickbar currently used by the creature
*
* Changes the quickbar currently used by the creature
*
* @param oCreature - The creature.
* @param nBarNumber - The index of the bar to use (0 to 4)
* @author Gabo
*/
void SetQuickslotBar( object oCreature, int nBarNumber) = 328;
/** @brief Locks or unlocks the quickslot bar for the user interface of a creature
*
* Locks or unlocks the quickslot bar for the user interface of a creature
*
* @param oCreature - The creature.
* @param bLock - Locks the quickbar if true, unlocks it if false
* @author Gabo
*/
void LockQuickslotBar( object oCreature, int bLock) = 329;
/** @brief Shows or hides a floating icon above a creature.
*
* Shows or hides a floating icon above a creature.
*
* @param oCreature - The creature.
* @param sIconName - The texture to use (or empty string to hide the icon)
* @author Henry
*/
void ShowFloatyIcon( object oCreature, string sIconName ) = 749;
/** @brief Notifies the GUI that one of the party members can level up
*
* Notifies the GUI that one of the party members can level up.
* Call again with 0 after the level up has finished.
*
* @param oPartyMember - The party member who can level up.
* @param bCanLevelUp - 1 if the party member can level up, 0 if the
* party member can no longer level up
* @author Henry
*/
void SetCanLevelUp( object oPartyMember, int bCanLevelUp = 0 ) = 760;
/** @brief Get whether a creature can level up or not
*
* @param oCreature - The creature
* @author Paul Schultz
*/
int GetCanLevelUp(object oCreature) = 633;
/** @brief Get autolevelup flag of a creature
*
* @param oCreature - The creature
*
* 0 = off, 1 = autolevel, 2 = force autolevel
*
* @author Jacques Lebrun
*/
int GetAutoLevelUp(object oPartyMember) = 384;
/** @brief Set autolevelup flag of a creature
*
* @param oCreature - The creature
* @param nAutoLevelUp - The flag
*
* 0 = off, 1 = autolevel, 2 = force autolevel
*
* @author Jacques Lebrun
*/
void SetAutoLevelUp(object oPartyMember, int nAutoLevelUp) = 385;
/** @brief Get the maximum attainable level.
*
* @author Jacques Lebrun
*/
int GetMaxLevel() = 840;
/** @brief Shows the Chanters GUI (quest board)
* @author Paul Schultz
*/
void ShowChantersGUI( int nBoardID ) = 779;
/** @brief Indicates if a creature has its weapons unsheathed.
*
* Indicates if a creature has its weapons unsheathed.
*
* @param oObject - The creature that may have its weapons unsheathed.
* @author Gabo.
*/
int GetWeaponsUnsheathedStatus( object oCreature ) = 160;
/** @brief Shows the General Scoreboard GUI
* @author Henry
*/
void ShowGeneralScoreboardGUI() = 788;
/** @brief Shows the Championship Scoreboard GUI
* @author Henry
*/
void ShowChampionshipScoreboardGUI() = 789;
/** @brief Shows the Tournament Scoreboard GUI
* @author Henry
*/
void ShowTournamentScoreboardGUI() = 790;
/** @brief Shows the Party Picker GUI
* @author Paul Schultz
*/
void ShowPartyPickerGUI( ) = 794;
/** @brief Sets the status of the party picker GUI (button invisible, visible but party picker unusable, etc.)
*
* @param nStatus - PP_GUI_STATUS_NO_USE = 0 (not visible on main GUI)
* - PP_GUI_STATUS_READ_ONLY = 1 (visible on main GUI, unusable)
* - PP_GUI_STATUS_USE = 2 (visible on main GUI, usable)
* @author Paul Schultz
*/
void SetPartyPickerGUIStatus( int nStatus ) = 311;
/** @brief Gets the status of the party picker GUI (button invisible, visible but party picker unusable, etc.)
*
* @author Paul Schultz
*/
int GetPartyPickerGUIStatus( ) = 312;
/** @brief Set the disabled state of the indicated GUI Element
*
* @param nGuiElement See GUI_HIGHLIGHT_* defines.
* @param bEnable Boolean indicating if it should be enabled or disabled
* @param nHighlightArgs Some highlights require additional information
*/
void SetGUIElementEnabled(int nElementID, int bEnabled) = 310;
/** @brief Highlight the indicated GUI Element
*
* @param nGuiElement See GUI_HIGHLIGHT_* defines.
* @param bHIghlighted Boolean indicating if the highlight should be turned on or off
* @param nHighlightArgs Some highlights require additional information
*/
void SetGUIElementHighlighted(int nElementID, int bHighlighted, int nHighlightArgs = 0) = 842;
//If called with it hides the current tutorial!
/** @brief Display a tutorial popup with the indicated text.
* @author John Fedorkiw
*
* @param sTitle - The text to be displayed as the title
* @param sText - The body text
* @param nPopupId - The type of tutorial poup to show. Set to -1 if you wish to hide the currently displayed popup
* @param fDisplayTime - Amount of time the tutorial should be displayed for. -1 if it shouldn't be hidden automatically
* @param oObject - The object to signal the callback event to.
* @param evEvent - The callback event to signal. When the Tutorial displayed is ended (either because the fDisplayTime specified is up or it is interrupted by another call to DisplayTutorial) this event is fired and Float[0] holds the remaining display time (which would only be non-zero if the tutorial was replaced with another tutorial message)
* @param scriptname - If specified, overides the default script the callback is sent to
*
*/
void DisplayTutorial(string sTitle, string sText, int nPopupID, float fDisplayTime, object oObject, event evEvent, string scriptname = "" ) = 843;
/** @brief Display a note popup with the indicated text.
* @author Michael Hamilton
*
* @param sTitle - The text to be displayed as the title
* @param sText - The body text
*
*/
void DisplayNote(string sTitle, string sText) = 692;
/** @brief Show a popup
* @author Jacques Lebrun
*/
void ShowPopup(int nMessageStrRef, int nPopupType, object oOwner = OBJECT_INVALID, int bShowInputField = FALSE, int nDefaultInputStrRef = 0) = 323;
/** @brief Adds an entry to the General Scoreboard GUI
*
* @param sName - Contestant's name
* @param nVictories - Number of victories
* @param nDefeats - Number of defeats
* @param nFatalities - Number of fatalities
* @param bQualified - 1 if the contestant has qualified for the Championship, 0 otherwise
* @param bDead - 1 if the contestant is dead, 0 otherwise
* @author Henry
*/
void AddGeneralScoreboardEntry( string sName, int nVictories, int nDefeats, int nFatalities, int bQualified, int bDead ) = 791;
/** @brief Sets an entry in the Championship Scoreboard GUI
*
* @param nEntryID - ID of the entry to set (0-15 first round, 16-23 quarterfinals, 24-27 semifinals, 28-29 final, 30 champion)
* @param sName - Name of contestant
* @param bWinner - 1 if this contestant won their game, 0 otherwise
* @param bIsPlayer - 1 if this contestant is the player, 0 otherwise
* @author Henry
*/
void SetChampionshipScoreboardEntry( int nEntryID, string sName, int bWinner, int bIsPlayer ) = 792;
/** @brief Sets an entry in the Tournament Scoreboard GUI
*
* @param nEntryID - ID of the entry to set (0-13 first seven rounds, 14 champion)
* @param sName - Name of contestant
* @param bDefeated - 1 if the contestant has been defeated, 0 otherwise
* @param bIsPlayer - 1 if this contestant is the player, 0 otherwise
* @author Henry
*/
void SetTournamentScoreboardEntry( int nEntryID, string sName, int bDefeated, int bIsPlayer ) = 793;
/** @brief Shows the Crafting GUI for the given crafting skill
*
* @param nCraftingSkillID - ID of the crafting skill (eg. Herbalism, Poison, Traps)
* @author Henry
*/
void ShowCraftingGUI(int nCraftingSkillID) = 355;
/** @brief Shows a notification for unlocking a specialization
*
* @param nSpecID : ID of the specialization as found in CLA_base.xls
* @author Paul
*/
void ShowSpecUnlockedNotification(int nSpecID) = 722;
/** @brief Shows a notification for unlocking an area on the world map
*
* @param sAreaName : name of the unlocked area
* @param sImage : optional image override to show with the notification
* @author Paul
*/
void ShowAreaUnlockedNotification(string sAreaName, string sImage = "") = 723;
/** @brief Shows a notification for recieving a crafting resource
*
* @param sResourceName: name of the crafting resource
* @author Michael Webb
*/
void ShowCraftingResourceDiscoveredNotification(string sResourceName) = 785;
/** @brief Removes a recipe from the list of recipes the party knows
*
* @param nRecipeID ID of the recipe to be removed
* @author Paul Schultz
*/
void RemovePartyCraftingRecipe(int nRecipeID) = 937;
/** @brief Shows a notification for recieving a crafting recipe
*
* @param sRecipeName: name of the crafting recipe
* @author Michael Webb
*/
void ShowCraftingRecipeAcquiredNotification(string sRecipeName) = 786;
/** @brief Shows a notification for a party member being acquired
*
* @param oidPartyMember: object ID of the party member
* @author Michael Webb
*/
void ShowPartyMemberNotification(object oidPartyMember) = 935;
/** @brief Shows a notification for having new mail
*
* @author Nicolas
*/
void ShowNewMailNotification() = 10;
/** @brief Displays the sub area banner for a fixed amount of time.
*
* @author Jacques
*/
void ShowSubAreaNotification(string sText) = 862;
/** @brief Set the movie to be played next time we enter GameModeLoading
*
* @author John Fedorkiw
*/
void SetNextLoadScreenMovie(string sMovie) = 247;
/** @brief Sets the game completion percentage to be shown by the character record.
*
* This currently being calculated as an aggregate of hidden achievements, so it spans
* games other than the one currently in progress.
*
* @param fPercentage : Percentage complete. Clamped to [0, 100] game-side
* @author Paul Schultz
*/
void SetGameCompletionPercentage(float fPercentage) = 844;
/** @brief Update the HP/Pixel of the main hud Health Bar
*
* @param fHPPerPixel Set the HP pixel to be displayed on the Main UI
* @author John Fedorkiw
*/
void SetHealthBarSize(float fHPPerPixel) = 878;
/** @brief Update the MP/Pixel of the main hud Mana Bar
*
* @param fHPPerPixel Set the MP Per pixel to be displayed on the Main UI
* @author John Fedorkiw
*/
void SetManaBarSize(float fMPPerPixel) = 879;
/** @brief Toggle the display of the helmet in the portrait on the main HUD
*
* @param oCreature The Player Creature to set the helmet in portrait state on
* @param bShowHelmetInPortrait A boolean indicating if the helmet should be shown in the portrait.
*
* @author John Fedorkiw
*/
void ShowHelmetInPortrait(object oCreature, int bShowHelmetInPortrait) = 884;
/** @brief Display the health bar of the specified creature for a brief moment
*
* @param oCreature The creature to show the health bar for
*
* @author Nicolas Ng Man Sun
*/
void ShowHealthFloaty(object oCreature) = 157;
/** @brief Get the boolean value of the indicated GUI Attribute. Note: In the PC Build of the game you can use the console command "explore" to browse the attribute tree.
*
* @param sAttribute The Path to an attribute (e.g. ClientOptions.GameOptions.DemoMode)
* @author John Fedorkiw
*/
int GetAttributeBool(string sAttribute) = 369;
/** @brief Get the Int value of the indicated GUI Attribute. Note: In the PC Build of the game you can use the console command "explore" to browse the attribute tree.
*
* @param sAttribute The Path to an attribute (e.g. ClientOptions.GameOptions.DifficultyLevel )
* @author John Fedorkiw
*/
int GetAttributeInt(string sAttribute) = 305;
/** @brief Get the Float value of the indicated GUI Attribute. Note: In the PC Build of the game you can use the console command "explore" to browse the attribute tree.
*
* @param sAttribute The Path to an attribute (e.g. GameModeExplore.CameraPositionX)
* @author John Fedorkiw
*/
float GetAttributeFloat(string sAttribute) = 693;
/** @brief Get the String value of the indicated GUI Attribute. Note: In the PC Build of the game you can use the console command "explore" to browse the attribute tree.
*
* @param sAttribute The Path to an attribute (e.g. SelectedChar.Name)
* @author John Fedorkiw
*/
string GetAttributeString(string sAttribute) = 699;
/*****************************************************************/
/** @brief Put the game into target request mode. If the user selects a target (or if a valid target is already available) the specified event will be fired back to scripting.
*
* @param nTargetType - The type of target to request (Target types are defined inside targettype.xls). Hostile: 4, AoE: 16
* @param fAOEParamater1 - This is used to specify the radius of a circular AoE. It should be zero if you only wish to target single objects
* @param fAOEParamater2 - _NOT CURRENTLY USED_. This should be 0.0f
* @param nEventID - ID of the event fired to the specified object(or overriden script). The event returned has an Object[0] value of the creature targeted (if any creature) and a Vector[0] value indicating the position of the target. Note if a creature is targeted the position is the position of the targeted creature.
* @param oObject - The object to signal the event to.
* @param scriptname - If specified overides the default script
*
* @author John Fedorkiw
*/
void RequestTarget(int nTargetType, float fAOEParamater1, float fAOEParamater2, int eventID, object oObject, string scriptname = "") = 645;
/*****************************************************************/
/*****************************************************************/
// Traps & Locks
/*****************************************************************/
/** @brief Sets the detected state of the trap
* @param oTrap A trap placeable
* @param bDetected Is this trap detected by the player
*
* @author John
*/
void SetTrapDetected(object oTrap, int bDetected) = 416;
/*****************************************************************/
// Get Nearest
/*****************************************************************/
/** @addtogroup get_nearest Get Nearest Functions
*
* Functions to find nearest objects in various ways
*/
/** @{*/
/** @brief Returns N nearest objects of a specific type
*
* Returns N nearest object of a specific type
*
* @param * oObject - target Object
* @param * nObjectType - type for the objects to query for their distance
* @param * nNumberOfObjects (optional) - Number of objects to return
* @param * nCheckLiving (optional) - only returns objects if they are alive
* @param * nCheckPerceived (optional) - only returns objects if they are within the perception radius.
* @author Adriana
*/
object[] GetNearestObject( object oObject, int nObjectType = OBJECT_TYPE_ALL, int nNumberOfObjects = 1, int nCheckLiving = 0, int nCheckPerceived = 0, int nIncludeSelf = 0) = 433;
/** @brief N nearest objects of a specific type to a Location
*
* Returns N nearest objects of a specific type to a Location
*
* @param * Location - target Location
* @param * nObjectType - type for the objects to query for their distance
* @param * nNumberOfObjects (optional) - Number of objects to return
* @author Adriana
*/
object[] GetNearestObjectToLocation( location lLocation, int nObjectType = OBJECT_TYPE_ALL, int nNumberOfObjects = 1 ) = 434;
/** @brief Returns N nearest object of a specific type, with a specifc tag
*
* Returns N nearest object of a specific type, with a specifc tag
*
* @param * oObject - target Object
* @param * nObjectType - type for the objects to query for their distance
* @param * sTag - Tag for the objects to query
* @param * nNumberOfObjects (optional) - Number of objects to return
* @param * nCheckLiving (optional) - only returns objects if they are alive
* @param * nCheckPerceived (optional) - only returns objects if they are within the perception radius.
* @author Adriana
*/
object[] GetNearestObjectByTag( object oObject, string sTag, int nObjectType = OBJECT_TYPE_ALL, int nNumberOfObjects = 1, int nCheckLiving = 0, int nCheckPerceived = 0, int nIncludeSelf = 0 ) = 435;
/** @brief Returns the one nearest object to the specified object
*
* @param * oObject - target Object
* @param * nIncludeSelf - TRUE if the query should check the target object
* @param * sTag - Tag for the objects to query
*/
object UT_GetNearestObjectByTag(object oObject, string sTag, int nIncludeSelf = 0) = 360;
/** @brief Returns N nearest object of a specific type, with a specifc Group Id
*
* Returns N nearest object of a specific type, with a specifc Group Id
*
* @param * oObject - target Object
* @param * nObjectType - type for the objects to query for their distance
* @param * nGroupId - Group Id for the objects to query
* @param * nNumberOfObjects (optional) - Number of objects to return
* @param * nCheckLiving (optional) - only returns objects if they are alive
* @param * nCheckPerceived (optional) - only returns objects if they are within the perception radius.
* @author Adriana
*/
object[] GetNearestObjectByGroup( object oObject, int nGroupId, int nObjectType = OBJECT_TYPE_ALL, int nNumberOfObjects = 1, int nCheckLiving = 0, int nCheckPerceived = 0, int nIncludeSelf = 0 ) = 436;
/** @brief Returns N nearest object of a specific type, with a specifc Hostility
*
* Returns N nearest object of a specific type, with a specifc Hostility
*
* @param * oObject - target Object
* @param * nObjectType - type for the objects to query for their distance
* @param * nHostility - Hostility for the objects to query (true/false)
* @param * nNumberOfObjects (optional) - Number of objects to return
* @param * nCheckLiving (optional) - only returns objects if they are alive
* @param * nCheckPerceived (optional) - only returns objects if they are within the perception radius.
* @author Adriana
*/
object[] GetNearestObjectByHostility( object oObject, int nHostility, int nObjectType = OBJECT_TYPE_ALL, int nNumberOfObjects = 1, int nCheckLiving = 0, int nCheckPerceived = 0, int nIncludeSelf = 0 ) = 127;
/** @brief Indicates if a creature is perceiving any hostiles
*
* Indicates if a creature is perceiving any hostiles
*
* @param oObject - The creature that may be perceiving hostiles
* @author Gabo.
*/
int IsPerceivingHostiles( object oCreature ) = 164;
/** @brief Indicates if the party of a creature is perceiving any hostiles
*
* Indicates if the party of a creature is perceiving any hostiles
*
* @param oObject - The creature whose party may be perceiving hostiles
* @author Gabo.
*/
int IsPartyPerceivingHostiles( object oCreature ) = 165;
/** @brief Makes a creature be perceived as long as its within the outer perception radius
*
* This command goes beyond the normal AI perception ring, but will return false
* if the creature to be perceived is dead, the same as the perceiving creature or
* beyond the visual radius (about 60m).
*
* @param oPerceivingCreature - The creature that will see another creature
* @param oPerceivingCreature - The creature that will be seen.
* @author Gabo.
*/
int TriggerPerception( object oPerceivingCreature, object oPerceivedCreature) = 166;
/** @brief Returns an array of hostile creatures
*
* Returns an array of hostile creatures
*
* @param oCreature - Creature to test against
* @param obHostile - Filter to only retrieve hostile creatures.
* @author Adriana
*/
object[] GetPerceivedCreatureList( object oCreature, int bHostile = 0 ) = 169;
/** @brief Returns if CreatureA perceives CreatureB
*
* Returns true if CreatureB exists on CreatureA's perception list. This is a cheap check
* against the perception list, it does not perform expensive line of sight checking.
*
* Note: Returns FALSE if A or B are not creatures or invalid.
*
* @param oidA - Creature who is perceiving
* @param oidB - Creature who is being perceived (or not)
* @author Georg Zoeller
*/
int IsPerceiving(object oidA, object oidB) = 170;
/** @brief Delete all entries in the perception list of a creature
*
* @param oPerceiver - The creature for which the perception list will be reset
* @author Jose
*/
void ClearPerceptionList(object oPerceiver) = 446;
/** @}*/
/*****************************************************************/
/*****************************************************************/
// Conversation
/*****************************************************************/
/** @addtogroup conversation Conversation Functions
*
* Functions to handle conversations
*/
/** @{*/
// const INT CVirtualMachineCommands::COMMAND_SPEAKONELINERCONVERSATION = 437;
// const INT CVirtualMachineCommands::COMMAND_GETLASTSPEAKER = 439;
// const INT CVirtualMachineCommands::COMMAND_SETCUSTOMTOKEN = 441;
// const INT CVirtualMachineCommands::COMMAND_INCONVERSATION = 442;
// const INT CVirtualMachineCommands::COMMAND_GETCONVERSATIONENTRYPARAMETER = 443;
/** @brief Begins a conversation with the given object
*
* If rConversationFile is specified then that file will be used, otherwise
* the conversation specified on the creature will be used
*
* @param * oTarget - The object that will own the conversation
* @param rConversationFile (optional) - The name of a dlg file to be used (*.con)
* @author Jon Thompson
*/
int BeginConversation(object oTarget, resource rConversationFile = R"") = 440;
/** @brief Starts a slideshow, as used in the DA epilogue
*
* @param * rConversation - The conversation with the slideshow information
*
* @author Jon Thompson
*/
void BeginSlideshow(resource rConversation) = 632;
/** @brief Returns true if the object has a conversation assigned to it
*
* Returns true if the object has a conversation assigned to it
*
* @param * oObject - The object to verify.
* @author Jon Thompson
*/
int HasConversation( object oObject) = 444;
/** @brief Returns true if the current conversation line is ambient
*
* Returns true if the current conversation line is ambient
*
* @author Jon Thompson
*/
int ConversationIsAmbient() = 344;
/** @brief Returns true if the given conversation is ambient, false if it isn't or if it cannot be determined.
*
* Returns true if the given conversation is ambient, false if it isn't or if it cannot be determined.
*
* @author Bryan Derksen
*/
int IsConversationAmbient(resource rConversation) = 871;
/** @brief Get the PC (if any) involved in the conversation that ran this script
*
* @author Jon Thompson
*/
object GetPCSpeaker() = 438;
/** @brief Plays a cutscene
*
* Plays a cutscene
*
* @param rCutscene - The file name of the cutscene.cut file to play.
* @author Jon Thompson
*/
void PlayCutscene( resource rCutscene ) = 647;
/** @brief Plays a bik movie.
*
* Call this to play a movie. If one's already playing, this will queue up after it.
*
* @param rMovie - The bik movie file.
* @author Paul
*/
void PlayMovie( resource rMovie ) = 173;
/** @}*/
/*****************************************************************/
/*****************************************************************/
// Stores
/*****************************************************************/
/** @addtogroup stores Stores Functions
*
* Functions to manage stores (open, close, set stats)
*/
/** @{*/
/** @brief Shows the Store GUI for a specific store
* @author Henry Smith
*
* @param oStore - The store object to display
*/
void OpenStore( object oStore ) = 447;
/** @brief Gets the money the store has available for buying items (-1 for infinite)
* @author Henry Smith
*
* @param oStore - The store object
*/
int GetStoreMoney( object oStore ) = 448;
/** @brief Sets the money the store has available for buying items (-1 for infinite)
* @author Henry Smith
*
* @param oStore - The store object
* @param oStore - The total money (in coppers, -1 for infinite)
*/
void SetStoreMoney( object oStore, int nMoney ) = 449;
/** @brief Gets the maximum price the store will pay for an item
* @author Henry Smith
*
* @param oStore - The store object
*/
int GetStoreMaxBuyPrice( object oStore ) = 450;
/** @brief Sets the maximum price the store will pay for an item
* @author Henry Smith
*
* @param oStore - The store object
* @param nMaxBuyPrice - The max buy price
*/
void SetStoreMaxBuyPrice( object oStore, int nMaxBuyPrice ) = 451;
/** @brief Gets the store's mark up percentage for selling items
* @author Henry Smith
*
* @param oStore - The store object
*/
int GetStoreMarkUp( object oStore ) = 452;
/** @brief Sets the store's mark up percentage for selling items
* @author Henry Smith
*
* @param oStore - The store object
* @param oStore - The mark up percentage (eg. 100 = normal item price, 150 = 150% item price)
*/
void SetStoreMarkUp( object oStore, int nMoney ) = 453;
/** @brief Gets the store's mark down percentage for buying items
* @author Henry Smith
*
* @param oStore - The store object
*/
int GetStoreMarkDown( object oStore ) = 313;
/** @brief Sets the store's mark down percentage for buying items
* @author Henry Smith
*
* @param oStore - The store object
* @param nMarkDown - The mark down percentage (eg. 100 = normal item price, 75 = 75% item price)
*/
void SetStoreMarkDown( object oStore, int nMarkDown ) = 314;
/** @}*/
/*****************************************************************/
/*****************************************************************/
// Item upgrading / runes
/*****************************************************************/
/** @addtogroup stores Item upgrading / runes Functions
*
* Functions to manage item upgrading (opening the GUI, any rune-related functions)
*/
/** @{*/
/** @brief Shows the Item upgrade GUI
* @author Paul Schultz
*/
void OpenItemUpgradeGUI() = 636;
/** @}*/
/*****************************************************************/
/*****************************************************************/
// Locations
/*****************************************************************/
/** @addtogroup locations Locations Functions
*
* Functions to manage locations (setting, getting etc')
*/
/** @{*/
/** @brief Location object constructor.
*
* This function creates a Location object based on the specified parameters.
*
* @param oArea - The area of the location
* @param vPosition - The vector position of the location
* @param fAngle - The angle degree orientation of the location
* @author Brenon Holmes
*/
location Location( object oArea, vector vPosition, float fAngle ) = 454;
/** @brief Used to test if a specific location is safe.
*
* This function is used to test to see if a location is valid.
* It will return TRUE if the specified location is valid. An invalid location
* is defined by an invalid area object, an empty position vector and an empty orientation vector.
*
* @param lLocation - The location tested to see if it's valid
* @returns TRUE on success, FALSE on error
* @sa IsLocationSafe, GetSafeLocation
* @author Brenon
*/
int IsLocationValid( location lLocation ) = 455;
/** @brief Used to test if a specific location is safe.
*
* This function is used to test if a specific location is safe.
* A safe location is a walkable section of terrain that is not occupied by a creature.
* It should be noted that walkable also means that the specified location would not
* be occupied by a placeable object, unless the placeable object had no walkmesh.
*
* @param lLocation - The location tested to see if it's safe
* @returns TRUE on success, FALSE on error
* @sa IsLocationValid
* @warning This function is expensive, and as such should not be called frequently if it can be helped.
* @author Brenon
*/
int IsLocationSafe( location lLocation) = 456;
/** @brief This function will compute a new safe location based on the specified location.
*
* This function will compute a new safe location based on the specified location.
* If the specified location is a safe location, then that location will be returned.
* A safe location is a walkable section of terrain that is not occupied by a creature.
* It should be noted that walkable also means that the specified location would not be occupied by a placeable object,
* unless the placeable object had no walkmesh.
*
* @param lLocation - The location to base a new safe location off of (if necessary)
* @returns a valid safe location
* @sa IsLocationSafe
* @warning This function is expensive, and as such should not be called frequently if it can be helped.
* @author Brenon
*/
location GetSafeLocation( location lLocation ) = 659;
/** @brief Returns the location of the specified object.
*
* This function returns the location of the specified object.
* If an invalid object is specified, then an invalid location will be returned.
*
* @param oObject - the object to get the location of
* @returns a valid location on success or invalid location on error
* @sa IsLocationValid
* @author Brenon
*/
location GetLocation( object oObject ) = 457;
/** @brief Sets the location of the specified object.
*
* This function sets the location of the specified object.
* If another area is specified, the object will be moved. However it should be
* noted that moving an object in this manner is inherently unsafe as the target
* location might not be a "safe" location.
*
* @param oObject - the object to set the location of
* @param lLocation - the location to set the object to
* @returns a valid location on success or invalid location on error
* @warning Moving an object to another area via this function should probably be discouraged. Use of the JumpToPoint or JumpToObject commands would be much safer.
* @author Brenon
*/
void SetLocation( object oObject, location lLocation ) = 458;
/** @brief Returns the position component of the location..
*
* This function returns the position component of the location.
*
* @param lLocation - the location to retrieve the position from
* @returns a non empty vector on success or an empty vector on failure
* @author Brenon
*/
vector GetPositionFromLocation( location lLocation ) = 459;
/** @brief sets the position of the specified location
*
* This function sets the position component of the specified location.
*
* @param lLocation - the location to set the position on
* @param vPosition - the position to set on the location
* @returns a valid location on success or an invalid location on failure
* @author Brenon
*/
location SetLocationPosition( location lLocation, vector vPosition ) = 460;
/** @brief returns the area component of the location
*
* This function returns the area component of the location.
*
* @param lLocation - the location to retrieve the area from
* @returns a valid object on success or an invalid object on failure
* @author Brenon
*/
object GetAreaFromLocation( location lLocation ) = 461;
/** @brief sets the area component of the specefied location.
*
* This function sets the area component of the specified location.
*
* @param lLocation - The location to set the area on
* @param oArea - The area to set on the location
* @returns a valid location on success or an invalid location on failure
* @author Brenon
*/
location SetLocationArea( location lLocation, object oArea ) = 462;
/** @brief returns the orientation component of the location as an absolute degree value.
*
* This function returns the orientation component of the location as an absolute degree value.
*
* @param lLocation - the location to retrieve the facing from
* @returns An absolute degree angle representing the orientation of the location
* @author Brenon
*/
float GetFacingFromLocation( location lLocation ) = 463;
/** @brief sets the angle orientation component of the specified location.
*
* This function sets the angle orientation component of the specified location.
*
* @param lLocation - the location to set the facing to
* @param fAngle - the angle to set on the location
* @returns a valid location on success or an invalid location on failure
* @author Brenon
*/
location SetLocationFacing( location lLocation, float fAngle ) = 658;
/** @brief returns the orientation component of the location as an orientation vector.
*
* This function returns the orientation component of the location as an orientation vector.
*
* @param lLocation - the location to retrieve the orientation from
* @returns a non empty vector on success or an empty vector on failure
* @author Brenon
*/
vector GetOrientationFromLocation( location lLocation ) = 464;
/** @brief sets the vector orientation component of the specified location.
*
* This function sets the vector orientation component of the specified location.
*
* @param lLocation - the location to set the orientation on
* @param vOrientation - the vector orientation to set on the location
* @returns a valid location on success or an invalid location on failure
* @author Brenon
*/
location SetLocationOrientation( location lLocation, vector vOrientation ) = 465;
/** @}*/
/*****************************************************************/
/*****************************************************************/
// Reaction
/*****************************************************************/
/** @addtogroup reaction Reaction Functions
*
* Functions to manage reaction between objects and groups and group management (hostility etc')
*/
/** @{*/
/** @brief Returns whether two groups are hostile to each other.
*
* This function accesses the hostility tables for the two specified groups and returns whether they are hostile
* to each other or not. If either of the two group ID's are not valid, the function will return FALSE.
*
* Changing group hostility will result in a perception event being refired to all creatures that
* can perceive a member of the group.
*
* @param nGroupA - The source group to use to check the hostility tables
* @param nGroupB - The target group to use to check the hostility tables
* @returns Returns TRUE if the two groups are hostile. FALSE otherwise. Returns FALSE on error.
* @remarks If invalid group ID's are specified, the function will return FALSE
* @sa SetGroupHostility(), GetGroupId(), SetGroupId()
* @author Brenon
*/
int GetGroupHostility( int nGroupA, int nGroupB ) = 466;
/** @brief Sets whether two groups are hostile to each other.
*
* This function sets the group hostility between the two specified groups. Creatures default to their group’s
* hostility, but this can be overridden with SetReactionOverride(). If two creatures are not hostile to each
* other they cannot engage in hostile actions with each other in any way, shape or form.
*
* @param nGroupA - The source group to use to check the hostility tables
* @param nGroupB - The target group to use to check the hostility tables
* @param bHostile - Specifies whether to set the two groups as hostile or not
* @sa GetGroupHostility(), GetGroupId(), SetGroupId(),SetReactionOverride(), GetReactionOverride()
* @author Brenon
*/
void SetGroupHostility( int nGroupA, int nGroupB, int bHostile ) = 467;
/** @brief Returns whether two objects are hostile to each other.
*
* This function checks the hostility of the two specified objects and returns whether they are hostile to each other or not.
* If either of the two objects are not valid, the function will return FALSE
*
* @param oSource - The source object to use to check the hostility tables
* @param oTarget - The target object to use to check the hostility tables
* @returns Returns TRUE if the two objects are hostile to one another, FALSE otherwise. Returns FALSE on error.
* @sa SetGroupHostility(), GetGroupHostility()
* @author Brenon
*/
int IsObjectHostile( object oSource, object oTarget ) = 468;
/** @brief Returns the group ID of the specified object.
*
* This function returns the group ID of the specified object. If the object is invalid, the function will return FALSE.
*
* @param oObject - The object to get the group ID of
* @returns Returns the group ID of the specified object
* @sa SetGroupId()
* @author Brenon
*/
int GetGroupId( object oObject ) = 469;
/** @brief Sets the group ID of the specified object.
*
* This function sets the group ID of the supplied object. It should be noted that any integer value can be used as it is simply an ID.
*
* @param oObject - The object to set the group ID of
* @param nGroupId - The group ID to set the specified object to
* @sa GetGroupId()
* @warning Setting negative group ID values will result in the function failing.
* @author Brenon
*/
void SetGroupId( object oObject, int nGroupId ) = 470;
/** @brief Sets the team ID of the specified object. -1 sets the object to be independent of any team
*
* @param oObject - The object to set the team ID of
* @param nTeamId - The team ID to set the specified object to
* @sa GetTeamId(), GetTeam()
* @author Jose
*/
void SetTeamId( object oObject, int nTeamId ) = 806;
/** @brief Gets the team ID of the specified object. -1 means that the object is independent of any team
*
* @param oObject - The object to get the team ID of
* @sa SetTeamId(), GetTeam()
* @author Jose
*/
int GetTeamId( object oObject ) = 807;
/** @brief Gets the team members given a team ID
*
* @param nTeamId - The team ID to get the members of
* @param nMembersType - The type of members (Creatures or Placeables. OBJECT_TYPE_ALL is not supported)
* @sa SetTeamId(), GetTeamId()
* @author Jose
*/
object[] GetTeam( int nTeamId, int nMembersType = OBJECT_TYPE_CREATURE ) = 808;
/** @brief Sets the encounter ID of the specified object. 0 sets the object to be independent of any encounter
*
* @param oObject - The creature to set the encounter ID of
* @param nEncounterId - The encounter ID to set the specified creature to
* @sa GetEncounterId(), GetEncounter()
* @author Nicolas
*/
void SetEncounterId( object oObject, int nEncounterId ) = 425;
/** @brief Gets the encounter ID of the specified creature. 0 means that the object is independent of any encounter
*
* @param oObject - The creature to get the encounter ID of
* @sa SetEncounterId(), GetEncounter()
* @author Nicolas
*/
int GetEncounterId( object oObject ) = 426;
/** @brief Gets the encounter members given a encounter ID
*
* @param nEncounterId - The encounter ID to get the members of
* @param nMembersType - The type of members (Creatures or Placeables. OBJECT_TYPE_ALL is not supported)
* @sa SetEncounterId(), GetEncounterId()
* @author Nicolas
*/
object[] GetEncounter( int nEncounterId ) = 427;
/** @brief Overrides the reaction of the specified object.
*
* This function overrides the reaction of the specified object. That means that the object will be hostile or non-hostile (depending
* on what is specified) regardless of what their group hostility is. If an object is overriden to non-hostile, it will no longer be possible
* for it to engage or anyone to engage with it in hostile actions in any way, shape or form.
*
* Changing a creature to a different group will cause a perception event to be refired.
*
* @param oObject - The object to override the reaction of
* @param bHostile - Specifies whether to override the reaction of the object to hostile or non-hostile.
* @sa ResetReaction()
* @author Brenon
*/
void SetReactionOverride( object oObject, int bHostile ) = 471;
/** @brief Resets the reaction of the specified object.
*
* This function resets the reaction of the specified object, returning it to whatever base group hostility it should be at.
* This function is normally used in conjunction with SetReactionOverride() to return an object to their group's hostility.
*
* @param oObject - The object to reset the reaction on
* @sa SetReactionOverride()
* @author Brenon
*/
void ResetReaction( object oObject ) = 669;
/** @}*/
/*****************************************************************/
/*****************************************************************/
// Sounds
/*****************************************************************/
/** @addtogroup sounds Sounds Functions
*
* Functions to handle game sounds and music
*/
/** @{*/
/** @brief SetSoundSet
* (core, for use in character generation only)
* This is intended for use on the player only and will generate undesireable results
* for any soundset not actually exported from the toolset.
*
* @param oTarget
* @param rSoundSetConv - Conversation file
* @author Georg
*/
void SetSoundSet(object oTarget, string sSoundSet) = 182;
/** @brief Play a sound on a specified object
*
*
* @param oTarget
* @param sSoundEventName
* @author Marek
*/
void PlaySound(object oTarget, string sSoundEventName) = 477;
/** @brief Stop sounds
*
*
* @param sSoundEventName
* @author Marek
*/
void StopSound(string sSoundEventName) = 478;
/** @brief Play music
*
*
* @param sMusicName
* @author Marek
*/
void PlayMusic(string sMusicName) = 484;
/** @brief Stop specified or all music
*
*
* @param sMusicName
* @author Marek
*/
void StopMusic(string sMusicName) = 485;
/** @brief Set music intesity (set cue in music theme)
*
*
* @param nIntensity
* @author Marek
*/
void SetMusicIntensity(int nIntensity) = 486;
/** @brief Enable/disable sound by tag
*
*
* @param sSoundTag
* @param nActivate
* @author Marek
*/
void ActivateSoundByTag(string sSoundTag, int nActivate) = 487;
/** @brief Overwrite music volume state
*
*
* @param sMusicVolumeTag
* @param nMusicState
* @author Marek
*/
void SetMusicVolumeStateByTag(string sMusicVolumeTag, int nMusicState) = 488;
/** @brief Play a voiceset entry on the specified object
*
* @param oTarget
* @param nSoundSetId - entry type from ss_types.xls
* @param fProbabilityOverride - force a probability.
* @author Georg
*/
void PlaySoundSet(object oTarget, int nSoundSetEntry, float fProbabilityOverride = 0.0f) = 479;
/** @brief Play a sound object
*
* @param oSound
* @author Yuri Leontiev
*/
void PlaySoundObject(object oSound) = 480;
/** @brief Stop playing a sound object
*
* @param oSound
* @author Yuri Leontiev
*/
void StopSoundObject(object oSound) = 481;
/** @brief Sets an audio parameter on a specific game object
*
* @param oTarget The object to apply the RTPC on
* @param sParameterName The name of the parameter to set
* @param fValue The value to set the parameter to
* @author Andrew Butcher
*/
void SetAudioGameParameter(object oTarget, string sParameterName, float fValue) = 885;
/** @brief Sets a global audio parameter
*
* @param sParameterName The name of the parameter to set
* @param fValue The value to set the parameter to
* @author Andrew Butcher
*/
void SetAudioGlobalGameParameter(string sParameterName, float fValue) = 886;
/** @}*/
/*****************************************************************/
/*****************************************************************/
// Players
/*****************************************************************/
/** @addtogroup players Players Functions
*
* Functions to handle player and party actions (autosaves, banning etc')
*/
/** @{*/
/** @brief Returns true if the creature is the main character
*
*
* @param oObject - The object to test if it is the main character
* @author Sam
*/
int IsHero(object oCreature) = 500;
/** @brief Returns the hero player
*
*
* @author Jacques
*/
object GetHero() = 502;
/** @brief Returns the currently main controlled party member.
*
* The main controlled party member is the one the player controls its movement directly, and the
* one whose quickbar currently appears on the screen.
*
* @author Jacques
*/
object GetMainControlled() = 168;
/** @brief Returns the object for the party
*
*
* @param oObject - Returns the object for the party
* @author Adriana
*/
object GetParty(object oCreature) = 83;
/** @brief Performs the AutoSave functionality
*
* Performs the AutoSave functionality
*
* @param nSaveType - 1=Triggered autosave, 2=Beginning-of-Act autosave, 3=Area transition autosave
* @author Gavin, David Robinson
*/
void DoAutoSave(int nSaveType = 1, string sSaveName = "" ) = 513;
// const INT CVirtualMachineCommands::COMMAND_ISGM = 501;
// const INT CVirtualMachineCommands::COMMAND_ISPLAYERVALID = 503;
// const INT CVirtualMachineCommands::COMMAND_GETPLAYERPUBLICCDKEY = 505;
// const INT CVirtualMachineCommands::COMMAND_GETPLAYERIPADDRESS = 506;
// const INT CVirtualMachineCommands::COMMAND_GETPLAYERNAME = 507;
// const INT CVirtualMachineCommands::COMMAND_GETSTARTLOCATION = 508;
// const INT CVirtualMachineCommands::COMMAND_KICKPLAYER = 509;
// const INT CVirtualMachineCommands::COMMAND_BANPLAYER = 510;
// const INT CVirtualMachineCommands::COMMAND_UNBANPLAYER = 511;
// const INT CVirtualMachineCommands::COMMAND_ENDGAME = 512;
// const INT CVirtualMachineCommands::COMMAND_SAVEGAME = 514;
// const INT CVirtualMachineCommands::COMMAND_EXPORTCHARACTER = 515;
// const INT CVirtualMachineCommands::COMMAND_EXPORTALLCHARACTERS = 516;
// const INT CVirtualMachineCommands::COMMAND_EXPLOREAREA = 517;
// const INT CVirtualMachineCommands::COMMAND_UNEXPLOREAREA = 518;
// const INT CVirtualMachineCommands::COMMAND_DISABLEMINIMAP = 519;
// const INT CVirtualMachineCommands::COMMAND_EXPLOREOBJECTRADIUS = 520;
// const INT CVirtualMachineCommands::COMMAND_UNEXPLOREOBJECTRADIUS = 521;
/** @}*/
/*****************************************************************/
/*****************************************************************/
// Spells / Combat
/*****************************************************************/
/** @addtogroup spells_combat Spells and Combat Functions
*
* Functions to handle spell and combat status on objects
*/
/** @{*/
/** @brief This function gets the combat target of a creature
*
* This function gets the combat target of a creature. This target is set when using an attack or
* ability command and is cleared (to target invalid) when combat state is set to false.
*
* @param oCreature - the creature whose combat target we are querying
* @returns the id of the creature's target. Will be invalid if the creature has no target.
* @sa GetAttackTarget
* @author Gabo
*/
object GetAttackTarget(object oCreature) = 522;
/** @brief Gets the weapon style used by a creature
*
* @param oCreature - the creature whose weapon style we are querying
* @returns the weapon style (0 - none, 1 - single (with or without shield), 2 - dual, 3 - two handed)
* @sa GetWeaponStyle
* @author Gabo
*/
int GetWeaponStyle(object oCreature) = 354;
// const INT CVirtualMachineCommands::COMMAND_GETSPELLTARGETOBJECT = 523;
// const INT CVirtualMachineCommands::COMMAND_GETSPELLTARGETLOCATION = 524;
/** @brief This function retrieves a damage effect associated with an attack
*
* @param oAttacker - the creature whose attack damage effect we are retrieving
* @param nDamageEffectId - the id of the damage effect to get (this id is passed in the ATTACK_IMPACT event)
* @author Jose
*/
effect GetAttackImpactDamageEffect(object oAttacker, int nDamageEffectId) = 695;
/** @brief This function sets the results of an attack
*
* @param oAttacker - the creature whose attack result we are storing
* @param nResult1 - the main attack result (HIT/MISS/ETC)
* @param eDamageEffect1 - the main attack damage effect
* @param nResult2 - the offhand attack result (HIT/MISS/ETC)
* @param eDamageEffect2 - the offhand attack damage effect
* @author Jose
*/
void SetAttackResult(object oAttacker, int nResult1, effect eDamageEffect1, int nResult2, effect eDamageEffect2) = 691;
/** @brief This function sets the result for an ability
*
* @param oUser - the creature whose ability result we are reporting
* @param nProjectileTarget - request a specific target node for projectile based abilities
* @author Jose
*/
void SetAbilityResult(object oUser, int nProjectileTarget = PROJECTILE_TARGET_INVALID) = 715;
/** @brief This function sets the Combat State on a creature
* (core function)
* This function sets the Combat State on a creature.
* ** If you are not Georg and you are using this function, you're in trouble!**
*
* @param oCreature - the creature whose combat state we are setting
* @param nCombatState - the combat state (TRUE or FALSE)
* @param nInstantEquipWeapon - if TRUE don't play enter/exit animations, just pop weapons in or out of the creature's hands
* @returns 0
* @sa GetCombatState
* @author Jose
*/
void SetCombatState(object oCreature, int nCombatState, int nInstantEquipWeapon = FALSE) = 525;
/** @brief This function gets the Combat State of a creature
*
* This function gets the Combat State of a creature
*
* @param oCreature - the creature whose combat state we are querying
* @returns TRUE if the creature is in combat, FALSE otherwise
* @sa SetCombatState
* @author Jose
*/
int GetCombatState(object oCreature) = 526;
/** @brief Returns the rank of a creature
*
* Returns the CreatureRank of a creature, representing its relative combat difficulty.
*
* @param oCreature - The creature
* @returns The CREATURE_RANK_* constant associated with the creature.
* @author Georg
*/
int GetCreatureRank (object oCreature) = 183;
/** @brief Sets the rank of a creature.
*
* Sets a creature's rank, representing its relative combat difficulty.
*
* @param oCreature - The creature.
* @param nRank - The new rank (CREATURE_RANK_*).
*/
void SetCreatureRank (object oCreature, int nRank) = 766;
/** @brief Returns the Creature Type (aka Combatant Type) of a creature
*
* The function returns the creature type index from (creaturetypes.xls) as defined
* in the toolset.
*
* @param oidCreature - The creature
* @returns Index into creaturetypes.xls (CREATURE_TYPE_* constant)
* @author Georg
*/
int GetCombatantType (object oidCreature) = 763;
/** @brief This function returns if a creature is allowed to die permanently
*
* This function returns the value set for the 'NoPermDeath' field in the toolset.
* This is usually used to prevent deathblows or other methods of permanent destruction
* from affecting plot important creatures in cases where using the Plot flag is not
* an option. It always returns FALSE for members of the player's party.
*
* @param oidCreature - The creature
* @returns Whether or not it is allowed to kill the creature permanently.
* @author Georg
*/
int GetCanDiePermanently(object oidCreature) = 184;
/** @brief Shows the death screen.
*
* Shows the death screen, indicating if the player is captured on death (which gives a different GUI screen)
*
* @param bCaptured - TRUE if player should be captured on death, FALSE otherwise
*/
void ShowDeathScreen (int bCaptured) = 771;
/** @brief Sets the death hint for the death screen.
*
* The death hint from the deathhints 2DA will be shown the next time the death screen is shown. The death hint is
* cleared after the death screen is hidden. If this is not called before showing the death screen, no hint will be
* displayed.
*
* @param nLoadHint The ID of the hint in the 2DA file.
* @param n2DAReference The ID of the 2DA (272 for the random hint, 205 for the scripted hint). Default is 205.
*
* @author Jacques
*/
void SetDeathHint(int nDeathHint, int n2DAReference = 205) = 321;
/** @brief Sets the load hint for the loadscreen.
*
* The load hint from the loadhints 2DA will be shown on the next area list transition. After the transition
* the hint is cleared. If this is not called before an area list transition, no hint will be shown. By default
* the "story so far" text is displayed when loading from a saved game.
*
* @param nLoadHint The ID of the hint in the 2DA file.
* @param n2DAReference The ID of the 2DA (271 for the random hint, 206 for the scripted hint). Default is 206.
*
* @author Jacques
*/
void SetLoadHint(int nLoadHint, int n2DAReference = 206) = 322;
/** @brief Overrides the image for the next area transition.
*
*/
void SetLoadImage(string sLoadImage) = 361;
/** @brief Set if the creature can be controlled by the user when they are in
* the party.
* If the primary controlled creature is set to uncontrollable, the next
* follower in the party will be set as the primay controlled creature.
* @author Jacques
*/
void SetControllable(object oFollower, int nIsControllable) = 814;
/** @brief Changes the primary controlled creature if they are in the active party.
* Calling this implicitly makes that creature controllable if it was
* previously set as uncontrollable.
* @author Jacuqes
*/
void SetPrimaryControlled(object oFollower) = 815;
/** @brief This function gets the Creature Strength Modifier from the Combat Interaction data on oAttacker
*
* Georg: This function was deprecated
*
* This function gets the Creature Strength Modifier from the Combat Interaction data on oAttacker
*
* @param oAttacker - the creature whose combat interaction data we are querying
* @returns Returns the Creature Strength Modifier from the combat interaction data of oAttacker
* @sa GetCreatureStrengthModifier
* @author Sophia
*/
int DEPRECATED_GetCreatureStrengthModifier(object oAttacker) = 700;
/** @brief This function gets the Weapon Armor Penetration from the Combat Interaction data on oAttacker
*
* This function gets the Weapon Armor Penetration from the Combat Interaction data on oAttacker
*
* @param oAttacker - the creature whose combat interaction data we are querying
* @param oTArget - the target of the attack
* @param nRightHandWeapon - TRUE by default, set to FALSE to return the left hand weapon value
* @returns Returns the Weapon Armor Penetration from the combat interaction data of oAttacker
* @sa GetWeaponArmorPenetration
* @author Sophia
*/
float GetWeaponArmorPenetration(object oAttacker, object oTarget, int nRightHandWeapon = TRUE) = 703;
/** @brief Spawn the creature's body bag
*
* Creates and populates the creature's body bag (only if creature is dead and lootable).
*
* @param oCreature - the creature
* @author JamesG
*/
void SpawnBodyBag(object oCreature,int bForce = FALSE) = 672;
/** @brief Set the time after which all dead creatures decay into lightweight placeables
*
* @param nMilliSec - Max time in milliseconds
* @author Nicolas Ng Man Sun
*/
void SetCreaturesGlobalMaxTimeBeforeDecay(int nMilliSec) = 702;
/** @brief Will force the creature to start decay after the specified time.
*
* @param oBodybag - placeable bodybag object id (NOT the dead creature's oid)
* @param nMilliSec - delay time in milliseconds (zero for immediate decay)
* @author Nicolas Ng Man Sun
*/
void SetBodybagDecayDelay(object oBodybag, int nMilliSec) = 698;
/** @ (chargen) brief Clears all abilities of a creature.
*
* *** CHARACTER CREATION ONLY ***
* Do not ever call outside of character generation, it will destroy a player's character.
*
* NOTE: item abilities will not be cleared. To clear an item ability, the item that added it must be removed.
*
* @param oCreature - the creature to clear the ability list on
* @param nAbilityType - The ability list to be cleared (ABILITY_TYPE_INVALID will clear all lists)
* @author Georg/Gabo
*/
void CharGen_ClearAbilityList(object oCreature, int nAbilityType = 0) = 320 ;
/** @brief Enables/Disables the weapon trail for a creature
*
* Enables/Disables the weapon trail for a creature.
*
* @param oCreature - the creature
* @param bEnable - TRUE/FALSE
* @param nTypeID - Weapon Trail ID from WT_** 2da
* @param fFinishTime - If disabling, how long to fade out the trail
* @author Adriana Lopez
*/
void EnableWeaponTrail(object oCreature, int bEnable, int nTypeID = 0, float fFinishTime=1.0f) = 185;
/** @}*/
/*****************************************************************/
/*****************************************************************/
// Game Modes
/*****************************************************************/
/** @addtogroup game_modes Game Modes
*
* Functions to control the game mode
*/
/** @{*/
/** @brief This function gets the current game mode.
*
* This function returns the current game mode for a specific player. A game mode can be combat, explore, conversation etc'
*
* @returns a GM_* var on success, GM_INVALID on error.
* @sa SetGameMode
* @author Jose
*/
int GetGameMode() = 529;
/** @brief This function sets the current game mode.
*
* This function sets the current game mode for a specific player. A game mode can be combat, explore, conversation etc'
*
* @param nMode - the mode to set the game to: GM_*
* @sa GetGameMode
* @author Jose
*/
void SetGameMode(int nMode) = 530;
/** @brief This function unloads the current module and puts the game in pregame mode.sets the current game mode.
*
* This function unloads the current module and puts the game in pregame mode.
*
* @param bShowCredits TRUE to show credits, FALSE to show start menu.
*
* @author Gavin Burt
*/
void ShowStartMenu(int bShowCredits = FALSE) = 362;
/** @brief This function toggles game pause on/off.
*
* This function toggles the game paused on or off
*
* @sa ToggleGamePause
* @param bPause - TRUE to pause, FALSE to unpause.
* @author EricP
*/
void ToggleGamePause(int bPause = TRUE) = 188;
/** @brief This function retrieves the auto-pause game option.
*
* This function retrieves the auto-pause game option.
*
* @sa GetAutoPauseCombatStatus
* @author EricP
*/
int GetAutoPauseCombatStatus() = 189;
/** @}*/
/*****************************************************************/
/*****************************************************************/
// Abilities
/*****************************************************************/
/** @addtogroup abilities Abilities
*
* Functions to control abilities
*/
/** @{*/
/** @brief This function activates a modal ability in a creature
*
* This function tells the engine to activate or deactivate the GUI indicator for a modal ability on a creature. Designers: Use ability_h.AbilitY_SetModalAbility instead.
*
* @param oCreature - the creature in which to set the modal ability
* @param nAbilityId - modal ability to set
* @param nStatus - modal ability enabled status (TRUE/FALSE)
* @sa IsModalAbilityActive
* @author Jose
*/
void Engine_SetModalAbilityGUI(object oCreature, int nAbilityId, int nStatus) = 725;
/** @brief Check if a modal ability is active in a creature
*
* Check if a modal ability is active in a creature.
*
* @param oCreature - the creature in which to check the modal ability
* @param nAbilityId - modal ability to check if it's active
* @returns 1 if active. 0 if inactive.
* @sa SetModalAbility
* @author Jose
*/
int IsModalAbilityActive(object oCreature, int nAbilityId) = 726;
/** @brief Set the cooldown for an ability. This is the initial value. The engine timer will automaticaly decrease the cooldown until it reaches zero.
*
* @param oCreature - owner of the ability
* @param nAbilityId - ability to set the cooldown
* @param fCooldownTime - time that the ability should be inactive (in seconds)
* @param sSourceItemTag - if an item ability, specify the specific item providing the ability. If an empty string, the engine will grab the first item with this ability, this may not be the desired intention if the player has several items with the same ability.
* @sa GetRemainingCooldown
* @author Jose
*/
void SetCooldown(object oCreature, int nAbilityId, float fCooldownTime, string sSourceItemTag = "") = 194;
/** @brief Get the remaining time for an ability to be used
*
* @param oCreature - owner of the ability
* @param nAbilityId - ability to check the cooldown
* @param sSourceItemTag - if an item ability, specify the specific item providing the ability. If an empty string, the engine will grab the first item with this ability, this may not be the desired intention if the player has several items with the same ability.
* @returns 0.0f if the ability is ready to be used again
* @sa SetCooldown
* @author Jose
*/
float GetRemainingCooldown(object oCreature, int nAbilityId, string sSourceItemTag = "") = 195;
/** @brief Get a list of abilities that need to be turned off due to a condition change
*
* @param oCreature - owner of the abilities
* @param nConditions - Bitmap of conditions that have changed
* @returns an array of abilities
* @author Gabo
*/
int[] GetConditionedAbilities(object oCreature, int nConditions) = 816;
/** @brief Get a list of abilities that need to be turned off due to a condition change
*
* The conditions parameter is to optimize the process a little bit. If a specific condition mask is passed,
* the engine will only check for that condition. If the default value is used, the engine will check all
* conditions that the abilities on the creature has to have. The conditions for an ability are specified in a column of the
* same name in the ABI_base.
*
* @param oCreature - owner of the abilities
* @param nAbility - The ability in question
* @param nConditions - A mask to tell the engine which conditions are being checked for (default is 0xFFFFFF, all conditions)
* @returns TRUE if the ability can be used
* @author Gabo
*/
int CanUseConditionedAbility(object oCreature, int nAbility, int nConditions = 4294967295) = 819;
/** @brief Sets whether the creature can use an ability. This is used only as a response
* to the EVENT_TYPE_ABILITY_ONTEST_USABLE event.
*
* @author Nicolas Ng Man Sun
*/
int SetCanUseAbility(object oCreature, int nConditions) = 874;
/** @}*/
/*****************************************************************/
/*****************************************************************/
// Commands
/*****************************************************************/
/** @addtogroup commands Commands Functions
*
* Functions to handle the commands of the action queue
*/
/** @{*/
// const INT CVirtualMachineCommands::COMMAND_COMMAND = 531;
// const INT CVirtualMachineCommands::COMMAND_ISCOMMANDVALID = 532;
/** @brief This function adds the specified command to the object.
*
* This function adds the specified command to the object command queue.
* The command can be added to the back of the queue or to the front, and can also be
* flagged as static (must-finish command).
*
* @param oObject - the object to add the specified command
* @param cCommand - the command to add to the object
* @param bAddToFront - specifies if the command should be added to the front of the queue or not
* @param bStatic - whether or not the command will be added as a static command. Static commands are flagged in a special manner and cannot be removed via regular clearing functionality. An override must specifically be specified to remove static commands. As such, commands should only be specified as static if they absolutely must finish.
* @param nOverrideAddBehavior - replace the default add behavior by specifying a new behavior here
* @returns TRUE on success, FALSE on failure
* @remarks Any duplicate commands in the queue that are adjacent to one another are deleted.
* @author Brenon
*/
int AddCommand( object oObject, command cCommand, int bAddToFront = FALSE, int bStatic = FALSE, int nOverrideAddBehavior = -1 ) = 533;
/** @brief Remove a command from the command queue by the specified index. Excludes the currently active command.
*
* @param oObject - the object in which to remove the command from
* @param nIndex - the index in the command queue from which to remove the command.
* @author Jacques Lebrun
*/
void RemoveCommandByIndex( object oObject, int nIndex ) = 534;
/** @brief Set the result of a command.
*
* @param oObject - the object in which to set the result of the command
* @param nResult - the result of the command (success, failure)
* @author Jose
*/
void SetCommandResult(object oObject, int nResult) = 716;
/** @brief Removes a specific command from an objects command queue
*
* @param oObject
* @param cCommand
* @author Sam
*/
void RemoveCommand(object oObject, command cCommand) = 535;
// const INT CVirtualMachineCommands::COMMAND_INSERTCOMMAND = 537;
/** @brief This function clears the command list for a given object
*
* This function clears the command list for a given object. Note that this also clear
* the currently executed command which is outside of the queue.
*
* @param oObject - the object on which to clear the command list
* @param nHardClear - specifies if the object can finish the action in progress or not (Hard = don't wait)
* @returns TRUE on success, FALSE on failure
* @remarks Designers should NOT use this function, but use the WR_ClearAllCommands
* wrapper function instead, defined in wrappers_h
* @author Sam, Jose
*/
int ClearAllCommands(object oObject, int nHardClear = TRUE) = 538;
/** @brief This function clears all ambient conversation for a given object or for all objects
*
* This function clears all ambient conversations for a given object or for all objects
* if OBJECT_INVALID is passed in
*
* @param oObject - the object on which to clear ambient conversations or OBJECT_INVALID to clear all
* @returns TRUE on success, FALSE on failure
* @author Yuri Leontiev
*/
int ClearAmbientConversations(object oObject = OBJECT_INVALID) = 626;
/** @brief This function returns the size of an object command queue, note that the currently active command doesn't belong in the queue.
*
* This function returns the size of an object command queue, note that the currently active command doesn't belong in the queue.
*
* @param oObject - returns the size of this objects command queue
* @returns int
* @author Sam
*/
int GetCommandQueueSize(object oObject) = 724;
/** @brief This function returns the previously processed command for the specified object
*
* @returns command - the previous command, use GetCommandType to see if it is COMMAND_INVALID
* @author Jose
*/
command GetPreviousCommand(object oObject) = 20;
/** @brief This function returns current command for the specified object
*
* The 'current' command is the command that is currently being executed. It is considered
* outside of the command queue.
*
* @returns command - the current command, use GetCommandType to see if it is COMMAND_INVALID
* @author Sam
*/
command GetCurrentCommand(object oObject) = 539;
/** @brief Returns whether the specified AI command was added by the player (as a result of a mouse click or keyboard action).
*
* @returns true if player issued
* @author Nicolas Ng Man Sun
*/
int GetCommandIsPlayerIssued(command oNode) = 628;
/** @brief This function clears the current command for the specified object
*
* The 'current' command is the command that is currently being executed. It is considered
* outside of the command queue.
*
* @returns void
* @author Sam
*/
void ClearCurrentCommand(object oObject) = 540;
/** @brief Returns the command at the specified index in the command queue.
*
* Index '0' is the command at the top of the queue, but not being executed yet.
*
* @returns command - the command at the specified index
* @param oObject - the object to get the command from
* @param nIndex - the index to get the command from
* @author Sam
*/
command GetCommandByIndex(object oObject, int nIndex) = 536;
/** @brief Returns the command type.
*
* Returns the command type.
*
* @returns int - the type of command.
* @param cCommand - The command.
* @author Jacques Lebrun
*/
int GetCommandType(command cCommand) = 541;
/** @brief Returns the command priority. (DEPRECATED)
*
* Returns the command priority.
*
* @returns int - the priority of the command.
* @param cCommand - The command.
* @author Jose
*/
int GetCommandPriority(command cCommand) = 730;
// const INT CVirtualMachineCommands::COMMAND_SETCOMMANDTYPE = 542;
// const INT CVirtualMachineCommands::COMMAND_GETCOMMANDID = 543;
/** @brief This returns an integer associated with the specified command
*
* @returns int
* @param cCommand - The command
* @param nIndex - The nth integer requested. Defaults to 0
* @author Sam
*/
int GetCommandInt(command cCommand, int nIndex = 0) = 544;
/** @brief This sets an integer associated with the specified command
*
* @returns VOID
* @param cCommand - The command
* @param nCommandInt - The integer being set on the command
* @param nIndex - The nth integer being set. Defaults to 0
* @author Sam
*/
void SetCommandInt(command cCommand, int nCommandInt, int nIndex = 0) = 545;
/** @brief This returns a float associated with the specified command
*
* @returns Float
* @param cCommand - The command
* @param nIndex - The nth float requested. Defaults to 0
* @author Gabo
*/
float GetCommandFloat(command cCommand, int nIndex = 0) = 546;
/** @brief This sets a float associated with the specified command
*
* @returns VOID
* @param cCommand - The command
* @param nCommandFloat - The float being set on the command
* @param nIndex - The nth float being set. Defaults to 0
* @author Gabo
*/
command SetCommandFloat(command cCommand, float nCommandFloat, int nIndex = 0) = 547;
/** @brief This returns an object associated with the specified command
*
* @returns object
* @param cCommand - The command
* @param nIndex - The nth object requested. Defaults to 0
* @author Jose
*/
object GetCommandObject(command cCommand, int nIndex = 0) = 550;
/** @brief This sets an object associated with the specified command
*
* @returns VOID
* @param cCommand - The command
* @param nCommandObject - The object being set on the command
* @param nIndex - The nth object being set. Defaults to 0
* @author Jose
*/
command SetCommandObject(command cCommand, object nCommandObject, int nIndex = 0) = 551;
// const INT CVirtualMachineCommands::COMMAND_GETCOMMANDBOOL = 548;
// const INT CVirtualMachineCommands::COMMAND_SETCOMMANDBOOL = 549;
// const INT CVirtualMachineCommands::COMMAND_GETCOMMANDSTRING = 552;
// const INT CVirtualMachineCommands::COMMAND_SETCOMMANDSTRING = 553;
// const INT CVirtualMachineCommands::COMMAND_GETCOMMANDVECTOR = 554;
// const INT CVirtualMachineCommands::COMMAND_SETCOMMANDVECTOR = 555;
// const INT CVirtualMachineCommands::COMMAND_COMMANDRANDOMWALK = 558;
/** @brief This function is a move to location command constructor. The object executing the command will use both the position and orientation of the location.
*
* This function is a move to location command constructor.
* It creates a move to location command which can then be added to any
* object's command queue. This command, when processed will attempt to
* move the creature to the specified location.
*
* @param lLocation - the location the command should move the creature to
* @param bRunToLocation - specifies whether the object should run or not
* @param bDeactivateAtEnd - deactivate the object at the end of the movement. Guaranteed to happen even if the movement doesn't complete
* @returns a valid command
* @author Brenon, Jose
*/
command CommandMoveToLocation( location lLocation, int bRunToLocation = TRUE, int bDeactivateAtEnd = FALSE ) = 559;
command CommandMoveToMultiLocations( location[] lLocations, int bRunToLocation = TRUE , int nStartingWP = 0, int bLoop = FALSE) = 644;
/** @brief This function is a move to object command constructor. The object executing the command will only use the position and disregard the target object orientation.
*
* This function is a move to object command constructor.
* It creates a move to object command which can then be added to any
* object's command queue. This command, when processed will attempt to
* move the creature to target object.
*
* @param oTarget - the object the command should move the creature to
* @param bRunToLocation - specifies whether the object should run or not
* @param fMinRange - The closest to the object we can be
* @param bUseOriginalPosition - Even if the target is moving, use the original position
* @returns a valid command
* @remarks Only creatures can move, non-creature objects that have a move command assigned to them will fail the command when attempting to process it.
* @author Noel, Jose
*/
command CommandMoveToObject( object oTarget, int bRunToLocation = TRUE, float fMinRange = 0.0f, int bUseOriginalPosition = FALSE, float fMaxRange = 0.0f ) = 560;
/** @brief Moves creature away from specified target object at the specified distance
*
* If no clear line-of-sight exists between our current position and any position around the target
* at the specified distance, the AI command will return failure.
* If we're currently further away from the target than the specified distance, the command
* will actually bring us closer up to the specified distance.
*
* @param oTarget - the object from whom to move away
* @param fAwayDistance - The distance away from the target we want to be
* @param bRunToLocation - specifies whether the object should run or not
* @returns a valid command
* @author Nicolas Ng Man Sun
*/
command CommandMoveAwayFromObject( object oTarget, float fAwayDistance, int bRunToLocation = TRUE) = 561;
/** @brief This function is a fly command constructor. The flying creature will use both the position and orientation of the target location.
*
* @param lLocation - the location the command should fly the creature to
* @param bIgnorePathing - (optiona) set to true if being able to path to the lLocation is not a requirement
* @returns a valid command
* @author Jose
*/
command CommandFly(location lLocation, int bIgnorePathing = FALSE) = 811;
// const INT CVirtualMachineCommands::COMMAND_COMMANDMOVETOOBJECT = 560;
// const INT CVirtualMachineCommands::COMMAND_COMMANDMOVEAWAYFROMOBJECT = 561;
// const INT CVirtualMachineCommands::COMMAND_COMMANDEQUIPITEM = 562;
// const INT CVirtualMachineCommands::COMMAND_COMMANDUNEQUIPITEM = 563;
// const INT CVirtualMachineCommands::COMMAND_COMMANDPICKUPITEM = 564;
// const INT CVirtualMachineCommands::COMMAND_COMMANDPUTDOWNITEM = 565;
/** @brief This function is an attack command constructor.
*
* This function is an attack command constructor.
* It creates an attack command which can then be added to any
* object's command queue. This command, when processed will attempt to
* make the creature attack the target object.
* This command will also move the attacker towards the target, if the creature
* has a melee weapon equipped.
*
* @param oTarget - the object the command make the creature attack.
* @param nForcedResult - the command will be executed without processing scripts
* @returns a valid command, or invalid if the target is dead.
* @remarks This command should not be used to initiate combat.
* @author Adriana/Brenon
*/
command CommandAttack(object oTarget, int nForcedResult = COMBAT_RESULT_INVALID) = 566;
/** @brief Deathblow command constructor.
*
* This creates a deathblow command which will play a deathblow animation on the
* object that executes it. If the attacker is the same as the object executing
* a deathblow attack animation will be played. If its not, then a deathblow
* damage animation will be played.
*
* @param oAttacker - The object that represents the attacker.
* @param nDeathType - Indicates what deathblow will be used use (e.i. unsync, sword and shield, dog, etc.)
* @returns a valid command
* @author Gabo
*/
command CommandDeathBlow(object oTarget, int nDeathType = 0) = 246;
/** @brief Turn command constructor.
*
* This creates a turn command which will turn the object towards a specific angle.
*
* @param fFacingDirection - Angle to turn towards.
* @returns a valid command
* @author Adriana, Jose
*/
command CommandTurn(float fFacingDirection) = 327;
// const INT CVirtualMachineCommands::COMMAND_COMMANDSPEAKSTRING = 567;
// const INT CVirtualMachineCommands::COMMAND_COMMANDSPEAKSTRINGBYSTRREF = 568;
/** @brief This function is an equip item command constructor.
*
* This function is an equip item command constructor.
* It creates an equip item command which can then be added to any
* object's command queue. This command, when processed will attempt
* to equip the specified item on the object.
*
* @param oItem - the item that the object should equip
* @param nEquipSlot - The optinal equip slot number. Use the INVENTORY_SLOT constants to specify a particular slot.
* @param nWeaponSet - The optinal weapon set number, it can be 0 or 1.
* @returns a valid command
* @author Noel/Gabo
*/
command CommandEquipItem( object oItem, int nEquipSlot = INVENTORY_SLOT_INVALID, int nWeaponSet = INVALID_WEAPON_SET ) = 562;
/** @brief This function is an unequip item command constructor.
*
* This function is an unequip item command constructor.
* It creates an unequip item command which can then be added to any
* object's command queue. This command, when processed will attempt
* to unequip the specified item on the object to the specified repository position.
*
* @param oItem - the item that the object should equip
* @returns a valid command
* @author Noel/Gabo
*/
command CommandUnequipItem( object oItem ) = 563;
/** @brief This function is a sheathe weapons command constructor.
*
* Makes the creature executing this command put away its weapons.
*
* @returns a valid command
* @author Gabo
*/
command CommandSheatheWeapons( ) = 158;
/** @brief This function is an unsheathe weapons command constructor.
*
* Makes the creature executing this command draw its weapons.
*
* @returns a valid command
* @author Gabo
*/
command CommandUnsheatheWeapons( ) = 159;
/** @brief This function is a switch weapon set command constructor.
*
* Makes the creature executing this command switch weapon sets
*
* if the WeaponSet used is INVALID_WEAPON_SET, then the next available
* weapon set is made active.
*
* @param nWeaponSet - The weapon set to make active.
* @returns a valid command
* @author Gabo
*/
command CommandSwitchWeaponSet(int nWeaponSet = INVALID_WEAPON_SET ) = 162;
/** @brief This function is a play animation command constructor.
*
* This function is a play animation command constructor.
* It creates a play animation command which can then be added to any
* object's command queue. This command, when processed will attempt
* to play the specified animation on the object.
*
* @param nAnimation - the animation that the object should play
* @param nLoops - The number of loops to play if its a looping animation or the next looping animation, if its a transition animation.
* @param bPlayNext - Indicates if the engine will automatically play the next animation after the initial animation and its looping animation.
* @param bBlendIn - 1 = fast blend (default), 2 = immediate (no blending)
* @param bRandomizeOffset - Start playing the animation at a random position
* @returns a valid command
* @author Brenon
*/
command CommandPlayAnimation( int nAnimation, int nLoops = 0, int bPlayNext = 0, int bBlendIn = 1, int bRandomizeOffset = 0) = 569;
// const INT CVirtualMachineCommands::COMMAND_COMMANDOPENDOOR = 570;
// const INT CVirtualMachineCommands::COMMAND_COMMANDCLOSEDOOR = 571;
// const INT CVirtualMachineCommands::COMMAND_COMMANDUNLOCK = 572;
// const INT CVirtualMachineCommands::COMMAND_COMMANDLOCK = 573;
// const INT CVirtualMachineCommands::COMMAND_COMMANDCASTSPELLATOBJECT = 574;
// const INT CVirtualMachineCommands::COMMAND_COMMANDCASTSPELLATLOCATION = 575;
// const INT CVirtualMachineCommands::COMMAND_COMMANDGIVEITEM = 576;
// const INT CVirtualMachineCommands::COMMAND_COMMANDTAKEITEM = 577;
/** @brief This function simply waits for the specified amount of time to pass.
*
* This function simply waits for the specified amount of time to pass.
* If a negative value is specified, the command will be given a wait time of zero.
*
* @param fDelay - The amount of time in seconds the command should delay
* @returns a valid command
* @author Brenon
*/
command CommandWait( float fSeconds ) = 578;
/** @brief Adds a command to move towards a character and initiate a conversation event
*
* Generates a command structure for a creature to approach a target and initiate a
* conversation event. If rConversationFile is specified then that file will be
* used, otherwise the conversation specified on the creature will be used
*
* @param oTarget - The object which will be approached to initiate a conversation event.
* @param rConversationFile (optional) - The name of a conversation file to be used (*.con)
* @returns a valid command
* @author Gabo
*/
command CommandStartConversation(object oTarget, resource rConversationFile = R"" ) = 579;
/** @brief Adds a command to move to the location of a given object
*
* Adds a command to move to the location of a given object
*
* @param oTarget - The object we are moving to
* @returns a valid command
* @author EricP
*/
command CommandJumpToObject(object oTarget) = 580;
/** @brief Adds a command to move to a location
*
* Adds a command to move to a location
*
* @param lLocation - The location the object will move to
* @returns a valid command
* @author EricP
*/
command CommandJumpToLocation (location lLocation ) = 581;
// const INT CVirtualMachineCommands::COMMAND_COMMANDUSESKILL = 583;
// const INT CVirtualMachineCommands::COMMAND_COMMANDUSEITEM = 584;
/** @brief This function is a "use ability" command constructor.
*
* This function is a "use ability" command constructor.
* It creates a "use ability" command which can then be added to any object's
* command queue. This command, when processed will cause the object to
* use the ability if they're able
*
* @param nAbilityId - The ability to perform
* @param oTarget - Object to perform the ability on (optional)
* @param vTarget - ground target location to perform the ability on (optional)
* @param nConjureTime - sets the conjure time of the ability (optional)
* @param AbilitySourceItem - sets the item that's granting the ability. If none is specified but the ability does come from an item, the the one in the creature's inventory with that ability is used.
* @returns a valid command
* @author Noel, Jose
*/
command CommandUseAbility( int nAbilityId, object oTarget=OBJECT_INVALID, vector vTarget=[0.0,0.0,0.0], float nConjureTime = -1.0, string sAbilitySourceItemTag="" ) = 582;
/** @brief This function is a do function command constructor.
*
* This function is a do function command constructor.
* It creates a do function command which can then be added to any object's
* command queue. This command, when processed will call the specified void
* returning function on the object.
*
* @param fFunction - the void returning function to call
* @returns a valid command
* @warning: Specifying a non-void returning function can cause unstable behaviour.
* @author Brenon
*/
//command CommandDoFunction( function fFunction ) = 585;
/** @brief Create a command to use an object.
*
* This will create a command to use an object. Sub commands include:
* (1) move to use point
* (2) face object
* (3) use object
*
* @param oTarget - the object to use
* @param nAction - the action to use on the object
* @returns a valid command
* @remarks See PLACEABLE_ACTION_*
* @author Jacques Lebrun
*/
command CommandUseObject( object oTarget, int nAction ) = 586;
// const INT CVirtualMachineCommands::COMMAND_COMMANDINTERACTOBJECT = 587;
/** @brief Creates and applies a command to play an animation to interact with an object.
*
* This function is for playing ambient animations. It should not be used for
* player or combat interactions.
*
* This will create a command to use an object. Sub commands include:
* (1) move to use point
* (2) face object
* (3) interact with object
*
* If the target object is a creature, this command will clear all
* commands on the creature and apply an interaction command on it aswell
* so they bothe play the sync animations properly.
*
* Once a creature has an interaction command on it, additional calls to this
* function will switch the animation being played immediately, without creating
* another command.
*
* @param oCreature - The creature that will interact
* @param oTarget - the placeable or creature to interact with
* @param nInteractionId - The type of interaction (see SyncPlaceableAnims and SyncCreatureAnims)
* @param nPose - The pose loop animation to use
* @param nLoops - The number of times to play a pose loop (-1 will loop infinitely)
* @param nPlayExit - Will play an exit animation after the loops end or if the command is cancelled
* @author Gabo
*/
void InteractWithObject( object oCreature, object oTarget, int nInteractionId, int nPose = 1, int nLoops = 0, int bPlayExit = 1, int bSkipReposition = 0 ) = 587;
// const INT CVirtualMachineCommands::COMMAND_COMMANDMOVEAWAYFROMLOCATION = 588;
// const INT CVirtualMachineCommands::COMMAND_COMMANDFORCEMOVETOLOCATION = 589;
// const INT CVirtualMachineCommands::COMMAND_COMMANDFORCEMOVETOOBJECT = 590;
// const INT CVirtualMachineCommands::COMMAND_COMMANDFORCEFOLLOWOBJECT = 591;
// const INT CVirtualMachineCommands::COMMAND_COMMANDEXAMINE = 592;
/** @brief This function is a do event command constructor.
*
* This function is a do event command constructor.
* It creates a do event command which can then be added to any object's
* command queue. This command, when processed will take the event that is
* set within it.
*
* @param evToQueue - the event to queue on your command queue
* @warning: Specifying a non-void returning function can cause unstable behaviour.
* @author MarkB
*/
//command CommandDoEvent( event evToQueue ) = 721;
/** @}*/
/*****************************************************************/
/*****************************************************************/
// Effect Access
/*****************************************************************/
/** @addtogroup effect_access Effect Access Functions
*
* Functions to handle effects (setting, removing etc')
*/
/** @{*/
/** @brief This function return the center of a cluster of creatures
*
* Returns the center of the best cluster of creatures based on input params
*
* @param oCreator - effect creator
* @param nAbilityId - ability id
* @param nClusterSize - min number of enemies needed
* @param nAllyFailChance - A percentage chance to fail each possible cluster if any ally is inside the cluster. The chance is comulative per ally
* @param nReturnFirstMatch - Return the first group matching the criterias instead of best match. Quicker.
* @author EricP
*/
location GetClusterCenter(object oCreator, int nAbilityId, int nClusterSize, int nAllyFailChance, int bReturnFirstMatch) = 445;
/** @brief This function applies an effect at a location.
*
* Applies eEffect to vLocation. If nDurationType is EFFECT_DURATION_TYPE_TEMPORARY, then fDuration is the duration of the effect.
*
* @param nDurationType - can be EFFECT_DURATION_TYPE_PERMANENT EFFECT_DURATION_TYPE_INSTANTANEOUS or EFFECT_DURATION_TYPE_TEMPORARY.
* @param eEffect - the effect to be applied
* @param location - the location of the effect
* @param fDuration - this value needs to be set only when nDurationType is EFFECT_DURATION_TYPE_TEMPORARY
* @param oCreator - effect creator
* @param nAbilityId - ability id
* @author EricP
*/
void Engine_ApplyEffectAtLocation(int nDurationType, effect eEffect, location lLocation, float fDuration=0.0f, object oCreator = OBJECT_SELF, int nAbilityId = 0) = 596;
/** @brief This function applies an effect on an object.
*
* Applies eEffect to oTarget. If nDurationType is EFFECT_DURATION_TYPE_TEMPORARY, then fDuration is the duration of the effect. Use core_h.ApplyEffectToObject instead of calling this directly!
*
* @param nDurationType - can be EFFECT_DURATION_TYPE_PERMANENT EFFECT_DURATION_TYPE_INSTANTANEOUS or EFFECT_DURATION_TYPE_TEMPORARY.
* @param eEffect - the effect to be applied
* @param oTarget - the target of the effect
* @param fDuration - this value needs to be set only when nDurationType is EFFECT_DURATION_TYPE_TEMPORARY
* @param oCreator - effect creator
* @param nAbilityId - ability id
* @author Sophia
*/
void Engine_ApplyEffectOnObject(int nDurationType, effect eEffect, object oTarget, float fDuration=0.0f, object oCreator = OBJECT_SELF, int nAbilityId = 0) = 597;
/** @brief This function applies an effect on an object.
*
* Applies eEffect to every member of the player's party!
*
* @param nDurationType - can be EFFECT_DURATION_TYPE_PERMANENT EFFECT_DURATION_TYPE_INSTANTANEOUS or EFFECT_DURATION_TYPE_TEMPORARY.
* @param eEffect - the effect to be applied
* * @param fDuration - this value needs to be set only when nDurationType is EFFECT_DURATION_TYPE_TEMPORARY
* @param oCreator - effect creator
* @param nAbilityId - ability id
* @param bExcludeCreator - Exclude the creator of the effect.
* @author Georg Zoeller
*/
void Engine_ApplyEffectOnParty(int nDurationType, effect eEffect, float fDuration=0.0f, object oCreator = OBJECT_SELF, int nAbilityId = 0, int bExcludeCreator = FALSE) = 148;
/** @brief Creates a blank effect
*
* Creates an empty effect
*
* @author Noel
*/
effect Effect( int nType = EFFECT_TYPE_INVALID ) = 19;
/** @brief Create an AoEObject
*
* Creates an Area of Effect object, optionally with an embedded vfx that is synced
* to the lifetime of the AoE Object.
*
* Please refer to the documentation or talk to georg about how to use these, they work
* slightly different than in previous games!
*
* @author Georg Zoeller
*/
effect EffectAreaOfEffect(int nId, resource rScript, int nAoEVfx=0) = 634;
/** @brief Is this effect valid?
*
* Tests to see if an effect is valid
*
* @param eEffect - the effect to be tested
* @author Noel
*/
int IsEffectValid(effect eEffect) = 595;
/** @brief Remove an effect
*
* Removes an effect from the object it's applied to
*
* @param oTarget - The object to remove the effect from
* @param eEffect - the effect to be removed
* @author Noel
*/
void RemoveEffect(object oTarget, effect eEffect) = 598;
/** @brief Remove effects based on certain parameters
*
* Removes a group of effects that have the specified values from the object it's applied to
*
* @param oTarget - The object to remove the effect from
* @param nType - Only remove effects of this type (setting EFFECT_TYPE_INVALID will remove all types of effects)
* @param nAbilityId - Only remove effects of with this ability id (setting ABILITY_INVALID will remove effects due to any ability)
* @param oCreator - Only remove effects created by this object (setting OBJECT_INVALID will remove effects created by anything)
* @param bIncludeInnate - TRUE = remove innate abilities too if they match the other criteria
* @author Gabo
*/
void RemoveEffectsByParameters(object oTarget, int nType = EFFECT_TYPE_INVALID, int nAbilityId = ABILITY_INVALID, object oCreator = OBJECT_INVALID, int bIncludeInnate = FALSE ) = 593;
/** @brief Remove all effects on an object with certain limitations
*
* Removes all the effects on an object. You can exclude effects due to injuries and effects that ignore death.
*
* @param oTarget - The object to remove the effect from
* @param bIgnoreInjuries - Don't remove effects that are due to injuries (that are within a certain ability id range)
* @param bDeath - Don't remove effects that ignore death (use this when removing effects on a creature due to it dying)
* @author Gabo
*/
void RemoveAllEffects(object oTarget, int bIgnoreInjuries = TRUE, int bDeath = FALSE) = 594;
/** @brief Remove Effects By Creator
*
* Removes all effects in the area created by a specific object. Can be limited to all effects with a specific ability Id.
*
* @param oCreator - The creator of the effect to be removed
* @param nAbilitID - The ability ID of the effect to be removed (ABILITY_INVALID = all effects from oCreator)
* @author Georg Zoeller
*/
void RemoveEffectsByCreator(object oCreator, int nAbilityID = ABILITY_INVALID) = 139;
/** @brief Get the type of an effect
*
* Gets the effect type of an effect
* This function is deprecated. Please use GetEffectTypeRef instead.
* @param eEffect - the effect to be examined
* @author Noel
*/
int GetEffectType( effect eEffect) = 604;
/** @brief Get the creator of an effect
*
* Gets the creator of an effect
* This function is deprecated. Please use GetEffectCreatorRef instead.
*
* @param eEffect - the effect to be examined
* @returns Returns the object that created the effect. Returns OBJECT_INVALID if the effect isn't valid
* @author Noel
*/
object GetEffectCreator( effect eEffect) = 612;
/** @brief Set the creator of an effect
*
* Sets the creator of an effect
* This function is deprecated. Please use SetEffectCreatorRef instead.
*
* @param eEffect - the effect to be changed
* @param oCreator - the object that should be set as creator
* @returns Returns an effect with the creator set to oCreator
* @author Noel
*/
effect SetEffectCreator( effect eEffect, object oCreator ) = 613;
/** @brief Set the creator of an effect
*
* Gets the DurationType of an effect
* This function is deprecated. Please use GetEffectDurationTypeRef instead.
*
* @param eEffect - the effect
* @returns Returns the EFFECT_DURATION_TYPE_* of an effect
* @author Georg
*/
int GetEffectDurationType(effect eEffect) = 608;
/** @brief Returns the ability id for the effect
*
* Returns the ability id for the effect
* This function is deprecated. Please use GetEffectAbilityIDRef instead.
*
* @param efEffect- The effect to get the ability off of.
* @returns Returns the ability id for the effect
* @sa GetEffectAbilityID()
* @author Adriana
*/
int GetEffectAbilityID( effect efEffect ) = 620;
/** @brief Sets the ability id for the effect
*
* Sets the ability id for the effect
* This function is deprecated. Please use SetEffectAbilityIDRef instead.
*
* @param efEffect - The effect to get the ability off of.
* @param nAbilityId - ability id
* @returns Sets the ability id for the effect
* @sa SetEffectAbilityID()
* @author Adriana
*/
effect SetEffectAbilityID( effect efEffect, int nAbilityId ) = 621;
/** @brief Returns the flags for an effect
*
* Returns the flags for an effect
* This function is deprecated. Please use GetEffectFlagsRef instead.
*
* @param efEffect- The effect of which to get the flags.
* @returns Returns the flags for the effect
* @author Gabo
*/
int GetEffectFlags( effect efEffect ) = 605;
/** @brief Sets the flags for an effect
*
* Sets the flags for an effect
* This function is deprecated. Please use SetEffectFlagsRef instead.
*
* @param efEffect - The effect to set the flags on.
* @param nFlags - The flags that will be set
* @author Gabo
*/
effect SetEffectFlags( effect efEffect, int nFlags ) = 609;
/** @brief Returns the animation for an effect
*
* Returns the animation for an effect
* This function is deprecated. Please use GetEffectAnimationRef instead.
*
* @param efEffect- The effect of which to get the animation.
* @returns Returns the animation for the effect
* @author Gabo
*/
int GetEffectAnimation( effect efEffect ) = 607;
/** @brief Sets the animation for an effect
*
* Sets the animation for an effect
* This function is deprecated. Please use SetEffectAnimationRef instead.
*
* @param efEffect - The effect to set the animation on.
* @param nAnimation - The animation that will be set
* @author Gabo
*/
effect SetEffectAnimation( effect efEffect, int nAnimation ) = 611;
/** @brief Gets the specified integer on the effect
*
* Gets the specified integer on the effect.
* This function is deprecated. Please use GetEffectIntegerRef instead.
*
* @param efEffect- The effect to get the integer off of.
* @param nIndex - The index of the integer to get.
* @returns Returns the specified integer, returns -1 on error.
* @sa SetEffectInteger()
* @author Noel
*/
int GetEffectInteger( effect efEffect, int nIndex ) = 683;
/** @brief Sets the specified integer on the effect
*
* Sets the specified integer on the effect
* This function is deprecated. Please use SetEffectIntegerRef instead.
*
* @param efEffect - The effect to set the value on.
* @param nIndex - The index of the value to set.
* @param nValue - The value of the value to set.
* @returns Returns the modfied effect, returns an invalid effect on error.
* @remarks It should be noted that there is no maximum number of values
* on an effect, as the array of values on the effect expands as needed.
* @sa GetEffectInteger()
* @author Noel
*/
effect SetEffectInteger( effect efEffect, int nIndex, int nValue ) = 684;
/** @brief Gets the specified float on the effect
*
* Gets the specified float on the effect
* This function is deprecated. Please use GetEffectFloatRef instead.
*
* @param efEffect- The effect to get the value off of.
* @param nIndex - The index of the value to get.
* @returns Returns the specified value, returns -1.0 on error.
* @sa SetEffectFloat()
* @author Noel
*/
float GetEffectFloat( effect efEffect, int nIndex ) = 685;
/** @brief Sets the specified float on the effect
*
* Sets the specified float on the effect
* This function is deprecated. Please use SetEffectFloatRef instead.
*
* @param efEffect - The effect to set the value on.
* @param nIndex - The index of the value to set.
* @param fValue - The value of the value to set.
* @returns Returns the modfied effect, returns an invalid effect on error.
* @remarks It should be noted that there is no maximum number of values
* on an effect, as the array of values on the effect expands as needed.
* @sa GetEffectFloat()
* @author Noel
*/
effect SetEffectFloat( effect efEffect, int nIndex, float fValue ) = 686;
/** @brief Gets the specified object on the effect
*
* Gets the specified object on the effect
* This function is deprecated. Please use GetEffectObjectRef instead.
*
* @param efEffect- The effect to get the value off of.
* @param nIndex - The index of the value to get.
* @returns Returns the specified value, returns OBJECT_INVALID on error.
* @sa SetEffectObject()
* @author Noel
*/
object GetEffectObject( effect efEffect, int nIndex ) = 687;
/** @brief Sets the specified float on the effect
*
* Sets the specified object on the effect
* This function is deprecated. Please use SetEffectObjectRef instead.
*
* @param efEffect - The effect to set the value on.
* @param nIndex - The index of the value to set.
* @param oValue - The value of the value to set.
* @returns Returns the modfied effect, returns an invalid effect on error.
* @remarks It should be noted that there is no maximum number of values
* on an effect, as the array of values on the effect expands as needed.
* @sa GetEffectObject()
* @author Noel
*/
effect SetEffectObject( effect efEffect, int nIndex, object oValue ) = 688;
/** @brief Gets the specified string on the effect
*
* Gets the specified string on the effect
* This function is deprecated. Please use GetEffectStringRef instead.
*
* @param efEffect- The effect to get the value off of.
* @param nIndex - The index of the value to get.
* @returns Returns the specified value, returns empty string on error.
* @sa SetEffectString()
* @author Noel
*/
string GetEffectString( effect efEffect, int nIndex ) = 689;
/** @brief Sets the specified string on the effect
*
* Sets the specified string on the effect
* This function is deprecated. Please use SetEffectStringRef instead.
*
* @param efEffect - The effect to set the value on.
* @param nIndex - The index of the value to set.
* @param sValue - The value of the value to set.
* @returns Returns the modfied effect, returns an invalid effect on error.
* @remarks It should be noted that there is no maximum number of values
* on an effect, as the array of values on the effect expands as needed.
* @sa GetEffectString()
* @author Noel
*/
effect SetEffectString( effect efEffect, int nIndex, string sValue ) = 690;
/** @brief Gets the specified integer on the effect
*
* Gets the specified integer on the effect
*
* @param efEffect- The effect to get the integer off of.
* @param nIndex - The index of the integer to get.
* @returns Returns the specified integer, returns -1 on error.
* @sa SetEffectIntegerRef()
* @author MarkB
*/
int GetEffectIntegerRef( ref effect efEffect, int nIndex ) = 893;
/** @brief Sets the specified integer on the effect
*
* Sets the specified integer on the effect
*
* @param efEffect - The effect to set the value on.
* @param nIndex - The index of the value to set.
* @param nValue - The value of the value to set.
* @remarks It should be noted that there is no maximum number of values
* on an effect, as the array of values on the effect expands as needed.
* @sa GetEffectIntegerRef()
* @author MarkB
*/
void SetEffectIntegerRef( ref effect efEffect, int nIndex, int nValue ) = 894;
/** @brief Gets the specified float on the effect
*
* Gets the specified float on the effect
*
* @param efEffect- The effect to get the value off of.
* @param nIndex - The index of the value to get.
* @returns Returns the specified value, returns -1.0 on error.
* @sa SetEffectFloatRef()
* @author MarkB
*/
float GetEffectFloatRef( ref effect efEffect, int nIndex ) = 895;
/** @brief Sets the specified float on the effect
*
* Sets the specified float on the effect
*
* @param efEffect - The effect to set the value on.
* @param nIndex - The index of the value to set.
* @param fValue - The value of the value to set.
* @remarks It should be noted that there is no maximum number of values
* on an effect, as the array of values on the effect expands as needed.
* @sa GetEffectFloatRef()
* @author MarkB
*/
void SetEffectFloatRef( ref effect efEffect, int nIndex, float fValue ) = 896;
/** @brief Gets the specified object on the effect
*
* Gets the specified object on the effect
*
* @param efEffect- The effect to get the value off of.
* @param nIndex - The index of the value to get.
* @returns Returns the specified value, returns OBJECT_INVALID on error.
* @sa SetEffectObjectRef()
* @author MarkB
*/
object GetEffectObjectRef( ref effect efEffect, int nIndex ) = 897;
/** @brief Sets the specified float on the effect
*
* Sets the specified object on the effect
*
* @param efEffect - The effect to set the value on.
* @param nIndex - The index of the value to set.
* @param oValue - The value of the value to set.
* @remarks It should be noted that there is no maximum number of values
* on an effect, as the array of values on the effect expands as needed.
* @sa GetEffectObjectRef()
* @author MarkB
*/
void SetEffectObjectRef( ref effect efEffect, int nIndex, object oValue ) = 898;
/** @brief Gets the specified string on the effect
*
* Gets the specified string on the effect
*
* @param efEffect- The effect to get the value off of.
* @param nIndex - The index of the value to get.
* @returns Returns the specified value, returns empty string on error.
* @sa SetEffectStringRef()
* @author MarkB
*/
string GetEffectStringRef( ref effect efEffect, int nIndex ) = 899;
/** @brief Sets the specified string on the effect
*
* Sets the specified string on the effect
*
* @param efEffect - The effect to set the value on.
* @param nIndex - The index of the value to set.
* @param sValue - The value of the value to set.
* @remarks It should be noted that there is no maximum number of values
* on an effect, as the array of values on the effect expands as needed.
* @sa GetEffectStringRef()
* @author MarkB
*/
void SetEffectStringRef( ref effect efEffect, int nIndex, string sValue ) = 900;
/** @brief Get the type of an effect
*
* Gets the effect type of an effect
*
* @param eEffect - the effect to be examined
* @author MarkB
*/
int GetEffectTypeRef( ref effect eEffect) = 901;
/** @brief Set the creator of an effect
*
* Gets the DurationType of an effect
*
* @param eEffect - the effect
* @returns Returns the EFFECT_DURATION_TYPE_* of an effect
* @author MarkB
*/
int GetEffectDurationTypeRef( ref effect eEffect) = 902;
/** @brief Get the creator of an effect
*
* Gets the creator of an effect
*
* @param eEffect - the effect to be examined
* @returns Returns the object that created the effect. Returns OBJECT_INVALID if the effect isn't valid
* @author MarkB
*/
object GetEffectCreatorRef( ref effect eEffect) = 903;
/** @brief Set the creator of an effect
*
* Sets the creator of an effect
*
* @param eEffect - the effect to be changed
* @param oCreator - the object that should be set as creator
* @author MarkB
*/
void SetEffectCreatorRef( ref effect eEffect, object oCreator ) = 904;
/** @brief Returns the ID of an effect.
*
* Returns the internal unique ID of an effect.
*
* @param eEffect - The effect
* @author MarkB
*/
int GetEffectIDRef( ref effect eEffect ) = 905;
/** @brief Returns the flags for an effect
*
* Returns the flags for an effect
*
* @param efEffect- The effect of which to get the flags.
* @returns Returns the flags for the effect
* @author MarkB
*/
int GetEffectFlagsRef( ref effect efEffect ) = 906;
/** @brief Sets the flags for an effect
*
* Sets the flags for an effect
*
* @param efEffect - The effect to set the flags on.
* @param nFlags - The flags that will be set
* @author MarkB
*/
void SetEffectFlagsRef( ref effect efEffect, int nFlags ) = 907;
/** @brief Returns the animation for an effect
*
* Returns the animation for an effect
*
* @param efEffect- The effect of which to get the animation.
* @returns Returns the animation for the effect
* @author MarkB
*/
int GetEffectAnimationRef( ref effect efEffect ) = 908;
/** @brief Sets the animation for an effect
*
* Sets the animation for an effect
*
* @param efEffect - The effect to set the animation on.
* @param nAnimation - The animation that will be set
* @author MarkB
*/
void SetEffectAnimationRef( ref effect efEffect, int nAnimation ) = 909;
/** @brief Returns the ability id for the effect
*
* Returns the ability id for the effect
*
* @param efEffect- The effect to get the ability off of.
* @returns Returns the ability id for the effect
* @sa SetEffectAbilityIDRef()
* @author MarkB
*/
int GetEffectAbilityIDRef( ref effect efEffect ) = 910;
/** @brief Sets the ability id for the effect
*
* Sets the ability id for the effect
*
* @param efEffect - The effect to get the ability off of.
* @param nAbilityId - ability id
* @sa GetEffectAbilityIDRef()
* @author MarkB
*/
void SetEffectAbilityIDRef( ref effect efEffect, int nAbilityId ) = 911;
/** @brief Sets the specified integer on the effect Engine Data structure
*
* Sets the specified integer on the effect
* These functions will soon be deprecated. Please use SetEffect*Ref instead (remove Engine from call, add Ref to end).
*
* @param efEffect - The effect to set the value on.
* @param nIndex - The index of the value to set.
* @param nValue - The value of the value to set.
* @returns Returns the modified effect, returns an invalid effect on error.
* @remarks The Engine data structure can only be written to and not read
* from scripting. It is also separate from Effect Data structure
* which was previously used as a all purpose way to exchange information.
* @author Nicolas NG MAN SUN
*/
effect SetEffectEngineInteger( effect efEffect, int nIndex, int nValue ) = 655;
effect SetEffectEngineFloat( effect efEffect, int nIndex, float fValue ) = 761;
effect SetEffectEngineObject( effect efEffect, int nIndex, object oValue ) = 762;
effect SetEffectEngineVector( effect efEffect, int nIndex, vector vVector ) = 727;
/** @brief Sets the specified integer on the effect Engine Data structure
*
* Sets the specified integer on the effect
*
* @param efEffect - The effect to set the value on.
* @param nIndex - The index of the value to set.
* @param nValue - The value of the value to set.
* @remarks The Engine data structure on effects is a separate list of data structures
* for use within the engine; giving design the flexibility of maintaining their
* own list in scripting while giving programming certainty as to where to find
* information (in some cases) derived from scripting.
* @author MarkB
*/
void SetEffectEngineIntegerRef( ref effect efEffect, int nIndex, int nValue ) = 928;
void SetEffectEngineFloatRef( ref effect efEffect, int nIndex, float fValue ) = 929;
void SetEffectEngineObjectRef( ref effect efEffect, int nIndex, object oValue ) = 930;
void SetEffectEngineVectorRef( ref effect efEffect, int nIndex, vector vVector ) = 931;
/** @brief Gets the effect associated with the current event
*
* Gets the effect associated with the current event.
* This command should only be used in scripts handling effect applied/removed events.
*
* @returns an effect
* @author Noel
*/
effect GetCurrentEffect() = 681;
/** @brief Tells the game if the effect associated with the current event is valid or not.
*
* Tells the game if the effect associated with the current event is valid or not.
* This determines if the effect is stored and if linked effects are also applied.
* This command should only be used in scripts handling effect applied/removed events.
*
* @param nValid - The effect is valid and was properly applied.
* @author Noel
*/
void SetIsCurrentEffectValid( int nValid=TRUE ) = 682;
/** @brief Returns the list of effects that are currently applied to an object.
*
* Returns the list of effects that are currently applied to an object. This includes both
* temporary and permanent effects. The order of the events inside the list is meaningless.
*
* @param oObject - The object from which we try to get the effects list.
* @param nEffectType - Optionally only return an array of a specified EffectType. Default setting returns all applied effects.
* @param nAbilityId - Optionally filter the returned array to include only effects with a matching ability id (0 means no filter).
* @param nEffectId - Optionally filter the array by EffectId (-1 means no filter).
* @param nDurationType - Optionally filter the array by DurationType (EFFECT_DURATION_TYPE_INVALID means no filter).
* @author Sam, Georg, Gabo
*/
effect[] GetEffects(object oObject, int nEffectType = EFFECT_TYPE_INVALID, int nAbilityId = 0, object oCreator = OBJECT_INVALID, int nDurationType = EFFECT_DURATION_TYPE_INVALID, int nEffectId = -1) = 712;
/** @brief Returns whether or not a creature has effects matching the filter criteria
*
* Returns whether or not a creature has effects matching the filter criteria
*
* @param oObject - The object from which we try to get the effects list.
* @param nEffectType - Optionally only return an array of a specified EffectType. Default setting returns all applied effects.
* @param nAbilityId - Optionally filter the returned array to include only effects with a matching ability id (-1 means no filter).
* @author Georg
*/
int GetHasEffects(object oObject, int nEffectType=EFFECT_TYPE_INVALID, int nAbilityId = -1) = 177;
/** @brief Returns the list of effects that created by the object.
*
* Returns the list of effects that created by the object
*
* @param oObject - The object from which we try to get the effects list.
* @param nAbilityID - if specified (not ABILITY_INVALID), returns only effects with the specified ability id.
* @param nType - if specified (not EFFECT_INVALIDEFFECT), returns only effects of the specified type.
* @author Adriana, Georg
*/
effect[] GetEffectsByCreator(object oCreator, int nAbilityID = ABILITY_INVALID, int nType = 0) = 713;
/** @brief Returns the location of a visual effect
*
* Returns the location of a visual effect. If it was applied to a location, it will be
* location it was applied at. if it was applied to an object, it will be the objects location
*
* @param eVFX - The visual effect
* @author Georg
*/
location GetVisualEffectLocation(effect eVFX) = 186;
/** @brief Returns the ID of an effect.
*
* Returns the internal unique ID of an effect.
* This function is deprecated. Please use GetEffectIDRef instead.
*
* @param eEffect - The effect
* @author dsitar
*/
int GetEffectID( effect eEffect) = 614;
/** @brief Returns the effect flags on a given object.
*
* Effects can set effect flags. This function will return
* and integer that contains all the effect flags on an object
* due to the effects it currently holds.
*
* @param oOwner - The object that contains effects
* @author Gabo
*/
int GetEffectsFlags(object oOwner) = 192;
/** @}*/
/** @brief Applies a visual effect to a target object.
*
* Applies a visual effect to a target object.
*
* @param oCreator - The object creating the visual effect
* @param oTarget - The object receiving the visual effect
* @param nVFXId - The Id of the visual effect
* @param nDurationType - Temporary, instant, permanent, etc.
* @param fDuration - Duration of the effect, depending on the type
* @param nAbilityId - The ability ID this effect is linked to (if applied by an ability)
* @author Eric Paquette, Georg Zoeller
*/
void ApplyEffectVisualEffect(object oCreator, object oTarget, int nVFXId, int nDurationType, float fDuration, int nAbilityId = ABILITY_INVALID) = 635;
/** @brief add/remove visual effect for items
*/
void AddItemVisualEffect(object oTarget, int nVFXId) = 780;
int[] GetItemVisualEffectsIDs(object oTarget) = 781;
void RemoveItemVisualEffect(object oTarget, int nId) = 782;
void RemoveAllItemVisualEffects(object oTarget) = 783;
/** @brief EffectDamage Constructor.
*
* EffectDamage Constructor
*
* @param fValue - Amount of damage to be applied.
* @param nDamageType - Damage Type to be applied (Physical, Fire): Default of 1 is physical.
* @param nFlags - Special behavior bitfield: Default is no flags (0).
* @param nImpactVFX - Impact VFX to play. Default of 0 is no impact VFX.
* @author Georg Zoeller, Ported Into Engine by Mark Brockington
*/
effect EffectDamage(float fValue, int nDamageType = 1, int nFlags = 0, int nImpactVFX = 0) = 833;
/** @brief EffectImpact Constructor.
*
* EffectImpact Constructor.
*
* @param fDamage - Amount of damage to be applied.
* @param oWeapon - Weapon that applies the damage.
* @param nVfx - Impact VFX to play. Default of 0 is no impact VFX.
* @param nAbi - Ability (default is invalid ability).
* @param nDamageType - Damage Type to be applied (Physical, Fire): Default of 1 is physical.
* @author Georg Zoeller, Ported Into Engine by Mark Brockington
*/
effect EffectImpact(float fDamage, object oWeapon, int nVfx = 0, int nAbi = 0, int nDamageType = 1) = 834;
/** @brief EffectModifyProperty Constructor.
*
* EffectModifyProperty Constructor.
*
* @author Georg Zoeller, Ported Into Engine by Mark Brockington
*/
effect EffectModifyProperty(int nProperty0, float fChange0, int nProperty1=0, float fChange1=0.0, int nProperty2=0, float fChange2=0.0 ) = 835;
/** @brief EffectModifyPropertyHostile Constructor.
*
* EffectModifyPropertyHostile Constructor.
*
* @author Georg Zoeller, Ported Into Engine by Mark Brockington
*/
effect EffectModifyPropertyHostile(int nProperty0, float fChange0, int nProperty1=0, float fChange1=0.0, int nProperty2=0, float fChange2=0.0 ) = 847;
/** @brief ApplyEffectModifyProperty
*
* ApplyEffectModifyProperty will go through the effort of applying the Modify
* Property without actually parsing the effect in the scripting language.
*
* If the effect hasn't been created by EffectModifyProperty or EffectModifyPropertyHostile
* it will be ignored by the function and nothing will occur in the game engine.
*
* @author Mark Brockington
*/
void ApplyEffectModifyProperty(effect eModifyPropertyEffect) = 854;
/** @brief RemoveEffectModifyProperty
*
* RemoveEffectModifyProperty will go through the effort of unapplying the Modify
* Property without actually parsing the effect in the scripting language.
*
* If the effect was not created by EffectModifyProperty or EffectModifyPropertyHostile
* it will be ignored by the function and nothing will occur in the game engine.
*
* @author Mark Brockington
*/
void RemoveEffectModifyProperty(effect eModifyPropertyEffect) = 855;
/** @brief Enables or disables the physics on a creature.
* @author Gabo
* @param oCreature - Creature to be affected
* @param bEnable - If true, physics will be enabled, if false, they will be disabled.
*/
void SetPhysicsController(object oCreature, int bEnable) = 839;
/** @}*/
/*****************************************************************/
/*****************************************************************/
// Waypoints & Map Patches
/*****************************************************************/
/** @addtogroup waypatches Waypoint & Map Patch Functions
*
* Functions to control the state of waypoints and map patches
*/
/** @{*/
/** @brief Controls the state of a map patch
*
* Map patches with a state of -1 are "invisible" to the client. Any
* other setting 0-N will make the patch appear on the client's map.
* If the action ID for the state is not -1, the patch is clickable,
* and the action ID will be sent to server whenever client clicks
* on the patch.
*
* @param oMapPatch - Object ID of patch to control
* @param nState - State number to set, -1 = invisible
* @sa GetMapPatchState(), GetPlayerMapPatch()
* @author Derek Beland
*/
void SetMapPatchState( object oMapPatch, int nState) = 649;
/** @brief Gets the current state of a map patch
*
* Map patches with a state of -1 are "invisible" to the client. Any
* other setting 0-N will make the patch appear on the client's map.
* If the action ID for the state is not -1, the patch is clickable,
* and the action ID will be sent to server whenever client clicks
* on the patch.
*
* @param oMapPatch - Object ID of patch to control
* @sa SetMapPatchState(), GetPlayerMapPatch()
* @author Derek Beland
*/
int GetMapPatchState( object oMapPatch ) = 650;
/** @brief Gets the object ID of the Nth player map patch
*
* Each player has a list of map patches and states for each area.
* This function looks up the Nth object ID of a map patch tag for a
* particular player. Note that the patch could be from any of the
* currently loaded areas.
*
* @param pPlayer - Object ID of player
* @param sTag - Tag string to search for
* @param nNth - Integer ordinal of object
* @sa GetMapPatchState(), SetMapPatchState()
* @author Derek Beland
*/
object GetPlayerMapPatch( object pPlayer, string sTag, int nNth = 0) = 651;
/** @brief Controls the state of a map pin
*
* Turns on or off a map pin.
*
* @param oMapPin - Object ID of Pin to control
* @param nEnable - TRUE or FALSE
* @sa GetMapPinState(), GetPlayerMapPin()
* @author Derek Beland
*/
void SetMapPinState( object oMapPin, int nEnable) = 652;
/** @brief Gets the current state of a map Pin
*
* Returns TRUE or FALSE indicating whether the pin is enabled
* or disabled
*
* @param oMapPin - Object ID of Pin to control
* @sa SetMapPinState(), GetPlayerMapPin()
* @author Derek Beland
*/
int GetMapPinState( object oMapPin ) = 653;
/** @brief Gets the object ID of the Nth player map Pin
*
* Each player has a list of map pins and states for each area.
* This function looks up the Nth object ID of a map pin tag for a
* particular player. Note that the pin could be from any of the
* currently loaded areas.
*
* @param pPlayer - Object ID of player
* @param sTag - Tag string to search for
* @param nNth - Integer ordinal of object
* @sa GetMapPinState(), SetMapPinState()
* @author Derek Beland
*/
object GetPlayerMapPin( object pPlayer, string sTag, int nNth = 0) = 654;
/** @}*/
/*****************************************************************/
/*****************************************************************/
// Plot Manager
/*****************************************************************/
/** @addtogroup plotman Plot Manager Functions
*
* Functions to interface with the Plot Manager
*/
/** @{*/
/** @brief Returns the value of a plot flag
*
* Queries the state of a plot flag from a party's plot table. In order to query DEFINED flags, this function needs to query the plot script associated with that flag.
*
* @param oParty - Party Object ID
* @param strPlot - Plot name to query
* @param nFlag - Plot flag # to query (32-127)
* @param nCallScript - Whether or not to call the plot script. Note: this should not be set to TRUE when this function is used inside a plot script. If nBit is a defined flag then the script will start calling itself recursivly.
* @sa SetPartyPlotFlag(), GetPartyPlotVar()
* @returns value of the flag - TRUE or FALSE
* @author Derek Beland
*/
int GetPartyPlotFlag( object oParty, string strPlot, int nFlag, int nCallScript = FALSE) = 660;
/** @brief Sets the value of a plot flag
*
* Sets the state of a plot flag in a party's plot table.
*
* @param oParty - Party Object ID
* @param strPlot - Plot name to query
* @param nFlag - Plot flag # to query (32-127)
* @param nValue - Value to set (TRUE or FALSE)
* @param nCallScript - Whether or not to call the plot script.
* @sa GetPartyPlotFlag(), GetPartyPlotVar(), SetPartyPlotVar()
* @author Derek Beland
*/
void SetPartyPlotFlag( object oParty, string strPlot, int nFlag, int nValue, int nCallScript = FALSE) = 661;
/** @brief Returns the name of a plot entry
*
* Returns a strref containing the localized name of the plot entry
*
* @param strPlot - Plot # to query
* @sa GetPlotEntry2DA(), GetPlotPriority()
* @author Derek Beland
*/
int GetPlotEntryName(string strPlot) = 665;
/** @brief Returns the resref of the plot (without extension) as a string
*
* @param strPlot a string containing the guid or resref of the plot
* @author Hesky Fisher
*/
string GetPlotResRef(string strPlot) = 742;
/** @brief Returns the GUID of the plot as a string (you should always translate RESREFS to GUIDs before using them)
*
* @param strPlot a string containing the guid or resref of the plot
* @return GUID for the associated PlotResRef, will return a blank string if the PlotResRef is unknown.
* @author Mark Brockington
*/
string GetPlotGUID(string strPlotResRef) = 853;
/** @brief Returns the name of the plot flag as a string
*
* @param strPlot - a string containing the guid or resref of the plot
* @param nFlag - plot flag number to query
* @author Hesky Fisher
*/
string GetPlotFlagName(string strPlot, int nFlag) = 743;
/** @brief Returns the reward ID related to a specific plot flag.
*
* @param strPlot - a string containing the guid or resref of the plot
* @param nFlag - plot flag number to query
* @author Georg Zoeller
*/
int GetPlotFlagRewardId(string strPlot, int nFlag) = 181;
/** @brief Sets the party picker area name
*
* Sets the party picker area name. Each module can have its own area
*
* @param sAreaName - Name of the partypicker stage
* @param s2DAName - Name of the 2DA to use with the stage
* @author Eric Paquette
*/
void SetPartyPickerStage(string sAreaName, string s2DAName) = 859;
/** @brief Sets the given plot as a Story plot.
*
* Sets the given plot as a Story plot. Story plots are displayed on the loading screen and will not appear in the Journal.
*
* @param sPlot - the plot resref
* @author Henry Smith
*/
void SetStoryPlot(string sPlot) = 750;
/** @brief Sets the plot giving flag of the object
*
*
* @param oid - the object.
* @param oid - whether the object is a plot giver.
* @author Henry Smith
*/
void SetPlotGiver(object oid, int bIsPlotGiver) = 751;
/** @brief Sets the plot giving flag of the object
*
*
* @param oid - the object.
* @param sPlotGUID - the plot GUID
* @param bIsPlotDestination - whether the object is a plot destination.
* @author Christopher Kerr
*/
void SetPlotDestination(object oid, string sPlotGUID, int bIsPlotDestination) = 729;
/** @brief Gets the summary for a given plot flag.
*
* Gets the summary for a given plot flag. The summary is whatever text
* is between the tags.
*
* @param sPlot - the plot resref
* @param nFlag - the flag id
* @author Bogdan Corciova
*/
string GetPlotSummary( string sPlot, int nFlag ) = 381;
/** @brief Gets the plot text id for a given plot flag.
*
* Gets the plot text id for a given plot flag. This is
* the full plot description.
*
* @param sPlot - the plot resref
* @param nFlag - the flag id
* @author Michael Hamilton
*/
int GetPlotEntryDescription( string sPlot, int nFlag ) = 718;
/** @brief Set the value of the specified custom tag
*
* @param nKey - the hash value of the custom tag
* @param nValue - the value to assign to it
*
* @author Nicolas Ng Man Sun
*/
void SetCustomTag( int nKey, int nValue ) = 431;
/** @}*/
/*****************************************************************/
/*****************************************************************/
// Party and Group
/*****************************************************************/
/** @addtogroup Party Party and Group control
*
* Functions for party and group functions
*/
/** @{*/
/** @brief Get the object array of the party pool
*
* @returns the array of followers belonging to the party pool
* @author Jacques Lebrun
*/
object[] GetPartyPoolList() = 395;
/** @brief Adds a creature into the player's active party
*
* This function will add the creature into the player's active party. The active
* party are the creatures that are currently following the player and appear
* in the main GUI. This number is limited to 3 additional followers in addition to
* the player character.
* NOTE: This function needs to have a return value when failure means that the player
* Tried to add to many followers.
*
* DEPRECATED, use SetFollowerState()
*
* @param oCreatureToAdd - The creature to add to the party.
* @param oPlayer - The player object leading the party.
* @remarks This function does not handle yet the party pool.
* @sa RemoveFromParty(), GetPartySize()
* @author Sophia
*/
//void AddToParty( object oCreatureToAdd, object oPlayer ) = 396;
/** @brief Removes a creature from the player's active party
*
* This function will remove the creature from the player's active party. The active
* party are the creatures that are currently following the player and appear
* in the main GUI. This number is limited to 3 additional followers in addition to
* the player character.
*
* DEPRECATED, use SetFollowerState()
*
* @param oCreature - The creature to remove from the party.
* @remarks This function does not handle yet the party pool.
* @sa AddToParty(),
* @author Sophia
*/
//void RemoveFromParty( object oCreature ) = 397;
/** @brief Gets the size of a player's active party
*
* This function returns the number of followers in the player's active party. The active
* party are the creatures that are currently following the player and appear
* in the main GUI. This number is limited to 3 additional followers in addition to
* the player character.
*
* DEPRECATED - use GetPartyList()
*
* @remarks This function does not handle yet the party pool.
* @author Sophia
*/
//int GetPartySize( object oPlayer ) = 398;
/** @brief Returns the party list for the creature
*
*
* @param oObject - The object to test for returning the party
* @author Adriana
*/
object[] GetPartyList(object oCreature=OBJECT_INVALID) = 504;
/** @brief Sets whether or not the party has mail waiting for them.
*
*
* @param nHasMail - 0 if the party has no mail, nonzero otherwise.
* @author PaulS
*/
void SetPartyHasMail(int nHasMail) = 860;
/** @brief Sets whether or not the party has mail waiting for them and marks the location on the world map if they do.
*
*
* @param sMailAreaTag - area tag of the map pin where the party has mail, or an empty string if they have no mail.
* @author Bryan Derksen
*/
void SetPartyMailArea(string sMailAreaTag) = 934;
/** @brief Get follower state.
*
* @param oCreature - Party follower
* @returns the state of the follower.
* @author Jacques Lebrun
*/
int GetFollowerState(object oCreature) = 399;
/** @brief Set the state of the follower.
*
* Follower State can be:
* FOLLOWER_STATE_ACTIVE - Add follower to party pool + active party
* FOLLOWER_STATE_AVAILABLE - Add follower to party pool and remove from active party
* FOLLOWER_STATE_INVALID - Remove follower from party pool and active party
* FOLLOWER_STATE_UNAVAILABLE - Remove follower from active party and do not allow adding it to active party again
* FOLLOWER_STATE_SUSPENDED - Remove follower from active party and store it for putting it back later into the party
*
* @param oCreature - Party follower
* @param nState - the state
* @author Jacques Lebrun
*/
void SetFollowerState(object oCreature, int nState) = 706;
/** @brief Get the follower sub state.
*
* Returns any of the FOLLOWER_STATE_X constants.
*
* @param oCreature - Party follower
* @returns the sub state of the follower.
* @author Jacques Lebrun
*/
int GetFollowerSubState(object oCreature) = 400;
/** @brief Set the sub state of the follower.
*
* @param oCreature - Party follower
* @param nState - the sub state
* @author Jacques Lebrun
*/
void SetFollowerSubState(object oCreature, int nSubState) = 144;
/** @brief Checks if the follower is locked in the current state
*
* @param oCreature - Party follower
* @returns TRUE if the follower is locked, FALSE otherwise
* @author Jacques Lebrun
*/
int IsFollowerLocked(object oCreature) = 146;
/** @brief Locks the follower in the current state he is
*
* This can be used while the follower is in any state. It will not allow the player, using the GUI,
* to change the state of a follower. For example: locking the follower while he is in the ACTIVE state
* will not allow the player remove the follower from the active party.
*
* @param oCreature - Party follower
* @param bLocked - TRUE to lock, FALSE to unlock
* @author Jacques Lebrun
*/
void SetFollowerLocked(object oCreature, int bLocked) = 147;
/** @brief Checks if the follower is set to follow the party leader
*
* @param oCreature - Party follower
* @returns TRUE if the follower is following the party, FALSE otherwise
* @author Adriana Lopez
*/
int GetFollowPartyLeader(object oCreature) = 768;
/** @brief Sets the following state of the henchman to true or false
*
* Change the following state to false if you want the henchman to separate
* from the group
*
* @param oCreature - Party follower
* @param bFollow - TRUE to follow, FALSE to separate from the party
* @author Adriana Lopez
*/
void SetFollowPartyLeader(object oCreature, int bFollow) = 769;
/** @brief Returns TRUE if a creature is a member of a player's party
*
* This function returns TRUE if oPlayer and oCreature are in the same party
*
* @param oPlayer
* @param oCreature
* @author Sam
*/
int IsFollower( object oCreature ) = 129;
/** @brief Adjust a party follower's approval rating
*
* @param oFollower follower whose approval of the hero has changed
* @param nAmount
* @author Paul Schultz
*/
void AdjustFollowerApproval( object oFollower, int nAmount, int bNotify = FALSE ) = 324;
/** @brief Get a party follower's approval rating
*
* @param oFollower follower whose approval of the hero you're interested in
* @returns oFollower's approval of the hero
* @author Paul Schultz
*/
int GetFollowerApproval( object oFollower) = 622;
/** @brief Enable the approval rating for a follower
*
* Enabling approval allows the follower's approval rating to be modified
* and will show the approval widgets in the GUIs.
* Disabling approval will cause the approval rating to be lost.
*
* @param oFollower follower whose approval of the hero has changed
* @param bEnabled enabled state
* @author Jacques Lebrun
*/
void SetFollowerApprovalEnabled( object oFollower, int bEnabled ) = 382;
/** @brief Sets the approval rating description text for a follower.
*
* Does nothing if approval is disabled.
*
* @param oFollower follower whose approval of the hero has changed
* @param nStrRef Description string ref
* @author Jacques Lebrun
*/
void SetFollowerApprovalDescription(object oFollower, int nDescStrRef) = 829;
/** @brief Gets the party leader.
*
* @returns Party leader creature object (not necessarily the hero)
* @author Gavin Burt
*/
object GetPartyLeader() = 624;
/** @brief Sets the party leader.
*
* @param oLeader Leader of the party (not necessarily the hero)
* @author Gavin Burt
*/
void SetPartyLeader( object oLeader) = 625;
/** @brief Adds a creature that follows you around but it is not part of the
* players party. The creature will not cross an area transition.
*
* @param oFollower Creature to add as a follower
* @return 1 if the creature is added, 0 if it fails
* @author Adriana Lopez
*/
int AddNonPartyFollower( object oFollower) = 351;
/** @brief Removes a non party follower
*
* @param oFollower Creature to add as a follower
* @author Adriana Lopez
*/
void RemoveNonPartyFollower( object oFollower) = 352;
/** @brief Returns TRUE if the object is currently being controlled by the player
* Note - this can be TRUE for the main player character, and also for any
* party members selected by the user (which can be more than one).
*
*
* @param oCreature - Check this creature to determine if it is controlled by the player
* @author Sam
*/
int IsControlled( object oObject ) = 714;
/** @brief Returns the package of a creature.
*
* @author Jacques
*/
int GetPackage(object oCreature) = 317;
/** @brief Returns the AI package of a creature.
*
* @author Jacques
*/
int GetPackageAI(object oCreature) = 318;
/** @brief Returns whether AI is enabled by the user for this creature.
*
* The user can choose to selectively disable AI on a per-creature basis.
*
* @param oCreature - the creature to query.
* @return - TRUE if AI is enabled for this creature.
* @author Jacques
*/
int IsPartyAIEnabled(object oCreature) = 787;
/** @brief Returns the number of tactics for the creature.
* Zero can imply that either the tactics are disabled by the user, or they don't exist.
* for this creature (a non-party creature).
*
* @param oCreature - the creature to query.
* @return - the number of available tactics.
* @author Jacques
*/
int GetNumTactics(object oCreature) = 772;
/** @brief Sets the number of tactics available.
*
* @param oCreature - the creature to query.
* @param nNumTactics - the number of tactics that can be set by the user.
* @author Jacques
*/
void SetNumTactics(object oCreature, int nNumTactics, int bSendNotification = FALSE) = 773;
/** @brief Returns whether the specified tactic is enabled.
*
* @param oCreature - the creature to query.
* @param nIndex - the tactic index.
* @return TRUE if the tactic is enabled.
* @author Jacques
*/
int IsTacticEnabled(object oCreature, int nIndex) = 774;
/** @brief Returns the target type for the specified tactic.
*
* @param oCreature - the creature to query.
* @param nIndex - the tactic index.
* @return The target type.
* @author Jacques
*/
int GetTacticTargetType(object oCreature, int nIndex) = 775;
/** @brief Returns the ID number of the targeted party member for those tactic
* targets which are generated on a per-follower basis.
*
* @param oCreature - The creature to query.
* @param nIndex - The tactic index.
* @return The ID number of the party member.
* @author Cody Watts
*/
object GetTacticTargetObject(object oCreature, int nIndex) = 372;
/** @brief Returns the condition id of the specified tactic
*
* @param oCreature - the creature to query.
* @param nIndex - the tactic index.
* @return The condition id.
* @author Jacques
*/
int GetTacticCondition(object oCreature, int nIndex) = 776;
/** @brief Returns the ID number of the party member being referenced in
* those conditions which are generated on a per-follower basis.
*
* @param oCreature - the creature to query.
* @param nIndex - the tactic index.
* @return The ID number of the party member.
* @author Cody Watts
*/
object GetTacticConditionObject(object oCreature, int nIndex) = 373;
/** @brief Returns the command type for the specified tactic.
*
* @param oCreature - the creature to query.
* @param nIndex - the tactic index.
* @return The command type.
* @author Jacques
*/
int GetTacticCommand(object oCreature, int nIndex) = 777;
/** @brief Returns the command parameter for the specified tactic.
* Can be the ability ID or item ID. Zero for none or not applicable.
* @param oCreature - the creature to query.
* @param nIndex - the tactic index.
* @return The target type.
* @author Jacques
*/
int GetTacticCommandParam(object oCreature, int nIndex) = 778;
/** @brief Returns the command item tag for the specified tactic.
*
* @param oCreature - the creature to query.
* @param nIndex - the tactic index.
* @return The item tag, or empty string if not applicable.
* @author Jacques
*/
string GetTacticCommandItemTag(object oCreature, int nIndex) = 374;
/** @brief Sets a tactic entry for a party member
*
* @author Jacques
*/
void SetTacticEntry(object oCreature, int nIndex, int nEnabled, int nTargetType, int nCondition, int nCommandType, int nCommandParam = 0) = 319;
/** @brief Get the current tactic preset of the creature,
* 0 indicating none is selected or it has been customized.
*
* @author Jacques
*/
int GetTacticPresetID(object oCreature) = 365;
/** @brief Set the current tactic preset of the creature.
*
* @author Jacques
*/
void SetTacticPresetID(object oCreature, int nPresetID) = 366;
/** @brief Add to the list of selectable presets for the creature.
*
* @author Jacques
*/
void AddTacticPresetID(object oCreature, int nPresetID) = 367;
/** @brief Modifies the look of the atmosphere
*
* @param nParamId - atmosphere parameter to modify
* @param fParamValue - new value to set it to
*/
void SetAtmosphere(int nParamId, float fParamValue) = 800;
void SetAtmosphereRGB(int nParamId, float fRedValue, float fGreenValue, float fBlueValue) = 801;
void ResetAtmosphere() = 802;
/** @brief Provides access to frame buffer effects
*
* @param sID - string ID of effect we want to modify
**/
void FB_SetEffectResource(string sEID, string sResID, float fResValue) = 803;
void FB_SetEffectEnabled(string sEID, int nEnabled) = 804;
/** @brief Modify creature look-at behaviour
*
* @param oCreature - oid of creature we want to modify
* @param nEnabled - true or false
**/
void SetLookAtEnabled(object oCreature, int nEnabled) = 805;
/** @brief Modify creature's Stealth state
*
* @param oCreature - oid of creature we want to modify
* @param nEnabled - true or false
**/
void SetStealthEnabled(object oCreature, int nEnabled) = 758;
/** @brief Returns creature's stealth state
*
* @param oCreature - oid of creature of interest
**/
int GetStealthEnabled(object oCreature) = 759;
/** @brief Modify whether the creature can be tracked via the Survival Skill
*
* @param oCreature - oid of creature we want to modify
* @param nEnabled - true or false
**/
void SetCreatureCanBeTracked(object oCreature, int nEnabled) = 764;
/** @brief Returns whether creature can be tracked via the Survival Skill
*
* @param oCreature - oid of creature of interest
**/
int GetCreatureCanBeTracked(object oCreature) = 765;
/** @}*/
/*****************************************************************/
/*****************************************************************/
// Arrays
/*****************************************************************/
/** @addtogroup Arrays array control functions
*
* Functions to control and read arrays
*/
/** @{*/
/** @brief Gets the size of an array
*
* Returns the size of an array, 0 if the array is empty.
*
* @param array - array whose size we check.
* @author Sam Johnson
*/
int GetArraySize( any array ) = 708;
/** @Returns an array with all objects in an area.
*
* Returns an array with all objects in an area. You can also specify
* a tag so the array only has all objects with that tag in that area.
* Check the size afterwards with GetArraySize.
*
* @param oArea - an area object.
* @param sTag - If specified, only objects will this tag will be returned.
* @author Georg, Gabo
*/
object[] GetObjectsInArea(object oArea, string sTag = "") = 707;
//const INT CVirtualMachineCommands::COMMAND_SETARRAYSIZE = 709;
//const INT CVirtualMachineCommands::COMMAND_DELETEARRAYINDEX = 710;
//const INT CVirtualMachineCommands::COMMAND_INSERTARRAYINDEX = 711;
/** @}*/
/*****************************************************************/
/** @brief Enable / disable access to the world map.
*
* @param nStatus - WM_GUI_STATUS_NO_USE = 0 (unavailable from area map)
* - WM_GUI_STATUS_READ_ONLY = 1 (available from area map, cannot travel)
* - WM_GUI_STATUS_USE = 2 (available from area map, click pin to travel)
* @author Jacques
*/
void SetWorldMapGuiStatus(int nStatus) = 752;
/** @brief Set the status of a world map icon.
*
* @param oLocation - the location.
* @param nStatusId - the status
* @param bSuppressActiveFlash - If nStatusId == WM_LOCATION_ACTIVE, set this flag to TRUE if you do not want the location to "flash". This flag has no effect if nStatusId != WM_LOCATION_ACTIVE.
* @author Jacques
*/
void SetWorldMapLocationStatus(object oLocation, int nStatusId, int bSuppressActiveFlash = FALSE) = 753;
/** @brief Sets the player's location on the map.
*
* @param oMap - the map object.
* @param oLocation - the location to place the player at.
* @author Jacques
*/
void SetWorldMapPlayerLocation(object oMap, object oLocation) = 754;
/** @brief Sets the primary map object.
*
* @param oMapId - the map to set as primary.
* @author Jacques
*/
void SetWorldMapPrimary(object oMapId) = 755;
/** @brief Force the world map to be shown.
*
* @author Jacques
*/
void OpenPrimaryWorldMap() = 757;
/** @brief Force the world map to be closed.
*
* @author Curtis Onuczko
*/
void ClosePrimaryWorldMap() = 387;
/** @brief Sets whether swapping to the primary/secondary world map swap options is enabled/disabled
*
* @author Paul Schultz
*/
void SetMapSwapEnabled(int nSwapID, int bEnabled)= 142;
/** @brief Force the fade map to be shown.
*
* @author Paul Schultz
*/
void OpenFadeMap() = 309;
/** @brief Removes the fog of war from the current area map.
*
* @author Jacques Lebrun
*/
void RevealCurrentMap() = 332;
/** @brief Start traveling on the world map to the location clicked. If a random encounter area tag and waypoint tag were specified then travel on the world map and have a random encounter at the specified location. Otherwise, sends the EVENT_TYPE_FINISHED_TRAVEL event when completed.
*
* @param sRandomEncounterArea - tag of the random encounter target area
* @param sRandomEncounterWaypointTag - tag of the random encounter target waypoint
* @param oSourceLocationOverride - map pin override object to start travelling from on the world map
* @author Curtis Onuczko
*/
void WorldMapStartTravelling(string sRandomEncounterArea="", string sRandomEncounterWaypointTag="", object oSourceLocationOverride = OBJECT_INVALID) = 696;
/** @brief Continue traveling on the world map from the location that the random encounter occurred to the location that was previously clicked. Sends the EVENT_TYPE_FINISHED_TRAVEL event when completed.
*
* @author Curtis Onuczko
*/
void WorldMapCompleteRandomEncounter() = 697;
/** @brief Set the loc name of a world map icon.
*
* @param oLocation - the location.
* @param nStringId - the string ID of the name of the new location
* @author Curtis O.
*/
void SetWorldMapLocationLocName(object oLocation, int nStringID) = 600;
/** @brief Retrive the base value of an item.
*
* @author Jacques Lebrun
*/
int GetItemValue(object oItem) = 291;
/** @}*/
/*****************************************************************/
/*****************************************************************/
// Item Properties
/*****************************************************************/
/** @addtogroup item_prop Item Properties Functions
*
* Functions to get or set specific item properties on items.
*
*/
/** @{*/
/** @brief Return an array with item properties present on an object
*
* @param oitem - the item
* @param bIncludeSubItems - include runes properties
* @param nDesiredType - if -1 returns all types, otherwise, only properties of the specified type
* @returns Array with item properties
* @author Georg Zoeller
*/
int[] GetItemProperties (object oItem, int bIncludeSubItems, int nDesiredType = -1) = 316;
/** @brief Return the power level of an item properties present on an object
*
* @param oitem - the item
* @param nPropertyId - the property
* @param bIncludeSubItems - include runes properties
* @param bScalePower - return the scaled power instead of the base value
* @returns the propertie's power level
* @author Georg Zoeller
*/
float GetItemPropertyPower (object oItem, int nPropertyId, int bIncludeSubItems, int bScalePower = 0) = 784;
/** @brief Adds an item property
*
* @param oitem - the Item
* @param nProperty - the Property
* @param nPower - the POWER_LEVEL of the item property
* @param bRefreshItem - choose to recalculate parts of the item (cost, icon, etc...)
* @author Georg Zoeller
*/
void AddItemProperty (object oItem, int nProperty, float nPower, int bRefreshItem = 0) = 303;
/** @brief Removes an item property
*
* Removes the item property of type nProperty from oItem
*
* @param oitem - the Item
* @param nProperty - the Property
* @author Georg Zoeller
*/
void RemoveItemProperty (object oItem, int nProperty) = 304;
/** @brief Query the 'droppable' property of an item
*
* Returns whether or not an item is droppable
*
* @param oitem - the Item
* @author Georg Zoeller
*/
int IsItemDroppable( object oItem ) = 295;
/** @brief Set the 'droppable' property of an item
*
* Sets whether or not an item is droppable
*
* @param oitem - the Item
* @param bDroppable - whether or not it is droppable
* @author Georg Zoeller
*/
void SetItemDroppable( object oItem, int bDroppable ) = 296;
/** @brief Set the level of an item
*
* Sets the level of the item, used for scaling purposes
*
* @param oitem - the Item
* @param nLevel - new item level
* @author Nicolas Ng Man Sun
*/
void SetItemLevel( object oItem, int nLevel ) = 880;
/** @brief Get the level of an item
*
* Returns the level of the item
*
* @param oitem - the Item of interest
* @author Nicolas Ng Man Sun
*/
int GetItemLevel( object oItem ) = 701;
/** @brief Get the 2da-row id of the item variation
*
* Get the 2da-row id of the item variation
*
* @param oitem - the Item of interest
* @author Nicolas Ng Man Sun
*/
int GetItemVariation( object oItem ) = 882;
/** @brief Query the 'Stealable' property of an item
*
* Returns whether or not an item is stealable
*
* @param oitem - the Item of interest
* @author Nicolas Ng Man Sun
*/
int IsItemStealable( object oItem ) = 641;
/** @}*/
/*****************************************************************/
/** @brief Returns a specified value from DragonAge.ini
*
* Returns a specified value from DragonAge.ini as stored in the Options
*
* @param sHeadingLabel - the Ini Section of the value (Leave blank for all sections)
* @param svalueLabel - The label for the ini value
* @author Owen Borstad
*/
string ReadIniEntry(string sHeadingLabel,string sValueLabel) = 809;
/** @brief Returns the platform that the game is running under.
*
* Return the ID of the platform that the game is running under.
*
* @author Sydney Tang
*/
int GetPlatform() = 694;
/** @brief Determines if a package is currently loaded.
*
* Returns TRUE if the package identified is currently loaded.
*
* @param sPackageUID - The package UID.
* @returns Returns TRUE if the package identified is currently loaded, FALSE otherwise.
* @author Gavin Burt
*/
int IsPackageLoaded( string sPackageUID ) = 888;
/** @brief Returns the EffectID played when the item is Hit
*
* @author Nicolas Ng Man Sun
*/
//int GetItemOnHitEffectID(object oItem) = 784;
/** @brief Returns the Power of the effect played when the item is Hit
*
* @author Nicolas Ng Man Sun
*/
//int GetItemOnHitPower(object oItem) = 785;
/** @brief Sets the effect played when the item is hit and its power
*
* @author Nicolas Ng Man Sun
*/
//void SetItemOnHitProperties(object oItem, int nEffectId, int nPower) = 786;
/** @brief Sets the active plot action set, or zero to hide the control.
*
* See plotactions 2DA.
*
* @author Jacques Lebrun
*/
void SetPlotActionSet(int nPlotActionSet) = 810;
/** @brief Turns off user interactions with the plot actions control.
*
* @author Jacques Lebrun
*/
void SetPlotActionsEnabled(int nEnabled) = 795;
/** @brief Sets the state of a plot action.
*
* 0 - Invalid - action will not appear in the control.
* 1 - Enabled - action appears in the control and can be activated by the user
* unless the control is disabled
* 2 - Disabled - action has been already used by the user and cannot be used again.
* 3 - Active - action is currently active.
*
* @author Jacques Lebrun
*/
void SetPlotActionState(int nPlotActionId, int nPlotActionState) = 796;
/** @brief Returns the current state of the plot action.
*
* @author Jacques Lebrun
*/
int GetPlotActionState(int nPlotActionId) = 797;
/** @brief Sets the count value of the plot action to be displayed on the GUI.
*
* @author Jacques Lebrun
*/
void SetPlotActionCount(int nPlotActionId, int nPlotActionCount) = 798;
/** @brief Returns the current count value of the plot action.
*
* @author Jacques Lebrun
*/
int GetPlotActionCount(int nPlotActionId) = 799;
/** @brief Set a cooldown for the indicated plot action. When the cooldown is finished an Event sporting the indicated event ID & the PlotActionID (in Integer argument 0) will be fired to the specified location)
* @param nPlotActionID: Id of the plot action
* @param fCooldownTime: amount of cooldown
* @param nEventID - The ID of the Even fired back to script when the cooldown has completed. This event will have an Integer[0] value identifying the PlotActionID that has finished cooling down
* @param oObject - The object to signal the event to.
* @param scriptname - If specified overides the default script
* @author John Fedorkiw
*/
void SetPlotActionCooldown(int nPlotActionId, float fCooldownTime, int nEventID, object oObject, string scriptname = "") = 889;
/** @brief Returns whether the creature satifies *all* the requirements for using the item
*
* @author Nicolas Ng Man Sun
*/
int CanUseItem(object oCreature, object oItem) = 812;
/** @brief Sets whether the creature satifies a retriction property. This is used only as a response
* to the EVENT_TYPE_ITEM_ONTEST_USABLE event.
*
* @author Nicolas Ng Man Sun
*/
void SetCanUseItem(object oCreature, int value) = 813;
/** @brief Sets whether the creature or placeable can be interacted with.
* Non-interactive objects act like static geometries in that mousing
* over them doesn't not trigger any selection and you can click through
* them
* @author Nicolas Ng Man Sun
*/
void SetObjectInteractive(object oObject, int value) = 676;
/** @brief Returns whether the creature or placeable can be interacted with.
*
* @author Nicolas Ng Man Sun
*/
int GetObjectInteractive(object oObject) = 677;
/** @brief Returns whether the item is unique.
*
* @author Curtis Onuczko
*/
int GetItemUnique(object oObject) = 368;
/** @brief In N frames, send the indicated raw input event. This event is queued and handled with the rest of the input(I.e not immediatly) Currently Available Events: (Available Events: '[Left|Right|Middle]MouseButton_[Pressed|Released|DobleClick]', eg: RightMouseButton_Released)
*
* @author John Fedorkiw
*/
void DEBUG_SendRawInputEvent(int nFrameNumber, string sRawEventName) = 338;
/** @brief Set the position of the cursor -- THIS SHOULD ONLY BE USED FOR DEBUGGING PURPOSES!
*
* @author John Fedorkiw
*/
void DEBUG_SetCursorPosition(int x, int y) = 339;
/** @brief Returns the value of the game setting: Auto level party members
*
* @author Cody Watts
*/
int GetAutoLevelFollowers() = 341;
/** @brief !DEPRECATED!
*
* DEPRECATED. Use GetAttributeBool("ClientOptions.GameOptions.ShowHostileDamageNumbers");
*
* @returns RETURNS FALSE -- THIS IS A DEPRECATED FUNCTION!
* @author John Fedorkiw
*/
int GetShowSpecialMoveFloaties() = 601;
/** @brief Returns the value of the "Show Tutorials" option
*
* Returns whether or not we should be displaying Special Move floaties
*
* @returns Returns the value of the "Show Tutorials" option
* @author John Fedorkiw
*/
int GetShowTutorials() = 858;
/** @brief GetPotionOption
* Return the player's selected quick heal potion selection. 0 is "Use smallest potion", 1 is "use most appropriate potion".
*
* @author Sebastian Hanlon
*/
int GetPotionOption() = 863;
/** @brief Sets the creature as a ghost. Ghost creatures can go through regular creatures but will pathfind around other ghosts.
*
* @author Nicolas Ng Man Sun
*/
void SetCreatureIsGhost(object oObject, int value) = 643;
/** @brief Turns creature into a statue. Statues have their animations frozen and cannot move.
*
* @author Nicolas Ng Man Sun
*/
void SetCreatureIsStatue(object oObject, int value) = 642;
/** @brief Starts the specified creature's heart beating
*
* @author Cody Watts
*/
void InitHeartbeat(object oCreature, float fInterval) = 342;
/** @brief Stops the creature's heartbeat
*
* @author Cody Watts
*/
void EndHeartbeat(object oCreature) = 343;
/** @brief Links the minimaps of two areas - what is explored in one will appear as explored in the other.
*
* @param sFirstArea - The resource reference for the first area
* @param sSecondArea - The resource reference for the second area
* @returns TRUE on success, FALSE otherwise.
* @author Cody Watts
*/
int LinkAreaMiniMaps(string sFirstArea, string sSecondArea) = 357;
/** @brief Returns the inventory slot this item is equipped in, or INVENTORY_SLOT_INVALID, if not equipped.
*
* @param oItem - The item in question.
* @returns The inventory slot, or INVENTORY_SLOT_INVALID, if not equipped.
* @author Cody Watts
*/
int GetItemEquipSlot(object oItem) = 358;
/** @brief Sets an item to be irremovable. Once equipped, an irremovable item cannot be unequipped by the player, only by scripting.
*
* @param oItem - The item to be made irremovable.
* @param bIrremovable - The irremovable flag; TRUE makes the object irremovable, FALSE makes it removable once again.
* @author Cody Watts
*/
void SetItemIrremovable(object oItem, int bIrremovable) = 375;
/** @brief Returns whether a given item is irremovable.
*
* @returns TRUE if the item is irremovable, FALSE otherwise.
* @author Cody Watts
*/
int IsItemIrremovable(object oItem) = 376;
/** @brief Sets an item to be indestructible. Indestructible items cannot be destroyed by the player.
*
* @param oItem - The item to be made indestructible.
* @param bIndestructible - The indestructible flag; TRUE makes the object indestructible, FALSE makes it destructible once again.
* @author Cody Watts
*/
void SetItemIndestructible(object oItem, int bIndestructible) = 377;
/** @brief Returns whether a given item is indestructible.
*
* @returns TRUE if the item is indestructible, FALSE otherwise.
* @author Cody Watts
*/
int IsItemIndestructible(object oItem) = 378;
/** @brief Determines if an object is humanoid.
*
* Returns TRUE if the object oObject uses the humanoid combat blend tree animations.
* Returns FALSE if oObject is not a creature or does not use the humanoid animations.
*
* @param oObject - The object that is to be checked for humamoind status.
* @author Craig Welburn
*/
int IsHumanoid( object oObject ) = 363;
/** @brief Returns stored character generation slider value
*
* This is used primarily to determine a specific visual trait of the player creature.
* @param nIndex 0 = head shape, 1 = skin colour
*
* @author Nicolas Ng Man Sun
*/
float GetCharGenSliderValue(int nIndex) = 432;
/** @brief Forces a creature to appear on the player's minimap as a blue dot. This can
* be used to highlight non-hostile creatures of interest, such as NPCs that are
* fighting alongside your party.
*
* @param oCreature - The creature to show on the map
* @param bEnable - TRUE to make the creature appear on the map, and FALSE to hide it.
* @author Cody Watts
*/
void ShowAsAllyOnMap( object oCreature, int bEnable ) = 364;
/** @brief Gets the 2DA row ID to use for getting a given creature's background defaults.
* The 2DA referred to is background_defaults in rules\background.xls
*
* @param oCreature - The creature whose background defaults you're interested in
* @author Paul Schultz
*/
int GetBackgroundDefaultsIndex( object oCreature ) = 637;
/** @brief Returns the formation location of the given party member as if it was following the leader
*
* @author Nicolas Ng Man Sun
*/
location GetFollowerWouldBeLocation( object oObject ) = 728;
/** @brief Sets the user's zoom level
*
* @param fZoomLevel - desired zoom level where 0 is fully zoomed out, 1 is fully zoomed in.
* @author Jacques Lebrun
*/
void SetZoomLevel(float fZoomLevel) = 849;
/** @brief Reset the camera facing direction to align with the player creature.
*
* @author Jacques Lebrun
*/
void ResetCameraFacing() = 651;
/** @brief Unlocks the achievement for the current player. This is slow and should no long be used. Use UnlockAchievementByID(int nID) instead.
*
* @author Craig Welburn
*/
void UnlockAchievement(string sAchievementID) = 638;
/** @brief Unlocks the achievement for the current player.
*
* @author Craig Welburn
*/
void UnlockAchievementByID(int nID) = 616;
/** @brief Returns whether or not the player has unlocked the specified achievement. This is slow and should no longer be used. Use GetHasAchievementByID(int nID) instead.
*
* @author Craig Welburn
*/
int GetHasAchievement(string sAchievementID) = 629;
/** @brief Returns whether or not the player has unlocked the specified achievement.
*
* @author Craig Welburn
*/
int GetHasAchievementByID(int nID) = 603;
/** @brief Returns the count for the specified achievement (i.e. the count towards the unlocked at value).
*
* @author Craig Welburn
*/
int GetAchievementCountByID(int nID) = 618;
/** @brief Increments the count for the specified achievement by the amount specified.
* Returns true if the achievement was unlocked due to the increment, false otherwise.
*
* @author Craig Welburn
*/
int IncrementAchievementCountByID(int nID, int nIncrement = 1) = 617;
/** @brief Updates the specified online statistic for the player.
*
* @author Craig Welburn
*/
void UpdateOnlineStatistic(string sStatName, int nUpdateType, int nUpdatePeriod, float fStatValue, string sStatText) = 639;
/** @brief Gets the specified online statistic for the player.
*
* @author Craig Welburn
*/
float GetOnlineStatistic(string sStatName, int nPeriodType) = 640;
/** @brief Sends the specified online telemetry for the player.
*
* @author Craig Welburn
*/
void SendOnlineTelemetry(int nModuleID, int nGroupID, string sTelemetryText) = 630;
/** @brief Sends the screen shot online for the player.
*
* @author Craig Welburn
*/
void SendOnlineScreenShot(string sFileName, string sShortDescription, string sLongDescription) = 631;
/** @brief Exposes ECString.Split to the scripting language using L"," as hardcoded delimiter.
* This is reserved for optimization, do not use, it is not fully implemented
*
* @author Georg Zoeller
*/
string[] ECSplitString(string sString) = 383;
/** @brief Scales all items equipped on the creature based on their material progression table
*
* For this to work, a number of conditions need to be met
* - area must have a valid area_id entry in ability_data
* - creature must not be a party member
*
* @param nTargetLevel - Target Level
*
* @author Georg Zoeller
*
*/
void ScaleEquippedItems(object oCreature, int nTargetLevel) = 386;
/** @brief Returns TRUE if a creature is currently moving
* @param oCreature - the creature to check movement for
* @author Jose
*/
int IsMoving(object oCreature) = 388;
/** @brief Sets a flag int the build marking it dirty.
*
* This function should be called in all the cheat scripts that can mess with the build.
*
* @author Bogdan Corciova
*
*/
void SetCheatUsedFlag() = 627;
/** @brief Shows all the codex entries in the journal.
*
* This is a DEBUG function. It will show all the codex entries in the journal.
*
* @author Bogdan Corciova
*
*/
void ShowAllCodexEntries() = 619;
/** @brief Sets the roam location for the creature.
*
*
* @author Pat LaBine
*
*/
void SetRoamLocation(object oCreature, location lLocation) = 824;
/** @brief Sets the roam radius for the creature.
*
*
* @author Pat LaBine
*
*/
void SetRoamRadius(object oCreature, float fRadius) = 825;
/** @brief Get the roam Location for the creature.
*
*
* @author Pat LaBine
*
*/
location GetRoamLocation(object oCreature) = 826;
/** @brief Returns the current plot assist option setting of the game.
* @returns Returns a plot assist constant GAME_PLOT_ASSSIST_*
* @author Craig Welburn
*/
int GetGamePlotAssist() = 602;
/** @brief Get the body bag placeable associated with this creature..
*
*
* @author Pat LaBine
*
*/
object GetCreatureBodyBag(object oCreature) = 827;
/** @brief Determine whether or not a piece of Post Release Content (PRC) is installed, enabled and authorized.
*
* @param sPRCName - Must correspond to the PRC's AddInItem UID from the AddIns.xml file.
*
* @returns Returns true if the PRC specified is installed, currently enabled and authorized.
* @author Craig Welburn
*
*/
int GetPRCEnabled(string sPRCName = "") = 828;
/** @brief Get the time that has elapsed for this particular playthrough of the game.
*
*
* @returns Returns the elapsed playthrough time in seconds.
* @author Craig Welburn
*
*/
int GetPlayTime() = 830;
/** @brief Buy/Download downloadable content.
*
* @param sOfferId - Must be a valid offer.
*
* @returns Returns true if the BuyDownload msg was successfully dispatched.
* @author Chris Smith
*
*/
int BuyDownload(string sOfferId = "") = 831;
/** @brief Special Post Campaign save for PRC.
*
* @param none
*
* @author Chris Smith
*
*/
void SaveGamePostCampaign() = 832;
/** @brief Count the areas in the active savegame for a given group
*
* @param nGroup - Group number, or -1 for 'all areas'
* @returns number of areas for which data would be cleared
* @author David Robinson
*
*/
int CountAreasInSavegameByGroup(int nGroupID) = 891;
/** @brief Removes area data from active savegame for a given group
*
* @param nGroup - Group number, or -1 for 'all areas'
* @returns number of areas for which data was cleared
*
* @author David Robinson
*
*/
int PurgeAreaGroupFromSavegame(int nGroupID) = 892;
/** @brief Check if any offers or addins exist.
* @param none
*
* @author Chris Smith
*
*/
int IsPRCAvailable() = 836;
/** @brief Logs an event for the hero's "Story So Far" in the save game.
* @param nEventID - The ID of the Event being logged.
*
* @author Craig Welburn
*
*/
void LogStoryEvent(int nEventID) = 837;
/** @brief Moves a quest or a whole quest group into the completed section.
* @param sGroup - The plot or group resource reference to move to completed section.
*
* @author Jonathan Ferland
*
*/
void CloseQuestGroup(string sGroupOrPlotResRef) = 846;
/** @brief Remove a quest.
* @param sGroup - The plot resource reference to remove.
*
* @author Jonathan Ferland
*
*/
void RemoveQuest(string sPlotResRef) = 850;
/** @brief Opens the Journal PRC Tab.
* @param sOfferId - The offer id to select when the PRC tab opens.
*
* @author Eric Paquette
*
*/
void OpenJournalPRCTab(string sOfferId = "") = 852;
// EOR Change
// Mark L
// Adding script command for rumble
/** @brief This starts a rumble event
*
* @returns VOID
* @param fLife - Lifetime of the rumble
* @param fIntensity - A scalar to the shape for determining the strength of the rumble
* @param fBaseIntensity - Added to the shape*scalar for the strength of the rumble
* @param iType - Shape of the rumble (0 constant, 1 ramp up, 2 ramp down, 3 sine wave)
* @param fIterations - Number of times to repeat the shape during the lifetime of the rumble
* @author Gabo
*/
void StartRumbleEvent(float fLife, float fIntensity, float fBaseIntensity, int iType, float fIterations) = 857;
// End EOR
/** @brief Plays a hit effect package (screenshake + rumble)
* @param nHitEffect - index into hiteffects 2da
* @param nStepUp - steps up the intensity of the effect (if possible)
*
* @author Noel Borstad
*
*/
void DoPlayerHitEffect(int nHitEffect, int nStepUp=0) = 936;
/** @brief Determines whether specific content appears in the market place.
* @param sOfferId - The offer id to check.
*
* @author Jonathan Ferland
*
*/
int IsContentAvailableInMarketPlace(string sOfferId = "") = 867;
void SpawnProjectiveDecal(vector vPosition, vector vDir, int nType) = 881;
/** @brief
*
* Spawns projective decals randomly placed around an object
*
* @author Noel
*/
void SpawnRandomDecals(object oTarget, int nCount, float fRange, int nType) = 668;
float CombatGetOptimalValue(int nLevel, int nProperty) = 848;
float CombatGetPercentageFromScaled(int nLevel, float fScaled, int nProperty) = 861;
/** @brief
*
*Get the current animation of a given object.
*
* @param o - An object
* @author Jon Cooper
*/
int GetCurrentAnimation(object o) = 868;
/** @brief Preloads a creature for a conversation
*
* @param oCreature The creature to preload
*
* @author Jon Thompson
*/
void PreloadCreatureForConversation(object oCreature) = 869;
/** @brief Unloads a preloaded a creature for a conversation
*
* @param oCreature The creature to unload
*
* @author Jon Thompson
*/
void UnloadCreatureForConversation(object oCreature) = 870;
/*****************************************************************/
// Public Demo Flag
/*****************************************************************/
/** @brief Checks if the game is in Public Demo Mode
*
* @returns 1 in Public Demo Mode, 0 otherwise
* @author James Redford
*/
int PublicDemo() = 877;
/*****************************************************************/
// Camera
/*****************************************************************/
/** @addtogroup camera Camera Functions
*
* Functions to control the camera
*/
/** @{*/
/** @}*/
/*****************************************************************/
/*****************************************************************/
// Journal
/*****************************************************************/
/** @addtogroup journal Journal Functions
*
* Functions to manage the journal
*/
/** @{*/
// const INT CVirtualMachineCommands::COMMAND_ADDJOURNALENTRY = 444;
// const INT CVirtualMachineCommands::COMMAND_REMOVEJOURNALENTRY = 445;
// const INT CVirtualMachineCommands::COMMAND_GETJOURNALENTRYXP = 446;
/** @}*/
/*****************************************************************/
/*****************************************************************/
// Messaging
/*****************************************************************/
/** @addtogroup messaging Messaging Functions
*
* Functions to send messages inside the game
*/
/** @{*/
// const INT CVirtualMachineCommands::COMMAND_SENDMESSAGETOPLAYER = 472;
// const INT CVirtualMachineCommands::COMMAND_SENDMESSAGETOPLAYERBYSTRREF = 473;
// const INT CVirtualMachineCommands::COMMAND_SENDMESSAGETOGM = 474;
// const INT CVirtualMachineCommands::COMMAND_SENDFEEDBACKTOPLAYER = 475;
// const INT CVirtualMachineCommands::COMMAND_SENDFEEDBACKTOPLAYERBYSTRREF = 476;
/** @}*/
/*****************************************************************/
/*****************************************************************/
// Time Functions
/*****************************************************************/
/** @addtogroup time Time Functions
*
* Functions to handle time (get and set)
*/
/** @{*/
// const INT CVirtualMachineCommands::COMMAND_SETTIME = 495;
// const INT CVirtualMachineCommands::COMMAND_GETTIMEHOUR = 496;
// const INT CVirtualMachineCommands::COMMAND_GETTIMEMINUTE = 497;
// const INT CVirtualMachineCommands::COMMAND_GETTIMESECOND = 498;
// const INT CVirtualMachineCommands::COMMAND_GETTIMEMILLISECOND = 499;
/** @}*/
/*****************************************************************/