I'm a doctor, not a mechanic

UE2:UT2K4GameProfile instance functions (UT2004)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UT2004 Object >> GameProfile >> UT2003GameProfile >> UT2K4GameProfile (instance functions)

;Other member categories for this class::properties, structs

Instance functions

AddHistoryRecord

function AddHistoryRecord (GameInfo Game, PlayerReplicationInfo PRI, UT2K4MatchInfo MI)

Adds the current match info to the history table

AddTeammate

function bool AddTeammate (string botname)

Overrides: GameProfile.AddTeammate

add teammate to the next available position on the team return false if not added because already on team or no room assumes it's a legal player record

CanChangeTeam

function bool CanChangeTeam (Controller Other, int NewTeam)

Overrides: GameProfile.CanChangeTeam

never allow team change unless we're god

CheatSkipMatch

function CheatSkipMatch (GameInfo CurrentGame)

Overrides: GameProfile.CheatSkipMatch


completedLadder

function bool completedLadder (int LadderId)

return true when the ladder has been completed

ContinueSinglePlayerGame

function ContinueSinglePlayerGame (LevelInfo level, optional bool bReplace)

Overrides: UT2003GameProfile.ContinueSinglePlayerGame

Called on gamerestart

CreateProfile

function CreateProfile (PlayerController PlayerOwner)

call this when you create a new profile, this will set the protection data

enableLadder

function enableLadder (int ladderId)

Enable a ladder, this makes sure a ladder is not reset Special case, ladderid=-1 this will set all ladders except the championship

GetAltLevel

function byte GetAltLevel (int ladder, int rung)

get the alternative match ID

GetAltTeamRoster

function bool GetAltTeamRoster (string TeamRosterName, out array<stringresult)

get the alternative team roster

GetBotPosition

function int GetBotPosition (string botname, optional bool bAdd)

return the position of the bot in the botstats array

GetBotPrice

function int GetBotPrice (optional string botname, optional int botid, optional float increase, optional bool bAdd)

Find the price of this player If increase > 1 increase the fee with that amouth if 1 > increase > 0 multiply the fee with that amouth if increase == 0 do nothing

GetChallengeGame

function class<ChallengeGameGetChallengeGame (optional string ClassName)

return a random or selected challenge game

GetCustomLadder

function int GetCustomLadder (string LadderName)

return the id of a custom ladder

GetCustomLadderProgress

function int GetCustomLadderProgress (string LadderName)

get the progres of a custom ladder

GetEnemyTeamName

function string GetEnemyTeamName (string MagicString)

Return the team name based on a magic string A magic string starts with a ';', if not asume it's a real team name

GetLadderDescription

function string GetLadderDescription (int LadderId, optional int MatchId)

returns the friendly name of the gametype selected

GetMatchDescription

function string GetMatchDescription ()

Overrides: GameProfile.GetMatchDescription

Get the friendly game type name

GetMatchInfo

function MatchInfo GetMatchInfo (int ladder, int rung)

Overrides: GameProfile.GetMatchInfo

Overwritten to get alt matches

GetMaxTeamSize

function int GetMaxTeamSize ()

return the maximum size of a team that you manage

getMinimalEntryFeeFor

function int getMinimalEntryFeeFor (UT2K4MatchInfo MI, optional bool bIgnoreHealth)

get the minimal fee for this match, based on the entry fee for the match and the minimal fee to pay out to your team mates if you lose. If you don't have enough team mates the result is negative

getMinimalTeamFee

function float getMinimalTeamFee (int members, optional bool bIgnoreHealth)

return the minimal fee for x team members, only uses team mates that are healthy

GetNumTeammatesForMatch

function int GetNumTeammatesForMatch ()

Overrides: GameProfile.GetNumTeammatesForMatch

return number of teammates needed for currently selected match assumes player team always gets an odd player

GetNumTeammatesForMatchInfo

function int GetNumTeammatesForMatchInfo (MatchInfo M)

return number of teammates needed for the provided assumes player team always gets an odd player

