Jump to content
Rpg²S Forum
  • 0

Menu FF7 PHS


suXer
 Share

Question

2 answers to this question

Recommended Posts

  • 0

Menù FFVII + PHS

 

 

1. Descrizione

Menù alla FFVII con l'aggiunta di un add-on,il PHS,una finestra per cambiare i personaggi del party.

 

2. Autore

Jappo

Traduction and Add-on by:Tio

 

Il PHS funziona come l'opzione per salvare: se userete il comando dell'evento "Disallow saving", verrà disattivato pure il PHS.Per togliere quest'opzione eliminate questa stringa (riga 661):

 

CODICE@command_window.disable_item(4)

 

e più in basso queste stringhe(dalla 757 alla 760):

 

CODICEif $game_system.save_disabled

$game_system.se_play($data_system.buzzer_se)

return

end

 

E ora veniamo al code.

Prima di tutto create una classe sopra Main e copiateci tutto questo:

 

 

Menù FFVII + PHS

 

 

1. Descrizione

Menù alla FFVII con l'aggiunta di un add-on,il PHS,una finestra per cambiare i personaggi del party.

 

2. Autore

Jappo

Traduction and Add-on by:Tio

 

Il PHS funziona come l'opzione per salvare: se userete il comando dell'evento "Disallow saving", verrà disattivato pure il PHS.Per togliere quest'opzione eliminate questa stringa (riga 661):

 

CODICE@command_window.disable_item(4)

 

e più in basso queste stringhe(dalla 757 alla 760):

 

CODICEif $game_system.save_disabled

$game_system.se_play($data_system.buzzer_se)

return

end

 

E ora veniamo al code.

Prima di tutto create una classe sopra Main e copiateci tutto questo:

 

 

 

# ■ Game_Actor

#------------------------------------------------------------------------------

#  アクターを扱うクラスです。このクラスは Game_Actors クラス ($game_actors)

# の内部で使用され、Game_Party クラス ($game_party) からも参照されます。

#===============================================================

 

 

class Game_Actor < Game_Battler

#--------------------------------------------------------------------------

# ● 公開インスタンス変数

#--------------------------------------------------------------------------

attr_reader :name # 名前

attr_reader :character_name # キャラクター ファイル名

attr_reader :character_hue # キャラクター 色相

attr_reader :class_id # クラス ID

attr_reader :weapon_id # 武器 ID

attr_reader :armor1_id # 盾 ID

attr_reader :armor2_id # 頭防具 ID

attr_reader :armor3_id # 体防具 ID

attr_reader :armor4_id # 装飾品 ID

attr_reader :level # レベル

attr_reader :exp # EXP

attr_reader :skills # スキル

attr_accessor :fixed_member # 固定メンバーフラグ

#--------------------------------------------------------------------------

# ● オブジェクト初期化

# actor_id : アクター ID

#--------------------------------------------------------------------------

def initialize(actor_id)

super()

setup(actor_id)

end

#--------------------------------------------------------------------------

# ● セットアップ

# actor_id : アクター ID

#--------------------------------------------------------------------------

def setup(actor_id)

actor = $data_actors[actor_id]

@actor_id = actor_id

@name = actor.name

@character_name = actor.character_name

@character_hue = actor.character_hue

@battler_name = actor.battler_name

@battler_hue = actor.battler_hue

@class_id = actor.class_id

@weapon_id = actor.weapon_id

@armor1_id = actor.armor1_id

@armor2_id = actor.armor2_id

@armor3_id = actor.armor3_id

@armor4_id = actor.armor4_id

@level = actor.initial_level

@exp_list = Array.new(101)

make_exp_list

@exp = @exp_list[@level]

@skills = []

@hp = maxhp

@sp = maxsp

@states = []

@states_turn = {}

@maxhp_plus = 0

@maxsp_plus = 0

@str_plus = 0

@dex_plus = 0

@agi_plus = 0

@int_plus = 0

@fixed_member = 0

# スキル習得

for i in 1..@level

for j in $data_classes[@class_id].learnings

if j.level == i

learn_skill(j.skill_id)

end

end

end

# オートステートを更新

update_auto_state(nil, $data_armors[@armor1_id])

update_auto_state(nil, $data_armors[@armor2_id])

update_auto_state(nil, $data_armors[@armor3_id])

update_auto_state(nil, $data_armors[@armor4_id])

end

#--------------------------------------------------------------------------

# ● アクター ID 取得

#--------------------------------------------------------------------------

def id

return @actor_id

end

#--------------------------------------------------------------------------

# ● インデックス取得

#--------------------------------------------------------------------------

def index

return $game_party.actors.index(self)

end

#--------------------------------------------------------------------------

# ● EXP 計算

#--------------------------------------------------------------------------

def make_exp_list

actor = $data_actors[@actor_id]

@exp_list[1] = 0

pow_i = 2.4 + actor.exp_inflation / 100.0

for i in 2..100

if i > actor.final_level

@exp_list = 0

else

n = actor.exp_basis * ((i + 3) ** pow_i) / (5 ** pow_i)

@exp_list = @exp_list[i-1] + Integer(n)

end

end

end

#--------------------------------------------------------------------------

# ● 属性補正値の取得

# element_id : 属性 ID

#--------------------------------------------------------------------------

def element_rate(element_id)

# 属性有効度に対応する数値を取得

table = [0,200,150,100,50,0,-100]

result = table[$data_classes[@class_id].element_ranks[element_id]]

# 防具でこの属性が防御されている場合は半減

for i in [@armor1_id, @armor2_id, @armor3_id, @armor4_id]

armor = $data_armors

if armor != nil and armor.guard_element_set.include?(element_id)

result /= 2

end

end

# ステートでこの属性が防御されている場合は半減

for i in @states

if $data_states.guard_element_set.include?(element_id)

result /= 2

end

end

# メソッド終了

return result

end

#--------------------------------------------------------------------------

# ● ステート有効度の取得

#--------------------------------------------------------------------------

def state_ranks

return $data_classes[@class_id].state_ranks

end

#--------------------------------------------------------------------------

# ● ステート防御判定

# state_id : ステート ID

#--------------------------------------------------------------------------

def state_guard?(state_id)

for i in [@armor1_id, @armor2_id, @armor3_id, @armor4_id]

armor = $data_armors

if armor != nil

if armor.guard_state_set.include?(state_id)

return true

end

end

end

return false

end

#--------------------------------------------------------------------------

# ● 通常攻撃の属性取得

#--------------------------------------------------------------------------

def element_set

weapon = $data_weapons[@weapon_id]

return weapon != nil ? weapon.element_set : []

end

#--------------------------------------------------------------------------

# ● 通常攻撃のステート変化 (+) 取得

#--------------------------------------------------------------------------

def plus_state_set

weapon = $data_weapons[@weapon_id]

return weapon != nil ? weapon.plus_state_set : []

end

#--------------------------------------------------------------------------

# ● 通常攻撃のステート変化 (-) 取得

#--------------------------------------------------------------------------

def minus_state_set

weapon = $data_weapons[@weapon_id]

return weapon != nil ? weapon.minus_state_set : []

end

#--------------------------------------------------------------------------

# ● MaxHP の取得

#--------------------------------------------------------------------------

def maxhp

n = [[base_maxhp + @maxhp_plus, 1].max, 9999].min

for i in @states

n *= $data_states.maxhp_rate / 100.0

end

n = [[integer(n), 1].max, 9999].min

return n

end

#--------------------------------------------------------------------------

# ● 基本 MaxHP の取得

#--------------------------------------------------------------------------

def base_maxhp

return $data_actors[@actor_id].parameters[0, @level]

end

#--------------------------------------------------------------------------

