| Home Page | Recent Changes | Preferences

GameInfo (UT)

UT :: Object >> Actor >> Info (UT) >> GameInfo

A GameInfo subclass contains the rules for a gametype. This includes timelimit, fraglimit, scoring, difficulty, game speed, allowed playerpawn classes, default inventory assignment, and if appropriate, team assignment and general bot behavior.

This is assigned to a map in the Level Properties window, under LevelInfo → DefaultGameType.

The GameInfo for the current game can be retrieved from every actor in that game via Level.Game, but only on the server. GameInfo is not replicated to network clients; only GameReplicationInfo is.

Properties

Globalconfig Properties

bool bMuteSpectators
Whether spectators are allowed to speak.
bool bLowGore
Whether or not to reduce gore.
bool bVeryLowGore
Greatly reduces gore.
bool bNoCheating
Disallows cheating. Hehe.
bool bAllowFOV
Allows FOV changes in net games
bool bExternalBatcher
float AutoAim
How much autoaiming to do (1 = none, 0 = always). (cosine of max error to correct)
float GameSpeed
Scale applied to game rate.
int MaxSpectators
Maximum number of spectators.
private string AdminPassword
Password to receive bAdmin privileges.
private string GamePassword
Password to enter game.
int MaxPlayers
string ServerLogName
Server Log
bool bLocalLog
bool bWorldLog
bool bBatchLocal
int DemoBuild
int DemoHasTuts
string IPPolicies[50]

Config Properties

bool bNoMonsters
Whether monsters are allowed in this play mode.
bool bHumansOnly
Whether non human player models are allowed.
bool bCoopWeaponMode
Whether or not weapons stay when picked up.
bool bClassicDeathmessages
Weapon deathmessages if false.

Localized Properties

bool bAlternateMode
string SwitchLevelMessage
string DefaultPlayerName
string LeftMessage
string FailedSpawnMessage
string FailedPlaceMessage
string FailedTeamMessage
string NameChangedMessage
string EnteredMessage
string GameName
string MaxedOutMessage
string WrongPassword
string NeedPassword
string IPBanned

Other Properties

int ItemGoals, KillGoals, SecretGoals
Special game goals.
byte Difficulty
In Unreal: 0=easy, 1=medium, 2=hard, 3=very hard. In UT: 0=Novice, 1=
bool bRestartLevel
bool bPauseable
Whether the level is pauseable.
bool bCanChangeSkin
Allow player to change skins in game.
bool bTeamGame
This is a teamgame.
bool bDeathMatch
This game is some type of deathmatch (where players can respawn during gameplay)
bool bGameEnded
set when game ends
bool bOverTime
bool bCanViewOthers
float StartTime
class<PlayerPawn> DefaultPlayerClass
class<Weapon (UT)> DefaultWeapon
Default weapon given to player at start.
int NumSpectators
Current number of spectators.
class<ScoreBoard> ScoreBoardType
Type of scoreboard this game uses.
class<Menu> GameMenuType
Type of oldstyle game options menu to display.
string BotMenuType
Type of bot menu to display.
string RulesMenuType
Type of rules menu to display.
string SettingsMenuType
Type of settings menu to display.
string GameUMenuType
Type of Game dropdown to display.
string MultiplayerUMenuType
Type of Multiplayer dropdown to display.
string GameOptionsMenuType
Type of options dropdown to display.
class<HUD (UT)> HUDType
HUD class this game uses.
class<MapList> MapListType
Maplist this game uses.
string MapPrefix
Prefix characters for names of maps for this game type.
string BeaconName
Identifying string used for finding LAN servers.
string SpecialDamageString
int SentText
int NumPlayers
int CurrentID
class<LocalMessage (UT)> DeathMessageClass
class<LocalMessage (UT)> DMMessageClass
class<Mutator> MutatorClass
Class of this gametype's base mutator. (Default is Engine.Mutator, DeathMatchPlus uses Botpack.DMMutator.)
Mutator BaseMutator
Mutator DamageMutator
Linked list of mutators which affect damage.
Mutator MessageMutator
Linked list of mutators which get localized message queries.
class<ZoneInfo> WaterZoneType
Default waterzone entry and exit effects
name DefaultPlayerState
What state a player should start in for this game type
class<GameReplicationInfo> GameReplicationInfoClass
GameReplicationInfo GameReplicationInfo
StatLog LocalLog
StatLog WorldLog
bool bLoggingGame
Does this gametype log?
string LocalLogFileName
string WorldLogFileName
class<StatLog> StatLogClass
string EnabledMutators
Server query info

