Skip to main content
Version: 5.x

Types

These are the structs, enums, and delegate types used by the Client Game Subsystem and the Blueprint async nodes. All structs are USTRUCT(BlueprintType) with BlueprintReadWrite fields, so you can break and make them in Blueprint. They live in RedwoodCore/Source/Redwood/Public/Types/; including Types/RedwoodTypes.h includes all of them.

Conventions:

  • Every ...Output struct has an Error string. Empty means success.
  • Each output struct has a matching C++ delegate typedef, named by replacing Output with OutputDelegate (e.g. FRedwoodListRealmsOutput and FRedwoodListRealmsOutputDelegate), which is a TDelegate<void(const FRedwoodListRealmsOutput&)>. Create one with CreateLambda, CreateUObject, and so on.
  • Free-form JSON (character data, party data, proxy data, global data) is a USIOJsonObject*. See Working with USIOJsonObject.
  • Timestamps are FDateTime in UTC.

Common​

TypeFields / signatureNotes
FRedwoodSocketConnectedFString ErrorResult of a Director or Realm connection
FRedwoodSocketConnectedDelegateTDelegate<void(const FRedwoodSocketConnected&)>
FRedwoodErrorOutputDelegateTDelegate<void(const FString&)>Used by requests that only report success or failure. The Blueprint output pin carries FString Error.
FRedwoodDelegate / FRedwoodDynamicDelegateno parametersUsed by events like OnDirectorConnectionLost

The macros RW_ENUM_TO_STRING(EnumValue) and RW_STRING_TO_ENUM(EnumType, String) convert enums to and from their value names (C++ only).

Auth​

TypeFieldsNotes
ERedwoodAuthUpdateTypeSuccess, MustVerifyAccount, Error, Unknown
FRedwoodAuthUpdateERedwoodAuthUpdateType Type (default Unknown), FString MessageMessage holds the error text; it's empty on Success
FRedwoodAuthUpdateDelegateTDelegate<void(const FRedwoodAuthUpdate&)>

Realms​

TypeFieldsNotes
FRedwoodRealmFString Id, FDateTime CreatedAt, FDateTime UpdatedAt, FString Name, FString Uri, bool bListed, FString SecretName is the realm instance config's name. Uri is the Realm Frontend websocket URI. Secret is always empty on the client.
FRedwoodListRealmsOutputFString Error, TArray<FRedwoodRealm> Realms

Characters​

TypeFieldsNotes
FRedwoodCharacterBackendFString Id, FDateTime CreatedAt, FDateTime UpdatedAt, bool bArchived, FDateTime ArchivedAt, FString PlayerId, FString Name, USIOJsonObject* CharacterCreatorData, USIOJsonObject* Metadata, USIOJsonObject* EquippedInventory, USIOJsonObject* NonequippedInventory, USIOJsonObject* Progress, USIOJsonObject* Data, USIOJsonObject* AbilitySystem, USIOJsonObject* RedwoodDataA PlayerCharacter. CharacterCreatorData is the only data field clients can write; the rest are written by game servers. RedwoodData is internal to Redwood (e.g. the last location used for zone travel); don't modify it. See Player Data.
FRedwoodListCharactersOutputFString Error, TArray<FRedwoodCharacterBackend> Characters
FRedwoodGetCharacterOutputFString Error, FRedwoodCharacterBackend Character

Players and Friends​