# ● 基本 MaxSP の取得

#--------------------------------------------------------------------------

def base_maxsp

return $data_actors[@actor_id].parameters[1, @level]

end

#--------------------------------------------------------------------------

# ● 基本腕力の取得

#--------------------------------------------------------------------------

def base_str

n = $data_actors[@actor_id].parameters[2, @level]

weapon = $data_weapons[@weapon_id]

armor1 = $data_armors[@armor1_id]

armor2 = $data_armors[@armor2_id]

armor3 = $data_armors[@armor3_id]

armor4 = $data_armors[@armor4_id]

n += weapon != nil ? weapon.str_plus : 0

n += armor1 != nil ? armor1.str_plus : 0

n += armor2 != nil ? armor2.str_plus : 0

n += armor3 != nil ? armor3.str_plus : 0

n += armor4 != nil ? armor4.str_plus : 0

return [[n, 1].max, 999].min

end

#--------------------------------------------------------------------------

# ● 基本器用さの取得

#--------------------------------------------------------------------------

def base_dex

n = $data_actors[@actor_id].parameters[3, @level]

weapon = $data_weapons[@weapon_id]

armor1 = $data_armors[@armor1_id]

armor2 = $data_armors[@armor2_id]

armor3 = $data_armors[@armor3_id]

armor4 = $data_armors[@armor4_id]

n += weapon != nil ? weapon.dex_plus : 0

n += armor1 != nil ? armor1.dex_plus : 0

n += armor2 != nil ? armor2.dex_plus : 0

n += armor3 != nil ? armor3.dex_plus : 0

n += armor4 != nil ? armor4.dex_plus : 0

return [[n, 1].max, 999].min

end

#--------------------------------------------------------------------------

# ● 基本素早さの取得

#--------------------------------------------------------------------------

def base_agi

n = $data_actors[@actor_id].parameters[4, @level]

weapon = $data_weapons[@weapon_id]

armor1 = $data_armors[@armor1_id]

armor2 = $data_armors[@armor2_id]

armor3 = $data_armors[@armor3_id]

armor4 = $data_armors[@armor4_id]

n += weapon != nil ? weapon.agi_plus : 0

n += armor1 != nil ? armor1.agi_plus : 0

n += armor2 != nil ? armor2.agi_plus : 0

n += armor3 != nil ? armor3.agi_plus : 0

n += armor4 != nil ? armor4.agi_plus : 0

return [[n, 1].max, 999].min

end

#--------------------------------------------------------------------------

# ● 基本魔力の取得

#--------------------------------------------------------------------------

def base_int

n = $data_actors[@actor_id].parameters[5, @level]

weapon = $data_weapons[@weapon_id]

armor1 = $data_armors[@armor1_id]

armor2 = $data_armors[@armor2_id]

armor3 = $data_armors[@armor3_id]

armor4 = $data_armors[@armor4_id]

n += weapon != nil ? weapon.int_plus : 0

n += armor1 != nil ? armor1.int_plus : 0

n += armor2 != nil ? armor2.int_plus : 0

n += armor3 != nil ? armor3.int_plus : 0

n += armor4 != nil ? armor4.int_plus : 0

return [[n, 1].max, 999].min

end

#--------------------------------------------------------------------------

# ● 基本攻撃力の取得

#--------------------------------------------------------------------------

def base_atk

weapon = $data_weapons[@weapon_id]

return weapon != nil ? weapon.atk : 0

end

#--------------------------------------------------------------------------

# ● 基本物理防御の取得

#--------------------------------------------------------------------------

def base_pdef

weapon = $data_weapons[@weapon_id]

armor1 = $data_armors[@armor1_id]

armor2 = $data_armors[@armor2_id]

armor3 = $data_armors[@armor3_id]

armor4 = $data_armors[@armor4_id]

pdef1 = weapon != nil ? weapon.pdef : 0

pdef2 = armor1 != nil ? armor1.pdef : 0

pdef3 = armor2 != nil ? armor2.pdef : 0

pdef4 = armor3 != nil ? armor3.pdef : 0

pdef5 = armor4 != nil ? armor4.pdef : 0

return pdef1 + pdef2 + pdef3 + pdef4 + pdef5

end

#--------------------------------------------------------------------------

# ● 基本魔法防御の取得

#--------------------------------------------------------------------------

def base_mdef

weapon = $data_weapons[@weapon_id]

armor1 = $data_armors[@armor1_id]

armor2 = $data_armors[@armor2_id]

armor3 = $data_armors[@armor3_id]

armor4 = $data_armors[@armor4_id]

mdef1 = weapon != nil ? weapon.mdef : 0

mdef2 = armor1 != nil ? armor1.mdef : 0

mdef3 = armor2 != nil ? armor2.mdef : 0

mdef4 = armor3 != nil ? armor3.mdef : 0

mdef5 = armor4 != nil ? armor4.mdef : 0

return mdef1 + mdef2 + mdef3 + mdef4 + mdef5

end

#--------------------------------------------------------------------------

# ● 基本回避修正の取得

#--------------------------------------------------------------------------

def base_eva

armor1 = $data_armors[@armor1_id]

armor2 = $data_armors[@armor2_id]

armor3 = $data_armors[@armor3_id]

armor4 = $data_armors[@armor4_id]

eva1 = armor1 != nil ? armor1.eva : 0

eva2 = armor2 != nil ? armor2.eva : 0

eva3 = armor3 != nil ? armor3.eva : 0

eva4 = armor4 != nil ? armor4.eva : 0

return eva1 + eva2 + eva3 + eva4

end

#--------------------------------------------------------------------------

# ● 通常攻撃 攻撃側アニメーション ID の取得

#--------------------------------------------------------------------------

def animation1_id

weapon = $data_weapons[@weapon_id]

return weapon != nil ? weapon.animation1_id : 0

end

#--------------------------------------------------------------------------

# ● 通常攻撃 対象側アニメーション ID の取得

#--------------------------------------------------------------------------

def animation2_id

weapon = $data_weapons[@weapon_id]

return weapon != nil ? weapon.animation2_id : 0

end

#--------------------------------------------------------------------------

# ● クラス名の取得

#--------------------------------------------------------------------------

def class_name

return $data_classes[@class_id].name

end

#--------------------------------------------------------------------------

# ● EXP の文字列取得

#--------------------------------------------------------------------------

def exp_s

return @exp_list[@level+1] > 0 ? @exp.to_s : "-------"

end

#--------------------------------------------------------------------------

# ● 次のレベルの EXP の文字列取得

#--------------------------------------------------------------------------

def next_exp_s

return @exp_list[@level+1] > 0 ? @exp_list[@level+1].to_s : "-------"

end

#--------------------------------------------------------------------------

# ● 次のレベルまでの EXP の文字列取得

#--------------------------------------------------------------------------

def next_rest_exp_s

return @exp_list[@level+1] > 0 ?

(@exp_list[@level+1] - @exp).to_s : "-------"

end

#--------------------------------------------------------------------------

# ● オートステートの更新

# old_armor : 外した防具

# new_armor : 装備した防具

#--------------------------------------------------------------------------

def update_auto_state(old_armor, new_armor)

# 外した防具のオートステートを強制解除

if old_armor != nil and old_armor.auto_state_id != 0

remove_state(old_armor.auto_state_id, true)

end

# 装備した防具のオートステートを強制付加

if new_armor != nil and new_armor.auto_state_id != 0

add_state(new_armor.auto_state_id, true)

end

end

#--------------------------------------------------------------------------

# ● 装備固定判定

# equip_type : 装備タイプ

#--------------------------------------------------------------------------

def equip_fix?(equip_type)

case equip_type

when 0 # 武器

return $data_actors[@actor_id].weapon_fix