Methods

AdminLogin (PlayerPawn P, string Password)
This function will allow a player to log in as the administrator if the password entered is correct. The function also broadcasts a notification message to the other players.
AdminLogout (PlayerPawn P)
This function is called when a player leaves administrator mode. It ensures that the player is forced to "Walk", and kills them. There is code in there to preserve the players score when they die from logging out of admin mode but I'm sure it doesn't work in practice. – must check.
InitLogging ( )
Called from PostBeginPlay(). Logs more stuff than you can shake a big stick at. Calls functions on the WorldLog, Log, and LocalLog objects to do so.
InitGameReplicationInfo ( )
This function is responsible for placing the values of the attributes of the GameInfo class important to the client onto the GameReplicationInfo object.
string GetInfo ( )
Returns the status of the World log.
string GetRules ( )
This function builds up a description of the server from the list of mutators currently in use, the type of server (Listen or otherwise), and whether there is a password on the server or not.
int GetServerPort ( )
This functon returns the port the server is runing on by interrogating the level URL.
bool SetPause (bool bPause, PlayerPawn P)
If the level can be paused then the player who paused the game is stored and the function returns true. If the game is not pausable then the function will return false.
LogGameParameters (StatLog StatLog)
This function writes the general game parameters to the stat. log.
SetGameSpeed (float T)
This function sets the game speed.
bool IsRelevant (Actor Other)
This function is called from any Actor's PreBeginPlay(). If this function returns true the actor continues to exist. If the function returns false then the actor is removed from the game. This function calls the AlwaysKeep(), and IsRelevant() functions on any mutators within the game prior to checking actor difficulty levels and "odds of appearing" values. The function also counts the number of remaining SecretGoals, ItemGoals, and KillGoals left within the level. (also see Creating Actors And Objects)
bool GrabOption (out string Options, out string Result)
finish me
GetKeyValue (string Pair, out string Key, out string Value)
finish me
bool HasOption (string Options, string InKey)
finish me
string ParseOption (string Options, string InKey)
finsh me
ProcessServerTravel (string URL, bool bItems)
Called when a map changes. Is responsible for handling the transfer of players and their inventory as well as ensuring that all logging for the level jsut played is tidied up.
bool AtCapacity (string Options)
This function returns true if the server has the maximum number of players allowed on it.
bool CheckIPPolicy (string Address)
Returns true if the IP address of the client is allowed to connect to the server.
int GetIntOption( string Options, string ParseString, int CurrentValue )
finish me
Logout (Pawn (UT) Exiting)
Logs the player out and tells the logging engine about it.
AddDefaultInventory (Pawn (UT) PlayerPawn)
Add any default inventory to the player.
NavigationPoint FindPlayerStart (Pawn (UT) Player, optional byte InTeam, optional string incomingName)
Locates the "best" player start for the player.
bool RestartPlayer (Pawn (UT) aPlayer)
Restart a player after they have died. This function adds the default inventory by calling AddDefaultInventory(), finds a start location by calling (you guessed it) FindPlayerStart(). Once this has been acomplished, sets the player's stats back to defaults.
StartPlayer (PlayerPawn Other)
Start a player. Finish me
Killed (Pawn (UT) Killer, Pawn (UT) Other, name damageType)
Called when someon gets killed. This function broadcasts the death message, logs the event, and calls the ScoreKill() function.
BroadcastRegularDeathMessage (Pawn (UT) Killer, Pawn (UT) Other, name damageType)
Calls on to BroadcastLocalizedMessage().
ScoreKill (Pawn (UT) Killer, Pawn (UT) Other)
Increases the Killer's killCount and score by 1 unless it was a suicide - in which case the killed pawn loses a point.
string KillMessage (name damageType, Pawn (UT) Other) [static]
Returns " died." as a default catch all death message.
bool CanSpectate (Pawn (UT) Viewer, Actor ViewTarget)
Returns whether players are allowed to use a certain Actor as ViewTarget.
RegisterDamageMutator (Mutator M)
Adds a damage mutator at the front of the list of damage mutators.
RegisterMessageMutator (Mutator M)
Adds a message mutator at the front of the list of message mutators.
int ReduceDamage (int Damage, name DamageType, Pawn (UT) injured, Pawn (UT) instigatedBy)
This function returns a damage of 0 if the injured Pawn (UT) is in a zone that has it's bNeutralZone property set to true. Otherwise the original damage is returned.
bool ShouldRespawn (Actor Other)
Returns whether an actor item should respawn. In death matches this function should return True for weapon and item pickups.
bool PickupQuery (Pawn (UT) Other, Inventory (UT) Item)
Called when pawn has a chance to pick Item up (i.e. when the pawn touches a weapon or item pickup). Should return true if he wants to pick it up, false if he does not want it.
DiscardInventory (Pawn (UT) Other)
Discard a player's inventory after he dies.
float PlayerJumpZScaling ( )
Returns 1.0, but could be overidden for "low grav" game types
ChangeName (Pawn (UT) Other, coerce string S, bool bNameChange)
Attempt to change a players name.
bool ChangeTeam (Pawn (UT) Other, int N)
Return whether a player can change teams or not.
float PlaySpawnEffect (Inventory (UT) Inv)
Play an inventory respawn effect.
string PlayerKillMessage (name damageType, PlayerReplicationInfo Other) [static]
returns " was killed by ".
string CreatureKillMessage (name damageType, Pawn (UT) Other) [static]
returns "was killed by a "
SendPlayer (PlayerPawn aPlayer, string URL)
Send the player specified to the URL passed to the function.
RestartGame ( )
Called to restart the current game
bool AllowsBroadcast (Actor broadcaster, int Len)
Returns true if the Actor passed to the function is allowed to broadcast a message.
EndGame (string Reason)
Called at the end of the game. Is responsible for checking with the mutator function HandleEndGame() and the function SetEndCams to determine whether the ame should go into extra time. The function also closes the game logging down.
bool SetEndCams (string Reason)
Puts all player pawns into a GameEnded state and calls the clientGameEnded() function on them. The function returns true.
ResetGame ( ) [static]
finish me
bool AddBot ( )
finish me
bool ForceAddBot ( )
finish me
PlayTeleportEffect (Actor Incoming, bool bOut, bool bSound)
finish me

