GS2-Version Master Data Reference

Reference for the master data format and the models to be imported

Master Data Format

{
  "version": "2019-10-09",
  "versionModels": [
    {
      "name": "[string]Version Model name",
      "metadata": "[string?]Metadata",
      "scope": "[string enum]Type of version value used for judgment",
      "type": "[string enum]Version Check Mode",
      "currentVersion": {
        "major": "[int]Major version",
        "minor": "[int]Minor version",
        "micro": "[int]Micro version"
      },
      "warningVersion": {
        "major": "[int]Major version",
        "minor": "[int]Minor version",
        "micro": "[int]Micro version"
      },
      "errorVersion": {
        "major": "[int]Major version",
        "minor": "[int]Minor version",
        "micro": "[int]Micro version"
      },
      "scheduleVersions": [
        {
          "currentVersion": {
            "major": "[int]Major version",
            "minor": "[int]Minor version",
            "micro": "[int]Micro version"
          },
          "warningVersion": {
            "major": "[int]Major version",
            "minor": "[int]Minor version",
            "micro": "[int]Micro version"
          },
          "errorVersion": {
            "major": "[int]Major version",
            "minor": "[int]Minor version",
            "micro": "[int]Micro version"
          },
          "scheduleEventId": "[string?]GS2-Schedule event GRN that enables version check"
        }
      ],
      "needSignature": "[bool]Whether the version value to be determined requires signature verification",
      "signatureKeyId": "[string]Encryption Key GRN",
      "approveRequirement": "[string enum]Requirement for approval"
    }
  ]
}
TypeConditionRequiredDefaultValue LimitsDescription
versionstring
2019-10-09Format version of master data
versionModelsList<VersionModel>~ 100 itemsVersion Model
You can set a warning version that accepts login but notifies you that you can upgrade, and an error version that does not accept login.

You can specify whether or not to have the client declare the current version with or without a signature.
If you select signed, the client will not be able to declare a false version.

Model

VersionModel

Version Model

You can set a warning version that accepts login but notifies you that you can upgrade, and an error version that does not accept login.

You can specify whether or not to have the client declare the current version with or without a signature. If you select signed, the client will not be able to declare a false version.

TypeConditionRequiredDefaultValue LimitsDescription
versionModelIdstring
*
~ 1024 charsVersion Model GRN
* Set automatically by the server
namestring
~ 128 charsVersion Model name
Version Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
metadatastring~ 2048 charsMetadata
Arbitrary values can be set in the metadata.
Since they do not affect GS2’s behavior, they can be used to store information used in the game.
scopeString Enum
enum {
  “passive”,
  “active”
}
Type of version value used for judgment
Determines how the version value is obtained for checking. “passive” means the client declares its current version at check time, while “active” means the system uses a version the user has explicitly approved in the past (such as agreeing to terms of service).
DefinitionDescription
“passive”Sent by Client
“active”Version explicitly approved in the past
typeString Enum
enum {
  “simple”,
  “schedule”
}
“simple”Version Check Mode
Selects the version checking strategy. “simple” uses fixed warning and error version thresholds, while “schedule” allows different version thresholds to be activated at different times using GS2-Schedule events.
DefinitionDescription
“simple”Simple
“schedule”Schedule Change
currentVersionVersion{type} == “simple” and {scope} == “active”
✓*
Current Version
The latest version available for this version model. Used only with “active” scope in “simple” mode to inform users of the current version when they approve or review version updates.
* Required if type is “simple” and scope is “active”
warningVersionVersion{type} == “simple”
✓*
Version that prompts for version upgrade
The minimum version threshold for showing an upgrade notification. If the client’s version is below this value, login is still allowed but the user is prompted to upgrade. Comparison is performed hierarchically: major, then minor, then micro.
* Required if type is “simple”
errorVersionVersion{type} == “simple”
✓*
Version that is determined to be an error by the version check
The minimum version threshold for allowing login. If the client’s version is below this value, the version check results in an error and login is blocked. Comparison is performed hierarchically: major, then minor, then micro.
* Required if type is “simple”
scheduleVersionsList<ScheduleVersion>{type} == “schedule”0 ~ 10 itemsList of Version check content that switches over time series
A list of version check configurations that activate at different times based on GS2-Schedule events. This allows gradual version enforcement, such as showing warnings before making an update mandatory.
* Applicable only if type is “schedule”
needSignaturebool{scope} == “passive”
✓*
Whether the version value to be determined requires signature verification
When enabled, the client must provide a cryptographic signature along with the version declaration. This prevents clients from falsely reporting a higher version to bypass version checks. Only applicable when scope is “passive”.
* Required if scope is “passive”
signatureKeyIdstring{needSignature}
✓*
~ 1024 charsEncryption Key GRN
* Required if needSignature is “true”
approveRequirementString Enum
enum {
  “required”,
  “optional”
}
{scope} == “active”“required”Requirement for approval
Controls whether user approval is mandatory or optional for this version model. When “required”, the version check fails if the user has not approved the current version. When “optional”, the version check passes regardless of approval status. Only applicable when scope is “active”.
DefinitionDescription
“required”Approval required
“optional”Approval optional
* Applicable only if scope is “active”

Version

Version

Represents a version number with a three-level hierarchy (major, minor, micro). Version comparison is performed hierarchically: major version is compared first, then minor, then micro. Used to define warning and error thresholds for version checking.

TypeConditionRequiredDefaultValue LimitsDescription
majorint
0 ~ 2147483646Major version
The highest priority component in version comparison. A difference in major version takes precedence over minor and micro versions.
minorint
0 ~ 2147483646Minor version
The second priority component in version comparison. Compared only when the major versions are equal.
microint
0 ~ 2147483646Micro version
The lowest priority component in version comparison. Compared only when both major and minor versions are equal.

ScheduleVersion

Version that switches in chronological order

Defines a set of version thresholds (current, warning, error) that become active during a specific time period controlled by a GS2-Schedule event. Multiple schedule versions can be configured to implement gradual version enforcement, such as warning users before blocking outdated clients.

TypeConditionRequiredDefaultValue LimitsDescription
currentVersionVersion
Current Version
The latest version available during this schedule period. Used with “active” scope to inform users of the current version when approving updates.
warningVersionVersion
Version that prompts for version upgrade
The minimum version threshold for showing an upgrade notification during this schedule period. Login is allowed but the user is prompted to upgrade.
errorVersionVersion
Version that is determined to be an error by the version check
The minimum version threshold for allowing login during this schedule period. If the client’s version is below this value, the version check results in an error and login is blocked.
scheduleEventIdstring~ 1024 charsGS2-Schedule event GRN that enables version check
Specifies the GS2-Schedule event that controls when this set of version thresholds is active. The version check configuration defined here only applies during the period when the specified event is active.