when 1 # 盾

return $data_actors[@actor_id].armor1_fix

when 2 # 頭

return $data_actors[@actor_id].armor2_fix

when 3 # 身体

return $data_actors[@actor_id].armor3_fix

when 4 # 装飾品

return $data_actors[@actor_id].armor4_fix

end

return false

end

#--------------------------------------------------------------------------

# ● 装備の変更

# equip_type : 装備タイプ

# id : 武器 or 防具 ID (0 なら装備解除)

#--------------------------------------------------------------------------

def equip(equip_type, id)

case equip_type

when 0 # 武器

if id == 0 or $game_party.weapon_number(id) > 0

$game_party.gain_weapon(@weapon_id, 1)

@weapon_id = id

$game_party.lose_weapon(id, 1)

end

when 1 # 盾

if id == 0 or $game_party.armor_number(id) > 0

update_auto_state($data_armors[@armor1_id], $data_armors[id])

$game_party.gain_armor(@armor1_id, 1)

@armor1_id = id

$game_party.lose_armor(id, 1)

end

when 2 # 頭

if id == 0 or $game_party.armor_number(id) > 0

update_auto_state($data_armors[@armor2_id], $data_armors[id])

$game_party.gain_armor(@armor2_id, 1)

@armor2_id = id

$game_party.lose_armor(id, 1)

end

when 3 # 身体

if id == 0 or $game_party.armor_number(id) > 0

update_auto_state($data_armors[@armor3_id], $data_armors[id])

$game_party.gain_armor(@armor3_id, 1)

@armor3_id = id

$game_party.lose_armor(id, 1)

end

when 4 # 装飾品

if id == 0 or $game_party.armor_number(id) > 0

update_auto_state($data_armors[@armor4_id], $data_armors[id])

$game_party.gain_armor(@armor4_id, 1)

@armor4_id = id

$game_party.lose_armor(id, 1)

end

end

end

#--------------------------------------------------------------------------

# ● 装備可能判定

# item : アイテム

#--------------------------------------------------------------------------

def equippable?(item)

# 武器の場合

if item.is_a?(RPG::Weapon)

# 現在のクラスの装備可能な武器に含まれている場合

if $data_classes[@class_id].weapon_set.include?(item.id)

return true

end

end

# 防具の場合

if item.is_a?(RPG::Armor)

# 現在のクラスの装備可能な防具に含まれている場合

if $data_classes[@class_id].armor_set.include?(item.id)

return true

end

end

return false

end

#--------------------------------------------------------------------------

# ● EXP の変更

# exp : 新しい EXP

#--------------------------------------------------------------------------

def exp=(exp)

@exp = [[exp, 9999999].min, 0].max

# レベルアップ

while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0

@level += 1

# スキル習得

for j in $data_classes[@class_id].learnings

if j.level == @level

learn_skill(j.skill_id)

end

end

end

# レベルダウン

while @exp < @exp_list[@level]

@level -= 1

end

# 現在の HP と SP が最大値を超えていたら修正

@hp = [@hp, self.maxhp].min

@sp = [@sp, self.maxsp].min

end

#--------------------------------------------------------------------------

# ● レベルの変更

# level : 新しいレベル

#--------------------------------------------------------------------------

def level=(level)

# 上下限チェック

level = [[level, $data_actors[@actor_id].final_level].min, 1].max

# EXP を変更

self.exp = @exp_list[level]

end

#--------------------------------------------------------------------------

# ● スキルを覚える

# skill_id : スキル ID

#--------------------------------------------------------------------------

def learn_skill(skill_id)

if skill_id > 0 and not skill_learn?(skill_id)

@skills.push(skill_id)

@skills.sort!

end

end

#--------------------------------------------------------------------------

# ● スキルを忘れる

# skill_id : スキル ID

#--------------------------------------------------------------------------

def forget_skill(skill_id)

@skills.delete(skill_id)

end

#--------------------------------------------------------------------------

# ● スキルの習得済み判定

# skill_id : スキル ID

#--------------------------------------------------------------------------

def skill_learn?(skill_id)

return @skills.include?(skill_id)

end

#--------------------------------------------------------------------------

# ● スキルの使用可能判定

# skill_id : スキル ID

#--------------------------------------------------------------------------

def skill_can_use?(skill_id)

if not skill_learn?(skill_id)

return false

end

return super

end

#--------------------------------------------------------------------------

# ● 名前の変更

# name : 新しい名前

#--------------------------------------------------------------------------

def name=(name)

@name = name

end

#--------------------------------------------------------------------------

# ● クラス ID の変更

# class_id : 新しいクラス ID

#--------------------------------------------------------------------------

def class_id=(class_id)

if $data_classes[class_id] != nil

@class_id = class_id

# 装備できなくなったアイテムを外す

unless equippable?($data_weapons[@weapon_id])

equip(0, 0)

end

unless equippable?($data_armors[@armor1_id])

equip(1, 0)

end

unless equippable?($data_armors[@armor2_id])

equip(2, 0)

end

unless equippable?($data_armors[@armor3_id])

equip(3, 0)

end

unless equippable?($data_armors[@armor4_id])

equip(4, 0)

end

end

end

#--------------------------------------------------------------------------

# ● グラフィックの変更

# character_name : 新しいキャラクター ファイル名

# character_hue : 新しいキャラクター 色相

# battler_name : 新しいバトラー ファイル名

# battler_hue : 新しいバトラー 色相

#--------------------------------------------------------------------------

def set_graphic(character_name, character_hue, battler_name, battler_hue)

@character_name = character_name

@character_hue = character_hue

@battler_name = battler_name

@battler_hue = battler_hue

end

#--------------------------------------------------------------------------

# ● バトル画面 X 座標の取得

#--------------------------------------------------------------------------

def screen_x

# パーティ内の並び順から X 座標を計算して返す

if self.index != nil

return self.index * 160 + 80

else

return 0

end

end

#--------------------------------------------------------------------------

# ● バトル画面 Y 座標の取得

#--------------------------------------------------------------------------

def screen_y

return 464

end

#--------------------------------------------------------------------------

# ● バトル画面 Z 座標の取得

#--------------------------------------------------------------------------

def screen_z

# パーティ内の並び順から Z 座標を計算して返す

if self.index != nil

return 4 - self.index

else

return 0

end

end

end

 

 

 

 

 

 

Game_Party

 

#===============================================================

 

===============

# ■ Game_Party

#------------------------------------------------------------------------------

#  パーティを扱うクラスです。ゴールドやアイテムなどの惼br />?報が含まれます。このク

# ラスのインスタンスは $game_party で参照されます。

#===============================================================

 

===============

 

class Game_Party

#--------------------------------------------------------------------------

# ● 公開インスタンス変数

#--------------------------------------------------------------------------

attr_reader :actors # アクター

attr_reader :gold # ゴールド

attr_reader :steps # 歩数

attr_accessor :member # パーティーメンバー

#--------------------------------------------------------------------------

# ● オブジェクト初期化

#--------------------------------------------------------------------------

def initialize

# アクターの配列を作成

@actors = []

# ゴールドと歩数を初期化

@gold = 0

@steps = 0

# アイテム、武器、防具の所持数ハッシュを作成

@items = {}

@weapons = {}

@armors = {}

# PTメンバー用配列を作成

@member = []

end

#--------------------------------------------------------------------------

# ● 初期パーティのセットアップ

#--------------------------------------------------------------------------

def setup_starting_members

@actors = []

for i in $data_system.party_members

@actors.push($game_actors)

@member.push($game_actors.id)

end

@member.sort!

end

#--------------------------------------------------------------------------

# ● 戦闘テスト用パーティのセットアップ

