Scripting Commands and Variables for Starsiege Tribes
Version 1.1
updated last 1/25/1999
by John "Cryect" Rittenhouse
email: cryect@captured.com
Info:
This is a guide to the Starsiege:Tribes scripting. The commands are currently almost all undocumented or not even mentioned in the scripts. Well talking with the Tribes team it looks like it will be a couple of weeks before they release info on Scripting and Map Editing but even then they might not tell all. So I took it upon myself to fill the gap here for a couple weeks and maybe even beyond. This information was retrieved by examing the main exe of the game in Microsoft Visual C++ 5.0 for those who are interested. I guess you would call it a kind of reverse engineering but not quite(I could if I want reverse engineer real fast by looking at it in debug mode but that was not needed plus it would take a hell of a long time to go over 2megs of data since most asm commands use aproximately 3 bytes each).
Basic Commands
getRandom() returns a random number between 0 to 1
Sprintf-Should work just like the one we all know and love in C
getIntegerTime
listPlayers() lists the clients in the game with info such as player numbers
Vector::dot(vec,vec) - Find the dot product of the two vectors given
Vector::add(vec,vec)- Adds the two together and returns it
Vector::sub(vec,vec) - Subtracts
Vector::neg(vec) Negates the vector given
Vector::getFromRot(<rot 3f>,[<length>]) - Returns a vector in direction given if given a length it will be that far away otherwise it defaults to the unit circle(Length of 1 for those of you who have not talked about the unit circle yet in math)
Vector::getDistance(vec,vec) Returns the distance between the 2 vectors
Vector::getRotation(normal) Gives you a vector of the angles
Vector::normalize(vec) Normalizes the vector given and returns the new one
Sqrt(Value) Finds the Square root of the value
Pow(value,power) Returns the value to that power
GetWord(String,nword)
exec(file)-executes the file
Advance Commands
GetBoxCenter(object) returns the center I think
ContainerBoxFillSet(set,mask,position,length,width,height,optional height) Some type of box filling
FindPointOnSphere(playerPos,objectPos,vec,object) Not sure quite yet
Group::iterateRecursive
Group::objectCount
Group::getObject
RemoveFromSet
EscapeString
RebuildCommandMap()- Pretty much what it says
UseItem(itemDescription)-Hmm could it possibly use the item
BuyFavorites()-guess what it buys your favorites
GetItemType(description)-As it says returns the item type of the item
GetItemCount(description)- basically as it says again
GetMountedItem(mountslot) returns item mounted at that mountslot I think havent used it yet
AddGameServer(address,name,version,ping,favorite<true or false>)- adds a server to the list with these settings
RebuildServerList()-rebuilds the list
AddCMCommand(object,menustring, command,
) Something to do with adding a menu command I know that much
SetCMMode(menuObject, mode) Sets the mode
remotePlayAnim
SetIssueCommand
IssueCommand
IssueCommandI
IssueTargCommand
RemoteSelectCommander
SetCommandStatus
StartGhosting
ResetPlayerManager
ResetGhostManagers
PreloadServerDataBlocks
PlayVoice
playSound
GetNumClients() returns number of clients in game
GetClientByIndex()
GetNumTeams() returns the number of teams
GetTeamName(TeamNumber) returns the name of that team number
GetObjectType(object) returns the type of object it is
GetObjectByTargetIndex
GetItemData(type) gives item data wow
GetNumItems
activateGroup
Team::setScore(playerid,score string, sortvalue)
SetTeamScoreHeading(headingString)
Team::setObjective(teamID,objNum,text)
Team::clearObjectives(teamID)-Clears the team objective
SetHudTimer(time in seconds) sets the clock on the console to this time
Client::setDataFinished(client)
Client::limitCommandBandwidth()
Client::setMenuScoreVis
Player::getClient(object)
Client::getOwnedObject
Client::getControlObject
Client::setOwnedObject
Client::setControlObject
GameBase::getOwnerClient(object)
GameBase::getControlClient(object)
Client::setSkin
Client::getTransportAddress
Client::getFirst
Client::getNext
Client::setItemShopping(client,<type,
>) Sets the item that is selected I think when shopping
Client::clearItemShopping(client,<type,
>) Clears the item
Client::isItemShoppingOn(client, type) returns if shopping is on
Client::setItemBuying (client,<type,
>)
Client::clearItemBuying (client,<type,
>)
Client::isItemBuyingOn(client, type) returns if buying is on
Client::setInitialTeam(playerid,teamid) Sets the player initial team I guess
Client::getName(playerid) returns the player name
Client::getTeam(playerid) returns the team
Client::sendMessage
Client::setScore
setClientScoreHeading
Client::setGuiMode(playerid, guiID)-sets the GUI mode being used
Client::getGuiMode(playerid) gets the GUI mode being used
Client::ExitLobby
ModeresetPlayDelegate
Client::getVoiceBase(client) gets the voice base
Client::getSkinBase(client) gets the skin base
Client::getGender(client) returns the gender
Client::centerPrint(msg,pos<0 center, 1 bottom, 2 top> -Prints a message
Client::getMouseSensitivity(actionMap)
Client::getMouseXAxisFlip(actionMap)
Client::getMouseYAxisFlip(actionMap)
GetClientByName(name) Returns the client with that name
GameBase::playSound
GameBase::generatePower(object, bool) sets the object to generate power based if set to true or false the boolean
GameBase::isPowerGenerator(object)- returns if it is a power generator or not
GameBase::getPowerCount(object) -
GameBase::isPowered (object) tells you if it is powered or not
GameBase::getTeam (object) Returns the team of the object
GameBase::setTeam (object,team) Sets the team of the object
GameBase::getPosition (object) Returns the position of the object
GameBase::getRotation (object) Returns the rotation of the object
GameBase::setPosition (object,pos) Returns the position of the object
GameBase::setRotation (object,rot) Sets the rotation of the object
GameBase::getTransform(object) Not sure when I first looked at it I assumed it was something with transformations but not really sure
GameBase::getDataName(object) I guess as it says
GameBase::isAtRest(object) Tells you if the object is at rest
GameBase::testPosition(object,pos) Not sure need to test
GameBase::setSequenceDirection(object,thread,bool forward) Set the direction a sequence is going in
GameBase::stopSequence(object,thread) Stops the sequence
GameBase::playSequence (object, thread, <sequence>) Now I have absolutely no idea how to use sequences except knowing there order maybe it is something with the cd player?
GameBase::pauseSequence(object,thread) pauses the sequence
GameBase::setRechargeRate(object,value) sets the recharge rate
GameBase::getRechargeRate(object) returns the recharge rate
GameBase::setAutoRepairRate(object,value) sets the Auto repair rate
GameBase::getAutoRepairRate(object) returns the auto repair rate
GameBase::repairDamage(object,amount) Repairs the amount of damage specified
GameBase::throw(item,object,vel, bool random) Throws the object(used for grenades)
GameBase::setEnergy(object,value) Sets the energy value of the object
GameBase::getEnergy(object) Returns the energy amount
GameBase::getDamageLevel(object) gets the damage value
GameBase::setDamageLevel(object,value) Sets the damage value of the object
GameBase::getDamageState(object) Returns the damage state
GameBase::applyDamage(object,type,value,pos,vec,mom,sourceObj)-Applys damage to the object with the regular info
GameBase::activateShield(object,vec,[zoffset])- Will activate a shield not sure exactly how it works yet
GameBase::getLOSInfo(object,range, <rotation>) Something with LOS not sure what
GameBase::setMapName(object,name)-sets the map name(not sure if this changes the map maybe)
GameBase::getMapName(object) Returns the map name
GameBase::virtual(object,functionname,..) Not sure what
GameBase::setActive(sensor,bool) Turns sensors on and off
GameBase::isActive(sensor) Tells you if the sensor is currently active
GameBase::getMuzzleTransform()
GameBase::startFadeOut()
GameBase::startFadeIn()
GameBase::applyRadiusDamage(type,pos,radius,damage,value,force,srcObjectID) Does radius damage oretty simple
GameBase::getRadius
GameBase::getDisabledDamage(object) This should tell you how much damage is required for it to be disabled
GameBase::setIsTarget(staticBade, bool) - ?
Player::setDetectParameters()
Player::setAnimation(player,anim)-set the current animation
Player::getArmor(player) Returns currently used armor
Player::incItemCount(player,type,<count>) Okay this isnt to hard
Player::decItemCount(player,type,<count>) Okay this isnt to hard
Player::setItemCount(player,type,count) Okay this isnt to hard
Player::getItemCount(player,type) returns the amount of this item
Player::getItemClassCount(player,classname) returns the amount of that class(ex weapons)
Player::mountItem(player,type,imageSlot,<team>)-I Think this is with mounting an external object on the player model
Player::unmountItem(player,imageslot)- think it unmounts it
Player::getMountedItem(player) returns the imageslot I guess
Player::useItem(player,type) possibly uses the item
Player::dropItem(player,type) just might happen to drop the item
Player::deployItem(player,type) and could you believe this will depl
Player::setMountObject(player,object,mountpoint) More stuff with mounting external objects
Player::getMountObject(player) Gets the object
Player::trigger(player,imageSlot,<Bool>)-this is for turning the bright green and dull green icons on and off on the side of the hud
Player::isTriggered(player,imageslot)-this returns the current state of that imageslot
Player::setSensorSupression(player,value)-sets the sensor supresion
Player::getSensorSupression(player) returns the number for sensor suppression
Player::isDead(player) returns if the player is dead or not
Player::applyImpulse(player,vec)-not sure I seem to recall it was used with jumping somehow
Player::kill(player) shuts down tribes now thats mean but it is how to quit also
Player::getDamageFlash(player) returns the current damage flash level
Player::setDamageFlash(player, value) you can set the damage flash level here longer time more red and takes longer to recoverer and it cant turn completely red so dont bother with a flash grenade
Player::setArmor(player,armor) sets the player armor to that it would be mean if server ops switched peoples armor
Player::isExposed(player) - I guess something to being exposed but to what radar maybe ?
Player::isJetting(player) - Tells you if the player is using their jets
Player::lastJetTime(player) - The last game time that the player was using his jets
Player::blowUp(player) - Hmmm can't figure out this one you don't blow up when used
Player::getLastContactCount(player) - Not sure
Player::isCrouching(player) - Tells you if they are crouching or not
Player::isAiControlled(player) - Tells you if its controlled by th ecomputer or not most likely its not
Turret::setTarget(turret,player) - Sets the turret target to the player whose id is given
Vehicle::canMount(Vehicle,player) - Returns if the player can mount or not
Vehicle::canRide(Vehicle, player)-Returns if the player can ride or not
Vehicle::nextPassengerPoint(Vehicle)- Returns the next mount point I think
Vehicle::incPassengers(Vehicle) - Not sure but I think it increases the passenger counter otherwise its the max passengers
Vehicle::decPassengers(Vehicle) - Not sure but I think it decreases the passenger counter otherwise its the max passengers
Vehicle::getMountPoint(Vehicle,mountpoint) - Not sure
Item::getItemData(item)-Returns the item data
Item::setVelocity
Item::getVelocity
Item::getCount(item) - SHould return the item count
Item::isRotating(item) - Tells you if the item is rotating(now how do you tell it to rotate?)
Item::hide(item) - I guess it hides it but there is no unHide command
Moveable::moveToWaypoint (object,waypoint) - Tells the object to move to the waypoint
Moveable::moveForward(object) - Moves forward through its waypoints stack
Moveable::moveBackward(object) - Moves backwards through its waypoint stack
Moveable::stop(object) - Tells the object to stop moving
Moveable::getState(object) - Gets the current state of movement(stop, moving , whatever)
Moveable::getWaypointCount(object) - REturns the amount of waypoints the object has
Moveable::getPosition(object) - I think it returns the object position but that doesn't make sense because you could use gamebase::getposition so it probably the next waypoint its going to position
Moveable::setWaypoint(object,%waypoint) - Gives a object a new waypoint I think with the %waypoint being a vector
Interior::setLightTime(Interior,light,time) - I guess it sets the time the light will switch on or off
Interior::toggleLight(interior,light) -Toggles it between on/off
Interior::switchOnLight(interior,light) - Turns the light on
Interior::switchOffLight(interior,light) - Turns the light off
ShapeView::setItem
ShapeView::setShape
ShapeView::setSkin
Projectile::spawnProjectile
inputActivate(device) - Activates that device
File::FindFirst(file) - Finds the first file that meets those specifications
File::FindNext(File) - Finds the next file thats meets those specifications
export(searchstring,[filename],[Append]) - This exports all variables that meat the specifications to the filename
GUI Commands
newObject(Name,type,...) - The type here can be several things more on it later.
setCursor(object,bmp) - Sets what the cursor bmp is when over the object
cursorOn(object) - I think this puts the cursor on that object
GUI::isIn8BitMode()- Returns true if in the persion who executed this command is in 8bit mode might work with player id haven't tried
GUI::issue8BitWarning()- Give person who executed this command a warning about being in 8bit mode might work with player id haven't tried
GUI::issueInternetWarning()Give person who executed this command a warning about not being on the internet might work with player id haven't tried
RenderCanvas(canvas) This will render a canvas
GuiLoadContentCtrl(canvas,gui file)- This will set the canvas up with the gui file
addToolButton(windowname,buttonname,bmp,[wrapafter],[togglebutton])- Puts a button on the toolbar with the data given. Toggle buttons are buttons that have an up and down state
addToolGap(windowName,GapName)-Adds a gap
setToolCommand(WindowName, ButtonName, ConsoleCommand,[ConsoleCommandUp])- Sets the command of a button when pressed. Console Command up is when released.
guiPopDialog(Canvas,int) - Pops up a dialog box of the canvas specified
guiPushDialog(canvas,filename) - Not sure yet
Variables
At First I thought these were commands but I determined they actually are variables all. These all do different things I'm not even sure about the variable pref::snipercrosshair since it got set about 12 different times in the exe
FearPlugin
Version
pref::ignoreInternetWarning
pref::IgnoreTargets
pref::NumDecals
pref::TerrainVisibleDistance
pref::TerrainPerspectiveDistance
pref::TerrainDetail
pref::TerrainTextureDetail
pref::TerrainVisibleDistance
pref::InteriorTextureDetailSensorNetworkEnabled
net::predictForwardTime - This is I think if it will predict forward time (maybe how far ahead?)
net::interpolateTime - Not sure but this might be how many packets it uses to try to interpolate time and if is it probably assigns different values with the more recent ones higher values
pref::damageSkinDetail
pref::useCustomSkins
pref::shadowDetailMask
pref::shadowDetailScale
pref::playerShapeDetail
pref::vehicleShapeDetail
pref::staticShapeDetail
pref::skyDetail
pref::starDetail
pref::freeLook(TRUE/FALSE) - if free look is on or off
pref::interiorLightUpdateMS
pref::dynamicLightDistance
pref::maxNumSmokePuffs
pref::weatherPrecipitation
pref::flipFlierY
pref::PlayerFov - The normal FOV set
pref::PlayerZoomFov - The FOV that is set when player zooms in
pref::PlayerZoomSpeed - The speed at which the player zooms in
GameBase::upFov
GameBase::upDistance
GameBase::upVelocity
GameBase::upSkips
GameBase::upOwnership
GameBase::upInterestServer
pref::SniperCrosshair(TRUE/FALSE)
playGui
Keyboard
Mouse
Joystick
Device
make
break
move
X-Axis
Y-Axis
Z-Axis
RX-Aaxis
RY_Axis
RZ-Axis
Slider
POV
X-POV
Y-POV
U-POV
D-POV
L-POV
R-POV
ButtonKey
|