Skip to main content

Platform Rule Sets for Cross Progression/Commerce

Summary

Platform Use Rulesets are an optional system to manage the unique rules that some platform partners have for how certain items are allowed/disallowed to transfer across different platforms.

Example Rulesets

These example rulesets are provided as a default with the "Load Defaults" button on the Ruleset page of the developer portal.

Real Money Purchase

This ruleset follows the cross commerce rules for each game platform. This applies to currency, and all other purchasable entitlements.

There are a couple things to note about this ruleset:

  1. PSN and Xbox Live does not allow currency purchased on other platforms to be used on PSN for in-game purchases.
  2. PSN does not allow currency purchased on PSN to be used on other platform.
  3. Where currency is allowed, the priority is to use it from the free/sweat pools before using currency that the user purchased.
Real Money PurchaseUsed on SteamUsed on Xbox LiveUsed on PSNUsed on NintendoUsed on Epic
Received from giveaway (Free)11111
Earned during gameplay (Sweat)22222
Purchased on Steam343
Purchased on Xbox Live4354
Purchased on PSN3
Purchased on Nintendo535
Purchased on Epic666
Received from Twitch Drops777
Received from Amazon Prime Rewards888

The raw version of this ruleset is:

{
"name": "Real Money Purchase",
"rules": {
"none": ["free","sweat","amazon","twitch","steam","xbox_live","nintendo_switch","epic"],
"psn": ["free","sweat","psn"],
"xbox_live": ["free","sweat","xbox_live"],
"nintendo_switch": ["sweat","nintendo_switch","amazon","twitch","steam","xbox_live","epic"]
}
}

Platform Exclusive Content

This ruleset is useful for content that is meant to only be used on the platform it was purchased on.

Real Money PurchaseUsed on SteamUsed on Xbox LiveUsed on PSNUsed on NintendoUsed on Epic
Purchased on Steam1
Purchased on Xbox Live1
Purchased on PSN1
Purchased on Nintendo1
Purchased on Epic1

The raw version of this ruleset is:

{
"name": "Platform Exclusive Content",
"rules": {
"epic": ["epic"],
"nintendo_switch": ["nintendo_switch"],
"psn": ["psn"],
"steam": ["steam"],
"xbox_live": ["xbox_live"],
"amazon": ["amazon"],
"twitch": ["twitch"]
}
}

Configuration

Rules

Each ruleset is comprised of a set of rules, which each have a list of buckets/platforms that define the priority order of how other buckets are used.

When creating rules, the none bucket is used as a fallback for any platform that is not explicitly defined in the ruleset.

Items

The Item configuration has a inventory_bucket_use_rule_set_id field for selecting which of these rulesets the item will follow. This system is OPT-IN by selecting a ruleset for the item.

  • Items with no ruleset will always use inventory records without an inventory bucket.
  • Items with a ruleset will ignore all inventory records without an inventory bucket.

Loot for a specific bucket

The Loot configuration has a use_inventory_bucket field that can be used to force the loot to use a specific inventory bucket.

Orders

Order entries have a use_inventory_bucket field that can be used select which bucket the loot should modify the inventory of. Note that Loot's use_inventory_bucket takes precedence over this.

When RallyHere submits an order as part of entitlement processing, all entries will be submitted with the associated use_inventory_bucket for that platform. Note that the support tool can also submit orders with the use_inventory_bucket set for testing purposes.

Loot operations when fulfilling an Order

When Loot for an item with a inventory_bucket_use_rule_set_id is granted via an order entry:

  • If a use_inventory_bucket is provided (either from the order entry, or the Loot), all operations will only consider/modify inventory with that bucket.
  • If a use_inventory_bucket is NOT provided, operations have the following effects:
    • check_greater_than_or_equal, check_less_than - checks the sum of ownership for the buckets that are in the rules (order doesn't matter) against the provided quantity.
    • set - always fails
    • add (with a positive quantity) or subtract (with a negative quantity) - always adds to the sweat bucket
    • add (with a negative quantity) or subtract (with a positive quantity)
      • Following the sequence of buckets in the rules, subtract (down to 0, not allowing them to go negative) for each pool.
      • If any remaining quantity hasn't been subtracted, subtract from the sweat bucket, allowing it to go negative.
        • In practice, this should rarely happen, as we virtually always check the user has enough to subtract before doing so.

Inventory

A player that plays/purchases on multiple platforms may have multiple inventory records with the same item_id, but a different bucket with this system. When an item is configured to follow a ruleset, the client should only display inventory that is in the rules for the platform they are currently logged in on.

Here is an example player's inventory for item 123, which follows the "Real Money Purchase" ruleset from above.

inventory_iditem_idbucketcount
6a763a99-6e68-4338-81fd-38ff01763ff5123psn500
33295c54-2c61-4802-89ce-9a5600dce127123xbox_live200
2c1235be-56b1-4f62-b81d-b7c9957731d0123epic50
ab3ea672-93e5-45c9-b760-fd2aaa83c64a123twitch9
11589784-91ad-4bda-b0ae-369dbaffe922123sweat1000

This player has a total of 1759 of this item in their inventory. However, when following the ruleset, will not be able to access it all at the same time. When logging in from different platforms, here are the quantities the player will see in their UI:

  • PSN = 1500
  • Xbox = 1200
  • Epic = 1259
  • Nintendo = 1259
  • Steam = 1259

Rule Sets Schema

NameTypeRequiredDescription
custom_dataobjectNoCustom data associated with the resource
namestringNoName of the resource
descriptionstringNoDescription of the resource
rulesobjectNoThe Inventory Bucket Use Rules by Inventory Bucket.
sandbox_idstringNoID of the Sandbox
last_modified_account_idstringNoAccount ID of the user who last modified the resource
last_modified_timestampstringNoTimestamp of when the resource was last modified
created_timestampstringNoTimestamp of when the resource was created
rule_set_idstringYesThe Inventory Bucket Use Rule Set ID.
legacy_rule_set_idintegerYesThe Legacy Inventory Bucket Use Rule Set ID.