API Documentation

AOWSGameMode
AOWSGameInstance
AOWSLoginWidget
AOWSPlayerController
AOWSCharacter
AOWSTravelToMapActor
AOWSChatManager
AOWSPersistentActor
Character Stats

* Note: This documentation is a work in progress and does not currently list all of the available blueprint nodes.

AOWSGameMode

The OWS Game Mode does not contain any methods you can call directly. Inheriting your game mode from this class allows your game to accept the following command line options: ?PLX, ?PLY, ?PLZ, ?PRX, ?PRY, ?PRZ, and ?Player. These command line options are required to be able to work with the server system.

The OWS Game Mode overrides InitNewPlayer and SpawnDefaultPawnFor.

AOWSGameInstance

The Game Instance has some utility functions for loading assets dynamically and manages the Loading Dialog that is used to hide the initalization process.

TSubclassOf LoadWeaponActorClassFromPath(FString WeaponActorClassPath)


Load a Weapon Actor Class from a Path. This is used to integrate with the ARPG Inventory System and load inventory assets dynamically.

UStaticMesh* LoadStaticMeshFromPath(FString StaticMeshPath)


Load a Static Mesh from a Path. This is used to integrate with the ARPG Inventory System and load inventory assets dynamically.

USkeletalMesh* LoadSkeletalMeshFromPath(FString SkeletalMeshPath)


Load a Skeletal Mesh from a Path. This is used to integrate with the ARPG Inventory System and load inventory assets dynamically.

AOWSLoginWidget

Inherit your Login UMG Widget from the AOWSLoginWidget class to allow your widget to Login using a User Account.

LoginAndCreateSession(FString Email, FString Password)


Attempt to Login as the specified User Account and create a User Session. This User Session GUID can be used to Create Characters, Update Cosmetic Custom Character Data and Select a Character before launching your Map/Zone.

Returns the following fields from NotifyLoginAndCreateSession: UserSessionGUID (FString)

OpenCreateAccountInBrowser()


Opens a browser window and points it to the page for creating a new User Account.

AOWSPlayerController

Inherit your Player Controller from the AOWSPlayerController class to allow your Player Character to access persistent storage and move between maps.

AddOrUpdateCosmeticCustomCharacterData(FString UserSessionGUID, FString CharacterName, FString CustomFieldName, FString CustomValue)


This method saves cosmetic data to the customer character data store. This method is meant to be unsecured and run from the client side. DO NOT use this method to store any data that can affect gameplay. It is intended to be used for things like character colors and morph targets.

AddPlayerToGroup(FString PlayerGroupName, int32 GroupType, FString CharacterNameToAdd)


Add a player to a group. Creates the group if it does not already exist.

Group Types

CreateCharacter(FString UserSessionGUID, FString CharacterName, FString ClassName)


Create a new Character and attach it to the User referenced by the UserSessionGUID. ClassName is the name of the Class you setup in the management console (from the Characters tab). Classes are meant to be default values for creating characters. The purpose is to ensure that players are not able to hack their starting stats. This is needed because Characters are created from unsecured code.

GetAllCharacters(FString UserSessionGUID)


Get a list of all Characters for the currently logged in User referenced by the UserSessionGUID.

GetChatGroupsForPlayer()


Get an array of all Chat Groups that this player is a part of.

GetCosmeticCustomCharacterData(FString CharacterName)


Get cosmetic custom character data value for this Character. Custom Character Data is a dictionary (key/value pairs) for storing non-secure data about the character. DO NOT store anything that you don't want hacked using this method.

Returns the following fields from NotifyGetCosmeticCustomCharacterData: CustomCharacterData (TArray)

GetLastZoneServerToTravelTo(FString CharacterName)


Get the Zone Server to travel to based on the User referenced by the UserSessionGUID. Unlike the GetMapServerToTravelTo BP node in TravelToMapActor, this method looks up the Zone that the player was most recently on.

Returns the following fields from NotifyLastZoneServerToTravelTo: ServerAndPort (FString)

GetPlayersInGroup(FString PlayerGroupName) - Not Yet Implemented

