UnrealTournament package for publishing selected game events to an HTTP Endpoint.
Version: 0.3.2-alpha
Author: Orel Eraki
Email: orel.eraki@gmail.com
Can be found at changelog.txt
- Core
- Engine
- IpDrv
- Botpack
- UBrowser
First copy GameEventsPublisher.u and GameEventsPublisher.int into System folder.
There are 2 options for loading the package.
- ServerActor: For always loading when game starts, add it to ServerActors as follow
Under
[Engine.GameEngine]
add a new line. Should look like this
[Engine.GameEngine]
# All existing lines of code..
ServerActors=GameEventsPublisher.GameEventsPublisherSA
- Mutator: For only loading it when you want to.
Name:
GameEventsPublisher.GameEventsMutator
- Remove or Replace configuration properties of TeamInfoJson and PlayerInfoJson as below. Configuration
The following are the default configuration which will be saved at initial loading.
[GameEventsPublisher.GameEventsConfig]
bEnabled=True
Host=localhost
Port=7790
Path=
PasswordHeaderName=Authorization
Password=
Debug=False
WaitingPlayersIntervalInSecs=60
WaitingPlayersIntervalInSecsExpired=600
TeamInfoJson=%Index%,%Name%,%Score%
PlayerInfoJson=%Id%,%Index%,%Name%,%Score%,%Ready%,%Password%,%Team%,%DieCount%,%KillCount%,%Spree%
Request are sent in the form of HTTP/1.0 POST request with payload body in JSON format. They will be sent to "http://Host:Port/Path"
Name | Description |
---|---|
WaitingPlayers | When map is loaded and every WaitingPlayersIntervalInSecs Interval. |
WaitingPlayersEnd | After configuration(WaitingPlayersIntervalInSecsExpired ) has reached. |
MatchStarted | Players started playing. |
FlagCapture | Flag has been captured. When occur InstigatorId will be populated with PlayerId. |
MatchEnded | Match ended. |
Note: All events are sent in capital letters.
{
"Name": "MATCHENDED",
"InstigatorId": -1,
"IP": "0.0.0.0:7777",
"GameType": "CTFGame",
"Map": "CTF-NaliTown",
"GamePassword": "",
"TimeSeconds": 120,
"TimeLimit": 1,
"FragLimit": 0,
"RemainingTime": 0,
"GoalTeamScore": 3,
"MaxPlayers": 10,
"NumPlayers": 2,
"MaxTeams": 2,
"Pauser": "",
"MatchStarted": false,
"MatchEnded": true,
"Teams": {
"Red": {
"Index": 0,
"Name": "Red",
"Score": 1
},
"Blue": {
"Index": 1,
"Name": "Blue",
"Score": 0
}
},
"Players": [
{
"Id": 0,
"Index": 0,
"Name": "Player1",
"Score": 8,
"Ready": false,
"Password": "",
"Team": 0,
"DieCount": 0,
"KillCount": 1,
"Spree": 1
},
{
"Id": 1,
"Index": 1,
"Name": "Player2",
"Score": -1,
"Ready": false,
"Password": "",
"Team": 1,
"DieCount": 2,
"KillCount": 0,
"Spree": 0
}
]
}