仕様/スクリプト/キャラクタステータス操作について(履歴ID:425)
      最終投稿者:
 akasata
      更新:2013/01/20 16:56:23
    
    
 akasata
      更新:2013/01/20 16:56:23
    
      このページでは、スクリプトでキャラクタのステータスを操作する
関数群の仕様について記述します。
詳細は関数リファレンスを参照してください。
関数リファレンス
http://rmake.jp/document/function_reference
プレイヤーキャラクタのステータス取得サンプル
パーティメンバーのステータス取得
取得できるステータス
getValueFromCharacterParam()関数の第2引数に指定できる関数の一覧です。
基本情報
現在のステータス
エディタ設定値
エディタでの設定値です。プレイヤーキャラクタの場合は
マイページのマイキャラで確認できる数値です。
    
  関数群の仕様について記述します。
詳細は関数リファレンスを参照してください。
関数リファレンス
http://rmake.jp/document/function_reference
プレイヤーキャラクタのステータス取得サンプル
| ゲームタイプ | 利用 | 
|---|---|
| 2DアクションRPG | Yes | 
| 2DRPG | Yes | 
| ノベルゲーム | No | 
# Character IDの取得
characterId = getValueFromCharacterParam(getPlayerParam(), getCharacterIdIndex())
# 名前の取得
characterName = getValueFromCharacterParam(getPlayerParam(), getCharacterNameIndex())
speak("ID: ", characterId, ", Name: ", characterName)
パーティメンバーのステータス取得
| ゲームタイプ | 利用 | 
|---|---|
| 2DアクションRPG | No | 
| 2DRPG | Yes | 
| ノベルゲーム | No | 
# 最初のメンバーのIDを取得する(0 ~ 3を指定可能)
memberId = getPartyMember(0)
# Character IDの取得
id = getValueFromCharacterParam(getPartyMemberParam(memberId), getCharacterIdIndex())
# 名前の取得
name = getValueFromCharacterParam(getPartyMemberParam(memberId), getCharacterNameIndex())
speak("ID: ", id, ", Name: ", name)
取得できるステータス
getValueFromCharacterParam()関数の第2引数に指定できる関数の一覧です。
基本情報
| ステータス名 | getValueFromCharacterParam()関数の第2引数で使用する関数 | 
|---|---|
| ID | getCharacterIdIndex() | 
| 名前 | getCharacterNameIndex() | 
| 名前(表示名) | getCharacterViewNameIndex() | 
| 位置(座標) | getCharacterPositionIndex() | 
現在のステータス
| ステータス名 | getValueFromCharacterParam()関数の第2引数で使用する関数 | 
|---|---|
| レベル | getCharacterLevelIndex() | 
| 最大HP | getCharacterMaxHPIndex() | 
| 最大MP | getCharacterMaxMPIndex() | 
| HP | getCharacterHPIndex() | 
| MP | getCharacterMPIndex() | 
| 力 | getCharacterStrengthIndex() | 
| 耐久 | getCharacterDefenceIndex() | 
| 賢さ | getCharacterIntellectIndex() | 
| 精神 | getCharacterMentalIndex() | 
| 器用さ | getCharacterDexterityIndex() | 
エディタ設定値
エディタでの設定値です。プレイヤーキャラクタの場合は
マイページのマイキャラで確認できる数値です。
| ステータス名 | getValueFromCharacterParam()関数の第2引数で使用する関数 | 
|---|---|
| 基本最大HP | getCharacterBaseMaxHPIndex() | 
| 基本最大MP | getCharacterBaseMaxMPIndex() | 
| 基本力 | getCharacterBaseStrengthIndex() | 
| 基本耐久 | getCharacterBaseDeffenceIndex() | 
| 基本賢さ | getCharacterBaseIntellectIndex() | 
| 基本精神 | getCharacterBaseMentalIndex() | 
| 基本器用さ | getCharacterBaseDexterityIndex() |