![]() |
![]() |
|||||||||||||||||||||||
|
|
||||||||||||||||||||||||
|
Sections: New Creatures & Placeables | New Tilesets | New Scripts
Go to (Previous - 1. About, 2. Introduction, 3. Script: Set Name, 4. Script: Set Wing, 5. Commands)
An Introduction To The New Scripting CommandsBy Craig Welburn Here is complete list of the new scripting commands in the upcoming 1.67 update, with descriptions as they appear in the toolset. The three most exciting commands have been placed at the top for your convenience:
Complete List of New Scripting Commandsvoid SetName(object oObject, string sNewName="");
// Creates a square Trap object. // - nTrapType: The base type of trap (TRAP_BASE_TYPE_*) // TRAP_BASE_TYPE_AVERAGE_ACID // TRAP_BASE_TYPE_AVERAGE_ACID_SPLASH // TRAP_BASE_TYPE_AVERAGE_ELECTRICAL // TRAP_BASE_TYPE_AVERAGE_FIRE // TRAP_BASE_TYPE_AVERAGE_FROST // TRAP_BASE_TYPE_AVERAGE_GAS // TRAP_BASE_TYPE_AVERAGE_HOLY // TRAP_BASE_TYPE_AVERAGE_NEGATIVE // TRAP_BASE_TYPE_AVERAGE_SONIC // TRAP_BASE_TYPE_AVERAGE_SPIKE // TRAP_BASE_TYPE_AVERAGE_TANGLE // TRAP_BASE_TYPE_DEADLY_ACID // TRAP_BASE_TYPE_DEADLY_ACID_SPLASH // TRAP_BASE_TYPE_DEADLY_ELECTRICAL // TRAP_BASE_TYPE_DEADLY_FIRE // TRAP_BASE_TYPE_DEADLY_FROST // TRAP_BASE_TYPE_DEADLY_GAS // TRAP_BASE_TYPE_DEADLY_HOLY // TRAP_BASE_TYPE_DEADLY_NEGATIVE // TRAP_BASE_TYPE_DEADLY_SONIC // TRAP_BASE_TYPE_DEADLY_SPIKE // TRAP_BASE_TYPE_DEADLY_TANGLE // TRAP_BASE_TYPE_EPIC_ELECTRICAL // TRAP_BASE_TYPE_EPIC_FIRE // TRAP_BASE_TYPE_EPIC_FROST // TRAP_BASE_TYPE_EPIC_SONIC // TRAP_BASE_TYPE_MINOR_ACID // TRAP_BASE_TYPE_MINOR_ACID_SPLASH // TRAP_BASE_TYPE_MINOR_ELECTRICAL // TRAP_BASE_TYPE_MINOR_FIRE // TRAP_BASE_TYPE_MINOR_FROST // TRAP_BASE_TYPE_MINOR_GAS // TRAP_BASE_TYPE_MINOR_HOLY // TRAP_BASE_TYPE_MINOR_NEGATIVE // TRAP_BASE_TYPE_MINOR_SPIKE // TRAP_BASE_TYPE_MINOR_SONIC // TRAP_BASE_TYPE_MINOR_TANGLE // TRAP_BASE_TYPE_STRONG_ACID // TRAP_BASE_TYPE_STRONG_ACID_SPLASH // TRAP_BASE_TYPE_STRONG_ELECTRICAL // TRAP_BASE_TYPE_STRONG_FIRE // TRAP_BASE_TYPE_STRONG_FROST // TRAP_BASE_TYPE_STRONG_GAS // TRAP_BASE_TYPE_STRONG_HOLY // TRAP_BASE_TYPE_STRONG_NEGATIVE // TRAP_BASE_TYPE_STRONG_SONIC // TRAP_BASE_TYPE_STRONG_SPIKE // TRAP_BASE_TYPE_STRONG_TANGLE // - lLocation: The location and orientation that the trap will be // created at. // - fSize: The size of the trap. Minimum size allowed is 1.0f. // - sTag: The tag of the trap being created. // - nFaction: The faction of the trap (STANDARD_FACTION_*). // STANDARD_FACTION_HOSTILE // STANDARD_FACTION_COMMONER // STANDARD_FACTION_MERCHANT // STANDARD_FACTION_DEFENDER object CreateTrapAtLocation(int nTrapType, location lLocation, float fSize=2.0f, string sTag="", int nFaction=STANDARD_FACTION_HOSTILE);
// Creates a Trap on the object specified. // - nTrapType: The base type of trap (TRAP_BASE_TYPE_*) // TRAP_BASE_TYPE_AVERAGE_ACID // TRAP_BASE_TYPE_AVERAGE_ACID_SPLASH // TRAP_BASE_TYPE_AVERAGE_ELECTRICAL // TRAP_BASE_TYPE_AVERAGE_FIRE // TRAP_BASE_TYPE_AVERAGE_FROST // TRAP_BASE_TYPE_AVERAGE_GAS // TRAP_BASE_TYPE_AVERAGE_HOLY // TRAP_BASE_TYPE_AVERAGE_NEGATIVE // TRAP_BASE_TYPE_AVERAGE_SONIC // TRAP_BASE_TYPE_AVERAGE_SPIKE // TRAP_BASE_TYPE_AVERAGE_TANGLE // TRAP_BASE_TYPE_DEADLY_ACID // TRAP_BASE_TYPE_DEADLY_ACID_SPLASH // TRAP_BASE_TYPE_DEADLY_ELECTRICAL // TRAP_BASE_TYPE_DEADLY_FIRE // TRAP_BASE_TYPE_DEADLY_FROST // TRAP_BASE_TYPE_DEADLY_GAS // TRAP_BASE_TYPE_DEADLY_HOLY // TRAP_BASE_TYPE_DEADLY_NEGATIVE // TRAP_BASE_TYPE_DEADLY_SONIC // TRAP_BASE_TYPE_DEADLY_SPIKE // TRAP_BASE_TYPE_DEADLY_TANGLE // TRAP_BASE_TYPE_EPIC_ELECTRICAL // TRAP_BASE_TYPE_EPIC_FIRE // TRAP_BASE_TYPE_EPIC_FROST // TRAP_BASE_TYPE_EPIC_SONIC // TRAP_BASE_TYPE_MINOR_ACID // TRAP_BASE_TYPE_MINOR_ACID_SPLASH // TRAP_BASE_TYPE_MINOR_ELECTRICAL // TRAP_BASE_TYPE_MINOR_FIRE // TRAP_BASE_TYPE_MINOR_FROST // TRAP_BASE_TYPE_MINOR_GAS // TRAP_BASE_TYPE_MINOR_HOLY // TRAP_BASE_TYPE_MINOR_NEGATIVE // TRAP_BASE_TYPE_MINOR_SPIKE // TRAP_BASE_TYPE_MINOR_SONIC // TRAP_BASE_TYPE_MINOR_TANGLE // TRAP_BASE_TYPE_STRONG_ACID // TRAP_BASE_TYPE_STRONG_ACID_SPLASH // TRAP_BASE_TYPE_STRONG_ELECTRICAL // TRAP_BASE_TYPE_STRONG_FIRE // TRAP_BASE_TYPE_STRONG_FROST // TRAP_BASE_TYPE_STRONG_GAS // TRAP_BASE_TYPE_STRONG_HOLY // TRAP_BASE_TYPE_STRONG_NEGATIVE // TRAP_BASE_TYPE_STRONG_SONIC // TRAP_BASE_TYPE_STRONG_SPIKE // TRAP_BASE_TYPE_STRONG_TANGLE // - oObject: The object that the trap will be created on. // Works only on Doors and Placeables. // - nFaction: The faction of the trap (STANDARD_FACTION_*). // STANDARD_FACTION_HOSTILE // STANDARD_FACTION_COMMONER // STANDARD_FACTION_MERCHANT // STANDARD_FACTION_DEFENDER void CreateTrapOnObject(int nTrapType, object oObject, int nFaction=STANDARD_FACTION_HOSTILE);
// returns the Wing type of the creature specified. // CREATURE_WING_TYPE_NONE // CREATURE_WING_TYPE_DEMON // CREATURE_WING_TYPE_ANGEL // CREATURE_WING_TYPE_BAT // CREATURE_WING_TYPE_DRAGON // CREATURE_WING_TYPE_BUTTERFLY // CREATURE_WING_TYPE_BIRD // returns CREATURE_WING_TYPE_NONE if used on a non-creature object, // if the creature has no wings, or if the creature can not have its // wing type changed in the toolset. int GetCreatureWingType(object oCreature=OBJECT_SELF);
// Sets the Wing type of the creature specified. // - nWingType (CREATURE_WING_TYPE_*) // CREATURE_WING_TYPE_NONE // CREATURE_WING_TYPE_DEMON // CREATURE_WING_TYPE_ANGEL // CREATURE_WING_TYPE_BAT // CREATURE_WING_TYPE_DRAGON // CREATURE_WING_TYPE_BUTTERFLY // CREATURE_WING_TYPE_BIRD // - oCreature: the creature to change the wing type for. // Note: Only two creature model types will support wings. // The MODELTYPE for the part based (playable races) 'P' // and MODELTYPE 'W'in the appearance.2da void SetCreatureWingType(int nWingType, object oCreature=OBJECT_SELF);
// returns the model number being used for the body part and creature // specified // The model number returned is for the body part when the creature // is not wearing // armor (i.e. whether or not the creature is wearing armor does not // affect the return value). // Note: Only works on part based creatures, which is typically // restricted to the playable races (unless some new part based custom // content has been added to the module). // // returns CREATURE_PART_INVALID if used on a non-creature object, // or if the creature does not use a part based model. // // - nPart (CREATURE_PART_*) // CREATURE_PART_RIGHT_FOOT // CREATURE_PART_LEFT_FOOT // CREATURE_PART_RIGHT_SHIN // CREATURE_PART_LEFT_SHIN // CREATURE_PART_RIGHT_THIGH // CREATURE_PART_LEFT_THIGH // CREATURE_PART_PELVIS // CREATURE_PART_TORSO // CREATURE_PART_BELT // CREATURE_PART_NECK // CREATURE_PART_RIGHT_FOREARM // CREATURE_PART_LEFT_FOREARM // CREATURE_PART_RIGHT_BICEP // CREATURE_PART_LEFT_BICEP // CREATURE_PART_RIGHT_SHOULDER // CREATURE_PART_LEFT_SHOULDER // CREATURE_PART_RIGHT_HAND // CREATURE_PART_LEFT_HAND // CREATURE_PART_HEAD int GetCreatureBodyPart(int nPart, object oCreature=OBJECT_SELF);
// Sets the body part model to be used on the creature specified.
// The model names for parts need to be in the following format:
// p<m/f><race letter><phenotype>_<body part><model number>.mdl
//
// - nPart (CREATURE_PART_*)
// CREATURE_PART_RIGHT_FOOT
// CREATURE_PART_LEFT_FOOT
// CREATURE_PART_RIGHT_SHIN
// CREATURE_PART_LEFT_SHIN
// CREATURE_PART_RIGHT_THIGH
// CREATURE_PART_LEFT_THIGH
// CREATURE_PART_PELVIS
// CREATURE_PART_TORSO
// CREATURE_PART_BELT
// CREATURE_PART_NECK
// CREATURE_PART_RIGHT_FOREARM
// CREATURE_PART_LEFT_FOREARM
// CREATURE_PART_RIGHT_BICEP
// CREATURE_PART_LEFT_BICEP
// CREATURE_PART_RIGHT_SHOULDER
// CREATURE_PART_LEFT_SHOULDER
// CREATURE_PART_RIGHT_HAND
// CREATURE_PART_LEFT_HAND
// CREATURE_PART_HEAD
// - nModelNumber: CREATURE_MODEL_TYPE_*
// CREATURE_MODEL_TYPE_NONE
// CREATURE_MODEL_TYPE_SKIN (not for use on shoulders, pelvis
// or head).
// CREATURE_MODEL_TYPE_TATTOO (for body parts that support
// tattoos, i.e. not heads/feet/hands).
// CREATURE_MODEL_TYPE_UNDEAD (undead model only exists for the
// right arm parts).
// - oCreature: the creature to change the body part for.
// Note: Only part based creature appearance types are supported.
// i.e. The model types for the playable races ('P') in the
// appearance.2da
void SetCreatureBodyPart(int nPart, int nModelNumber, object oCreature=OBJECT_SELF);
// returns the Tail type of the creature specified. // CREATURE_TAIL_TYPE_NONE // CREATURE_TAIL_TYPE_LIZARD // CREATURE_TAIL_TYPE_BONE // CREATURE_TAIL_TYPE_DEVIL // returns CREATURE_TAIL_TYPE_NONE if used on a non-creature object, // if the creature has no Tail, or if the creature can not have its // Tail type changed in the toolset. int GetCreatureTailType(object oCreature=OBJECT_SELF);
// Sets the Tail type of the creature specified. // - nTailType (CREATURE_TAIL_TYPE_*) // CREATURE_TAIL_TYPE_NONE // CREATURE_TAIL_TYPE_LIZARD // CREATURE_TAIL_TYPE_BONE // CREATURE_TAIL_TYPE_DEVIL // - oCreature: the creature to change the Tail type for. // Note: Only two creature model types will support Tails. // The MODELTYPE for the part based (playable) races 'P' // and MODELTYPE 'T'in the appearance.2da void SetCreatureTailType(int nTailType, object oCreature=OBJECT_SELF);
// returns the Hardness of a Door or Placeable object. // - oObject: a door or placeable object. // returns -1 on an error or if used on an object that is // neither a door nor a placeable object. int GetHardness(object oObject=OBJECT_SELF);
// Sets the Hardness of a Door or Placeable object. // - nHardness: must be between 0 and 250. // - oObject: a door or placeable object. // Does nothing if used on an object that is neither // a door nor a placeable. void SetHardness(int nHardness, object oObject=OBJECT_SELF);
// When set the object can not be opened unless the // opener possesses the required key. The key tag required // can be specified either in the toolset, or by using // the SetLockKeyTag() scripting command. // - oObject: a door, or placeable. // - nKeyRequired: TRUE/FALSE void SetLockKeyRequired(object oObject, int nKeyRequired=TRUE);
// Set the key tag required to open object oObject. // This will only have an effect if the object is set to // "Key required to unlock or lock" either in the toolset // or by using the scripting command SetLockKeyRequired(). // - oObject: a door, placeable or trigger. // - sNewKeyTag: the key tag required to open the locked object. void SetLockKeyTag(object oObject, string sNewKeyTag);
// Sets whether or not the object can be locked. // - oObject: a door or placeable. // - nLockable: TRUE/FALSE void SetLockLockable(object oObject, int nLockable=TRUE);
// Sets the DC for locking the object. // - oObject: a door or placeable object. // - nNewLockDC: must be between 0 and 250. void SetLockLockDC(object oObject, int nNewLockDC);
// Sets the DC for unlocking the object. // - oObject: a door or placeable object. // - nNewUnlockDC: must be between 0 and 250. void SetLockUnlockDC(object oObject, int nNewUnlockDC);
// Sets whether or not the trapped object can be disarmed. // - oTrapObject: a placeable, door or trigger // - nDisarmable: TRUE/FALSE void SetTrapDisarmable(object oTrapObject, int nDisarmable=TRUE);
// Sets whether or not the trapped object can be detected. // - oTrapObject: a placeable, door or trigger // - nDetectable: TRUE/FALSE // Note: Setting a trapped object to not be detectable will // not make the trap disappear if it has already been detected. void SetTrapDetectable(object oTrapObject, int nDetectable=TRUE);
// Sets whether or not the trap is a one-shot trap // (i.e. whether or not the trap resets itself after firing). // - oTrapObject: a placeable, door or trigger // - nOneShot: TRUE/FALSE void SetTrapOneShot(object oTrapObject, int nOneShot=TRUE);
// Set the tag of the key that will disarm oTrapObject. // - oTrapObject: a placeable, door or trigger void SetTrapKeyTag(object oTrapObject, string sKeyTag);
// Set the DC for disarming oTrapObject. // - oTrapObject: a placeable, door or trigger // - nDisarmDC: must be between 0 and 250. void SetTrapDisarmDC(object oTrapObject, int nDisarmDC);
// Set the DC for detecting oTrapObject. // - oTrapObject: a placeable, door or trigger // - nDetectDC: must be between 0 and 250. void SetTrapDetectDC(object oTrapObject, int nDetectDC);
// Set the Will saving throw value of the Door or Placeable object // oObject. // - oObject: a door or placeable object. // - nWillSave: must be between 0 and 250. void SetWillSavingThrow(object oObject, int nWillSave);
// Set the Reflex saving throw value of the Door or Placeable // object oObject. // - oObject: a door or placeable object. // - nReflexSave: must be between 0 and 250. void SetReflexSavingThrow(object oObject, int nReflexSave);
// Set the Fortitude saving throw value of the Door or Placeable // object oObject. // - oObject: a door or placeable object. // - nFortitudeSave: must be between 0 and 250. void SetFortitudeSavingThrow(object oObject, int nFortitudeSave);
// returns the resref (TILESET_RESREF_*) of the tileset used to // create area oArea. // TILESET_RESREF_BEHOLDER_CAVES // TILESET_RESREF_CASTLE_INTERIOR // TILESET_RESREF_CITY_EXTERIOR // TILESET_RESREF_CITY_INTERIOR // TILESET_RESREF_CRYPT // TILESET_RESREF_DESERT // TILESET_RESREF_DROW_INTERIOR // TILESET_RESREF_DUNGEON // TILESET_RESREF_FOREST // TILESET_RESREF_FROZEN_WASTES // TILESET_RESREF_ILLITHID_INTERIOR // TILESET_RESREF_MICROSET // TILESET_RESREF_MINES_AND_CAVERNS // TILESET_RESREF_RUINS // TILESET_RESREF_RURAL // TILESET_RESREF_RURAL_WINTER // TILESET_RESREF_SEWERS // TILESET_RESREF_UNDERDARK // * returns an empty string on an error. string GetTilesetResRef(object oArea);
// - oTrapObject: a placeable, door or trigger // * Returns TRUE if oTrapObject can be recovered. int GetTrapRecoverable(object oTrapObject);
// Sets whether or not the trapped object can be recovered. // - oTrapObject: a placeable, door or trigger void SetTrapRecoverable(object oTrapObject, int nRecoverable=TRUE);
// Get the XP scale being used for the module. int GetModuleXPScale();
// Set the XP scale used by the module. // - nXPScale: The XP scale to be used. Must be between 0 and 200. void SetModuleXPScale(int nXPScale);
// Get the feedback message that will be displayed when trying to // unlock the object oObject. // - oObject: a door or placeable. // Returns an empty string "" on an error or if the game's default // feedback message is being used string GetKeyRequiredFeedback(object oObject);
// Set the feedback message that is displayed when trying to unlock // the object oObject. // This will only have an effect if the object is set to // "Key required to unlock or lock" either in the toolset // or by using the scripting command SetLockKeyRequired(). // - oObject: a door or placeable. // - sFeedbackMessage: the string to be displayed in the player's // text window. to use the game's default message, // set sFeedbackMessage to "" void SetKeyRequiredFeedback(object oObject, string sFeedbackMessage);
// - oTrapObject: a placeable, door or trigger // * Returns TRUE if oTrapObject is active int GetTrapActive(object oTrapObject);
// Sets whether or not the trap is an active trap // - oTrapObject: a placeable, door or trigger // - nActive: TRUE/FALSE // Notes: // Setting a trap as inactive will not make the // trap disappear if it has already been detected. // Call SetTrapDetectedBy() to make a detected trap disappear. // To make an inactive trap not detectable call SetTrapDetectable() void SetTrapActive(object oTrapObject, int nActive=TRUE);
// Locks the player's camera pitch to its current pitch setting, // or unlocks the player's camera pitch. // Stops the player from tilting their camera angle. // - oPlayer: A player object. // - bLocked: TRUE/FALSE. void LockCameraPitch(object oPlayer, int bLocked=TRUE);
// Locks the player's camera distance to its current distance setting, // or unlocks the player's camera distance. // Stops the player from being able to zoom in/out the camera. // - oPlayer: A player object. // - bLocked: TRUE/FALSE. void LockCameraDistance(object oPlayer, int bLocked=TRUE);
// Locks the player's camera direction to its current direction, // or unlocks the player's camera direction to enable it to move // freely again. // Stops the player from being able to rotate the camera direction. // - oPlayer: A player object. // - bLocked: TRUE/FALSE. void LockCameraDirection(object oPlayer, int bLocked=TRUE);
// Get the last object that default clicked (left clicked) on the // placeable object that is calling this function. // Should only be called from a placeables OnClick event. // * Returns OBJECT_INVALID if it is called by something other than // a placeable. object GetPlaceableLastClickedBy();
// returns TRUE if the item is flagged as infinite. // - oItem: an item. // The infinite property affects the buying/selling behavior of the // item in a store. // An infinite item will still be available to purchase from a store // after a player buys the item (non-infinite items will disappear // from the store when purchased). int GetInfiniteFlag(object oItem);
// Sets the Infinite flag on an item // - oItem: the item to change // - bInfinite: TRUE or FALSE, whether the item should be Infinite // The infinite property affects the buying/selling behavior of the // item in a store. // An infinite item will still be available to purchase from a store // after a player buys the item (non-infinite items will disappear // from the store when purchased). void SetInfiniteFlag(object oItem, int bInfinite=TRUE);
// Gets the size of the area. // - nAreaDimension: The area dimension that you wish to determine. // AREA_HEIGHT // AREA_WIDTH // - oArea: The area that you wish to get the size of. // Returns: The number of tiles that the area is wide/high, or zero // on an error. // If no valid area (or object) is specified, it uses the area of the // caller. // If an object other than an area is specified, will use the area // that the object is currently in. int GetAreaSize(int nAreaDimension, object oArea=OBJECT_INVALID);
// Get the PortraitId of oTarget. // - oTarget: the object for which you are getting the portrait Id. // Returns: The Portrait Id number being used for the object oTarget. // The Portrait Id refers to the row number of the // Portraits.2da that this portrait is from. // If a custom portrait is being used, oTarget is a player // object, or on an error returns PORTRAIT_INVALID. In these // instances try using GetPortraitResRef() instead. int GetPortraitId(object oTarget=OBJECT_SELF);
// Change the portrait of oTarget to use the Portrait Id specified. // - oTarget: the object for which you are changing the portrait. // - nPortraitId: The Id of the new portrait to use. // nPortraitId refers to a row in the Portraits.2da // Note: Not all portrait Ids are suitable for use with all // object types. void SetPortraitId(object oTarget, int nPortraitId);
// Get the Portrait ResRef of oTarget. // - oTarget: the object for which you are getting the portrait ResRef. // Returns: The Portrait ResRef being used for the object oTarget. // The Portrait ResRef will not include a trailing size letter. string GetPortraitResRef(object oTarget=OBJECT_SELF);
// Change the portrait of oTarget to use the Portrait ResRef specified. // - oTarget: the object for which you are changing the portrait. // - sPortraitResRef: The ResRef of the new portrait to use. // Note: Not all portrait ResRefs are suitable for use with all // object types. void SetPortraitResRef(object oTarget, string sPortraitResRef);
|
|||||||||||||||||||||||
|
|
||
|
Multiplayer Games at Neverwinter Connections
|
||
|
Buy Premium Modules
|
||
|
4,827,120 BioWare Users:
|
||