Transaction Action of GS2-Experience

Specification of verify/consume/acquire transaction actions

VerifyAction

Gs2Experience:VerifyRankByUserId

Verify rank by user ID

Actions for which quantity can be specified: NO

TypeDescription
namespaceNamestringNamespace name
userIdstringUser Id
Set #{userId} to replace the currently logged in user ID.
experienceNamestringExperience Model Name
verifyTypeString Enum
enum {
  “less”,
  “lessEqual”,
  “greater”,
  “greaterEqual”,
  “equal”,
  “notEqual”
]
Type of verification
Enumerator String DefinitionDescription
“less”Rank is less than the specified value
“lessEqual”Rank is less than or equal to the specified value
“greater”Rank is greater than the specified value
“greaterEqual”Rank is greater than or equal to the specified value
“equal”Rank is equal to the specified value
“notEqual”Rank is not equal to the specified value
propertyIdstringProperty ID
rankValuelongCurrent Rank
multiplyValueSpecifyingQuantityboolWhether to multiply the value used for verification when specifying the quantity
timeOffsetTokenstringTime offset token
{
    "action": "Gs2Experience:VerifyRankByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "userId": "[string]User Id",
        "experienceName": "[string]Experience Model Name",
        "verifyType": "[string]Type of verification",
        "propertyId": "[string]Property ID",
        "rankValue": "[long]Current Rank",
        "multiplyValueSpecifyingQuantity": "[bool]Whether to multiply the value used for verification when specifying the quantity",
        "timeOffsetToken": "[string]Time offset token"
    }
}
action: Gs2Experience:VerifyRankByUserId
request:
  namespaceName: "[string]Namespace name"
  userId: "[string]User Id"
  experienceName: "[string]Experience Model Name"
  verifyType: "[string]Type of verification"
  propertyId: "[string]Property ID"
  rankValue: "[long]Current Rank"
  multiplyValueSpecifyingQuantity: "[bool]Whether to multiply the value used for verification when specifying the quantity"
  timeOffsetToken: "[string]Time offset token"
transaction.service("experience").consume.verify_rank_by_user_id({
    namespaceName="[string]Namespace name",
    userId="[string]User Id",
    experienceName="[string]Experience Model Name",
    verifyType="[string]Type of verification",
    propertyId="[string]Property ID",
    rankValue="[long]Current Rank",
    multiplyValueSpecifyingQuantity="[bool]Whether to multiply the value used for verification when specifying the quantity",
    timeOffsetToken="[string]Time offset token",
})

Gs2Experience:VerifyRankCapByUserId

Verify rank cap by user ID

Actions for which quantity can be specified: NO

TypeDescription
namespaceNamestringNamespace name
userIdstringUser Id
Set #{userId} to replace the currently logged in user ID.
experienceNamestringExperience Model Name
verifyTypeString Enum
enum {
  “less”,
  “lessEqual”,
  “greater”,
  “greaterEqual”,
  “equal”,
  “notEqual”
]
Type of verification
Enumerator String DefinitionDescription
“less”Rank cap is less than the specified value
“lessEqual”Rank cap is less than or equal to the specified value
“greater”Rank cap is greater than the specified value
“greaterEqual”Rank cap is greater than or equal to the specified value
“equal”Rank cap is equal to the specified value
“notEqual”Rank cap is not equal to the specified value
propertyIdstringProperty ID
rankCapValuelongCurrent Rank Cap
multiplyValueSpecifyingQuantityboolWhether to multiply the value used for verification when specifying the quantity
timeOffsetTokenstringTime offset token
{
    "action": "Gs2Experience:VerifyRankCapByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "userId": "[string]User Id",
        "experienceName": "[string]Experience Model Name",
        "verifyType": "[string]Type of verification",
        "propertyId": "[string]Property ID",
        "rankCapValue": "[long]Current Rank Cap",
        "multiplyValueSpecifyingQuantity": "[bool]Whether to multiply the value used for verification when specifying the quantity",
        "timeOffsetToken": "[string]Time offset token"
    }
}
action: Gs2Experience:VerifyRankCapByUserId
request:
  namespaceName: "[string]Namespace name"
  userId: "[string]User Id"
  experienceName: "[string]Experience Model Name"
  verifyType: "[string]Type of verification"
  propertyId: "[string]Property ID"
  rankCapValue: "[long]Current Rank Cap"
  multiplyValueSpecifyingQuantity: "[bool]Whether to multiply the value used for verification when specifying the quantity"
  timeOffsetToken: "[string]Time offset token"
transaction.service("experience").consume.verify_rank_cap_by_user_id({
    namespaceName="[string]Namespace name",
    userId="[string]User Id",
    experienceName="[string]Experience Model Name",
    verifyType="[string]Type of verification",
    propertyId="[string]Property ID",
    rankCapValue="[long]Current Rank Cap",
    multiplyValueSpecifyingQuantity="[bool]Whether to multiply the value used for verification when specifying the quantity",
    timeOffsetToken="[string]Time offset token",
})

ConsumeAction

Gs2Experience:SubExperienceByUserId

Subtract experience by specifying user ID

Actions for which quantity can be specified: YES

Reversible action: YES

TypeDescription
namespaceNamestringNamespace name
userIdstringSet #{userId} to replace the currently logged in user ID.
experienceNamestringExperience Model Name
propertyIdstringProperty ID
experienceValuelongLost Experience
timeOffsetTokenstringTime offset token
{
    "action": "Gs2Experience:SubExperienceByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "userId": "[string]User Id",
        "experienceName": "[string]Experience Model Name",
        "propertyId": "[string]Property ID",
        "experienceValue": "[long]Lost Experience",
        "timeOffsetToken": "[string]Time offset token"
    }
}
action: Gs2Experience:SubExperienceByUserId
request:
  namespaceName: "[string]Namespace name"
  userId: "[string]User Id"
  experienceName: "[string]Experience Model Name"
  propertyId: "[string]Property ID"
  experienceValue: "[long]Lost Experience"
  timeOffsetToken: "[string]Time offset token"
transaction.service("experience").consume.sub_experience_by_user_id({
    namespaceName="[string]Namespace name",
    userId="[string]User Id",
    experienceName="[string]Experience Model Name",
    propertyId="[string]Property ID",
    experienceValue="[long]Lost Experience",
    timeOffsetToken="[string]Time offset token",
})

Gs2Experience:SubRankCapByUserId

Subtract rank cap by specifying user ID

Actions for which quantity can be specified: YES

Reversible action: YES

TypeDescription
namespaceNamestringNamespace name
userIdstringSet #{userId} to replace the currently logged in user ID.
experienceNamestringExperience Model Name
propertyIdstringProperty ID
rankCapValuelongCurrent Rank Cap
timeOffsetTokenstringTime offset token
{
    "action": "Gs2Experience:SubRankCapByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "userId": "[string]User Id",
        "experienceName": "[string]Experience Model Name",
        "propertyId": "[string]Property ID",
        "rankCapValue": "[long]Current Rank Cap",
        "timeOffsetToken": "[string]Time offset token"
    }
}
action: Gs2Experience:SubRankCapByUserId
request:
  namespaceName: "[string]Namespace name"
  userId: "[string]User Id"
  experienceName: "[string]Experience Model Name"
  propertyId: "[string]Property ID"
  rankCapValue: "[long]Current Rank Cap"
  timeOffsetToken: "[string]Time offset token"
transaction.service("experience").consume.sub_rank_cap_by_user_id({
    namespaceName="[string]Namespace name",
    userId="[string]User Id",
    experienceName="[string]Experience Model Name",
    propertyId="[string]Property ID",
    rankCapValue="[long]Current Rank Cap",
    timeOffsetToken="[string]Time offset token",
})

AcquireAction

Gs2Experience:AddExperienceByUserId

Add experience by specifying user ID

Actions for which quantity can be specified: YES

Reversible action: YES

TypeDescription
namespaceNamestringNamespace name
userIdstringSet #{userId} to replace the currently logged in user ID.
experienceNamestringExperience Model Name
propertyIdstringProperty ID
experienceValuelongGained Experience
truncateExperienceWhenRankUpboolWhether to truncate the remaining experience when ranking up
timeOffsetTokenstringTime offset token
{
    "action": "Gs2Experience:AddExperienceByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "userId": "[string]User Id",
        "experienceName": "[string]Experience Model Name",
        "propertyId": "[string]Property ID",
        "experienceValue": "[long]Gained Experience",
        "truncateExperienceWhenRankUp": "[bool]Whether to truncate the remaining experience when ranking up",
        "timeOffsetToken": "[string]Time offset token"
    }
}
action: Gs2Experience:AddExperienceByUserId
request:
  namespaceName: "[string]Namespace name"
  userId: "[string]User Id"
  experienceName: "[string]Experience Model Name"
  propertyId: "[string]Property ID"
  experienceValue: "[long]Gained Experience"
  truncateExperienceWhenRankUp: "[bool]Whether to truncate the remaining experience when ranking up"
  timeOffsetToken: "[string]Time offset token"
transaction.service("experience").acquire.add_experience_by_user_id({
    namespaceName="[string]Namespace name",
    userId="[string]User Id",
    experienceName="[string]Experience Model Name",
    propertyId="[string]Property ID",
    experienceValue="[long]Gained Experience",
    truncateExperienceWhenRankUp="[bool]Whether to truncate the remaining experience when ranking up",
    timeOffsetToken="[string]Time offset token",
})

Gs2Experience:SetExperienceByUserId

Set experience by specifying user ID

Actions for which quantity can be specified: YES

Reversible action: YES

TypeDescription
namespaceNamestringNamespace name
userIdstringSet #{userId} to replace the currently logged in user ID.
experienceNamestringExperience Model Name
propertyIdstringProperty ID
experienceValuelongCumulative experience gained
timeOffsetTokenstringTime offset token
{
    "action": "Gs2Experience:SetExperienceByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "userId": "[string]User Id",
        "experienceName": "[string]Experience Model Name",
        "propertyId": "[string]Property ID",
        "experienceValue": "[long]Cumulative experience gained",
        "timeOffsetToken": "[string]Time offset token"
    }
}
action: Gs2Experience:SetExperienceByUserId
request:
  namespaceName: "[string]Namespace name"
  userId: "[string]User Id"
  experienceName: "[string]Experience Model Name"
  propertyId: "[string]Property ID"
  experienceValue: "[long]Cumulative experience gained"
  timeOffsetToken: "[string]Time offset token"
transaction.service("experience").acquire.set_experience_by_user_id({
    namespaceName="[string]Namespace name",
    userId="[string]User Id",
    experienceName="[string]Experience Model Name",
    propertyId="[string]Property ID",
    experienceValue="[long]Cumulative experience gained",
    timeOffsetToken="[string]Time offset token",
})

Gs2Experience:AddRankCapByUserId

Add rank cap by specifying user ID

Actions for which quantity can be specified: YES

Reversible action: YES

TypeDescription
namespaceNamestringNamespace name
userIdstringSet #{userId} to replace the currently logged in user ID.
experienceNamestringExperience Model Name
propertyIdstringProperty ID
rankCapValuelongCurrent Rank Cap
timeOffsetTokenstringTime offset token
{
    "action": "Gs2Experience:AddRankCapByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "userId": "[string]User Id",
        "experienceName": "[string]Experience Model Name",
        "propertyId": "[string]Property ID",
        "rankCapValue": "[long]Current Rank Cap",
        "timeOffsetToken": "[string]Time offset token"
    }
}
action: Gs2Experience:AddRankCapByUserId
request:
  namespaceName: "[string]Namespace name"
  userId: "[string]User Id"
  experienceName: "[string]Experience Model Name"
  propertyId: "[string]Property ID"
  rankCapValue: "[long]Current Rank Cap"
  timeOffsetToken: "[string]Time offset token"
transaction.service("experience").acquire.add_rank_cap_by_user_id({
    namespaceName="[string]Namespace name",
    userId="[string]User Id",
    experienceName="[string]Experience Model Name",
    propertyId="[string]Property ID",
    rankCapValue="[long]Current Rank Cap",
    timeOffsetToken="[string]Time offset token",
})

Gs2Experience:SetRankCapByUserId

Set rank cap by specifying user ID

Actions for which quantity can be specified: NO

Reversible action: NO

TypeDescription
namespaceNamestringNamespace name
userIdstringSet #{userId} to replace the currently logged in user ID.
experienceNamestringExperience Model Name
propertyIdstringProperty ID
rankCapValuelongCurrent Rank Cap
timeOffsetTokenstringTime offset token
{
    "action": "Gs2Experience:SetRankCapByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "userId": "[string]User Id",
        "experienceName": "[string]Experience Model Name",
        "propertyId": "[string]Property ID",
        "rankCapValue": "[long]Current Rank Cap",
        "timeOffsetToken": "[string]Time offset token"
    }
}
action: Gs2Experience:SetRankCapByUserId
request:
  namespaceName: "[string]Namespace name"
  userId: "[string]User Id"
  experienceName: "[string]Experience Model Name"
  propertyId: "[string]Property ID"
  rankCapValue: "[long]Current Rank Cap"
  timeOffsetToken: "[string]Time offset token"
transaction.service("experience").acquire.set_rank_cap_by_user_id({
    namespaceName="[string]Namespace name",
    userId="[string]User Id",
    experienceName="[string]Experience Model Name",
    propertyId="[string]Property ID",
    rankCapValue="[long]Current Rank Cap",
    timeOffsetToken="[string]Time offset token",
})

Gs2Experience:MultiplyAcquireActionsByUserId

Multiply resources according to the rank of the property subject to the experience value by specifying user ID

Actions for which quantity can be specified: YES

Reversible action: NO

TypeDescription
namespaceNamestringNamespace name
userIdstringSet #{userId} to replace the currently logged in user ID.
experienceNamestringExperience Model Name
propertyIdstringProperty ID
rateNamestringRemuneration addition table name
acquireActionsAcquireAction[]List of Acquire Action
baseRatefloatBase rate
timeOffsetTokenstringTime offset token
{
    "action": "Gs2Experience:MultiplyAcquireActionsByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "userId": "[string]User Id",
        "experienceName": "[string]Experience Model Name",
        "propertyId": "[string]Property ID",
        "rateName": "[string]Remuneration addition table name",
        "acquireActions": [
            {
                "action": "[string]Types of actions to be performed in the acquire action",
                "request": "[string]JSON of request"
            }
        ],
        "baseRate": "[float]Base rate",
        "timeOffsetToken": "[string]Time offset token"
    }
}
action: Gs2Experience:MultiplyAcquireActionsByUserId
request:
  namespaceName: "[string]Namespace name"
  userId: "[string]User Id"
  experienceName: "[string]Experience Model Name"
  propertyId: "[string]Property ID"
  rateName: "[string]Remuneration addition table name"
  acquireActions: 
    - action: "[string]Types of actions to be performed in the acquire action"
      request: "[string]JSON of request"
  baseRate: "[float]Base rate"
  timeOffsetToken: "[string]Time offset token"
transaction.service("experience").acquire.multiply_acquire_actions_by_user_id({
    namespaceName="[string]Namespace name",
    userId="[string]User Id",
    experienceName="[string]Experience Model Name",
    propertyId="[string]Property ID",
    rateName="[string]Remuneration addition table name",
    acquireActions={
        {
            action="[string]Types of actions to be performed in the acquire action",
            request="[string]JSON of request"
        }
    },
    baseRate="[float]Base rate",
    timeOffsetToken="[string]Time offset token",
})