Core Update 1.0.224 - Concurrent Data Storage

Highlights for Version 1.0.224

Patch Notes Header

Welcome to our November 30th patch notes!

With this patch, we're introducing a new storage system to Core: Concurrent Storage.

Concurrent Storage Data allows creators to write data to a table for players or games while the player is offline (or online but on a different server), or write data that is shared across game instances and not associated with a player.

Creators can have 1 concurrent player key per game, up to 16 concurrent shared player keys, and up to 16 concurrent shared creator keys. In each project creators can select which keys are active through the Shared Storage window. Active keys can be found in the Project Content window in the My Shared Keys folder, and are accessed in scripts by their Net Reference. For more information, see the API section below. We’ve included a few examples to kick-start your creativity - this feature will allow a bunch of new game types to be created!

Make sure to watch the patch notes live stream hosted by Buckmonster on the buckmonst3r Twitch channel at 9 AM PST.

Platform

  • New: Added an "Is Animated" flag to Outline Objects (On by default to match previous behavior). Disable "Is Animated" for static objects to greatly reduce runtime cost.
  • New: UIButton has a property "Bound Action" which fires any binding associated with the given action name.
  • New: Added error message when providing invalid animation string to an animated mesh.
  • New: Added a warning message if a Trigger is added to a parent with disabled collision.
  • New: It is now possible to mute the voice chat of a player in your friends list.
  • New: Right-clicking in the Project Content area with no selection will now offer the option to create various asset types.
  • Voice Chat settings have changed to encourage more use of the system:
    • New: You can now mute and unmute yourself via a button in the social UI.

    • Changed: The default voice chat method has been changed from "Push-To-Talk" to "Detect Speaking", for new users. It stays the same for existing users.

    • Changed: Voice chat will no longer transmit when Core loses focus. This can be configured from the options menu.

    • Changed: The "Push-To-Toggle" voice chat option has been removed due to low usage and some issues that were occurring with it

  • Changed: Pressing Enter on single line text parameters in Create mode now clears focus instead of highlighting all text.
  • Fixed: An issue where previously outlined objects would show an outline if an object in front was on the same channel the previous object was.
  • Fixed: Some wrong badge colors on the in-game friends list widget.
  • Fixed: A bug that could prevent players from completing the "Fresh out of the Oven" quest.
  • Fixed: A crash when a template containing a merged model also contains other invalid objects.
  • Fixed: Several bugs where deleting multiple template assets at the same time didn't clean up all references to those templates.
  • Fixed: The option to start Core directly into Create Mode via the -CREATE command line argument now works in the Epic Games version as well.

API

Concurrent Data

  • New: Concurrent Storage Data allows creators to write data to a table for players or games while the player is offline (or online but on a different server), or write data that is shared across game instances and not associated with a player.

We've prepared a reference and tutorial for how to use Concurrent Data in your game.

Class Function Name Return Type Description Tags
Storage.GetConcurrentPlayerData(string playerId) <table data, StorageResultCode resultCode, string errorMessage> Requests the concurrent player data associated with the specified player. This function may yield until data is available. Returns the data (nil if not available), a result code, and an optional error message if an error occurred. Server-Only
Storage.SetConcurrentPlayerData(string playerId, function callback) <table data, StorageResultCode resultCode, string errorMessage> Updates the concurrent player data associated with the specified player. This function retrieves the most recent copy of the player's data, then calls the creator-provided callback function with the data table as a parameter. callback is expected to return the player's updated data table, which will then be saved. This function yields until the entire process is complete, returning a copy of the player's updated data (nil if not available), a result code, and an optional error message if an error occurred. Server-Only
Storage.ConnectToConcurrentPlayerDataChanged(string playerId, function eventListener, [...]) EventListener Listens for any changes to the concurrent data associated with playerId for this game. Calls to Storage.SetConcurrentPlayerData() from this or other game servers will trigger this listener. The listener function parameters should be: string player ID, table player data. Accepts any number of additional arguments after the listener function, those arguments will be provided, in order, after the table argument. Returns an EventListener which can be used to disconnect from the event or check if the event is still connected. Server-Only
Storage.HasPendingSetConcurrentPlayerData(string playerId) boolean Returns true if this server has a pending call to Storage.SetConcurrentPlayerData() either waiting to be processed or actively running for the specified player ID. Server-Only
Storage.GetConcurrentSharedPlayerData(NetReference concurrentSharedStorageKey, string playerId) <table data, StorageResultCode resultCode, string errorMessage> Requests the concurrent player data associated with the specified player and storage key. The storage key must be of type CONCURRENT_SHARED_PLAYER_STORAGE. This function may yield until data is available. Returns the data (nil if not available), a result code, and an optional error message if an error occurred. Server-Only
Storage.SetConcurrentSharedPlayerData(NetReference concurrentSharedStorageKey, string playerId, function callback) <table data, StorageResultCode resultCode, string errorMessage> Updates the concurrent player data associated with the specified player and storage key. The storage key must be of type CONCURRENT_SHARED_PLAYER_STORAGE. This function retrieves the most recent copy of the player's data, then calls the creator-provided callback function with the data table as a parameter. callback is expected to return the player's updated data table, which will then be saved. This function yields until the entire process is complete, returning a copy of the player's updated data (nil if not available), a result code, and an optional error message if an error occurred. Server-Only
Storage.ConnectToConcurrentSharedPlayerDataChanged(NetReference concurrentSharedStorageKey, string playerId, function eventListener, [...]) EventListener Listens for any changes to the concurrent shared data associated with playerId and concurrentSharedStorageKey. Calls to Storage.SetConcurrentSharedPlayerData() from this or other game servers will trigger this listener. The listener function parameters should be: NetReference storage key, string player ID, table shared player data. Accepts any number of additional arguments after the listener function, those arguments will be provided, in order, after the table argument. Returns an EventListener which can be used to disconnect from the event or check if the event is still connected. Server-Only
Storage.HasPendingSetConcurrentSharedPlayerData(NetReference concurrentSharedStorageKey, string playerId) boolean Returns true if this server has a pending call to Storage.SetConcurrentSharedPlayerData() either waiting to be processed or actively running for the specified player ID and shared storage key. Server-Only
Storage.GetConcurrentCreatorData(NetReference concurrentCreatorStorageKey) <table data, StorageResultCode resultCode, string errorMessage> Requests the concurrent data associated with the given storage key. The storage key must be of type CONCURRENT_CREATOR_STORAGE. This data is player- and game-agnostic. This function may yield until data is available. Returns the data (nil if not available), a result code, and an optional error message if an error occurred. Server-Only
Storage.SetConcurrentCreatorData(NetReference concurrentCreatorStorageKey, function callback) <table data, StorageResultCode resultCode, string errorMessage> Updates the concurrent data associated with the given storage key. The storage key must be of type CONCURRENT_CREATOR_STORAGE. This data is player- and game-agnostic. This function retrieves the most recent copy of the creator data, then calls the creator-provided callback function with the data table as a parameter. callback is expected to return the updated data table, which will then be saved. This function yields until the entire process is complete, returning a copy of the updated data (nil if not available), a result code, and an optional error message if an error occurred. Server-Only
Storage.ConnectToConcurrentCreatorDataChanged(NetReference concurrentCreatorStorageKey, function eventListener, [...]) EventListener Listens for any changes to the concurrent data associated with concurrentCreatorStorageKey. Calls to Storage.SetConcurrentCreatorData() from this or other game servers will trigger this listener. The listener function parameters should be: NetReference storage key, table creator data. Accepts any number of additional arguments after the listener function, those arguments will be provided, in order, after the table argument. Returns an EventListener which can be used to disconnect from the event or check if the event is still connected. Server-Only
Storage.HasPendingSetConcurrentCreatorData(NetReference concurrentCreatorStorageKey) boolean Returns true if this server has a pending call to Storage.SetConcurrentCreatorData() either waiting to be processed or actively running for the specified creator storage key. Server-Only