#--------------------------------------------------------------------------

def setup_battle_test_members

@actors = []

for battler in $data_system.test_battlers

actor = $game_actors[battler.actor_id]

actor.level = battler.level

gain_weapon(battler.weapon_id, 1)

gain_armor(battler.armor1_id, 1)

gain_armor(battler.armor2_id, 1)

gain_armor(battler.armor3_id, 1)

gain_armor(battler.armor4_id, 1)

actor.equip(0, battler.weapon_id)

actor.equip(1, battler.armor1_id)

actor.equip(2, battler.armor2_id)

actor.equip(3, battler.armor3_id)

actor.equip(4, battler.armor4_id)

actor.recover_all

@actors.push(actor)

end

@items = {}

for i in 1...$data_items.size

if $data_items.name != ""

occasion = $data_items.occasion

if occasion == 0 or occasion == 1

@items = 99

end

end

end

end

#--------------------------------------------------------------------------

# ● パーティメンバーのリフレッシュ

#--------------------------------------------------------------------------

def refresh

# ゲームデータをロードした直後はアクターオブジェクトが

# $game_actors から分離してしまっている。

# ロードのたびにアクターを再設定することで問題を回避すゼbr />?。

new_actors = []

for i in 0...@actors.size

if $data_actors[@actors.id] != nil

new_actors.push($game_actors[@actors.id])

end

end

@actors = new_actors

end

#--------------------------------------------------------------------------

# ● 最大レベルの取得

#--------------------------------------------------------------------------

def max_level

# パーティ人数が 0 人の場合

if @actors.size == 0

return 0

end

# ローカル変数 level を初期化

level = 0

# パーティメンバーの最大レベルを求める

for actor in @actors

if level < actor.level

level = actor.level

end

end

return level

end

#--------------------------------------------------------------------------

# ● アクターを加える

# actor_id : アクター ID

#--------------------------------------------------------------------------

def add_actor(actor_id)

# アクターを取得

actor = $game_actors[actor_id]

# パーティ人数が 4 人未満で、このアクターがパーティにいない場合

if @actors.size < 4 and not @actors.include?(actor)

# アクターを追加

@actors.push(actor)

# プレイヤーをリフレッシュ

$game_player.refresh

end

# パーティーメンバー配列にアクターID追加

unless @member.include?(actor.id)

@member.push(actor.id)

@member.sort!

end

end

#--------------------------------------------------------------------------

# ● アクターを外す

# actor_id : アクター ID

#--------------------------------------------------------------------------

def remove_actor(actor_id)

# アクターを削除

@actors.delete($game_actors[actor_id])

# プレイヤーをリフレッシュ

$game_player.refresh

# パーティーメンバー配列からアクターID削除

@member.delete(actor_id)

end

#--------------------------------------------------------------------------

# ● アクターを外す : 待機メンバーに配置

# actor_id : アクター ID

#--------------------------------------------------------------------------

def wait_actor(actor_id)

# アクターを削除

@actors.delete($game_actors[actor_id])

# プレイヤーをリフレッシュ

$game_player.refresh

end

#--------------------------------------------------------------------------

# ● アクターを変更

# actor_id : アクター ID

# index : 交換を行う位置

#--------------------------------------------------------------------------

def change_actor(actor_id, index)

# アクターを変更

@actors[index] = $game_actors[actor_id]

# プレイヤーをリフレッシュ

$game_player.refresh

end

#--------------------------------------------------------------------------

# ● ゴールドの増加 (減少)

# n : 金額

#--------------------------------------------------------------------------

def gain_gold(n)

@gold = [[@gold + n, 0].max, 9999999].min

end

#--------------------------------------------------------------------------

# ● ゴールドの減少

# n : 金額

#--------------------------------------------------------------------------

def lose_gold(n)

# 数値を逆転して gain_gold を呼ぶ

gain_gold(-n)

end

#--------------------------------------------------------------------------

# ● 歩数増加

#--------------------------------------------------------------------------

def increase_steps

@steps = [@steps + 1, 9999999].min

end

#--------------------------------------------------------------------------

# ● アイテムの所持数取得

# item_id : アイテム ID

#--------------------------------------------------------------------------

def item_number(item_id)

# ハッシュに個数データがあればその数値を、なければ 0 を返す

return @items.include?(item_id) ? @items[item_id] : 0

end

#--------------------------------------------------------------------------

# ● 武器の所持数取得

# weapon_id : 武器 ID

#--------------------------------------------------------------------------

def weapon_number(weapon_id)

# ハッシュに個数データがあればその数値を、なければ 0 を返す

return @weapons.include?(weapon_id) ? @weapons[weapon_id] : 0

end

#--------------------------------------------------------------------------

# ● 防具の所持数取得

# armor_id : 防具 ID

#--------------------------------------------------------------------------

def armor_number(armor_id)

# ハッシュに個数データがあればその数値を、なければ 0 を返す

return @armors.include?(armor_id) ? @armors[armor_id] : 0

end

#--------------------------------------------------------------------------

# ● アイテムの増加 (減少)

# item_id : アイテム ID

# n : 個数

#--------------------------------------------------------------------------

def gain_item(item_id, n)

# ハッシュの個数データを更新

if item_id > 0

@items[item_id] = [[item_number(item_id) + n, 0].max, 99].min

end

end

#--------------------------------------------------------------------------

# ● 武器の増加 (減少)

# weapon_id : 武器 ID

# n : 個数

#--------------------------------------------------------------------------

def gain_weapon(weapon_id, n)

# ハッシュの個数データを更新

if weapon_id > 0

@weapons[weapon_id] = [[weapon_number(weapon_id) + n, 0].max, 99].min

end

end

#--------------------------------------------------------------------------

# ● 防具の増加 (減少)

# armor_id : 防具 ID

# n : 個数

#--------------------------------------------------------------------------

def gain_armor(armor_id, n)

# ハッシュの個数データを更新

if armor_id > 0

@armors[armor_id] = [[armor_number(armor_id) + n, 0].max, 99].min

end

end

#--------------------------------------------------------------------------

# ● アイテムの減少

# item_id : アイテム ID

# n : 個数

#--------------------------------------------------------------------------

def lose_item(item_id, n)

# 数値を逆転して gain_item を呼ぶ

gain_item(item_id, -n)

end

#--------------------------------------------------------------------------

# ● 武器の減少

# weapon_id : 武器 ID

# n : 個数

#--------------------------------------------------------------------------

def lose_weapon(weapon_id, n)

# 数値を逆転して gain_weapon を呼ぶ

gain_weapon(weapon_id, -n)

end

#--------------------------------------------------------------------------

# ● 防具の減少

# armor_id : 防具 ID

# n : 個数

#--------------------------------------------------------------------------

def lose_armor(armor_id, n)

# 数値を逆転して gain_armor を呼ぶ

gain_armor(armor_id, -n)

end

#--------------------------------------------------------------------------

# ● アイテムの使用可能判定

# item_id : アイテム ID

#--------------------------------------------------------------------------

def item_can_use?(item_id)

# アイテムの個数が 0 個の場合

if item_number(item_id) == 0

# 使用不能

return false

end

# 使用可能時を取得

occasion = $data_items[item_id].occasion

# バトルの場合

if $game_temp.in_battle

# 使用可能時が 0 (常時) または 1 (バトルのみ) なら使用可能

return (occasion == 0 or occasion == 1)

end

# 使用可能時が 0 (常時) または 2 (メニューのみ) なら使用可能

return (occasion == 0 or occasion == 2)

end

#--------------------------------------------------------------------------

# ● 全員のアクションクリア

#--------------------------------------------------------------------------

def clear_actions

# パーティ全員のアクションをクリア

for actor in @actors