Get an array of all players in the Player Group.

GetUserSession(FString UserSessionGUID)


Get the User Session based on the User referenced by the UserSessionGUID.

Returns the following fields from NotifyGetUserSession: CharacterName, X (Location), Y (Location), Z (Location), RX (Rotation), RY (Rotation), RZ (Rotation)

LaunchDungeon(FString MapName)


Starts up a new Dungeon Instance using [MapName] if one is not already running for this Player Group. Loop through the players in your group and call this on each of their Player Controllers on the server side. In the event that your ZoneName does not match the MapName, use the ZoneName.

Returns the following fields from NotifyLaunchDungeon: ServerAndPort (FString)

PlayerLogout()

Call this blueprint node to log the player out of the server system.

RemovePlayerFromGroup(FString PlayerGroupName, FString CharacterNameToRemove)

Remove [CharacterNameToRemove] from [PlayerGroupName]

SaveAllPlayerData()


Save all player data to persistent storage. This includes location, stats, statuses, and custom data. Call this on the Player Controller on the server side.

SavePlayerLocation()


* Note: For better performance use the batch player saving in the GameMode instead of this. Saves the player location to persistent storage. Call this periodically to keep your player position updated. You will have to determine how often to run it for your game, but once every 20 seconds seems to work well for me. Call this on the Player Controller on the server side.

TravelToMap(FString URL)


Transfer the client to a different map. Usually you will call Launch Dungeon or Get Map Server To Travel To to get the URL to pass into this blueprint node.

UserSessionSetSelectedCharacter(FString UserSessionGUID, FString SelectedCharacterName)


Sets the selected character for the current User Session. Be sure to call this prior to calling GetLastZoneServerToTravelTo.

AOWSCharacter

Inheriting from the AOWSCharacter class get you access to all the persistent character storage.

AddItemToInventory(FString InventoryName, FString ItemName, int InSlotNumber, int Quantity, int NumberOfUsesLeft, int Condition, FGuid &UniqueItemGUID)

Add an item [ItemName] to the inventory [InventoryName].

AddOrUpdateCharacterStatus(FString StatusName, int32 StatusValue, int32 StatusDurationMinutes) - Not Yet Implemented

Add a status [StatusName] with a value of [StatusValue] to persist for [StatusDurationMinutes]. If a status of the same [StatusName] already exists, the new [StatusValue] and [StatusDurationMinutes] will overwrite the existing values.

AddOrUpdateCustomCharacterData(FString CustomFieldName, FString CustomValue)

Save the key/value pair [CustomFieldName]/[CustomValue] to persistent storage and associate it with this character. All values are stored as strings so you will have to perform your own conversion to and from strings for non-string value types.

CreateInventory(FString InventoryName, int InventorySize)

Create an inventory named [InventoryName] with a number of slots equal to [InventorySize].

GetAbilityBars()


Gets a list of all the ability bars this character has. This does not get the abilities on the bars.

GetAbilityBarsAndAbilities()


Gets a list of all the ability bars this character has along with the abilities on each of the bars.

GetCharacterAbilities()


Gets a list of all abilities that have been configured. This is your complete library of all abilites (even abilities that may not be assigned to anyone).

GetCharacterStats()


Loads the character stats from persistent storage. This is usually called during your character initalization in the BeginPlay event.

GetCharacterStatuses() - Not Yet Implemented

Get an array of all statues active on this character. Statuses automatically expire in persistent storage based on the [StatusDurationMinutes] setting used when the status was added.

GetCustomCharacterData()


Get an array of custom data related to this character. This is usually called during your character initalization in the BeginPlay event. The Notify Get Custom Character Data event is called when the data has been retrieved. You can then loop through the fields and process them as required for your game. Usually you will use the values to update properties in your character class.

GetInventoryItems(FString InventoryName)

Each character can have an unlimited number of inventories. Each inventory must be referenced by a unique InventoryName. This method returns an array of all the items in the inventory. Here is the struct for each InventoryItem in the array:

ParseInventoryCustomData(FString InventoryCustomData, TArray &ItemCustomDataArray)

