GS2-Mission
GS2-Deploy のテンプレートで使用できるリソース定義のリファレンス
GS2-Deploy リファレンス
エンティティ
CounterModelMaster
CounterModelMaster
Type: GS2::Mission::CounterModelMaster
Properties:
NamespaceName: namespace1
Name: counter-0001
Metadata: null
Description: null
Scopes:
-
ResetType: notReset
ChallengePeriodEventId: null
カウンターモデルマスター
カウンターモデルマスターはミッションタスクの達成条件に設定可能なエンティティです。
カウンターの値は複数のミッショングループから参照可能なため、1つのカウンターでウィークリーミッションとデイリーミッションといった複数のミッショングループの達成条件に設定ができます。
型 | 必須 | デフォルト | 値の制限 | 説明 | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 32文字 | ネームスペース名 | |
name | string | ✓ | ~ 128文字 | カウンター名 | |
metadata | string | ~ 1024文字 | メタデータ | ||
description | string | ~ 1024文字 | 説明文 | ||
scopes | CounterScopeModel[] | ✓ | [] | カウンターのリセットタイミングリスト | |
challengePeriodEventId | string | ~ 1024文字 | カウンターの操作が可能な期間を設定した GS2-Schedule イベントGRN |
MissionGroupModelMaster
MissionGroupModelMaster
Type: GS2::Mission::MissionGroupModelMaster
Properties:
NamespaceName: namespace1
Name: mission-group-0001
Metadata: null
Description: null
ResetType: notReset
ResetDayOfMonth: null
ResetDayOfWeek: monday
ResetHour: 10
CompleteNotificationNamespaceId: null
ミッショングループモデルマスター
ミッショングループはカウンターのリセットタイミングでタスクをグルーピングするエンティティです。
たとえば、デイリーミッションで1つのグループ。ウィークリーミッションで1つのグループとなります。
型 | 必須 | デフォルト | 値の制限 | 説明 | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 32文字 | ネームスペース名 | |
name | string | ✓ | ~ 128文字 | ミッショングループ名 | |
metadata | string | ~ 1024文字 | メタデータ | ||
description | string | ~ 1024文字 | 説明文 | ||
resetType | string | ✓ | "notReset" | ~ 128文字 | リセットタイミング |
resetDayOfMonth | int | {resetType} == "monthly" | 1 ~ 31 | リセットをする日にち | |
resetDayOfWeek | string | {resetType} == "weekly" | ~ 128文字 | リセットする曜日 | |
resetHour | int | {resetType} in ["monthly", "weekly", "daily"] | ~ 23 | リセット時刻 | |
completeNotificationNamespaceId | string | ~ 1024文字 | ミッションのタスクを達成したときのプッシュ通知 |
Namespace
Namespace
Type: GS2::Mission::Namespace
Properties:
Name: namespace1
Description: null
TransactionSetting:
EnableAutoRun: false
QueueNamespaceId: grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001
KeyId: grn:gs2:ap-northeast-1:YourOwnerId:key:namespace1:key:key-0001
MissionCompleteScript: null
CounterIncrementScript: null
ReceiveRewardsScript: null
CompleteNotification: null
LogSetting:
LoggingNamespaceId: grn:gs2:ap-northeast-1:YourOwnerId:log:namespace1
QueueNamespaceId: grn:gs2:ap-northeast-1:YourOwnerId:queue:namespace1
KeyId: grn:gs2:ap-northeast-1:YourOwnerId:key:namespace1:key:key-0001
ネームスペース
ネームスペースは一つのプロジェクトで同じサービスを異なる用途で複数利用できるようにするための仕組みです。
GS2 のサービスは基本的にネームスペースというレイヤーがあり、ネームスペースが異なれば同じサービスでもまったく別のデータ空間として取り扱われます。
そのため、各サービスの利用を開始するにあたってネームスペースを作成する必要があります。
型 | 必須 | デフォルト | 値の制限 | 説明 | |
---|---|---|---|---|---|
name | string | ✓ | ~ 32文字 | ネームスペース名 | |
description | string | ~ 1024文字 | 説明文 | ||
transactionSetting | TransactionSetting | ✓ | トランザクション設定 | ||
missionCompleteScript | ScriptSetting | ミッションを達成したときに実行するスクリプト | |||
counterIncrementScript | ScriptSetting | カウンターを上昇したときに実行するスクリプト | |||
receiveRewardsScript | ScriptSetting | 報酬を受け取ったときに実行するスクリプト | |||
completeNotification | NotificationSetting | ミッションのタスクを達成したときのプッシュ通知 | |||
logSetting | LogSetting | ログの出力設定 | |||
queueNamespaceId | string | ~ 1024文字 | スタンプシートの実行に使用する GS2-JobQueue のネームスペース | ||
keyId | string | ~ 1024文字 | スタンプシートの発行に使用する GS2-Key のネームスペース |
CurrentMissionMaster
CurrentMissionMaster
Type: GS2::Mission::CurrentMissionMaster
Properties:
NamespaceName: namespace1
Settings: {
"version": "2019-05-28",
"groups": [
{
"name": "daily",
"metadata": "DAILY",
"tasks": [
{
"name": "quest_x10",
"metadata": "QUEST_X10",
"counterName": "quest_complete",
"targetValue": 10,
"completeAcquireActions": [
{
"action": "Gs2Experience:AddExperienceByUserId",
"request": "{\\"experienceName\\": \\"basic\\", \\"userId\\": \\"#{userId}\\", \\"experienceModelName\\": \\"player\\", \\"propertyId\\": \\"player\\", \\"experienceValue\\": 10}"
}
]
},
{
"name": "quest_x20",
"metadata": "QUEST_X20",
"counterName": "quest_complete",
"premiseMissionTaskName": "quest_x10",
"targetValue": 20,
"completeAcquireActions": [
{
"action": "Gs2Experience:AddExperienceByUserId",
"request": "{\\"experienceName\\": \\"basic\\", \\"userId\\": \\"#{userId}\\", \\"experienceModelName\\": \\"player\\", \\"propertyId\\": \\"player\\", \\"experienceValue\\": 20}"
}
]
},
{
"name": "gacha",
"metadata": "GACHA",
"counterName": "lot_gacha",
"targetValue": 1,
"completeAcquireActions": [
{
"action": "Gs2Experience:AddExperienceByUserId",
"request": "{\\"experienceName\\": \\"basic\\", \\"userId\\": \\"#{userId}\\", \\"experienceModelName\\": \\"player\\", \\"propertyId\\": \\"player\\", \\"experienceValue\\": 30}"
}
]
}
],
"resetType": "daily",
"resetHour": 10
},
{
"name": "weekly",
"metadata": "WEEKLY",
"tasks": [
{
"name": "quest_x100",
"metadata": "QUEST_X100",
"counterName": "quest_complete",
"targetValue": 100,
"completeAcquireActions": [
{
"action": "Gs2Experience:AddExperienceByUserId",
"request": "{\\"experienceName\\": \\"basic\\", \\"userId\\": \\"#{userId}\\", \\"experienceModelName\\": \\"player\\", \\"propertyId\\": \\"player\\", \\"experienceValue\\": 40}"
}
]
},
{
"name": "quest_x1000",
"metadata": "QUEST_X1000",
"counterName": "quest_complete",
"premiseMissionTaskName": "quest_x100",
"targetValue": 1000,
"completeAcquireActions": [
{
"action": "Gs2Experience:AddExperienceByUserId",
"request": "{\\"experienceName\\": \\"basic\\", \\"userId\\": \\"#{userId}\\", \\"experienceModelName\\": \\"player\\", \\"propertyId\\": \\"player\\", \\"experienceValue\\": 50}"
}
]
}
],
"resetType": "weekly",
"resetDayOfWeek": "monday",
"resetHour": 10
},
{
"name": "story",
"metadata": "STORY",
"tasks": [
{
"name": "quest_1-1",
"metadata": "QUEST_1-1",
"counterName": "quest1",
"targetValue": 1
},
{
"name": "quest_1-2",
"metadata": "QUEST_1-2",
"counterName": "quest1",
"premiseMissionTaskName": "quest_1-1",
"targetValue": 1
},
{
"name": "quest_1-3",
"metadata": "QUEST_1-3",
"counterName": "quest1",
"premiseMissionTaskName": "quest_1-2",
"targetValue": 1
},
{
"name": "quest_1-4",
"metadata": "QUEST_1-4",
"counterName": "quest1",
"premiseMissionTaskName": "quest_1-3",
"targetValue": 1
},
{
"name": "quest_2-1",
"metadata": "QUEST_2-1",
"counterName": "quest2",
"premiseMissionTaskName": "quest_1-4",
"targetValue": 1
}
],
"resetType": "notReset"
}
],
"counters": [
{
"name": "quest_complete",
"metadata": "QUEST_COMPLETE",
"scopes": [
{
"resetType": "daily",
"resetHour": 5
},
{
"resetType": "weekly",
"resetDayOfWeek": "monday",
"resetHour": 5
}
]
},
{
"name": "lot_gacha",
"metadata": "LOT_GACHA",
"scopes": [
{
"resetType": "daily",
"resetHour": 5
}
]
},
{
"name": "quest1",
"metadata": "QUEST1",
"scopes": [
{
"resetType": "notReset"
}
]
},
{
"name": "quest2",
"metadata": "QUEST2",
"scopes": [
{
"resetType": "notReset"
}
]
}
]
}
現在有効なマスターデータ
GS2ではマスターデータの管理にJSON形式のファイルを使用します。
ファイルをアップロードすることで、実際にサーバーに設定を反映することができます。
JSONファイルを作成する方法として、マネージメントコンソール上でのマスターデータエディタを提供していますが
よりゲームの運営に相応しいツールを作成し、適切なフォーマットのJSONファイルを書き出すことでもサービスを利用可能です。
JSONファイルの形式についてはドキュメントを参照ください。
型 | 必須 | デフォルト | 値の制限 | 説明 | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 32文字 | ネームスペース名 | |
settings | string | ✓ | ~ 5242880文字 | マスターデータ |
MissionTaskModelMaster
MissionTaskModelMaster
Type: GS2::Mission::MissionTaskModelMaster
Properties:
NamespaceName: namespace1
MissionGroupName: mission-group-0001
Name: mission-task-0001
Metadata: null
Description: null
CounterName: counter-0001
TargetValue: 10
CompleteAcquireActions:
-
Action: Gs2Experience:AddExperienceByUserId
Request: Gs2Experience:AddExperienceByUserId-request1
ChallengePeriodEventId: null
PremiseMissionTaskName: null
ミッションタスクモデルマスター
ミッションタスクは関連付けたカウンターの値が一定を超えたら報酬が貰える条件を定義するエンティティです。
型 | 必須 | デフォルト | 値の制限 | 説明 | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 32文字 | ネームスペース名 | |
missionGroupName | string | ✓ | ~ 128文字 | ミッショングループ名 | |
name | string | ✓ | ~ 128文字 | タスク名 | |
metadata | string | ~ 1024文字 | メタデータ | ||
description | string | ~ 1024文字 | 説明文 | ||
counterName | string | ✓ | ~ 128文字 | カウンター名 | |
targetValue | long | ✓ | 1 ~ 9223372036854775806 | 目標値 | |
completeAcquireActions | AcquireAction[] | [] | ミッション達成時の報酬 | ||
challengePeriodEventId | string | ~ 1024文字 | 報酬が受け取り可能な期間を設定した GS2-Schedule イベントGRN | ||
premiseMissionTaskName | string | ~ 128文字 | このタスクに挑戦するために達成しておく必要のあるタスクの名前 |