Hello

This thread describes how to use the admin system



The server requires a privileges.xml file to be present inside the Assets folder (next to all the .pak files)

The file should already be present on your server where you only need to add the SteamIDs that should have admin status. You should be able to select the file on the G-Portal website under Configuration Files. If you are unable to select the file there, you will have to connect to your server via FTP and transfer the file to the server. You can find the connection details (username, password, IP and port) on the G-Portal website after having logged in and selected your server.

Contents of the file:

Code:
<Privileges>
	<Privilege Name="Moderator">
		<SteamIDs>
			<SteamID id="1234567890123457" showColors="1"/> <!-- Name here -->
			<SteamID id="1234567890123458" showColors="1"/> <!-- Name here -->
		</SteamIDs>
		<Commands>
			<Command Name="Lobby.Kick.RichId"/>
			<Command Name="weather.stormfactor.setnewtarget"/>
			<Command Name="e_timeofday"/>
			<Command Name="sv_say"/>
			<Command Name="Platform.Server.Password"/>
			<Command Name="Platform.Session.Name"/>
			<Command Name="Admin.ShowAdminStatus"/>
		</Commands>
	</Privilege>
	<Privilege Name="Administrator">
		<SteamIDs>
			<SteamID id="1234567890123459" showColors="1"/> <!-- Name here -->
		</SteamIDs>
		<Commands bHasPrevious="true">
			<Command Name="Lobby.Ban.RichId"/>
			<Command Name="game.skirmish.setnextarea"/>
			<Command Name="game.skirmish.forceendround"/>
		</Commands>
	</Privilege>
	<Privilege Name="Senior Administrator">
		<SteamIDs>
			<SteamID id="1234567890123456" showColors="1"/> <!-- Name here -->
		</SteamIDs>
		<Commands bHasPrevious="true">
			<Command Name="g_teamSizeMaxUserPercentageDifference"/>
		</Commands>
	</Privilege>
	<Privilege Name="Custom Privilege Rank">
		<SteamIDs>
			<SteamID id="12345678901234569" showColors="1"/> <!-- Name here -->
		</SteamIDs>
		<Commands bHasPrevious="true">
			
		</Commands>
	</Privilege>
</Privileges>
Complex setup with multiple admin ranks
Download XML file: https://www.dropbox.com/s/g32e9po33w...leges.xml?dl=0

Simple setup with just one admin rank that can use all the specified commands
Download XML file: https://www.dropbox.com/s/nar7kobktb...leges.xml?dl=0

Notice the various groups <Privilege Name="Administrator">. These groups allow you to have different ranks of moderators with different abilities, defined by the commands in that group <Command Name="kick"/>. If bHasPrevious is set to true is defined <Commands bHasPrevious="true">. This group will also be able to use the commands from the previous group.

You can remove any group you want, incase you wanted all admins to have the same abilities. You can also add new groups if lets say, you wanted to have 10 different admin tiers.

Here is a list of commands that might be useful, though technically, any command can be added. The UI is currently hardcoded to always list the same buttons, the buttons will however only function if the related commands are available for that particular users Admin Group. If you add commands that are not available in the UI, they can be triggered by typing them in the console like so: admin.command e_timeofday 11.5

We'll add more examples later

  • Lobby.Kick.RichId //Kicks someone. - Syntax: admin.command Lobby.Kick.RichId [SteamID64] "[Reason]" Example: admin.command Lobby.Kick.RichId 1234567890123456 "He was trolling"
  • Lobby.Ban.RichId //Bans someone. - Syntax: admin.command Lobby.Ban.RichId [SteamID64] "[Reason]" [Duration in minutes] Example: admin.command Lobby.Ban.RichId 1234567890123456 "He was trolling" 60
  • e_timeofday //Changes the current time of day. - Syntax: admin.command e_timeofday [0-24] Example: admin.command e_timeofday 11.5
  • weather.stormfactor.setnewtarget //Sets a new target for the weather system to slowly move towards, more or less 30 minutes later, a new stormfactor target will randomly be generated. - Syntax: admin.command weather.stormfactor.setnewtarget [0.0 - 1.0] Example: admin.command weather.stormfactor.setnewtarget 0.6
  • g_teamSizeMaxUserPercentageDifference //Controls how much of a percentage, the teams can be offset in terms of amount of players. Set to 1 to completely disable auto balance. - Syntax: admin.command g_teamSizeMaxUserPercentageDifference [0.0 - 1.0] Example: admin.command g_teamSizeMaxUserPercentageDifference 0.03


How to find SteamIDs

The SteamID is located in the url once a player has been found and selected
Steam Search: https://steamcommunity.com/search/users/

If the players SteamID from the previous link is not a number, then use this method, insert the whole steam URL from the previous URL
The SteamID to use is the numbers in steamID64
SteamID Finder: https://steamidfinder.com/

When changing skirmish area, you can in the console type game.skirmish.areas which will print the available skirmish areas for the current map, in the console. Next to each skirmish area is a number. For example on Antietam, Dunker Church has number 11. So to switch to that skirmish area. Press E, then enter 11 in the text field to the left of the button Set Next Skirmish Area. Click the button. If you then let the current skirmish area play to the end, the next area will be the specified one. You can however also click Force End Round, which will immediately end the current round and switch to the next round. If no area has been set by an admin, Force End Round simply just moves the game on to the next skirmish area in line.

Players are added to these groups inside <SteamIDs> </SteamIDs> tags. Here is an example:

Code:
<SteamIDs>
	<SteamID id="1234567890123456"/> <!-- Johny -->
	<SteamID id="1234567890123457"/> <!-- Reb -->
	<SteamID id="1234567890123458"/> <!-- Charlie -->
	<SteamID id="1234567890123459"/> <!-- Joe -->
</SteamIDs>
When banning players, they will be added to a banlist.json file inside the Assets folder. For example for our official servers, banned players are added to "War of Rights Official 12 - US East.json" One way to remove a ban without having to wait for the ban to expire by time, would be to remove this file or open it and remove the particular player ban entry. A different way to unban somebody would be to connect to the server with the game and in the console, type admin.command unbanuser 2234567890123456 with the 16 digit number being the SteamID of the player to unban.