TypeFieldsNotes
ERedwoodFriendListTypeAll, Active, PendingAll, PendingReceived, PendingSent, Blocked, Inactive, UnknownThe filter for ListFriends and the FriendshipState of a player
FRedwoodServerDetailsFString RealmName, FString ProxyId, FString InstanceId, FString ZoneName, FString ShardNameDescribes a game server. Also returned by URedwoodGameStateComponent::GetServerDetails() on clients connected to a server.
FRedwoodPlayerOnlineStateRealmeverything in FRedwoodServerDetails, plus FString CharacterIdWhere a friend is playing. InstanceId isn't filled in for friends.
FRedwoodPlayerFString PlayerId, FString Nickname, ERedwoodFriendListType FriendshipState, bool bOnline, bool bPlaying, FRedwoodPlayerOnlineStateRealm OnlineStateRealmbOnline means connected to the Director; bPlaying means also playing in a realm (then OnlineStateRealm is filled)
FRedwoodListPlayersOutputFString Error, TArray<FRedwoodPlayer> PlayersOutput of SearchForPlayers and ListFriends
FRedwoodPlayerOutputFString Error, FRedwoodPlayer PlayerOutput of SearchForPlayerById
FRedwoodPlayerDataFString Id, FString Nickname, bool bSelectedGuildValid, FRedwoodGuildInfo SelectedGuild, USIOJsonObject* DataThe PlayerIdentity as seen by game servers (URedwoodPlayerStateComponent::RedwoodPlayer)
note

Older versions used FRedwoodFriend and FRedwoodListFriendsOutput; they redirect to FRedwoodPlayer and FRedwoodListPlayersOutput.

Realm Contacts​

TypeFieldsNotes
FRedwoodRealmContactFString CharacterId, FString CharacterName, FString Description
FRedwoodListRealmContactsOutputFString Error, TArray<FRedwoodRealmContact> Contacts, TArray<FRedwoodRealmContact> BlockedContacts

Servers​

TypeFieldsNotes
FRedwoodGameServerProxyId, CreatedAt, UpdatedAt, EndedAt, bEnded, Name, ModeId, MapId, bContinuousPlay, Password, ShortCode, MaxPlayersPerShard, Data (USIOJsonObject*), OwnerPlayerId, Region, bStartOnBoot, TArray<FString> Zones, NumPlayersToAddShard (-1 = no sharding), NumMinutesToDestroyEmptyShard (-1 = never), bPublic, bProxyEndsWhenCollectionEnds, bCollectionEndsWhenAnyShardEnds, bHasPassword, CurrentPlayers, ActiveCollectionIdA GameServerProxy as returned by ListProxies. ModeId is the game profile ID. ActiveCollectionId is empty when no servers are running.
FRedwoodGameServerInstanceId, CreatedAt, UpdatedAt, ProviderId, StartedAt, EndedAt, bEnded, Connection, Channel, ZoneName, ShardName, ContainerId, CollectionIdA single game server (GameServerInstance). Channel is <zone>:<shard>. Mostly used server side.
FRedwoodCreateProxyInputsee belowInput to CreateProxy
FRedwoodListProxiesOutputFString Error, TArray<FRedwoodGameServerProxy> Proxies
FRedwoodCreateProxyOutputFString Error, FString ProxyReferenceProxyReference is the new proxy's ID
FRedwoodJoinServerOutputFString Error, FString ConnectionUri, FString TokenInformational; the client travels automatically from the backend's push
FRedwoodConnectToServerDynamicDelegate(FString ConsoleCommand)Signature of OnRequestToJoinServer
FRedwoodStitchToServerDynamicDelegate(FURL URL)Signature of the interface-only OnRequestToStitchServer

FRedwoodCreateProxyInput​

FieldTypeDefaultMeaning
NameFStringDisplay name; must be unique among active proxies in the realm
RegionFStringRegion name (a key from GetRegions())
ModeIdFStringThe game profile id
MapIdFStringemptyOptional map ID (a URedwoodMapAsset Redwood ID); empty picks from the profile's zone maps
bPublicboolfalseWhether it shows up in other players' ListProxies
bProxyEndsWhenCollectionEndsbooltrueEnd the proxy entirely when its game servers end (typical for lobbies and matches). Set false for worlds that should survive server restarts.
bContinuousPlayboolfalsePassed to the game server as continuousPlay; for games that keep cycling matches on the same server
PasswordFStringemptyOptional join password
ShortCodeFStringemptyOptional short code players can use to join (also usable as a ProxyReference)
DataUSIOJsonObject*nullOptional custom data stored with the proxy
bStartOnBootboolfalseRestart this proxy whenever the backend boots. Admins only.

