Jump to content
Rpg²S Forum
  • 0

Problema Luci e Turnazione


Light
 Share

Question

Appena arrivato ma gia vi chiedo aiuti allora :

1)Ho una mappa con la fog e la tonalita schermo che rendono la mappa scura tipo notte il problema è che gli oggetti si scuriscono a loro volta...dovrei risolvere questo problema per oggetti come torcie o lampade che cmq nella notte dovrebbero essere illuminate e non scurirsi come tutta la mappa...sapete come posso fare?

2)Avete una minima idea di come possa creare una finestra di turnazione alla Final Fantasy X (per farci un idea)con turni gia predefiniti e con le faccine visibili?

Grazie in anticipo

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Raga i problemi in pratica sono quelli che vi avevo già postato:

1) Abbiamo una mappa in notturna (con fog e tint screen applicati) e vorremmo che alcuni eventi (nello specifico delle torce) non siano oscurati dal "buio" ma, al contrario, emettano luce propria;

2) Vorremo aggiungere un sistema che renda visibile la turnazione come avviene in FFX durante le battaglie (usiamo il BS di Minkoff senza l'ATB)

Il mondo è il cancro... Io la cura...

 

Il mio sport preferito:

Gli altri --> (T_T#)O==(^_^Q) <-- IO

 

I miei alias:

http://www.naruto-kun.com/images/narutotest/shikamaru.jpg

-----------------------------------------------------

http://www.naruto-kun.com/images/narutotest/rocklee.jpg

-----------------------------------------------------

http://www.ff-fan.com/chartest/banners/auron.jpg

 

Broly88's

http://pokejungle.net/other/pokepet/trainers/e4k2.png http://pokejungle.net/other/pokepet/Charizard.gif

Flame Dancer the level 99 Charizard!

 

http://img259.imageshack.us/img259/7446/rockleeoj1.gif http://img233.imageshack.us/img233/7449/sorajm1.gif

Link to comment
Share on other sites

  • 0

Per le luci potreste usare dei chara luminosi con un animation che li faccia brillare... oppure lo script degli effetti luminosi che rende bene!

Per la turnazione basta usare picture e variabili, a seconda del turno si assegna una certa variabile a ogni picture e poi le si dispone secondo quelle variabili...

http://img58.imageshack.us/img58/4264/newheavenhd2.jpg

 

Iscrivetevi alla nostra accademia di Rpgmaking, presto sarà piena di contenuti e lezioni su Mapping, Eventing, Pixel Art e Scrittura, a livelli bassi, medi e avanzati!

http://img185.imageshack.us/img185/4599/bannerua7.gif

Link to comment
Share on other sites

  • 0

questo è uno script di un tipo giapponese simile a ffx

 

 

##############################################################
###########
# FF10にあった、カウントタイムバトル的なモノです。
#
# ☆良くあるATB(ゲージがたまると行動可能になるやつね)との違い
# ・行動順を割り出す計算式が変わっています。
# ATBでは毎フレームすばやさに応じた値が足されていき、
# 行動を終了したら規定の値(ほとんどの方が0だと思いますが)になります。
# それに対して、この似非CTBシステム(以下CTB)では、
# 全員のゲージが同じスピードで上昇し、
# 行動を終了したあと、素早さに応じた値を減算します。
# このため、行動順がATBと微妙に変化するかと思われます。
#
# ・行動順の表示が名前の羅列になってます。
# この名前は、ゲージのように動くことはなく、
# 現在の行動者含めて五人先の人までを名前で表示しています。
# なお、行動先読みには「全ての行動が物理攻撃だった時」を前提にしてます。
# そのため、スキルやアイテムなどを使ってしまうと、その分微妙にズレます。
#
# ☆制約
# ・パーティーが三人
# 行動順を表示する部分どこにあっても邪魔なので、
# 結局パーティー表示部分の左端を削りました。
#
# ・「何もしない」の動作が不審
# 何の前触れもなくスキップしてしまうように設定していますので、
# 見かけ上は無視されたように見えてしまいます。
#
# ☆特殊操作
# ・パーティーコマンド呼び出し
# アクターのコマンドが表示されている時にXボタンを押してください。
# パーティーコマンドが呼び出されます。
# 戦闘再開はそのまま、戦闘再開。
# 行動順表示は、50人先まで行動順を表示します。
# あまり使えないかもしれませんが。
# 一応、L、Rによるページ送り機能などもつけてます。
# 逃走は、「全員のCPを一定値減算したのち、逃走する」という形式にしてます。
#
# ☆スキルについて
# 「スキル名,ディレイ値,詠唱時間」とスキル名を書き換えてください。
# ディレイ値は「その行動が終了した後に減算するCPの基準となる値」です。
# たとえば通常攻撃はこれがCP_COST_ATTACKで定義されています。
# 何も書いていない場合の値も定義可能です。
# 詠唱時間は「そのスキルが発動するまでの時間」です。
# 詠唱中はステート「詠唱」が付加されます。
# 攻撃の場合はもちろんこの詠唱時間は0ですね。
# なので、こんな感じで↓
# 「クイックカット,120,0」
# これでCP_COST_ATTACKを120以上にしておけば、
# 通常攻撃よりも早く次の出番がきますね。
# 「パワフルスイング,100,120」
# これだとスキルを選択してから発動するまでのタイムラグが120ありますね。
#########################################################################

#==============================================================================
# ■ 初期定義
#==============================================================================
module RPG
class Skill
CP_COST_DELAY = 300 # スキルで値を何も書いていない場合のディレイ値
CP_COST_SPELL = 300 # スキルで値を何も書いていない場合の詠唱時間
end
end

module CTB_Define
# 詠唱ステートのID
SPELL_STATE_ID = 300
# 消費CP
# 消費CPの算出方法は「消費CP(ここで定義)×すばやさ平均÷すばやさ」です。
CP_COST_ITEM   = 200 # アイテムを使用したときの減算値
CP_COST_ATTACK  = 300 # 攻撃したときの減算値
CP_COST_GUARD   = 200 # 防御したときの減算値
CP_COST_NOTHING = 100 # なにもしないときの減算値
CP_COST_ESCAPE  = 100 # 「逃げる」時*全員の*の減算値
CP_COST_SKILL  = [0,300,300,400,300,300,300,300,400,300,300,400,300,300,400,300,300,400,300,300,4
00,300,300,400,300,300,400,300,300,400,400,550,250,350,250,350,250,350,250,350,2
5
0,350,250,350,250,350,250,350,250,350,250,350,400,400,400,400,200,300,400,500,20
0
,300,400,500,200,300,400,500,200,300,400,500,200,300,400,500,200,300,400,500,900
]
end

#==============================================================================
# ■ RPG::Skill
#==============================================================================
module RPG
class Skill
  def name
    name = @name.split(/,/)[0]
    return name != nil ? name : ''
  end
  def delay
    name = @name.split(/,/)[1].to_i
    return name != nil ? name : CP_COST_DELAY
  end
  def spell
    name = @name.split(/,/)[2].to_i
    return name != nil ? name : CP_COST_SPELL
  end
end
end

#==============================================================================
# ■ Window_CTB
#------------------------------------------------------------------------------
# キャラの行動順を表示するウィンドウです。
#==============================================================================
class Window_CTB < Window_Base
# 詠唱ステートのID読み込み
include CTB_Define
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize(avg)
  super(0, 320, 160, 160)
  self.contents = Bitmap.new(self.width - 32, self.height - 32)
  # 平均AGI算出   
  @agi_avg = avg
  # キャラ名列
  @names = []
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh
  # 再描画開始
  self.contents.clear
   self.contents.font.name = "Tahoma"
  self.contents.font.size = 20
  self.contents.font.color = system_color
  self.contents.font.size = 16
  self.contents.draw_text(0, 0, 100, 17, "Turn Ratio")
  # キャラ名列
  @names = []
  # 攻撃コマンド後の全員のCPを先読み
  get_cps
  # cpの値でソート
  @names.sort!{|a,b| b[0] <=> a[0] }   
  h = 0
  self.contents.font.size = 17
  for i in 0...6
    @nam = @names[i]
    if @nam == nil
      break
    end
    x = 4
    y = 18 * h + 17
    if @nam[0] >= 500 # 500より大きければ白文字。
      if @nam[2] == true
        self.contents.font.color = Color.new(230, 255, 255, 255)
      else
         self.contents.font.name = "Tahoma"
  self.contents.font.size = 12
        self.contents.font.color = normal_color
      end
    else
      if @nam[2] == true
        self.contents.font.color = Color.new(190, 225, 225, 255)
      else
        self.contents.font.color = disabled_color
      end
    end
    self.contents.draw_text(x, y, 128, 18, @nam[1])
    h += 1
  end
end
#--------------------------------------------------------------------------
# ● 行動後のCPの取得
#--------------------------------------------------------------------------
def get_cps
  # メンバー全員の行動後のCPと名前を@namesに格納
  i = 0
  while @names.size < 15
    for member in $game_party.actors + $game_troop.enemies
      next if member.dead? or !member.exist?
      cp = CP_COST_ATTACK * @agi_avg / member.agi # 攻撃時に減算するCP先読み
      if i == 1 and member.current_action.kind == 1
        skill = $data_skills[member.current_action.skill_id]
        cp = CP_COST_SKILL[skill.id] * @agi_avg / member.agi
      end
      cp = member.cp - (cp * i)
      if i == 0
        spell = member.state?(SPELL_STATE_ID)
      else
        spell = false
      end
      @names.push([cp, member.name, spell])
    end
    i += 1
  end
end
#--------------------------------------------------------------------------
# ● CTBウィンドウの中身が空かどうかを確認する
#--------------------------------------------------------------------------
def names_empty
  if @names == []
    return true
  else
    return false
  end
end
end

#==============================================================================
# ■ Window_CTB_All
#------------------------------------------------------------------------------
# キャラの行動順を表示するウィンドウの拡大版です。
#==============================================================================
class Window_CTB_All < Window_Base
# 詠唱ステートのID読み込み
include CTB_Define
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize(avg)
  super(0, 0, 160, 480)
  self.contents = Bitmap.new(self.width - 32, self.height - 32)
   self.contents.font.name = "Tahoma"
  self.contents.font.size = 12
  # 平均AGI算出   
  @agi_avg = avg
  # キャラ名列
  @names = []
  # 攻撃コマンド後の全員のCPを先読み
  get_init_cps
  # cpの値でソート
  @names.sort!{|a,b| b[0] <=> a[0] }
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh(id)
  # 再描画開始
  self.contents.clear
   self.contents.font.name = "Tahoma"
  self.contents.font.size = 20
  self.contents.font.color = system_color
  self.contents.font.size = 18
  self.contents.draw_text(0, 0, 100, 20, "Turn Ratio")
  h = 0
  self.contents.font.size = 19
  for i in id-1...[id+18,50].min
    @nam = @names[i]
    if @nam == nil
      break
    end
    x = 4
    y = 22 * h + 20
    if @nam[0] >= 500 # 500より大きければ白文字。
      if @nam[2] == true
        self.contents.font.color = Color.new(230, 255, 255, 255)
      else
        self.contents.font.color = normal_color
      end
    else
      if @nam[2] == true
        self.contents.font.color = Color.new(190, 225, 225, 255)
      else
        self.contents.font.color = disabled_color
      end
    end
     self.contents.font.name = "Tahoma"
  self.contents.font.size = $fontsize
    self.contents.draw_text(x, y, 32, 22, (i+1).to_s)
    self.contents.draw_text(x+32, y, 128, 22, @nam[1])
    h += 1
  end
end
#--------------------------------------------------------------------------
# ● 行動後のCPの取得
#--------------------------------------------------------------------------
def get_init_cps
  # メンバー全員の行動後のCPと名前を@namesに格納
  i = 0
  while @names.size < 75
    for member in $game_party.actors + $game_troop.enemies
      next if member.dead? or !member.exist?
      cp = CP_COST_ATTACK * @agi_avg / member.agi # 攻撃時に減算するCP先読み
      if i == 1 and member.current_action.kind == 1
        @skill = $data_skills[@active_battler.current_action.skill_id]
        skill = $data_skills[member.current_action.skill_id]
        cp = CP_COST_SKILL[skill.id] * @agi_avg / member.agi
      end
      cp = member.cp - (cp * i)
      if i == 0
        spell = member.state?(SPELL_STATE_ID)
      else
        spell = false
      end
      @names.push([cp, member.name, spell])
    end
    i += 1
  end
end
#--------------------------------------------------------------------------
# ● CTBウィンドウの中身が空かどうかを確認する
#--------------------------------------------------------------------------
def names_full(id)
  if @names[id] == nil
    return false
  end
  return true
end
end
#==============================================================================
# ■ Window_PartyCommand(座標がおかしくなるので、全部再定義しちゃってます)
#==============================================================================
class Window_PartyCommand < Window_Selectable
#--------------------------------------------------------------------------
# ● オブジェクト初期化(再定義)
#--------------------------------------------------------------------------
def initialize
  super(0, 0, 640, 64)
  self.contents = Bitmap.new(width - 32, height - 32)
  self.back_opacity = 160
  # コマンド追加
  @commands = ["Battle", "Special", "Escape"]
  @item_max = 3
  @column_max = 3
  draw_item(0, normal_color)
  draw_item(1, normal_color)   
  draw_item(2, $game_temp.battle_can_escape ? normal_color : disabled_color)
  self.active = false
  self.visible = false
  self.index = 0
end
#--------------------------------------------------------------------------
# ● 項目の描画(再定義)
#     index : 項目番号
#     color : 文字色
#--------------------------------------------------------------------------
def draw_item(index, color)
  self.contents.font.color = color
  rect = Rect.new(80 + index * 160 + 4, 0, 128 - 10, 32)
  self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
  self.contents.draw_text(rect, @commands[index], 1)
end
#--------------------------------------------------------------------------
# ● カーソルの矩形更新(再定義)
#--------------------------------------------------------------------------
def update_cursor_rect
  self.cursor_rect.set(80 + index * 160, 0, 128, 32)
end
end
#==============================================================================
# ■ Window_BattleStatus
#==============================================================================
class Window_BattleStatus < Window_Base
#--------------------------------------------------------------------------
# ● オブジェクト初期化(再定義)(微妙に座標調整)
#--------------------------------------------------------------------------
def initialize
  super(160, 320, 480, 160)
  self.contents = Bitmap.new(width - 32, height - 32)
  @level_up_flags = [false, false, false, false]
  refresh
end
#--------------------------------------------------------------------------
# ● リフレッシュ(再定義)(微妙に座標調整)
#--------------------------------------------------------------------------
def refresh
  self.contents.clear
   self.contents.font.name = "Tahoma"
  self.contents.font.size = 19
  @item_max = $game_party.actors.size
  for i in 0...$game_party.actors.size
    actor = $game_party.actors[i]
    actor_x = i * 115 + 9
    draw_actor_name(actor, actor_x, 0)
    draw_actor_hp(actor, actor_x, 31, 90)
    draw_actor_sp(actor, actor_x, 65, 90)
    if @level_up_flags[i]
      self.contents.font.color = normal_color
      self.contents.draw_text(actor_x, 99, 120, 32, "Level Up!")
    else
      draw_actor_state(actor, actor_x, 99)
    end
  end
end
end

#==============================================================================
# ■ Game_Battler
#==============================================================================
class Game_Battler
# 詠唱ステートのID読み込み
include CTB_Define

attr_accessor :now_guarding             # 現在防御中フラグ
attr_accessor :cp                       # 現在CP
#--------------------------------------------------------------------------
# ● コマンド入力可能判定
#--------------------------------------------------------------------------
alias ctb_sys_inputable? inputable?
def inputable?
  bool = ctb_sys_inputable?
  return false if state?(SPELL_STATE_ID)
  return false if bool == false
  return false if @cp < 500
  return true
end
end

#==============================================================================
# ■ Game_Actor
#==============================================================================
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# ● セットアップ
#--------------------------------------------------------------------------
alias ctb_sys_setup setup
def setup(actor_id)
  ctb_sys_setup(actor_id)
  @cp = 0
  @now_guarding = false
end
#--------------------------------------------------------------------------
# ● バトル画面 X 座標の取得(再定義)
#--------------------------------------------------------------------------
def screen_x
  # パーティ内の並び順から X 座標を計算して返す
  if self.index != nil
    return self.index * 115 + 215
  else
    return 0
  end
end
end

#==============================================================================
# ■ Game_Enemy
#==============================================================================
class Game_Enemy < Game_Battler
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
alias ctb_sys_initialize initialize
def initialize(troop_id, member_index)
  ctb_sys_initialize(troop_id, member_index)
  @cp = 0
  @now_guarding = false
end
end

#==============================================================================
# ■ Game_BattleAction
#==============================================================================
class Game_BattleAction
#--------------------------------------------------------------------------
# ● 公開インスタンス変数
#--------------------------------------------------------------------------
attr_accessor :spell                    # 詠唱中か否か
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
alias ctb_sys_initialize initialize
def initialize
  @spell = false # spellをfalseにする
  ctb_sys_initialize
end

#--------------------------------------------------------------------------
# ● クリア
#--------------------------------------------------------------------------
alias ctb_sys_clear clear
def clear
  # spell がtrueならば実行しない
  return if @spell
  ctb_sys_clear
end
end

#==============================================================================
# ■ Scene_Battle
#==============================================================================
class Scene_Battle
# 詠唱ステートのID読み込み
include CTB_Define

#--------------------------------------------------------------------------
# ● メイン処理 (再定義)
#--------------------------------------------------------------------------
def main
  # 戦闘用の各種一時データを初期化
  $game_temp.in_battle = true
  $game_temp.battle_turn = 0
  $game_temp.battle_event_flags.clear
  $game_temp.battle_abort = false
  $game_temp.battle_main_phase = false
  $game_temp.battleback_name = $game_map.battleback_name
  $game_temp.forcing_battler = nil
  # バトルイベント用インタプリタを初期化
  $game_system.battle_interpreter.setup(nil, 0)
  # トループを準備
  @troop_id = $game_temp.battle_troop_id
  $game_troop.setup(@troop_id)  
  # アクターコマンドウィンドウを作成
  s1 = $data_system.words.attack
  s2 = $data_system.words.skill
  s3 = $data_system.words.guard
  s4 = $data_system.words.item
  @actor_command_window = Window_Command.new(115, [s1, s2, s3, s4])
  @actor_command_window.y = 160
  @actor_command_window.back_opacity = 0
  @actor_command_window.active = false
  @actor_command_window.visible = false
  # その他のウィンドウを作成
  @party_command_window = Window_PartyCommand.new
  @help_window = Window_Help.new
  @help_window.back_opacity = 0
  @help_window.visible = false
  @status_window = Window_BattleStatus.new
  @message_window = Window_Message.new

  ### ココから追加部分
  # 全員のすばやさの平均を割り出す
  @avg = read_avg
  # CTB用Windowを作成
  @ctb_window = Window_CTB.new(@avg)
  # 全員の初期CPを代入
  first_cp
  ### ココまで追加部分

  # スプライトセットを作成
  @spriteset = Spriteset_Battle.new
  # ウェイトカウントを初期化
  @wait_count = 0
  # トランジション実行
  if $data_system.battle_transition == ""
    Graphics.transition(20)
  else
    Graphics.transition(40, "Graphics/Transitions/" +
      $data_system.battle_transition)
  end
 
  # プレバトルフェーズ開始
  start_phase1
  # メインループ
  loop do
    # ゲーム画面を更新
    Graphics.update
    # 入力情報を更新
    Input.update
    # フレーム更新
    update
    # 画面が切り替わったらループを中断
    if $scene != self
      break
    end
  end
  # マップをリフレッシュ
  $game_map.refresh
  # トランジション準備
  Graphics.freeze
  # ウィンドウを解放
  @actor_command_window.dispose
  @party_command_window.dispose
  @help_window.dispose
  @status_window.dispose
  @message_window.dispose
  ### ココから追加部分
  @ctb_window.dispose
  if @skill_window != nil
    @skill_window.dispose
  end
  ### ココまで追加部分
  if @skill_window != nil
    @skill_window.dispose
  end
  if @item_window != nil
    @item_window.dispose
  end
  if @result_window != nil
    @result_window.dispose
  end
  # スプライトセットを解放
  @spriteset.dispose
  # タイトル画面に切り替え中の場合
  if $scene.is_a?(Scene_Title)
    # 画面をフェードアウト
    Graphics.transition
    Graphics.freeze
  end
  # 戦闘テストからゲームオーバー画面以外に切り替え中の場合
  if $BTEST and not $scene.is_a?(Scene_Gameover)
    $scene = nil
  end
end
#--------------------------------------------------------------------------
# ● フレーム更新(再定義)
#--------------------------------------------------------------------------
def update
  # バトルイベント実行中の場合
  if $game_system.battle_interpreter.running?
    # インタプリタを更新
    $game_system.battle_interpreter.update
    # アクションを強制されているバトラーが存在しない場合
    if $game_temp.forcing_battler == nil
      # バトルイベントの実行が終わった場合
      unless $game_system.battle_interpreter.running?
        # 戦闘継続の場合、バトルイベントのセットアップを再実行
        unless judge
          setup_battle_event
        end
      end
      # アフターバトルフェーズでなければ
      if @phase != 5
        # ステータスウィンドウをリフレッシュ
        @status_window.refresh
      end
    end
  end
  # システム (タイマー)、画面を更新
  $game_system.update
  $game_screen.update
  # タイマーが 0 になった場合
  if $game_system.timer_working and $game_system.timer == 0
    # バトル中断
    $game_temp.battle_abort = true
  end
 
  # ココから追加
  # CP更新
  if @phase != 4
    cp_countup
  end
  @ctb_window.update
  # CTB ウィンドウに名前が表示されていない場合(戦闘開始時)はrefresh
  @ctb_window.refresh if @ctb_window.names_empty
  # ココまで追加

  # ウィンドウを更新
  @help_window.update
  @party_command_window.update
  @actor_command_window.update
  @status_window.update
  @message_window.update
  # スプライトセットを更新
  @spriteset.update
  # トランジション処理中の場合
  if $game_temp.transition_processing
    # トランジション処理中フラグをクリア
    $game_temp.transition_processing = false
    # トランジション実行
    if $game_temp.transition_name == ""
      Graphics.transition(20)
    else
      Graphics.transition(40, "Graphics/Transitions/" +
        $game_temp.transition_name)
    end
  end
  # メッセージウィンドウ表示中の場合
  if $game_temp.message_window_showing
    return
  end
  # エフェクト表示中の場合
  if @spriteset.effect?
    return
  end
  # ゲームオーバーの場合
  if $game_temp.gameover
    # ゲームオーバー画面に切り替え
    $scene = Scene_Gameover.new
    return
  end
  # タイトル画面に戻す場合
  if $game_temp.to_title
    # タイトル画面に切り替え
    $scene = Scene_Title.new
    return
  end
  # バトル中断の場合
  if $game_temp.battle_abort
    # バトル開始前の BGM に戻す
    $game_system.bgm_play($game_temp.map_bgm)
    # バトル終了
    battle_end(1)
    return
  end
  # ウェイト中の場合
  if @wait_count > 0
    # ウェイトカウントを減らす
    @wait_count -= 1
    return
  end
  # アクションを強制されているバトラーが存在せず、
  # かつバトルイベントが実行中の場合
  if $game_temp.forcing_battler == nil and
     $game_system.battle_interpreter.running?
    return
  end
  # フェーズによって分岐
  case @phase
  when 1  # プレバトルフェーズ
    update_phase1
  when 2  # パーティコマンドフェーズ
    update_phase2
  when 3  # アクターコマンドフェーズ
    update_phase3
  when 4  # メインフェーズ
    update_phase4
  when 5  # アフターバトルフェーズ
    update_phase5
  # ココから追加
  when 6 # 全行動順確認フェーズ(追加部分)
    update_ctb_all
  end
end
#--------------------------------------------------------------------------
# ● パーティコマンドフェーズ開始(再定義)
#--------------------------------------------------------------------------
def start_phase2
  # フェーズ 2 に移行
  @phase = 2
  # アクターを非選択状態に設定
  @actor_index = -1
  @active_battler = nil
  # ココから変更
  # アクターコマンドウィンドウを無効化
  @actor_command_window.active = false
  @actor_command_window.visible = false
  # ココまで変更
  # メインフェーズフラグをクリア
  $game_temp.battle_main_phase = false
  # パーティ全員のアクションをクリア
  $game_party.clear_actions   
  # コマンド入力不可能な場合
  unless $game_party.inputable?
    # メインフェーズ開始
    start_phase4
  end
  # ココから変更
  # パーティーコマンドがアクティブならばパーティーコマンドフェーズへ
  if @party_command_window.active != true
    start_phase3
  else
    update_phase2
  end
  # ココまで変更
end
#--------------------------------------------------------------------------
# ● フレーム更新 (パーティコマンドフェーズ)(再定義)
#--------------------------------------------------------------------------
def update_phase2
  # 全部変更してます
  # C ボタンが押された場合
  if Input.trigger?(Input::C)
    # パーティコマンドウィンドウのカーソル位置で分岐
    case @party_command_window.index
    when 0  # 戦う
      # 決定 SE を演奏
      $game_system.se_play($data_system.decision_se)
      # アクターコマンドフェーズ開始
      start_phase3
    when 1  # CTBWindow2
      # 決定 SE を演奏
      $game_system.se_play($data_system.decision_se)
      # CTB表示開始
      start_phase2_CTB
    when 2  # 逃げる
      # 逃走可能ではない場合
      if $game_temp.battle_can_escape == false
        # ブザー SE を演奏
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # 決定 SE を演奏
      $game_system.se_play($data_system.decision_se)
      # 逃走処理
      update_phase2_escape
    end
    return
  elsif Input.trigger?(Input::B)
    # 決定 SE を演奏
    $game_system.se_play($data_system.cancel_se)
    # アクターコマンドフェーズ開始
    start_phase3
  end
end
#--------------------------------------------------------------------------
# ● フレーム更新 (パーティコマンドフェーズ : 逃げる)
#--------------------------------------------------------------------------
alias ctb_sys_update_phase2_escape update_phase2_escape
def update_phase2_escape
  # CP消費 (全員)
  for actor in $game_party.actors
    if actor.exist?
      actor.cp -= CP_COST_ESCAPE * @avg / actor.agi
    end
  end
  ctb_sys_update_phase2_escape
end
#--------------------------------------------------------------------------
# ● アクターコマンドウィンドウのセットアップ
#--------------------------------------------------------------------------
alias ctb_sys_phase3_setup_command_window phase3_setup_command_window
def phase3_setup_command_window
  ctb_sys_phase3_setup_command_window
  # ガードフラグをfalseにする
  @active_battler.now_guarding = false
  # アクターコマンドウィンドウの位置を再設定(右へ160移動)
  @actor_command_window.x = @actor_index * 105 + 160
end
#--------------------------------------------------------------------------
# ● フレーム更新 (アクターコマンドフェーズ : 基本コマンド)
#--------------------------------------------------------------------------
alias ctb_sys_update_phase3_basic_command update_phase3_basic_command
def update_phase3_basic_command
  # X ボタンが押された場合
  if Input.trigger?(Input::X)
    # 決定 SE を演奏
    $game_system.se_play($data_system.decision_se)
    # パーティーコマンド呼び出し
    @party_command_window.active = true
    @party_command_window.visible = true     
    start_phase2     
  else
    ctb_sys_update_phase3_basic_command
  end
end
#--------------------------------------------------------------------------
# ● 行動順序作成 (再定義)
#--------------------------------------------------------------------------
def make_action_orders
  # CP500以上のバトラーはpushしないようにした。
  # 配列 @action_battlers を初期化
  @action_battlers = []
  # CP500以上のエネミーを配列 @action_battlers に追加
  for enemy in $game_troop.enemies
    if enemy.cp >= 500
      @action_battlers.push(enemy)
    end
  end
  # CP500以上のアクターを配列 @action_battlers に追加
  for actor in $game_party.actors
    if actor.cp >= 500
      @action_battlers.push(actor)
    end
  end
  # 全員のアクションスピードを決定
  for battler in @action_battlers
    battler.make_action_speed
  end
  # アクションスピードの大きい順に並び替え
  @action_battlers.sort! {|a,b|
    b.current_action.speed - a.current_action.speed }
end
#--------------------------------------------------------------------------
# ● フレーム更新 (メインフェーズ ステップ 1 : アクション準備)
#--------------------------------------------------------------------------
alias ctb_sys_update_phase4_step1 update_phase4_step1
def update_phase4_step1
  # CTBリフレッシュ
  @ctb_window.refresh
  ctb_sys_update_phase4_step1
end
#--------------------------------------------------------------------------
# ● フレーム更新 (メインフェーズ ステップ 2 : アクション開始)(再定義)
#--------------------------------------------------------------------------
def update_phase4_step2
  # 強制アクションでなければ
  unless @active_battler.current_action.forcing
    # 制約が [敵を通常攻撃する] か [味方を通常攻撃する] の場合
    if @active_battler.restriction == 2 or @active_battler.restriction == 3
      # アクションに攻撃を設定
      @active_battler.current_action.kind = 0
      @active_battler.current_action.basic = 0
    end
    # 制約が [行動できない] の場合
    if @active_battler.restriction == 4
      # アクション強制対象のバトラーをクリア
      $game_temp.forcing_battler = nil
      if @active_battler.cp >= 500
        # ステート自然解除
        @active_battler.remove_states_auto
        # CP消費 (行動できない場合は何もしない場合と同じ) ココ追加
        @active_battler.cp -= CP_COST_NOTHING * @avg / @active_battler.agi
        # cpをカウントアップ
        cp_countup
      end
      # ステップ 1 に移行
      @phase4_step = 1
      return
    end
  end
  # 対象バトラーをクリア
  @target_battlers = []
  # アクションの種別で分岐
  case @active_battler.current_action.kind
  when 0  # 基本
    make_basic_action_result
  when 1  # スキル
    make_skill_action_result
  when 2  # アイテム
    make_item_action_result
  end
  # ステップ 3 に移行
  if @phase4_step == 2
    @phase4_step = 3
  end
end
#--------------------------------------------------------------------------
# ● 基本アクション 結果作成
#--------------------------------------------------------------------------
alias ctb_sys_make_basic_action_result make_basic_action_result
def make_basic_action_result
  # 攻撃の場合
  if @active_battler.current_action.basic == 0
@active_battler.cp -= CP_COST_ATTACK * @avg / @active_battler.agi
  end
  # 防御の場合
  if @active_battler.current_action.basic == 1
    # CP消費
    @active_battler.cp -= CP_COST_GUARD * @avg / @active_battler.agi
  end
  # 敵の逃げるの場合
  if @active_battler.is_a?(Game_Enemy) and
     @active_battler.current_action.basic == 2
    # CP消費
    @active_battler.cp -= CP_COST_ESCAPE * @avg / @active_battler.agi
  end
  # 何もしないの場合
  if @active_battler.current_action.basic == 3
    # CP消費
    @active_battler.cp -= CP_COST_NOTHING * @avg / @active_battler.agi
    # アクション強制対象のバトラーをクリア
    $game_temp.forcing_battler = nil
    # cpをカウントアップ
    cp_countup
    # ステップ 1 に移行
    @phase4_step = 1
    return
  end
  # 呼び戻し
  ctb_sys_make_basic_action_result
end
#--------------------------------------------------------------------------
# ● スキルアクション 結果作成(再定義)
#--------------------------------------------------------------------------
def make_skill_action_result
  # スキルを取得
  @skill = $data_skills[@active_battler.current_action.skill_id]
  skill = $data_skills[@active_battler.current_action.skill_id]
  # ステータスウィンドウをリフレッシュ
  @status_window.refresh
  @ctb_window.refresh
  # ヘルプウィンドウにスキル名を表示
  @help_window.set_text(@skill.name, 1)
  # 詠唱中の場合
  if @active_battler.state?(SPELL_STATE_ID)
    # ステート「詠唱」を削除
    @active_battler.remove_state(SPELL_STATE_ID)
    @active_battler.current_action.spell = false
  else
    # SP 消費
    @active_battler.sp -= @skill.sp_cost
    # SkillのSpell値が1以上の場合
    if @skill.spell > 0
      # CP 消費 skill.spellの減算
      @active_battler.cp -= CP_COST_SKILL[skill.id] * @avg / @active_battler.agi
      # ステート「詠唱」を付
      @active_battler.add_state(SPELL_STATE_ID)
      @active_battler.current_action.spell = true
    end
  end
  # ステート「詠唱」がなければ効果実行
  unless @active_battler.state?(SPELL_STATE_ID)
    # SP 消費を戻す。
    @active_battler.sp += @skill.sp_cost
    # 強制アクションでなければ
    unless @active_battler.current_action.forcing
      # SP 切れなどで使用できなくなった場合
      unless @active_battler.skill_can_use?(@skill.id)
        # アクション強制対象のバトラーをクリア
        $game_temp.forcing_battler = nil
        # ステップ 1 に移行
        @phase4_step = 1
        return
      end
    end
    # SP をまた消費
    @active_battler.sp -= @skill.sp_cost
    # CP 消費 skill.delayの減算
    @active_battler.cp -= CP_COST_SKILL[skill.id] * @avg / @active_battler.agi
    # アニメーション ID を設定
    @animation1_id = @skill.animation1_id
    @animation2_id = @skill.animation2_id
    # コモンイベント ID を設定
    @common_event_id = @skill.common_event_id
    # 対象側バトラーを設定
    set_target_battlers(@skill.scope)
    # スキルの効果を適用
    for target in @target_battlers
      target.skill_effect(@active_battler, @skill)
           end
 end
end
#--------------------------------------------------------------------------
# ● アイテムアクション 結果作成
#--------------------------------------------------------------------------
def make_item_action_result
alias ctb_sys_make_item_action_result make_item_action_result
 ctb_sys_make_item_action_result
 # CP 消費
 @active_battler.cp -= CP_COST_ITEM * @avg / @active_battler.agi
end
#--------------------------------------------------------------------------
# ● フレーム更新 (メインフェーズ ステップ 6 : リフレッシュ)
#--------------------------------------------------------------------------
alias ctb_sys_update_phase4_step6 update_phase4_step6
def update_phase4_step6
 ctb_sys_update_phase4_step6
 # cpをカウントアップ
 cp_countup
end
#--------------------------------------------------------------------------
# ● すばやさ平均割り出し
#--------------------------------------------------------------------------
def read_avg
 temp = 0
 for member in $game_party.actors + $game_troop.enemies
   temp += member.agi
 end
 temp /= $game_troop.enemies.size + $game_party.actors.size
 return temp
end 
#--------------------------------------------------------------------------
# ● 全員の初期CPを決定
#--------------------------------------------------------------------------
def first_cp
 for member in $game_party.actors + $game_troop.enemies
   member.cp = [[5 * (rand(20) + 60) * member.agi / @avg, 0].max, 490].min
 end
end
#----------------------------------------------------------------------------
# ● 次の行動者までCPをカウントアップ
#----------------------------------------------------------------------------
def cp_countup   
 # 500 - cpの最小値を読み込む
 cpmin = 500
 edead = 0
 for enemy in $game_troop.enemies
   # 行動出来なければ無視
   if enemy.dead? == true
     edead +=1
     enemy.cp = 0
     next
   end
   cpmin = [cpmin, 500 - enemy.cp].min
 end

 # エネミーが全員死んでいればreturn
 return if $game_troop.enemies.size == edead

 for actor in $game_party.actors
   # 行動出来なければ無視
   if actor.dead? == true
     actor.cp = 0
     next
   end
   cpmin = [cpmin, 500 - actor.cp].min
 end

 # cpminが0ならばここで処理終了
 return if cpmin <= 0

 # 全員のCPをcpmin加算
 for member in $game_party.actors + $game_troop.enemies
   # 行動出来なければ無視
   next if member.dead?
   member.cp += cpmin
   # cpが500より小さければ次へ
   next if member.cp < 500
   # ステート自然解除
   member.remove_states_auto
   # MP回復
   plus = [member.maxsp * 5/ 100,1].max
   member.sp = [member.sp + plus,member.maxsp].min
   if member.slip_damage?
     # スリップダメージ
     member.slip_damage_effect
     member.damage_pop = true
   end
 end
 @status_window.refresh
end
#--------------------------------------------------------------------------
# ● フレーム更新 (パーティコマンドフェーズ : 行動順表示)
#--------------------------------------------------------------------------
def start_phase2_CTB
 @party_command_window.active = false
 @party_command_window.visible = false
 # フェーズ 6 に移行
 @phase = 6
 @ctb_window.visible = false
 @ctb_window_all = Window_CTB_All.new(@avg)
 @ctb_window_all.update
 @id = 1
 @ctb_window_all.refresh(@id)
end 
#--------------------------------------------------------------------------
# ● フレーム更新 (パーティコマンドフェーズ : 行動順アップデート)
#--------------------------------------------------------------------------
def update_ctb_all
 # 下 ボタンが押された場合
 if Input.trigger?(Input::DOWN) or Input.repeat?(Input::DOWN)
   if @id < 50
     @id +=1
   else
     @id = 1
   end
   @ctb_window_all.refresh(@id)
 # 上 ボタンが押された場合     
 elsif Input.trigger?(Input::UP) or Input.repeat?(Input::UP)
   if @id > 1
     @id -= 1
   else
     @id = 50
   end
   @ctb_window_all.refresh(@id)
 # L ボタンが押された場合     
 elsif Input.trigger?(Input::L)
   @id = [@id-18,1].max
   @ctb_window_all.refresh(@id)
 # R ボタンが押された場合     
 elsif Input.trigger?(Input::R)
   @id = [@id+18, 50].min
   @ctb_window_all.refresh(@id)
 # BかAが押されたら
 elsif Input.trigger?(Input::B)
   # キャンセル SE を演奏
   $game_system.se_play($data_system.cancel_se)
   @ctb_window.visible = true
   @ctb_window_all.dispose
   @party_command_window.active = true
   @party_command_window.visible = true     
   start_phase2     
 end
end
end

 

 

http://img511.imageshack.us/img511/8839/screendg5.png

 

piccola spiegazione

 

naturalmente se lo fai da solo è meglio ed è piu appagante

Edited by DarkSchneider
Link to comment
Share on other sites

  • 0

E invece, dato che sono un cocciuto della madonna, ho fatto un fritto misto e devo dire che è uscita na cosa figa. Se il mio team (mio xkè lo dirigo io ^_______^) mi approva la soluzione che ho trovato, vi spiego tutto. In anteprima vi dico subito che è uno script che usa anche gli eventi e i chara luminosi ^______________________^.

 

Per quanto riguarda il secondo problema, invece, ho cominciato a vedere lo script che mi ha postato DarkSchneider e sembrerebbe fare proprio al caso mio. Solo che da quello che ho potuto capire, questo è un BS completo, e non so quanto possa essere compatibile con quello di Minkoff. Anche perchè, se ho capito bene, quella finestra di turnazione si basa tutta sul resto dello script scritto dal tizio jappo (che a me non serve), e non sul BS di default come quello di Minkoff.

Edited by Broly88

Il mondo è il cancro... Io la cura...

 

Il mio sport preferito:

Gli altri --> (T_T#)O==(^_^Q) <-- IO

 

I miei alias:

http://www.naruto-kun.com/images/narutotest/shikamaru.jpg

-----------------------------------------------------

http://www.naruto-kun.com/images/narutotest/rocklee.jpg

-----------------------------------------------------

http://www.ff-fan.com/chartest/banners/auron.jpg

 

Broly88's

http://pokejungle.net/other/pokepet/trainers/e4k2.png http://pokejungle.net/other/pokepet/Charizard.gif

Flame Dancer the level 99 Charizard!

 

http://img259.imageshack.us/img259/7446/rockleeoj1.gif http://img233.imageshack.us/img233/7449/sorajm1.gif

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...