GetSelectedLevel

function int GetSelectedLevel (int ladder, int rung)

return the level ID selected, or -1 if no selection

GetSelectedMatchInfo

function UT2K4MatchInfo GetSelectedMatchInfo (int ladder, int rung, int selection, optional bool bOrig)

return a selected UT2K4MatchInfo record

GetTeamPosition

function int GetTeamPosition (string teamname, optional bool bAdd)

Find the position of this team in the list

HasAltLevel

function bool HasAltLevel (int ladder, int rung)

check if there is an alternative level

HasFullTeam

function bool HasFullTeam ()

Returns true when the player has a full team

Initialize

function Initialize (GameInfo currentGame, string pn)

Overrides: GameProfile.Initialize

initialize the profile, called at the beginning of each game

InjureTeamMate

function InjureTeamMate (optional int Number)

Find the worst team mate(s) and injure it Only one injury is supported

IsCheater

function bool IsCheater ()

return true of the Cheat flag has been set

IsLocked

function bool IsLocked ()

return if a profile has been locked out for character unlocking

IsTeamGametype

function bool IsTeamGametype (string gametype)

return true if it's a team game type

IsTeammate

function bool IsTeammate (string botname)

Return true if the bot is a teammate

LengthOfLadder

function int LengthOfLadder (int LadderId)

return the length of a selected ladder

LoadProfile

function LoadProfile (PlayerController PlayerOwner)

call this when you load the profile, it will lock the profile when the PlayerIDHash has changed

openChampionshipLadder

function bool openChampionshipLadder ()

return true when the ChampionshipLadder is within reach

PayTeamMates

function float PayTeamMates (int Money, float FeeModifier, optional int IncreaseFeeOf, optional float updateFee)

Pay out the participating team mates and increase their fee A percentage of the match earnings is added/removed from their fee IncreaseFeeOf = number of team mates to pay updateFee = percentage to increase the fee Return the total payment

procLastMatchDetails

function procLastMatchDetails (GameInfo currentGame, PlayerReplicationInfo PRI, UT2K4MatchInfo MI)

Generate stats for the last match, all except the balance change

procPhantomMatches

function procPhantomMatches (int games)

Create information about other matches played by other teams

RandomIncreaseBotFee

function RandomIncreaseBotFee (int TeamId, float updateFee)

Increase fee of a few bots that belong to TeamId

RankTeamMates

function RankTeamMates (GameInfo Game, PlayerReplicationInfo Me)

Rank team mates based on how they did in the last match

RegisterCustomLadder

function RegisterCustomLadder (string LadderName)

add a new custom ladder

RegisterGame

function RegisterGame (GameInfo currentGame, PlayerReplicationInfo PRI)

Overrides: GameProfile.RegisterGame

After a game is completed, this function should be called to record the player's statistics and update the ladder. Currently called from Deathmatch 'MatchOver' state

ReleaseTeammate

function bool ReleaseTeammate (string botname)

Overrides: GameProfile.ReleaseTeammate

remove teammate from the team return false if not removed because not on team

ReportCheat

function ReportCheat (PlayerController Cheater, string cheat)

Overrides: GameProfile.ReportCheat

Will be called in case of a cheat

ResetSelectedLevel

function ResetSelectedLevel (int ladder, int rung)

remove a previous set selection

SetAltTeamRoster

function SetAltTeamRoster (string TeamRosterName, array<stringNewRoster)

set the alternative team roster

SetCustomLadderProgress

function SetCustomLadderProgress (string LadderName, int increase)

set the progress of a custom ladder

SetSelectedLevel

function SetSelectedLevel (int ladder, int rung, byte id)

set a level selection

StartNewMatch

function StartNewMatch (int PickedLadder, LevelInfo CurrentLevel)

Overrides: GameProfile.StartNewMatch

Send the player to the next match in the given ladder

StoredPlayerID

function string StoredPlayerID ()

return the stored player id, use this to check a profile before loading it

UpgradeGP

function UpgradeGP ()