Parse an [InventoryCustomData] JSON string into a TArray [ItemCustomDataArray].

SaveInventory(FString InventoryName, FString InventoryData)

Save [InventoryData] to the inventory named [InventoryName].

UpdateCharacterStats()


Save the current character stats back to persistent storage. You would usually only call this after the stats of a character have changed, such as after a level up.

AOWSTravelToMapActor

This is a base class for the MyTravelToMapActor blueprint that is used as a portal to connect Zones.

GetMapServerToTravelTo(FString MapName)



Get the URL of the map server to travel to. This is usually used to build the URL to input to the Travel To Map blueprint node. This also spins up a server instance if the zone is not already running.

Returns the following fields from NotifyMapServerToTravelTo: ServerAndPort (FString)

AOWSChatManager

Inherit from this Actor and place one instance of this object on every map you want to have chat functionality.

AddOrJoinChatGroup(FString CharacterNameToAdd, FString ChatGroupName)


Add character [CharacterNameToAdd] to the chat group named [ChatGroupName]. If there isn't already a chat group with this name, then create it.

GetNewChatMessages(int32 LastChatMessageReceived)


Get an array of Chat Messages to process and distribute to clients. You will usually call this method from the AOWSChatManager object once every 5 seconds.

LeaveChatGroup(FString CharacterNameLeaving, FString ChatGroupName)


Remove character [CharacterNameLeaving] from the chat group named [ChatGroupName].

SendChatToChannel(FString SentFromCharacterName, FString Message, FString ChatChannelName)


Send a chat message to a specific chat channel.

SendGlobalChat(FString SentFromCharacterName, FString Message)


Send a chat message to all connected players.

SendPrivateChatMessage(FString SentFromCharacterName, FString SendToCharacterName, FString Message)


Send a private chat message to a specific character.

AOWSPersistentActor

Inherit your actors from this class if you want their location to be persistent in your world. When a map loads all persistent actors are spawned at the last location they were saved.

Coming Soon...

Character Stats

Field NameField Type
CharacterNameText (50 chars)
CharacterLevelInteger (2 Byte)
GenderInteger (1 Byte)
WeightFloat
SizeInteger (2 Byte)
FameFloat
AlignmentFloat
DescriptionText (unlimited length)
XPInteger (4 Byte)
TeamNumberInteger (4 Byte)
HitDieInteger (1 Byte)
WoundsFloat
ThirstFloat
HungerFloat
MaxHealthFloat
HealthFloat
HealthRegenRateFloat
MaxManaFloat
ManaFloat
ManaRegenRateFloat
MaxEnergyFloat
EnergyFloat
EnergyRegenRateFloat
MaxFatigueFloat
FatigueFloat
FatigueRegenRateFloat
MaxStaminaFloat
StaminaFloat
StaminaRegenRateFloat
MaxEnduranceFloat
EnduranceFloat
EnduranceRegenRateFloat
StrengthFloat
DexterityFloat
ConstitutionFloat
IntellectFloat
WisdomFloat
CharismaFloat
AgilityFloat
SpiritFloat
MagicFloat
FortitudeFloat
ReflexFloat
WillpowerFloat
BaseAttackFloat
BaseAttackBonusFloat
AttackPowerFloat
AttackSpeedFloat
CritChanceFloat
CritMultiplierFloat
HasteFloat
SpellPowerFloat
SpellPenetrationFloat
DefenseFloat
DodgeFloat
ParryFloat
AvoidanceFloat
VersatilityFloat
MultishotFloat
InitiativeFloat
NaturalArmorFloat
PhysicalArmorFloat
BonusArmorFloat
ForceArmorFloat
MagicArmorFloat
ResistanceFloat
ReloadSpeedFloat
RangeFloat
SpeedFloat
GoldInteger (4 Byte)
SilverInteger (4 Byte)
CopperInteger (4 Byte)
FreeCurrencyInteger (4 Byte)
PremiumCurrencyInteger (4 Byte)
PerceptionFloat
AcrobaticsFloat
ClimbFloat
StealthFloat
ScoreInteger (4 Byte)