uiScript Commands

The uiScript command is used in the Script Action to provide access to actions hard coded into the program. Team Arena provides a number of these actions and mod programmers can add more to meet their requirements. The format for using uiScript is as follows :

uiScript <string>

where <string> is the name of an action as described in the following :

  • stopRefresh
    • stops trying to refresh the server list by terminating queries to servers.
  • loadDemos
    • loads a list of demos for use with the demo feeder.
  • loadSave
    • loads a list of saved games for use with the save feeder.
  • LoadGame
    • copys the name of the selected saved game into the "ui_LoadGame" cvar.
  • SaveGame
    • copys the name of the selected saved game into the "ui_SaveGame" cvar.
  • loadMods
    • loads a list of mods for use with the mod feeder. If a file named `description.txt' exists in a mod directory, the first line of that file is used as the mod's name in the feeder list. If no such file exists, the name of the directory itself is used.
  • playMovie
    • play the movie provided by the movie feeder.
  • startServer
    • Starts a server, and the associated online game (instead of just joining). Initialized values include dedicated setting, gametype, number of available spots (maxClients), number of bots, bot names (if any).
  • updateSPMenu <name>
    • update the values for the single player game. If <name> is not present then this command only works from a menu named "skirmish". If <name> is present it work from a menu called <name>.
  • resetDefaults
    • resets the program's default values.
  • loadArenas <name>
    • load a list of the arena maps avalible for use by the map feeder. If <name> is not present then this command only works from a menu named "createserver". If <name> is present it work from a menu called <name>.
  • loadGameInfo
    • parses the gameinfo.txt file and sets the values contained in it.
  • resetScores
    • reset best scores for all maps.
  • refreshServers
    • refresh the list of servers for use with the server feeder.
  • refreshFilter
    • refresh the server list according to the game filter you have previously set and update the display list.
  • runSPDemo
    • run the demo selected by the demo feeder.
  • loadMovies
    • loads a list of movies for use by the movie feeder
  • runMod
    • run the mod selected by the mod feeder.
  • closeJoin
    • stops the server refresh in preparation of closing the join game menu.
  • serverStatus
    • retrieve the status info from the server selected by the server feeder.
  • foundPlayerServerStatus
    • retrieve the status info from the server selected by the findplayer feeder
  • findPlayer
    • find a list of servers containing a player name, stored in the cvar " ui_findPlayer'', for use by the findplayer feeder
  • joinServer
    • join the game selected by the server feeder.
  • foundPlayerJoinServer
    • join the server selected by the findplayer feeder
  • quit
    • quit the program entirely.
  • controls <menu name>
    • pauses the game, if ingame, and opens the menu named <menu name>.
  • leave
    • leaves the game by disconnecting and opens the main menu.
  • serverSort <column>
    • sort the list of servers using the column specified by <column>, which may be in the range 1 to 5. These columns are :
      • map name
      • number of players
      • game type
      • ping
      • punkbuster
    • If a new column is selected, the list is sorted in ascending order. If specified again for the second time in a row, the sort direction is reversed. Each time the column is re-selected without a new column selected (i.e. clicking on the same column again and again), the sort direction is sorted in the other order (i.e. sort order keeps switching).
  • nextSkirmish <name>
    • go to the next round of a single player game. If <name> is not present then this command only works from a menu named "skirmish". If <name> is present it work from a menu called <name>.
  • skirmishStart
    • start a single player game.
  • glCustom
    • set the cvar "ui_glCustom" to a value of 4.
  • saveControls
    • save the current key bindings.
  • loadControls
    • load the key bindings.
  • clearError
    • sets the cvar " com_errorMessage'' to an empty string, effectively clearing out any errors.
  • updateFilter
    • refresh the server list with the new filter if the source is set to Local. Update the display list for all sources.
  • closeingame
    • close all open menus and unpauses the game. Used by the ingame menus.
  • voteMap
    • call avote to switch to the map selected by the allmaps feeder.
  • voteKick
    • call a vote to kick the player selected by the player_list feeder.
  • voteGame
    • call vote on game type.
  • voteLeader
    • call vote to select as leader the player selected by the team_list feeder.
  • addBot
    • add bot selected by the heads feeder to the game.
  • addFavorite
    • add currently selected server to the Favorite servers list.
  • deleteFavorite
    • delete the currently selected server from the Favorites list.
  • createFavorite
    • add to Favorite servers list the server specified by the cvars ui_favoriteName and ui_favoriteAddress.
  • getHostName
    • copy host name of currently selected server in the ui_HostName cvar. If no host name is avalible use the name <empty>.
  • orders <string>
    • execute <string> as a console command and then close all menus and unpause game. If a teammate is selected with the cvar "cg_selectedPlayer'', the order is sent to the teammate. Otherwise, the order is sent to the entire team.
  • voiceOrdersTeam <string>
    • execute <string> as a console command and then close all menus and unpause game. If a teammate is selected with the cvar "cg_selectedPlayer'', nothing is sent. Otherwise, the order is sent to the entire team.
  • voiceOrders <string>
    • execute <string> as a console command and then close all menus and unpause game. If a teammate is selected with the cvar "cg_selectedPlayer'', the order is sent to the teammate. Otherwise, nothing is sent.
  • update <var name>
    • update the cvars associated with the cvar named <var name>, which can be one of the following :
      • ui_SetName
      • ui_setRate
      • ui_GetName
      • r_colorbits
      • r_lodbias
      • ui_glCustom
      • ui_mousePitch
  • UpdateModel
    • update the current player model to reflect changes in those cvars associated with it.
  • maskGameType <type> <type> ....
    • create a mask to remove selected game types from those displayed by the ownerdraw UI_GAMETYPE and ownerdraw UI_NETGAMETYPE commands. <type> is the Numeric identifier of a game type, as defined in the gametypes section of the gameinfo.txt file, that you wish not to display. There can be up to 16 <type> values in this command.
  • unmaskGameType
    • clear out the mask created by maskGameType so all game types are shown.

 

Return to Home Page