Native Functions

string GetNetworkNumber()
finish me
string ParseKillMessage (string KillerName, string VictimName, string WeaponName, string DeathMessage) [static]
Parses the kill message. Replaces the first occurances of %k, %o and %w with KillerName, VictimName and WeaponName respectively. (also see Message Placeholder)

Events

GameEnding ( )
This functon is called when a game is shut down. It halts any world logging and local logging.
DetailChange ( )
This function is called whenever the client changes their level of detail (high to low, or low to high). Apart from re-linking all of the zones to a SkyBox, any actors with their bHighDetailMode property set to true will be destroyed on entry to a "low detail" mode.
InitGame (string Options, out string Error)
This function is called before the Actors PreBeginPlay() function if the comment in the file is to be believed. It sets up some of the game options.
string GetBeaconText ( )
finish me
PreLogin (string Options, string Address, out string Error, out string FailCode)
Accepts or rejects a player based upon any game password vlaidation, IP bans, and current server capacity.
PlayerPawn Login (string Portal, string Options, out string Error, class<PlayerPawn> SpawnClass)
Log a player in. Fails login if you set the Error string. PreLogin is called before Login, but significant game time may pass before Login is called, especially if content is downloaded.
PostLogin (PlayerPawn NewPlayer)
Called after a successful login. This is the first place it is safe to call replicated functions on the PlayerPawn. finish me
AcceptInventory (Pawn (UT) PlayerPawn)
Called when new inventory is accepted. Calls the function AddDefaultInventory.
ScoreEvent (name EventName, Actor EventActor, Pawn (UT) InstigatedBy)
Placeholder event function.

Known subclasses

Comments

We could do with a nice time diagram showing when all of the different functions and events (including those on the mutators) get called.

Related Topics

See Function Syntax and Variable Syntax for additional background information.

The Unreal Engine Documentation Site

Wiki Community

Topic Categories

Image Uploads

Random Page

Recent Changes

Offline Wiki

Unreal Engine

Console Commands

Terminology

Mapping Topics

Mapping Lessons

UnrealEd Interface

Questions&Answers

Scripting Topics

Scripting Lessons

Making Mods

Class Tree

Questions&Answers

Modeling Topics

Questions&Answers

Log In