Ticketing​

TypeFieldsNotes
ERedwoodTicketingUpdateTypeJoinResponse, Update, TicketError, UnknownJoinResponse with an empty Message means the ticket was accepted
FRedwoodTicketingUpdateERedwoodTicketingUpdateType Type, FString Message
FRedwoodTicketingUpdateDelegateTDelegate<void(const FRedwoodTicketingUpdate&)>

Parties​

TypeFieldsNotes
FRedwoodPartyInviteFString Id, FString FromPlayerId, FString FromPlayerNameId is the inviting party's ID; pass it to RespondToPartyInvite
FRedwoodPartyMemberCharacterFString Id, FString Name, CharacterCreatorData, Metadata, EquippedInventory, NonequippedInventory, Progress, Data, AbilitySystem (all USIOJsonObject*)Only the fields listed in realm.instances.<key>.parties.included-character-fields are filled (by default characterCreatorData and metadata)
FRedwoodPartyMemberFString PlayerId, FString Nickname, bool bInstanceIdValid, FString InstanceId, FRedwoodPartyMemberCharacter CharacterInstanceId is the game server the member is currently on, if any
FRedwoodPartybool bValid, FString Id, FString LootType, USIOJsonObject* Data, FString LeaderId, TArray<FRedwoodPartyMember> MembersbValid == false means "not in a party"
FRedwoodGetPartyOutputFString Error, FRedwoodParty Party
FRedwoodListPartyInvitesOutputFString Error, TArray<FRedwoodPartyInvite> Invites
Event signaturesFRedwoodPartyInvitedDynamicDelegate(FRedwoodPartyInvite Invite), FRedwoodPartyUpdatedDynamicDelegate(FRedwoodParty Party), FRedwoodPartyEmoteReceivedDynamicDelegate(const FString& PlayerId, const FString& Emote)
Known issue (5.0.0)

FRedwoodPartyMemberCharacter::AbilitySystem is always null, even when abilitySystem is in included-character-fields.

Guilds and Alliances​

TypeFieldsNotes
ERedwoodGuildInviteTypePublic (anyone can join), Admin (only guild admins can invite), Member (any member can invite), Unknown
ERedwoodGuildAndAllianceMemberStateNone, Invited, Member, Banned, Admin, UnknownA player's state in a guild, or a guild's state in an alliance
FRedwoodGuildId, CreatedAt, UpdatedAt, Name, Tag, ERedwoodGuildInviteType InviteType, bool bListed, bool bMembershipPublicbListed: appears in lists and searches. bMembershipPublic: non-members can see the member list.
FRedwoodGuildAllianceMembershipAllianceId, AllianceName, ERedwoodGuildAndAllianceMemberState GuildState
FRedwoodGuildInfoFRedwoodGuild Guild, ERedwoodGuildAndAllianceMemberState PlayerState, TArray<FRedwoodGuildAllianceMembership> AlliancesPlayerState is the current player's state in that guild
FRedwoodListGuildsOutputFString Error, TArray<FRedwoodGuildInfo> Guilds
FRedwoodGetGuildOutputFString Error, FRedwoodGuildInfo Guild
FRedwoodGuildPlayerFString Id, FString NameName is the nickname, or the character name when guilds are realm-scoped
FRedwoodGuildPlayerMembershipFRedwoodGuildPlayer Player, ERedwoodGuildAndAllianceMemberState PlayerState
FRedwoodListGuildMembersOutputFString Error, TArray<FRedwoodGuildPlayerMembership> Members
FRedwoodCreateGuildOutputFString Error, FString GuildId
FRedwoodAllianceId, CreatedAt, UpdatedAt, Name, bool bInviteOnly
FRedwoodListAlliancesOutputFString Error, TArray<FRedwoodAlliance> Alliances, TArray<ERedwoodGuildAndAllianceMemberState> GuildStatesGuildStates is only filled when a guild filter is used, and lines up index by index with Alliances
FRedwoodCreateAllianceOutputFString Error, FString AllianceId
FRedwoodAllianceGuildMembershipFRedwoodGuild Guild, ERedwoodGuildAndAllianceMemberState GuildState
FRedwoodListAllianceGuildsOutputFString Error, TArray<FRedwoodAllianceGuildMembership> Guilds

