Mostly Harmless

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[edit]

AddHistoryRecord[edit]

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

Adds the current match info to the history table

AddTeammate[edit]

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[edit]

function bool CanChangeTeam (Controller Other, int NewTeam)

Overrides: GameProfile.CanChangeTeam

never allow team change unless we're god

CheatSkipMatch[edit]

function CheatSkipMatch (GameInfo CurrentGame)

Overrides: GameProfile.CheatSkipMatch


completedLadder[edit]

function bool completedLadder (int LadderId)

return true when the ladder has been completed

ContinueSinglePlayerGame[edit]

function ContinueSinglePlayerGame (LevelInfo level, optional bool bReplace)

Overrides: UT2003GameProfile.ContinueSinglePlayerGame

Called on gamerestart

CreateProfile[edit]

function CreateProfile (PlayerController PlayerOwner)

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

enableLadder[edit]

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[edit]

function byte GetAltLevel (int ladder, int rung)

get the alternative match ID

GetAltTeamRoster[edit]

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

get the alternative team roster

GetBotPosition[edit]

function int GetBotPosition (string botname, optional bool bAdd)

return the position of the bot in the botstats array

GetBotPrice[edit]

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[edit]

function class<ChallengeGameGetChallengeGame (optional string ClassName)

return a random or selected challenge game

GetCustomLadder[edit]

function int GetCustomLadder (string LadderName)

return the id of a custom ladder

GetCustomLadderProgress[edit]

function int GetCustomLadderProgress (string LadderName)

get the progres of a custom ladder

GetEnemyTeamName[edit]

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[edit]

function string GetLadderDescription (int LadderId, optional int MatchId)

returns the friendly name of the gametype selected

GetMatchDescription[edit]

function string GetMatchDescription ()

Overrides: GameProfile.GetMatchDescription

Get the friendly game type name

GetMatchInfo[edit]

function MatchInfo GetMatchInfo (int ladder, int rung)

Overrides: GameProfile.GetMatchInfo

Overwritten to get alt matches

GetMaxTeamSize[edit]

function int GetMaxTeamSize ()

return the maximum size of a team that you manage

getMinimalEntryFeeFor[edit]

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[edit]

function float getMinimalTeamFee (int members, optional bool bIgnoreHealth)

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

GetNumTeammatesForMatch[edit]

function int GetNumTeammatesForMatch ()

Overrides: GameProfile.GetNumTeammatesForMatch

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

GetNumTeammatesForMatchInfo[edit]

function int GetNumTeammatesForMatchInfo (MatchInfo M)

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

GetSelectedLevel[edit]

function int GetSelectedLevel (int ladder, int rung)

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

GetSelectedMatchInfo[edit]

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

return a selected UT2K4MatchInfo record

GetTeamPosition[edit]

function int GetTeamPosition (string teamname, optional bool bAdd)

Find the position of this team in the list

HasAltLevel[edit]

function bool HasAltLevel (int ladder, int rung)

check if there is an alternative level

HasFullTeam[edit]

function bool HasFullTeam ()

Returns true when the player has a full team

Initialize[edit]

function Initialize (GameInfo currentGame, string pn)

Overrides: GameProfile.Initialize

initialize the profile, called at the beginning of each game

InjureTeamMate[edit]

function InjureTeamMate (optional int Number)

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

IsCheater[edit]

function bool IsCheater ()

return true of the Cheat flag has been set

IsLocked[edit]

function bool IsLocked ()

return if a profile has been locked out for character unlocking

IsTeamGametype[edit]

function bool IsTeamGametype (string gametype)

return true if it's a team game type

IsTeammate[edit]

function bool IsTeammate (string botname)

Return true if the bot is a teammate

LengthOfLadder[edit]

function int LengthOfLadder (int LadderId)

return the length of a selected ladder

LoadProfile[edit]

function LoadProfile (PlayerController PlayerOwner)

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

openChampionshipLadder[edit]

function bool openChampionshipLadder ()

return true when the ChampionshipLadder is within reach

PayTeamMates[edit]

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[edit]

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

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

procPhantomMatches[edit]

function procPhantomMatches (int games)

Create information about other matches played by other teams

RandomIncreaseBotFee[edit]

function RandomIncreaseBotFee (int TeamId, float updateFee)

Increase fee of a few bots that belong to TeamId

RankTeamMates[edit]

function RankTeamMates (GameInfo Game, PlayerReplicationInfo Me)

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

RegisterCustomLadder[edit]

function RegisterCustomLadder (string LadderName)

add a new custom ladder

RegisterGame[edit]

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[edit]

function bool ReleaseTeammate (string botname)

Overrides: GameProfile.ReleaseTeammate

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

ReportCheat[edit]

function ReportCheat (PlayerController Cheater, string cheat)

Overrides: GameProfile.ReportCheat

Will be called in case of a cheat

ResetSelectedLevel[edit]

function ResetSelectedLevel (int ladder, int rung)

remove a previous set selection

SetAltTeamRoster[edit]

function SetAltTeamRoster (string TeamRosterName, array<stringNewRoster)

set the alternative team roster

SetCustomLadderProgress[edit]

function SetCustomLadderProgress (string LadderName, int increase)

set the progress of a custom ladder

SetSelectedLevel[edit]

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

set a level selection

StartNewMatch[edit]

function StartNewMatch (int PickedLadder, LevelInfo CurrentLevel)

Overrides: GameProfile.StartNewMatch

Send the player to the next match in the given ladder

StoredPlayerID[edit]

function string StoredPlayerID ()

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

UpgradeGP[edit]

function UpgradeGP ()