> For the complete documentation index, see [llms.txt](/llms.txt)

# GS2-Experience Buff リファレンス

GS2-Buff でバフを適用する際に指定する、パラメータの補正が可能なモデル/アクション内のフィールドと、その適用範囲の設定について




{{% alert title="Note" color="info" %}}
バフエントリーモデルの詳細については [BuffEntryModel](api_reference/buff/master_data/#buffentrymodel) をご参照ください。
{{% /alert %}}

## Models
バフを適用可能なモデルの種類

### Gs2Experience:Status
ステータス


#### バフの適用対象フィールド

##### rankCapValue


|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| rankCapValue | long |  | ✓|  | 0 ~ 9223372036854775805 | 現在のランクキャップ<br>このステータスが現在到達できる最大ランクです。初期値は経験値モデルの defaultRankCap に設定され、限界突破などのランクキャップ増加操作により maxRankCap まで引き上げることができます。 |


##### マスターデータ記述例

`rate` には、対象フィールドに対する補正レートを指定します。


**JSON**
```json
"targetModel": {
    "targetModelName": "Gs2Experience:Status",
    "targetFieldName": "rankCapValue",
    "conditionGrns": [
    ],
    "rate": 1.0
}
```



#### バフの適用条件モデル

##### Gs2Experience:ExperienceModel


経験値モデル


##### マスターデータ記述例


**JSON**
```json
"conditionGrns": [
    {
        "targetModelName": "Gs2Experience:ExperienceModel",
        "targetGrn": "grn:gs2:any:any:experience:{namespaceName}:model:{experienceName}"
    }
]
```


##### Gs2Experience:Status


ステータス


##### マスターデータ記述例


**JSON**
```json
"conditionGrns": [
    {
        "targetModelName": "Gs2Experience:Status",
        "targetGrn": "grn:gs2:any:any:experience:{namespaceName}:user:any:experienceModel:{experienceName}:property:{propertyId}"
    }
]
```


---
## Action
バフを適用可能なアクションの種類

### Gs2Experience:AddExperienceByUserId
ユーザーIDを指定して経験値を加算<br>

指定されたユーザーのステータスに経験値を加算します。ランクはランクアップ閾値に基づいて自動的に再計算されます。<br>
truncateExperienceWhenRankUp が true の場合、ランクアップ時に閾値を超えた余剰経験値は切り捨てられます。false（デフォルト）の場合は次のランクに繰り越されます。


#### バフの適用対象フィールド

##### experienceValue


[Status - ステータス](../sdk#status)



|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| experienceValue | long |  | | 0 | 0 ~ 9223372036854775805 | 獲得経験値 |


##### マスターデータ記述例



**JSON**
```json
"targetAction": {
    "targetActionName": "Gs2Experience:AddExperienceByUserId",
    "targetFieldName": "experienceValue",
    "conditionGrns": [
    ],
    "rate": 1.0
}
```

#### バフの適用条件モデル

##### Gs2Experience:ExperienceModel


経験値モデル


##### マスターデータ記述例


**JSON**
```json
"conditionGrns": [
    {
        "targetModelName": "Gs2Experience:ExperienceModel",
        "targetGrn": "grn:gs2:{region}:{ownerId}:experience:{namespaceName}:model:{experienceName}"
    }
]
```


##### Gs2Experience:Status


ステータス


##### マスターデータ記述例


**JSON**
```json
"conditionGrns": [
    {
        "targetModelName": "Gs2Experience:Status",
        "targetGrn": "grn:gs2:{region}:{ownerId}:experience:{namespaceName}:user:{userId}:experienceModel:{experienceName}:property:{propertyId}"
    }
]
```



---

### Gs2Experience:SubExperience
経験値を減算<br>

リクエストしたユーザーのステータスから経験値を減算します。経験値は0を下回りません。<br>
ランクはランクアップ閾値に基づいて自動的に再計算されます。


#### バフの適用対象フィールド

##### experienceValue


[Status - ステータス](../sdk#status)



|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| experienceValue | long |  | | 0 | 0 ~ 9223372036854775805 | 失う経験値 |


##### マスターデータ記述例



**JSON**
```json
"targetAction": {
    "targetActionName": "Gs2Experience:SubExperience",
    "targetFieldName": "experienceValue",
    "conditionGrns": [
    ],
    "rate": 1.0
}
```

#### バフの適用条件モデル

##### Gs2Experience:ExperienceModel


経験値モデル


##### マスターデータ記述例


**JSON**
```json
"conditionGrns": [
    {
        "targetModelName": "Gs2Experience:ExperienceModel",
        "targetGrn": "grn:gs2:{region}:{ownerId}:experience:{namespaceName}:model:{experienceName}"
    }
]
```


##### Gs2Experience:Status


ステータス


##### マスターデータ記述例


**JSON**
```json
"conditionGrns": [
    {
        "targetModelName": "Gs2Experience:Status",
        "targetGrn": "grn:gs2:{region}:{ownerId}:experience:{namespaceName}:user:{userId}:experienceModel:{experienceName}:property:{propertyId}"
    }
]
```



---

### Gs2Experience:SubExperienceByUserId
ユーザーIDを指定して経験値を減算<br>

指定されたユーザーのステータスから経験値を減算します。経験値は0を下回りません。<br>
ランクはランクアップ閾値に基づいて自動的に再計算されます。


#### バフの適用対象フィールド

##### experienceValue


[Status - ステータス](../sdk#status)



|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| experienceValue | long |  | | 0 | 0 ~ 9223372036854775805 | 失う経験値 |


##### マスターデータ記述例



**JSON**
```json
"targetAction": {
    "targetActionName": "Gs2Experience:SubExperienceByUserId",
    "targetFieldName": "experienceValue",
    "conditionGrns": [
    ],
    "rate": 1.0
}
```

#### バフの適用条件モデル

##### Gs2Experience:ExperienceModel


経験値モデル


##### マスターデータ記述例


**JSON**
```json
"conditionGrns": [
    {
        "targetModelName": "Gs2Experience:ExperienceModel",
        "targetGrn": "grn:gs2:{region}:{ownerId}:experience:{namespaceName}:model:{experienceName}"
    }
]
```


##### Gs2Experience:Status


ステータス


##### マスターデータ記述例


**JSON**
```json
"conditionGrns": [
    {
        "targetModelName": "Gs2Experience:Status",
        "targetGrn": "grn:gs2:{region}:{ownerId}:experience:{namespaceName}:user:{userId}:experienceModel:{experienceName}:property:{propertyId}"
    }
]
```



---



