OX論壇
Would you like to react to this message? Create an account in a few clicks or log in to continue.

如何製作 存在角色但不顯示在人物選單上

2 posters

向下

如何製作 存在角色但不顯示在人物選單上 Empty 如何製作 存在角色但不顯示在人物選單上

發表  ★暒星☆ 周五 8月 29, 2008 7:59 pm

如何製作
角色存在但不顯示在人物選單上
戰鬥也是不顯示,戰鬥勝利 那個角色也可以得到EXP
應該很難吧= =

原先構想:
遇戰鬥時角色1離開隊伍
結束角色1增加
角色1的功能只是行走圖和紀錄領主的等級...
如果1加入隊後好像會排到後面,角色行走圖 第一位才會有顯使出來!
可以有角色1以外,還有4位隊員!

如果畫圖不好,想要讓開頭圖片改變怎麼辦?
哪邊有可以抓圖的= =

字體怎樣改便
★暒星☆
★暒星☆
拿著木劍的戰士
拿著木劍的戰士

文章數 : 28
注冊日期 : 2008-08-28
年齡 : 31

回頂端 向下

如何製作 存在角色但不顯示在人物選單上 Empty 回復: 如何製作 存在角色但不顯示在人物選單上

發表  愚零鬥武多 周日 8月 31, 2008 2:26 pm

★暒星☆ 寫到:如何製作
角色存在但不顯示在人物選單上
戰鬥也是不顯示,戰鬥勝利 那個角色也可以得到EXP
應該很難吧= =

原先構想:
遇戰鬥時角色1離開隊伍
結束角色1增加
角色1的功能只是行走圖和紀錄領主的等級...
如果1加入隊後好像會排到後面,角色行走圖 第一位才會有顯使出來!
可以有角色1以外,還有4位隊員!
1.設置不出現的角色不出現在選單中,加入人數無限制(但選單與戰鬥中最多只能容納4 人)
2.腳本開頭有使用說明
3.將以下腳本貼在Main之前
代碼:

# 設置不顯示在選單中的角色ID
# 例:不想讓1號角色出現EXIT_ACTORS = [1]
# 例:不想讓2號與4號角色出現EXIT_ACTORS = [2,4]
# 例:按照正常顯示全部角色EXIT_ACTORS = []
EXIT_ACTORS = [1]
#==============================================================================
# ■ Window_MenuStatus
#==============================================================================
class Window_MenuStatus < Window_Selectable
  #--------------------------------------------------------------------------
  # ● 更新
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    @item_max = [$game_party.actors.size,4].min
    for i in 0...@item_max
      x = 64
      y = i * 116
      actor = $game_party.actors[i]
      draw_actor_graphic(actor, x - 40, y + 80)
      draw_actor_name(actor, x, y)
      draw_actor_class(actor, x + 144, y)
      draw_actor_level(actor, x, y + 32)
      draw_actor_state(actor, x + 90, y + 32)
      draw_actor_exp(actor, x, y + 64)
      draw_actor_hp(actor, x + 236, y + 32)
      draw_actor_sp(actor, x + 236, y + 64)
    end
  end
end
#==============================================================================
# ■ Window_BattleStatus
#==============================================================================
class Window_BattleStatus < Window_Base
  #--------------------------------------------------------------------------
  # ● 更新
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    @item_max = [$game_party.actors.size,4].min
    for i in 0...@item_max
      actor = $game_party.actors[i]
      actor_x = i * 160 + 4
      draw_actor_name(actor, actor_x, 0)
      draw_actor_hp(actor, actor_x, 32, 120)
      draw_actor_sp(actor, actor_x, 64, 120)
      if @level_up_flags[i]
        self.contents.font.color = normal_color
        self.contents.draw_text(actor_x, 96, 120, 32, "LEVEL UP!")
      else
        draw_actor_state(actor, actor_x, 96)
      end
    end
  end
end 
#==============================================================================
# ■ Game_Party
#==============================================================================
class Game_Party
  attr_accessor :actors                  # 角色
  #--------------------------------------------------------------------------
  # ● 加入同伴(破除人數限制)
  #    actor_id : 角色 ID
  #--------------------------------------------------------------------------
  def add_actor(actor_id)
    # 取得角色
    actor = $game_actors[actor_id]
    # 本角色不在隊伍中的情況下
    if @actors.include?(actor)
      # 添加角色
      @actors.push(actor)
      # 還原主角
      $game_player.refresh
    end
  end
end
#==============================================================================
# ■ Scene_Menu
#==============================================================================
class Scene_Menu
  #--------------------------------------------------------------------------
  # ● 主處理
  #--------------------------------------------------------------------------
  alias actor_exit_main main
  def main
    @temp_id = []
    for actor in $game_party.actors
      @temp_id.push(actor.id)
    end
    # 隊伍處理
    if EXIT_ACTORS != []
      for i in EXIT_ACTORS
        $game_party.remove_actor(i)
      end
    end
    actor_exit_main
    # 隊伍復原
    $game_party.actors = []
    for id in @temp_id
      $game_party.add_actor(id)
    end
  end
end
#==============================================================================
# ■ Scene_Battle
#==============================================================================
class Scene_Battle
  #--------------------------------------------------------------------------
  # ● 主要處理
  #--------------------------------------------------------------------------
  alias battler_exit_main main 
  def main
    @temp_id = []
    for actor in $game_party.actors
      @temp_id.push(actor.id)
    end
    # 隊伍處理
    if EXIT_ACTORS != []
      for i in EXIT_ACTORS
        $game_party.remove_actor(i)
      end
    end
    battler_exit_main
    # 隊伍復原
    $game_party.actors = []
    for id in @temp_id
      $game_party.add_actor(id)
    end
  end
  #--------------------------------------------------------------------------
  # ● 製作行動循序
  #--------------------------------------------------------------------------
  def make_action_orders
    # 初始化序列 @action_battlers
    @action_battlers = []
    # 添加敵人到 @action_battlers 序列
    for enemy in $game_troop.enemies
      @action_battlers.push(enemy)
    end
    # 添加角色到 @action_battlers 序列
    actor_size = 0
    for actor in $game_party.actors
      @action_battlers.push(actor)
      actor_size += 1
      if actor_size >= 4
        break
      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 
end


如果畫圖不好,想要讓開頭圖片改變怎麼辦?
哪邊有可以抓圖的= =
請善用辜狗去搜尋你想要的圖

字體怎樣改便

在Main裡找到
Font.default_name = (["細明體"])
你可以改為
Font.default_name = (["標楷體"])
愚零鬥武多
愚零鬥武多
不正常人類研究中心自慰隊員
不正常人類研究中心自慰隊員

文章數 : 421
注冊日期 : 2008-04-06

回頂端 向下

回頂端


 
這個論壇的權限:
無法 在這個版面回復文章