Implement Nodecraft Interfaces
DISCLAIMER: Documentation for our Unreal Engine Plugin is under construction and subject to change while the SDK is in technical preview.
For Nodecraft Studio to be able to keep the state of your game servers in sync with our own services, you will need to implement a limited number of various interfaces.
INodecraftPlayer
HOW
-
Add this interface to any APlayerController that remote players use when connecting to and while playing on your game’s servers. It is recommended that you use some kind of BasePlayerController to avoid reproducing code across multiple player controllers.
-
Implement the five getters and setters in this interface.
You are free to store and retrieve these attributes in whatever matter you like, whether they’re on the APlayerController, APlayerState, or somewhere else. They do not need to be replicated to the client.
-
Add the
NodecraftCommon
module to your project's Public or Private dependencies as needed.
WHAT IS IT
- This is an interface that must be implemented on any APlayerController actors that remote players use when connecting to and while playing on your game’s servers.
- It is responsible for getting and setting three properties associated with the player:
- The player’s Join Token, which is digested upon login by your Game Mode (see below).
- The player’s Session ID. This is the main identifier used to identify the player when they join or leave the server or when Nodecraft Studio reports that a player should be Kicked from the server, either due to a kick or a ban being applied.
- The player’s Analytics Session ID, which is used for tracking analytics based events in Nodecraft Studio.
- The player's Nodecraft Player ID, which uniquely identifies them for purposes of performing moderation actions like kicks and bans.
- The player's IP Address, which is used to re-identify the player when they reconnect after server travel, thus preventing them from having to re-validate themselves.
- It is responsible for getting and setting three properties associated with the player:
Any APlayerControllers that fail to implement this interface will be automatically kicked from your server as soon as the player logs in to the server.
At the time of writing, INodecraftPlayer is only implementable in C++. Soon, you will be able to use it in blueprint-based PlayerControllers.
Updated 6 months ago