Once I get that upgrade to 36-hour days, I will tackle that. – Mychaeel

Difference between revisions of "XServerQuery"

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
(Where i can find it?)
(How to Install?)
Line 11: Line 11:
  
 
== How to Install? ==
 
== How to Install? ==
<under construction>
+
1. remove the old querymod, simply add at the front a semicolon.
 +
It should show so:
 +
<nowiki>;ServerActors=IpServer.UdpServerQuery</nowiki>
  
 
== Settings ==
 
== Settings ==

Revision as of 11:01, 6 June 2011

Temp Notes:

This site is in work, so pls forgive me some pointless and/or bad/no english texts.

Introduction

XServerQuery is a new Version of IpServer.UdpServerQuery.

There was some pointless commands removed and many new things added (see Query commands).

Where i can find it?

  • a link is comming soon

How to Install?

1. remove the old querymod, simply add at the front a semicolon. It should show so: ;ServerActors=IpServer.UdpServerQuery

Settings

[XServerQuery.UdpXServerQuery]
bShowProtaction=True                    // Returns True if the server is protected.
bShowCPName=True                        // if bShowProtaction=True then return the name of the CP.
bShowSpectators=True                    // Returns spectator infos.
bShowPlayerCountry=True         // Returns the players country.
Homepage=www.yourhomepage.com           // Returns your homepage if set.

Query commands

\basic\

Same like here UT_Server_Query

\info\xserverquery

In this case you not only send a QueryType, you send a QueryValue too. Only "\info\" will return old infos.

<Das hat zur folge, dass, wenn der Server XServerQuery verwendet, er dir die neuen Infos sendet, ansonsten gibt er dir die alten Infos zurück.

Damit sollte es keine probleme mit der kommunikation zwischen "alten" Browsern und "neueren" Servern bzw. umgekehrt, geben.>

Note: <einige informationen wurden entfernt, da diese entweder hier nicht gebraucht werden, oder veraltet sind und nicht mehr benutzt werden.>

\XServerQuery\XVersion
\Hostname\[Level.Game.GameReplicationInfo.ServerName]
\Hostport\[Level.Game.GetServerPort()]
\CountryS\[Country-Prefix if IpToCountry used else none]
\Protaction\[returns "False", "True", "Hidden" or eg.: "ACEv08h"]
\Password\[string(Level.ConsoleCommand("get Engine.GameInfo GamePassword")!="")]
\NumPlayers\[NumAllPlayers]
\MaxPlayers\[Level.Game.MaxPlayers + Level.Game.NumSpectators]
\GameType\[GetItemName(string(Level.Game.Class))]
\MapName\[Left(string(Level), InStr(string(Level), "."))]
\GameVer\[Level.EngineVersion]
\MinNetVer\[Level.MinNetVersion]

\rules\xserverquery

\AdminName\[Level.Game.GameReplicationInfo.AdminName]
\AdminEMail\[Level.Game.GameReplicationInfo.AdminEmail]
\Homepage\Homepage
\Spectators\[returns "Level.Game.NumSpectators/Level.Game.MaxSpectators", "False" or "Hidden"]
\NetMode\[returns "Dedicated Server" or "Listen Server"]
\GameStyle\[returns "Turbo", "Hardcore" or "Classic"]
\Tournament\[DeathMatchPlus(Level.Game).bTournament]
\MinNetVer\[Level.MinNetVersion]
\TimeLimit\[DeathMatchPlus(Level.Game).TimeLimit]

... if no TeamGame
\FragLimit\[DeathMatchPlus(Level.Game).FragLimit]
... else
\GoalTeamScore\[TeamGamePlus(Level.Game).GoalTeamScore]
\FriendlyFire\[TeamGamePlus(Level.Game).FriendlyFireScale]
\MaxTeams\[TeamGamePlus(Level.Game).MaxTeams]
\TeamName_#\[TeamGamePlus(Level.Game).Teams[#].TeamName]
\TeamScore_#\[TeamGamePlus(Level.Game).Teams[#].Score]
\TeamSize_#\[TeamGamePlus(Level.Game).Teams[#].Size]
... end if

\MapTitle\[Level.Title]
\MapAuthor\[Level.Author]
\IdealPlayerCount\[Level.IdealPlayerCount]

\MinPlayers\[DeathMatchPlus(Level.Game).MinPlayers]
\BotSkill\[class'ChallengeBotInfo'.default.Skills[Level.Game.Difficulty]]
\Mutators\[Level.Game.EnabledMutators]

\players\xserverquery

\Player_#\[P.PlayerReplicationInfo.PlayerName]
\CountryC_#\[players country-prefix or "none"]
\Ping_#\[P.ConsoleCommand("GETPING")]
\Time_#\[Play Time //FIXME:TimeSeconds are not accurate to real seconds.]
\Frags_#\[P.PlayerReplicationInfo.Score]
\Deaths_#\[P.PlayerReplicationInfo.Deaths]
\Health_#\[P.Health]
\Spree_#\[P.Spree]
\Team_#\[P.PlayerReplicationInfo.Team]
\Mesh_#\[P.Menuname]
\Skin_#\[SkinName]
\Face_#\[FaceName]

Note: The Players Time don't count like ingame and both are not accurate to real minutes.

I actually using this, maybe someone has a better solution:

// Epic has done this in Scoreboards:
	Time = Max(1, (Level.TimeSeconds + PlayerOwner.PlayerReplicationInfo.StartTime - PRI.StartTime)/60);
 
// if i use the same, it does not return the same Value. So i used this:
	GameSpeed = Level.Game.GameSpeed * 100;
	Seconds = (Level.TimeSeconds / GameSpeed) * 100;
	StartTime = (float(P.PlayerReplicationInfo.StartTime) / GameSpeed) * 100;
	TimeResult = Max(1, (Seconds - StartTime)/60);
 
	ResultSet = ResultSet$"\\Time_"$PlayerNum$"\\"$TimeResult;

\status\xserverquery

With QueryValue its something like: \info\xserverquery\rules\xserverquery\players\xserverquery

Only QueryType is like the old one: \basic\\info\\rules\\players\

\echo\

Same like here UT_Server_Query, but it returns only "\echo_replay\<your text>".

\level_property\, \game_property\ and \player_property\

This QueryType was removed, because of some secure things.