Global Data, Blobs, and SaveGames​

TypeFieldsNotes
FRedwoodGetGlobalDataOutputFString Error, int32 Id (default -1), USIOJsonObject* Data
FRedwoodGetBlobOutputFString Error, TArray<uint8> BlobServer only
FRedwoodGetSaveGameOutputFString Error, USaveGame* SaveGameServer only

Sync and Server Internals​

These are used by the game server side of the plugin. You'll rarely touch them directly; see Persistence and Sync.

TypeFields
FRedwoodSyncItemStateFString Id (the item's Redwood ID), FString TypeId (its URedwoodSyncItemAsset type ID), bool bDestroyed, FString ZoneName (the zone that owns it)
FRedwoodSyncItemMovementFTransform Transform
FRedwoodSyncItemFRedwoodSyncItemState State, FRedwoodSyncItemMovement Movement, USIOJsonObject* Data
FRedwoodInitialLoadDataUSIOJsonObject* Data (world data), USIOJsonObject* ZoneData (zone data), TArray<FRedwoodSyncItem> Items (persisted sync items), loaded by a game server when it starts a zone

Save Game​

URedwoodSaveGame (RedwoodSaveGame.h) is the USaveGame the client uses for Remember Me. It's stored in the slot named RedwoodSaveGame, user index 0, and has two fields: FString Username and FString AuthToken. Redwood writes it on every login and logout; you don't need to use it directly.

Working with USIOJsonObject​

USIOJsonObject comes from the SIOJson module of the bundled SocketIOClient plugin. It's a Blueprint-friendly wrapper around Unreal's FJsonObject. C++ users who touch it need SIOJson in their Build.cs dependencies.

Blueprint:

NodeUse
Construct Json ObjectCreates an empty object
Struct To Json ObjectConverts any struct (wildcard input) to a JSON object; use this for CreateCharacter's creator data
Json Object To StructFills a struct from a JSON object; returns true if every property was found
Get/Set String Field, Get/Set Number Field, Get/Set Bool Field, Get/Set Object Field, and the array variantsRead and write individual fields
Encode Json / Decode JsonConvert to and from a JSON string

C++:

#include "SIOJsonObject.h"
#include "SIOJConvert.h"

// Struct -> USIOJsonObject
FMyCreatorData Creator;
USIOJsonObject* Json = NewObject<USIOJsonObject>();
Json->SetRootObject(USIOJConvert::ToJsonObject(FMyCreatorData::StaticStruct(), &Creator));

// USIOJsonObject -> struct
FMyCreatorData Parsed;
USIOJConvert::JsonObjectToUStruct(Json->GetRootObject(), FMyCreatorData::StaticStruct(), &Parsed);

USIOJLibrary::StructToJsonObject is a Blueprint-only custom thunk; don't call it from C++.

Things to know:

  • Field names are converted with Unreal's JSON conventions: the first letter is lowercased (a SchemaVersion property is stored as schemaVersion), and reading back is case-insensitive.
  • Blueprint struct field names are stored without their GUID suffixes, and Blueprint enums are stored as their display names.
  • The UObject number API uses float, so integers above 16,777,216 lose precision. In C++, use GetRootObject()->GetNumberField(...) (a double) for large numbers.