actor.current_action.clear

end

end

#--------------------------------------------------------------------------

# ● コマンド入力可能判定

#--------------------------------------------------------------------------

def inputable?

# 一人でもコマンド入力可能なら true を返す

for actor in @actors

if actor.inputable?

return true

end

end

return false

end

#--------------------------------------------------------------------------

# ● 全滅判定

#--------------------------------------------------------------------------

def all_dead?

# パーティ人数が 0 人の場合

if $game_party.actors.size == 0

return false

end

# HP 0 以上のアクターがパーティにいる場合

for actor in @actors

if actor.hp > 0

return false

end

end

# 全滅

return true

end

#--------------------------------------------------------------------------

# ● スリップダメージチェック (マップ用)

#--------------------------------------------------------------------------

def check_map_slip_damage

for actor in @actors

if actor.hp > 0 and actor.slip_damage?

actor.hp -= [actor.maxhp / 100, 1].max

if actor.hp == 0

$game_system.se_play($data_system.actor_collapse_se)

end

$game_screen.start_flash(Color.new(255,0,0,128), 4)

$game_temp.gameover = $game_party.all_dead?

end

end

end

#--------------------------------------------------------------------------

# ● 対象アクターのランダムな決定

# hp0 : HP 0 のアクターに限る

#--------------------------------------------------------------------------

def random_target_actor(hp0 = false)

# ルーレットを初期化

roulette = []

# ループ

for actor in @actors

# 条件に該当する場合

if (not hp0 and actor.exist?) or (hp0 and actor.hp0?)

# アクターのクラスの [位置] を取得

position = $data_classes[actor.class_id].position

# 前衛のとき n = 4、中衛のとき n = 3、後衛のとき n = 2

n = 4 - position

# ルーレットにアクターを n 回追加

n.times do

roulette.push(actor)

end

end

end

# ルーレットのサイズが 0 の場合

if roulette.size == 0

return nil

end

# ルーレットを回し、アクターを決定

return roulette[rand(roulette.size)]

end

#--------------------------------------------------------------------------

# ● 対象アクターのランダムな決定 (HP 0)

#--------------------------------------------------------------------------

def random_target_actor_hp0

return random_target_actor(true)

end

#--------------------------------------------------------------------------

# ● 対象アクターのスムーズな決定

# actor_index : アクターインデックス

#--------------------------------------------------------------------------

def smooth_target_actor(actor_index)

# アクターを取得

actor = @actors[actor_index]

# アクターが存在する場合

if actor != nil and actor.exist?

return actor

end

# ループ

for actor in @actors

# アクターが存在する場合

if actor.exist?

return actor

end

end

end

end

 

 

 

Poi create un'altra classe subito dopo e metteteci questo code:

 

 

# ■ Window_PTmember

#------------------------------------------------------------------------------

#  PTチェンジ画面 メンバーウィンドウ

#==============================================================================

 

class Window_PTmember < Window_Selectable

#--------------------------------------------------------------------------

# ● オブジェクト初期化

#--------------------------------------------------------------------------

def initialize

super(0, 0, 320, 192)

self.contents = Bitmap.new(width - 32, height - 32)

@column_max = 4

refresh

self.active = true

self.index = 0

end

#--------------------------------------------------------------------------

# ● リフレッシュ

#--------------------------------------------------------------------------

def refresh

self.contents.clear

if $game_party.member.size > 4

@item_max = [$game_party.actors.size + 1, 4].min

else

@item_max = [$game_party.actors.size + 1, $game_party.member.size].min

end

rect = Rect.new( 0, 34, 240, 1)

self.contents.fill_rect(rect, Color.new(255, 255, 255, 255))

self.contents.draw_text( 0, 0, 160, 32, "Gruppo attuale")

for i in 0...$game_party.actors.size

x = 40 + i * (70)

actor = $game_party.actors

draw_actor_graphic(actor, x, 150)

if actor.fixed_member == 1

self.contents.font.size = 16

self.contents.draw_text( x + 12, 134, 50, 28, "Mandatory")

self.contents.font.size = 22

end

end

self.contents.draw_text( 15, 40, 240, 32, "Cambia i membri del gruppo...")

end

#--------------------------------------------------------------------------

# ● カーソルの矩形更新

#--------------------------------------------------------------------------

def update_cursor_rect

if @index < 0

self.cursor_rect.empty

else

self.cursor_rect.set( 5 + @index * 70, 40, 70, 120)

end

end

end

 

#==============================================================================

# ■ Window_PTstatus

#------------------------------------------------------------------------------

#  PTチェンジ画面 ステータスウィンドウ

#==============================================================================

 

class Window_PTstatus < Window_Base

#--------------------------------------------------------------------------

# ● オブジェクト初期化

#--------------------------------------------------------------------------

def initialize

super(0, 192, 320, 192)

self.contents = Bitmap.new(width - 32, height - 32)

refresh( $game_party.actors[0].id )

end

#--------------------------------------------------------------------------

# ● リフレッシュ

#--------------------------------------------------------------------------

def refresh(actor_id)

if actor_id != @a_id

self.contents.clear

if actor_id == nil

@a_id = actor_id

return

end

actor = $game_actors[actor_id]

draw_actor_name(actor, 0, 0)

draw_actor_level(actor, 220, 0)

draw_actor_state(actor, 0, 96)

draw_actor_exp(actor, 0, 128)

draw_actor_hp(actor, 0, 32)

draw_actor_sp(actor, 0, 64)

@a_id = actor_id

end

end

end

#==============================================================================

# ■ Window_Waitmember

#------------------------------------------------------------------------------

#  PTチェンジ画面 待機メンバーウィンドウ

#==============================================================================

 

class Window_Waitmember < Window_Selectable

#--------------------------------------------------------------------------

# ● オブジェクト初期化

#--------------------------------------------------------------------------

def initialize

super(320, 0, 320, 480)

self.contents = Bitmap.new(width - 32, height - 32)

@column_max = 4

refresh

self.active = false

self.index = -1

end

#--------------------------------------------------------------------------

# ● リフレッシュ

#--------------------------------------------------------------------------

def refresh

self.contents.clear

@item_max = $game_party.member.size

rect = Rect.new( 0, 34, 240, 1)

self.contents.fill_rect(rect, Color.new(255, 255, 255, 255))

self.contents.draw_text( 0, 0, 200, 32, "Membri esterni al gruppo")

for i in 0...$game_party.member.size

x = 40 + ( i % 4 ) * 70

y = 150 + ( i / 4 ) * 140

actor = $game_actors[$game_party.member]

draw_member_graphic(actor, x, y)

end

end

#--------------------------------------------------------------------------

# ● メンバーグラフィックの描画

#--------------------------------------------------------------------------

def draw_member_graphic(actor, x, y)

bitmap = RPG::Cache.character(actor.character_name, actor.character_hue)

cw = bitmap.width / 4

ch = bitmap.height / 4

src_rect = Rect.new(0, 0, cw, ch)

# PTにいる場合は半透明で表示

if $game_party.actors.include?(actor)

opacity = 120

else

opacity = 255

end

self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect, opacity)

end

#--------------------------------------------------------------------------

# ● カーソルの矩形更新

#--------------------------------------------------------------------------

def update_cursor_rect

if @index < 0

self.cursor_rect.empty

else

self.cursor_rect.set( 5 + ( @index % 4 ) * 70, 40 + ( @index / 4 ) * 140, 70, 120)

end

end

end

#==============================================================================

# ■ Window_PThelp

#------------------------------------------------------------------------------

#  PTチェンジ画面 操作ヘルプウィンドウ

#==============================================================================

 

class Window_PThelp < Window_Base

#--------------------------------------------------------------------------

# ● オブジェクト初期化

#--------------------------------------------------------------------------

def initialize

super( 0, 384, 320, 96)

self.contents = Bitmap.new(width - 32, height - 32)

@type = 0

refresh

end

#--------------------------------------------------------------------------

# ● リフレッシュ

#--------------------------------------------------------------------------

def refresh

self.contents.clear

self.contents.draw_text(4, 0, 240, 32, "Scegli il membro che vuoi sostituire.")

if @type == 0

self.contents.draw_text(4, 32, 240, 32, "Premi X o Esc per uscire.")

else

self.contents.draw_text(4, 32, 240, 32, "Scegli il membro da inserire.")

end

end

#--------------------------------------------------------------------------

# ● タイプ変更

#--------------------------------------------------------------------------

def type_change

if @type == 0

@type = 1

else

@type = 0

end

refresh

end

end

#==============================================================================

# ■ Scene_PTchange

#------------------------------------------------------------------------------

# Lo script appartiene ad un sito JAP, la traduzione in inglese è stata fatta da Viskar Nogam'e

# La traduzione in italiano è stata fatta da Tio. Per qualsiasi problema o domanda visitate

# www.rpgshrine.altervista.org

#==============================================================================

 

class Scene_PTchange

#--------------------------------------------------------------------------

# ● メイン処理

#--------------------------------------------------------------------------

def main

# Informs which Windows to open

@pt_member = Window_PTmember.new

@pt_status = Window_PTstatus.new

@wait_member = Window_Waitmember.new

@pt_help = Window_PThelp.new

# トランジション実行

Graphics.transition

# メインループ

loop do

# ゲーム画面を更新

Graphics.update

# 入力情報を更新

Input.update

# フレーム更新

update

# 画面が切り替わったらループを中断

if $scene != self

break

end

end

# トランジション準備

Graphics.freeze

# ウィンドウを解放

@pt_member.dispose

@pt_status.dispose

@wait_member.dispose

@pt_help.dispose

end

#--------------------------------------------------------------------------

# ● フレーム更新

#--------------------------------------------------------------------------

def update

# ステータスウィンドウが表示されてる間は、Bボタン押されるまで停止

if @status != nil

if Input.trigger?(Input::B)

# キャンセル SE を演奏

$game_system.se_play($data_system.cancel_se)

# ステータスウィンドウを削除

@status.dispose

@status = nil

end

return

end

# ウィンドウを更新

@pt_member.update

@wait_member.update

# メンバーウィンドウがアクティブの場合: update_pt を呼ぶ

if @pt_member.active

# カーソル位置が空白 ( メンバーの最大値と同じ ) の時ステータスを空白に

if @pt_member.index == $game_party.actors.size

@pt_status.refresh( nil )

else

@pt_status.refresh( $game_party.actors[@pt_member.index].id )

end

update_pt

return

end

# 待機メンバーウィンドウがアクティブの場合: update_member を呼ぶ

if @wait_member.active

@pt_status.refresh( $game_actors[$game_party.member[@wait_member.index]].id )

update_member

return

end

end

#--------------------------------------------------------------------------

# ● フレーム更新 (メンバーウィンドウがアクティブの場合)

#--------------------------------------------------------------------------

def update_pt

# B ボタンが押された場合

if Input.trigger?(Input::B)

if $game_party.actors.size == 0

# ブザー SE を演奏

$game_system.se_play($data_system.buzzer_se)

return

end

# キャンセル SE を演奏

$game_system.se_play($data_system.cancel_se)

# メニュー画面に切り替え

$scene = Scene_Menu.new(4)

return

end

# C ボタンが押された場合

if Input.trigger?(Input::C)

# 選択アクターが固定の場合ブザーを鳴らす

if @pt_member.index != $game_party.actors.size

if $game_party.actors[@pt_member.index].fixed_member == 1

$game_system.se_play($data_system.buzzer_se)

return

end

end

# 決定 SE を演奏

$game_system.se_play($data_system.decision_se)

# 待機メンバーウィンドウをアクティブにする

@pt_member.active = false

@wait_member.active = true

@wait_member.index = 0

@pt_help.type_change

return

end

# X ボタンが押された場合

if Input.trigger?(Input::X)

# カーソル位置が空白 ( メンバーの最大値と同じ ) の時ブザーを鳴らす

if @pt_member.index == $game_party.actors.size

# ブザー SE を演奏

$game_system.se_play($data_system.buzzer_se)

return

end

# 決定 SE を演奏

$game_system.se_play($data_system.decision_se)

# ステータスウィンドウを表示する

@status = Window_Status.new( $game_party.actors[@pt_member.index] )

@status.z += 50

return

end

# Y ボタンが押された場合

if Input.trigger?(Input::Y)

# 選択アクターが固定の場合ブザーを鳴らす

if @pt_member.index != $game_party.actors.size

if $game_party.actors[@pt_member.index].fixed_member == 1

$game_system.se_play($data_system.buzzer_se)

return

end

end

# 決定 SE を演奏

$game_system.se_play($data_system.decision_se)

$game_party.wait_actor( $game_party.actors[@pt_member.index].id )

# メンバーウィンドウと待機ウィンドウを再描写

@pt_member.refresh

@wait_member.refresh

return

end

end

#--------------------------------------------------------------------------

# ● フレーム更新 (待機メンバーウィンドウがアクティブの場合)

#--------------------------------------------------------------------------

def update_member

# B ボタンが押された場合

if Input.trigger?(Input::B)

# キャンセル SE を演奏

$game_system.se_play($data_system.cancel_se)

# メンバーウィンドウをアクティブにする

@pt_member.active = true

@wait_member.active = false

@wait_member.index = -1

@pt_help.type_change

return

end

# C ボタンが押された場合

if Input.trigger?(Input::C)

# 決定 SE を演奏

$game_system.se_play($data_system.decision_se)

# 待機メンバーウィンドウで選択されている アクターID を習得

actor_id = $game_actors[$game_party.member[@wait_member.index]].id

# メンバー選択位置が空白の場合は、普通に加える

if @pt_member.index == $game_party.actors.size

$game_party.add_actor( actor_id )

# メンバーウィンドウと待機ウィンドウを再描写

@pt_member.refresh

@wait_member.refresh

# メンバーウィンドウをアクティブにする

@pt_member.active = true

@wait_member.active = false

@wait_member.index = -1

@pt_help.type_change

return

end

# 既に選択されたメンバーがいる場合 そのキャラと交換

if $game_party.actors.include?( $game_actors[actor_id] )

a = $game_party.actors.index( $game_actors[actor_id] )

b = $game_party.actors[@pt_member.index].id

$game_party.change_actor( b, a)

end

# メンバー変更

$game_party.change_actor( actor_id, @pt_member.index )

# メンバーウィンドウと待機ウィンドウを再描写

@pt_member.refresh

@wait_member.refresh

# メンバーウィンドウをアクティブにする

@pt_member.active = true

@wait_member.active = false

@wait_member.index = -1

@pt_help.type_change

return

end

# X ボタンが押された場合

if Input.trigger?(Input::X)

# 決定 SE を演奏

$game_system.se_play($data_system.decision_se)

# ステータスウィンドウを表示する

@status = Window_Status.new( $game_actors[$game_party.member[@wait_member.index]] )

@status.z += 50

return

end

# Y ボタンが押された場合

if Input.trigger?(Input::Y)

# アクターをセット

actor = $game_actors[$game_party.member[@wait_member.index]]

# 装備固定の場合

if actor.equip_fix?(4)

# ブザー SE を演奏

$game_system.se_play($data_system.buzzer_se)

return

end

# 装備 SE を演奏

$game_system.se_play($data_system.equip_se)

# 装飾品を外す

actor.equip( 4, 0)

return

end

end

end

#Final Fantasy VII menu setup by AcedentProne

#*********************************************************

#To use:

#Create a new folder in the Characters folder, and call it Faces

#Adding faces: add a 80x80 picture with the same name as the characterset it

#corrosponds with in the Faces folder

#If text does not appear, right click and select Replace

#Put $defaultfonttype in the Search String box

#Put $fontface in the Replacement String box

#Hit replace all.

#Put $defaultfontsize in the Search String box

#Put $fontsize in the Replacement String box

#Hit replace all.

#

#If you do not want Faces, go to line 102

#and change delete the # of draw_actor_graphic

#and put a # infront of draw_actor_face

# NB TIO:Questo script non l'ho fatto io, ho solamente preso il menu stile FF7, la schermata

# per cambiare personaggio e ho messo l'opzione nel menu, niente di più.

# Se ci sono problemi visitate www.rpgshrine.altervista.org

 

 

#========================================

#■ Window_Base

#--------------------------------------------------------------------------

# Setting functions for the "Base"

#========================================

 

class Window_Base < Window

 

def draw_actor_face(actor, x, y)

face = RPG::Cache.character("Faces/" + actor.character_name, actor.character_hue)

fw = face.width

fh = face.height

src_rect = Rect.new(0, 0, fw, fh)

self.contents.blt(x - fw / 23, y - fh, face, src_rect)

end

end

def draw_actor_battler_graphic(actor, x, y)

bitmap = RPG::Cache.battler(actor.battler_name, actor.battler_hue)

cw = bitmap.width

ch = bitmap.height

src_rect = Rect.new(0, 0, cw, ch)

self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)

end

 

#========================================

#■ Game_Map

#--------------------------------------------------------------------------

# Setting functions for the Map

#========================================

class Game_Map

 

def name

$map_infos[@map_id]

end

end

 

#========================================

#■ Window_Title

#--------------------------------------------------------------------------

# Setting functions for the Title

#========================================

class Scene_Title

$map_infos = load_data("Data/MapInfos.rxdata")

for key in $map_infos.keys

$map_infos[key] = $map_infos[key].name

end

end

 

 

 

 

#========================================================

# ■ Window_MenuStatus

#------------------------------------------------------------------------

# Sets up the Choosing.

#========================================================

 

class Window_MenuStatus < Window_Selectable

#--------------------------------------------------------------------------

# Set up

#--------------------------------------------------------------------------

def initialize

super(0, 0, 560, 454)

self.contents = Bitmap.new(width - 32, height - 32)

self.contents.font.name = "Arial"

self.contents.font.size = 24

refresh

self.active = false

self.index = -1

end

#--------------------------------------------------------------------------

# Drawing Info on Screen

#--------------------------------------------------------------------------

def refresh

self.contents.clear

@item_max = $game_party.actors.size

for i in 0...$game_party.actors.size

x = 94

y = i * 110

actor = $game_party.actors

draw_actor_face(actor, 12, y + 90) #To get rid of the Face, put a "#" before the draw_ of this line

#draw_actor_graphic(actor, 48, y + 65) #and delete the "#" infront of draw of this line

draw_actor_name(actor, x, y)

draw_actor_class(actor, x + 80, y)

draw_actor_level(actor, x, y + 18)

draw_actor_state(actor, x + 200, y)

draw_actor_exp(actor, x+ 144, y + 38)

draw_actor_hp(actor, x, y + 38)

draw_actor_sp(actor, x, y + 58)

end

end

#--------------------------------------------------------------------------

# Update of Cursor

#--------------------------------------------------------------------------

def update_cursor_rect

if @index < 0

self.cursor_rect.empty

else

self.cursor_rect.set(0, @index * 116, self.width - 32, 96)

end

end

end

 

#=======================================#

# ■Window_GameStats #

# written by AcedentProne #

#-----------------------------------------------------------------------#

 

class Window_GameStats < Window_Base

def initialize

super(0, 0, 160, 80)

self.contents = Bitmap.new(width - 32, height - 32)

self.contents.font.name = "Arial"

self.contents.font.size = 22

refresh

end

 

def refresh

self.contents.clear

self.contents.font.color = system_color

# Draw "Time"

@total_sec = Graphics.frame_count / Graphics.frame_rate

hour = @total_sec / 60 / 60

min = @total_sec / 60 % 60

sec = @total_sec % 60

text = sprintf("%02d:%02d:%02d", hour, min, sec)

self.contents.font.color = normal_color

self.contents.draw_text(4, 6, 120, 32, text, 2)

self.contents.font.color = system_color

self.contents.draw_text(4, -10, 120, 32, "Tempo di gioco")

#Drawing Gold

self.contents.font.color = normal_color

self.contents.draw_text(4, 22, 120, 32,$game_party.gold.to_s + " " +$data_system.words.gold, 2)

self.contents.font.color = system_color

self.contents.draw_text(4, 22, 120, 32, $data_system.words.gold, 2)

end

#--------------------------------------------------------------------------

# Update of The count

 

 

 

 

#--------------------------------------------------------------------------

def update

super

if Graphics.frame_count / Graphics.frame_rate != @total_sec

refresh

end

end

end

 

#========================================================

# ■ Window_Mapname

#------------------------------------------------------------------------

#  Draws the Map name

#========================================================

 

class Window_Mapname < Window_Base

#--------------------------------------------------------------------------

# Set up

#--------------------------------------------------------------------------

def initialize

super(0, 0, 320, 60)

self.contents = Bitmap.new(width - 52, height - 32)

self.contents.font.name = "Arial"

self.contents.font.size = 24

refresh

end

#--------------------------------------------------------------------------

# Draws info on screen

#--------------------------------------------------------------------------

def refresh

self.contents.clear

 

# Map Name

#map = $game_map.name

self.contents.font.color = system_color

self.contents.draw_text(4, 0, 220, 32, "Luogo")

self.contents.font.color = normal_color

self.contents.draw_text(175, 0, 80, 32, $game_map.name)

end

end

 

#========================================================

# ■ Scene_Menu

#------------------------------------------------------------------------

# FF7 menu laytout as requested by AcedentProne.

#========================================================

 

class Scene_Menu

#--------------------------- edit-------------------------------

attr_reader :status_window

#/--------------------------- edit-------------------------------

 

def initialize(menu_index = 0)

@menu_index = menu_index

end

 

def main

s1 = $data_system.words.item

s2 = $data_system.words.skill

s3 = $data_system.words.equip

s4 = "Status"

s5 = "PHS" #Da qui potete cambiare il nome dell'opzione per cambiare gruppo

s6 = "Salva"

s7 = "Esci"

#--------------------------- edit-------------------------------

# Command menu

# Size = Screen height - border sizes -

# GameStatus menu - Spacing from GameStatus

@command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7])

@command_window.x = 640 - @command_window.width

@command_window.y = 0

@command_window.z = 110

@command_window.index = @menu_index

if $game_party.actors.size == 0

@command_window.disable_item(0)

@command_window.disable_item(1)

@command_window.disable_item(2)

@command_window.disable_item(3)

end

if $game_system.save_disabled

@command_window.disable_item(4)

@command_window.disable_item(5)

end

@map = Window_Mapname.new

@map.x = 640 - @map.width

@map.y = 480 - @map.height - 1

@map.z = 110

 

 

# Lower right box

@game_stats_window = Window_GameStats.new

@game_stats_window.x = 640 - @game_stats_window.width

@game_stats_window.y = 640 - @command_window.height - @game_stats_window.height + 3

@game_stats_window.z =110

 

 

# Status window

@status_window = Window_MenuStatus.new

@status_window.x = 0

@status_window.y = 8

@status_window.z = 100

 

 

 

Graphics.transition

loop do

Graphics.update

Input.update

update

if $scene != self

break

end

end

Graphics.freeze

@command_window.dispose

@game_stats_window.dispose

@status_window.dispose

@map.dispose

end

#--------------------------------------------------------------------

# Updating

#--------------------------------------------------------------------

def update

@command_window.update

@game_stats_window.update

@status_window.update

@map.update

if @command_window.active

update_command

return

end

if @status_window.active

update_status

return

end

end

#--------------------------------------------------------------------

# Updating the Command Selection

#--------------------------------------------------------------------

def update_command

# If B button is pused

if Input.trigger?(Input::B)

# Plays assigned SE

$game_system.se_play($data_system.cancel_se)

# Go to Map

$scene = Scene_Map.new

return

end

# If C button is pused

if Input.trigger?(Input::C)

# Checks actor size

if $game_party.actors.size == 0 and @command_window.index < 4

# plays SE

$game_system.se_play($data_system.buzzer_se)

return

end

case @command_window.index

when 0

$game_system.se_play($data_system.decision_se)

$scene = Scene_Item.new

when 1

$game_system.se_play($data_system.decision_se)

@command_window.active = false

@status_window.active = true

@status_window.index = 0

when 2

$game_system.se_play($data_system.decision_se)

@command_window.active = false

@status_window.active = true

@status_window.index = 0

when 3

$game_system.se_play($data_system.decision_se)

@command_window.active = false

@status_window.active = true

@status_window.index = 0

when 4

if $game_system.save_disabled

$game_system.se_play($data_system.buzzer_se)

return

end

$game_system.se_play($data_system.decision_se)

$scene = Scene_PTchange.new

when 5

if $game_system.save_disabled

$game_system.se_play($data_system.buzzer_se)

return

end

$game_system.se_play($data_system.decision_se)

$scene = Scene_Save.new

when 6

$game_system.se_play($data_system.decision_se)

$scene = Scene_End.new

end

return

end

end

#--------------------------------------------------------------------

# Updating Status Screen

#--------------------------------------------------------------------

 

def update_status

if Input.trigger?(Input::B)

$game_system.se_play($data_system.cancel_se)

@command_window.active = true

@status_window.active = false

@status_window.index = -1

return

end

if Input.trigger?(Input::C)

case @command_window.index

when 1

if $game_party.actors[@status_window.index].restriction >= 2

$game_system.se_play($data_system.buzzer_se)

return

end

$game_system.se_play($data_system.decision_se)

$scene = Scene_Skill.new(@status_window.index)

when 2

$game_system.se_play($data_system.decision_se)

$scene = Scene_Equip.new(@status_window.index)

when 3

$game_system.se_play($data_system.decision_se)

$scene = Scene_Status.new(@status_window.index)

end

return

end

end

end

 

 

 

Cancellate le stringhe dove verranno visualizzate queste:

==========

Link to comment
Share on other sites

  • 0

Allora, anche a me serve questo script, ma vorrei fare 2 cose:

1 poterlo mettere nel mio menù senza che me ne crei un'altro lui...

2 poterlo eliminare (e per eliminare intendo non far neanche vedere l'opzione) fino a quando non viene preso un oggetto o simile (come in ff7 appunto)

"Giochiamo a: schiettezza o grande impresa eroica!"

Personaggio PBF: Lyriel
PN: 12/20
PV: 2/2
PA: 4 (5 col mantello d'acero)
Equipaggiamento:

Spada comune
Pugnale comune
Arco elfico (magico, ignifugo. Permette di colpire da lunghe distanze. Se distrutto si auto-restaura a fine battaglia. Le frecce scoccate con questo arco ottengono l'effetto dell'incantesimo Folata di vento permettendo di spazzare via piccoli oggetti e creature.)
Faretra con 20 frecce
Cappuccio
Armatura delle ombre borchiata (punti armatura 4, ignifuga, di notte +1 a furtività)
2 anelli di valore
Borsa comune (10 slot)

  • Corda
  • Penna e calamaio
  • Libro vuoto
  • Forma di formaggio
  • Mappa
  • Cannocchiale
  • Tagliola di ferro
  • Campanellino di Maia
  • Mantello d'Acero (+1PA): un mantello pesante di colore rossiccio che presenta dei motivi fiochi, dello stesso colore, a forma di foglie d'acero. E' dotato di un ampio cappuccio e può coprire completamente chi lo indossa. Se si resta fermi in un'area boschiva o tra un gruppo di alberi il mantello è in grado di celare completamente la presenza del possessore dando un grado di furtività pari a gr.5. Nel caso di bestie ed animali dalla visuale meno acuta, se il giocatore è già stato notato od ha notificato in qualche modo la sua presenza può gettarsi a terra tra un gruppo di foglie o tra i cespugli per scomparire completamente dalla visuale di tali nemici.

181 monete d'oro
Cintura porta coltelli (6 slot)

  • Coltello da lancio intarsiato
  • Coltello da lancio in metallo
  • Coltello da lancio in metallo

Campanellino di Maia




Se Lyriel, e solo lui, suona tre volte il campanellino può richiamare una creatura magica che combatterà al suo fianco al prezzo di 3 PN.
L'animale ha l'aspetto di un leopardo delle nevi, i suoi occhi sono viola e così gli artigli, i denti e la punta della coda. Questa è lunga e larga, molto folta e corposa. Il manto a differenza dei leopardi è tutto bianco, inoltre ha una folta criniera circolare intorno al collo a mo' di sciarpa e che si unisce con la sommità della fronte creando un cresta non molto alta pettinata all'indietro.
La creatura combatte indipendentemente dal possessore (il giocatore potrà descriverne il comportamento in battaglia e fuori, ma il master potrà riservarsi il diritto di far compiere alla creatura delle azioni per conto proprio).
La creatura non deve per forza stare vicino all'utilizzatore, ma può essere mandata lontano e tornare da lui su comando.
Lyriel e l'animale hanno un contatto mentale e possono comunicare anche a distanza.
Non vi è limite alla permanenza della creatura una volta evocata, però se i suoi PV raggiungono lo zero dovrà essere risvegliata magicamente da un mago od un curatore esperto. Lyriel può richiamare all'interno del campanellino la creatura quando essa non è impegnata in combattimento od in altre prove senza sforzi, ma dovrà spendere di nuovo 3 PN per richiamarla. Può continuare a combattere se Lyriel viene sconfitto.
L'animale vede bene anche di notte e se c'è nebbia.
Caratteristiche della creatura:
PV 2
PA 2
Atletica Gr.4
Furtività Gr.1
Attacco (tipo descritto dal giocatore nei limiti fisici di artigli e morso) di massimo Gr.5 può dichiarare DIRETTO su armature di cuoio o cuoio borchiato e MAGICO con tutti gli attacchi. Può dichiarare SONNO se artigli e denti viola entrano in contatto diretto con il sangue l'avversario. DIRETTO e SONNO sono due effetti, quindi come da regolamento solo uno può essere scelto. MAGICO può esser combinato con entrambi.
Malus: il campanellino deve tintinnare, quindi Lyriel suonandolo tradirà la sua presenza.
Il campanellino tutte le volte che viene suonato fa venire in mente Maia a Lyriel, quindi il giocatore dovrà scrivere una frase di almeno 3 parole per ricordare la bambina, ogni volta diversa, altrimenti l'evocazione non avrà esito.

 


Personaggio PBF: Wren
PN: 20/20
PV:2/2
PA:0


Borsa Comune

  • 3 filoni di pane
  • 4 mele
  • prosciutto
  • formaggio
  • coltello da cucina

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...