See our API documentation for examples on how to use these.

Shared Assets

  • New: Shared Assets are a limited form of World.SpawnAsset() that enable certain networked behavior very cheaply. These functions can only be called on the server, and the spawned object will exist on both the server and client. However, these are very much cheaper than networked objects. The object once spawned cannot be modified, like other objects within a static context. The only option parameters available are transform, position, rotation, and scale.
Function Name Return Type Description Tags
SpawnSharedAsset(string assetId, [table parameters]) CoreObject Spawns an instance of an asset into the world as a child of a networked Static Context, also spawning copies of the asset on clients without the overhead of additional networked objects. Any object spawned this way cannot be modified, as with other objects within a Static Context, but they may be destroyed by calling DestroySharedAsset() on the same NetworkContext instance. Raises an error if called on a non-networked Static Context or a Static Context which is a descendant of a Client Context or Server Context. Optional parameters can specify a transform for the spawned object.
Supported parameters include:
position (Vector3): Position of the spawned object, relative to the parent NetworkContext.
rotation (Rotation or Quaternion): Local rotation of the spawned object.
scale (Vector3 or number): Scale of the spawned object, may be specified as a Vector3 or as a number for uniform scale.
transform (Transform): The full transform of the spawned object. If transform is specified, it is an error to also specify position, rotation, or scale.
Server-Only
DestroySharedAsset(CoreObject coreObject) None Destroys an object that was spawned using SpawnSharedAsset(). Raises an error if coreObject was not created by this NetworkContext. Server-Only

See our API documentation for examples on how to use these.

Miscellaneous

  • New: Added a Player:GetPrivateNetworkedDataSize() method that can be used to query the current private data usage on a player.
    • Calling this from client on a non-local player will always return 0, because the data is private per player.
    • The current limit is 32kB.
  • New: Added a Game.GetCurrentGameId() call that returns a string representing the current game id. Empty string will be returned if no valid game id can be found.
  • New: Provide a "backlog" queue for events that cannot be sent within the event bandwidth, holding them back to send as soon as the bandwidth available. This also applies to chat messages. This removes previous behavior where getting close to the bandwidth limit triggers warnings.
  • Fixed: CoreDebug.DrawBox() now uses box dimensions (depth, width, height) instead of treating the argument as a half extent.
  • Fixed: A bug where Player:SetPrivateNetworkedData() would incorrectly reject valid attempts to replace existing data.

Core Content

  • New: Added the "Producers, Buffs and Areas" example project:

    • Explore producers, buffs, lots, and areas in this example. Producers are objects that can be placed in the world by the player, and then they can be fed one type of item and produce a new item (or items) over time. Buffs are a type of data that can be applied to a producer to change how it builds/grows, how many objects it drops, or if it dies. Lots are player owned spaces that keep track of which objects a player has placed in them. Areas are places that have object loaders that can add art to the scene when you travel to them via portal.
  • New: Added a "Attack Sound Template" parameter on Core Content weapons. (Moved from MuzzleFlash)

5 Likes

omg. I have been waiting for this for soooooooo long. this is amazing :heart::heart:

This update probably allows the most new capability of any other single patch. Super exciting.

Just today, without knowing of this update, i was thinking about "how can i make a city builder?"

...and there is the answer in this update! :slight_smile: