Script Trigger Reference of GS2-Experience
Reference of event triggers that call extended scripts
Trigger
rankCapScript
obtaining rank caps
Synchronous Execution Script
The script is executed synchronously before the obtaining rank caps process.
Request
| Type | Description | |
|---|---|---|
| namespace | Namespace | Namespace |
| experienceModel | ExperienceModel | Experience Model |
| userId | string | User ID |
| propertyId | string | Property ID |
Result
| Type | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|
| rankCap | long | ✓ | 0 ~ 2147483645 | rank cap |
Implementation Example
namespace = args.namespace
experienceModel = args.experienceModel
userId = args.userId
propertyId = args.propertyId
result = {
rankCap=rankCap
}changeExperience
experience value changes
Synchronous Execution Script
The script is executed synchronously before the experience value changes process.
Request
| Type | Description | |
|---|---|---|
| namespace | Namespace | Namespace |
| experienceModel | ExperienceModel | Experience Model |
| status | Status | Status before change |
| afterStatus | Status | Status after change |
Result
| Type | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|
| permit | bool | ✓ | Whether to allow experience value changes | ||
| overrideExperienceValue | long | ✓ | 0 ~ 2147483645 | Overriding experience value |
Implementation Example
namespace = args.namespace
experienceModel = args.experienceModel
status = args.status
afterStatus = args.afterStatus
result = {
permit=permit,
overrideExperienceValue=overrideExperienceValue
}Asynchronous Execution Script
The script executes asynchronously after the experience value changes.
Request
| Type | Description | |
|---|---|---|
| namespace | Namespace | Namespace |
| experienceModel | ExperienceModel | Experience Model |
| oldStatus | Status | Status before change |
| status | Status | Status |
Implementation Example
namespace = args.namespace
experienceModel = args.experienceModel
oldStatus = args.oldStatus
status = args.status
result = {
}changeRank
rank changes
Synchronous Execution Script
The script is executed synchronously before the rank changes process.
Request
| Type | Description | |
|---|---|---|
| namespace | Namespace | Namespace |
| experienceModel | ExperienceModel | Experience Model |
| status | Status | Status before change |
| afterStatus | Status | Status after change |
Result
| Type | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|
| permit | bool | ✓ | Whether to allow rank changes |
Implementation Example
namespace = args.namespace
experienceModel = args.experienceModel
status = args.status
afterStatus = args.afterStatus
result = {
permit=permit
}Asynchronous Execution Script
The script executes asynchronously after the rank changes.
Request
| Type | Description | |
|---|---|---|
| namespace | Namespace | Namespace |
| experienceModel | ExperienceModel | Experience Model |
| oldStatus | Status | Status before change |
| status | Status | Status |
Implementation Example
namespace = args.namespace
experienceModel = args.experienceModel
oldStatus = args.oldStatus
status = args.status
result = {
}changeRankCap
Rank cap changes
Synchronous Execution Script
The script is executed synchronously before the rank cap changes process.
Request
| Type | Description | |
|---|---|---|
| namespace | Namespace | Namespace |
| experienceModel | ExperienceModel | Experience Model |
| status | Status | Status before change |
| afterStatus | Status | Status after change |
Result
| Type | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|
| permit | bool | ✓ | Whether to allow rank cap change | ||
| overrideRankCapValue | long | ✓ | 0 ~ 2147483645 | New rank cap |
Implementation Example
namespace = args.namespace
experienceModel = args.experienceModel
status = args.status
afterStatus = args.afterStatus
result = {
permit=permit,
overrideRankCapValue=overrideRankCapValue
}Asynchronous Execution Script
The script executes asynchronously after the Rank cap changes.
Request
| Type | Description | |
|---|---|---|
| namespace | Namespace | Namespace |
| experienceModel | ExperienceModel | Experience Model |
| status | Status | Status |
Implementation Example
namespace = args.namespace
experienceModel = args.experienceModel
status = args.status
result = {
}overflowExperience
Experience overflow
Synchronous Execution Script
The script is executed synchronously before the experience overflow process.
Request
| Type | Description | |
|---|---|---|
| namespace | Namespace | Namespace |
| experienceModel | ExperienceModel | Experience Model |
| status | Status | Status |
| overflowExperienceValue | long | Experience overflow value |
Result
| Type | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|
| permit | bool | ✓ | Whether to allow experience overflow |
Implementation Example
namespace = args.namespace
experienceModel = args.experienceModel
status = args.status
overflowExperienceValue = args.overflowExperienceValue
result = {
permit=permit
}