幻想森林

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 3375|回复: 10

[RM2K&2K3] [求助]RPGXP的队伍问题

[复制链接]

62

主题

332

帖子

3234

积分

⑥精研

人造神经病患者

积分
3234
发表于 2006-7-12 13:04:50 | 显示全部楼层 |阅读模式
怎么XP不象2003那样可以有N个主角?
超过4个便不显示了?
如何做像POKEMON一样可以存放精灵?
笔没水了,暂时无法签名
回复

使用道具 举报

91

主题

3188

帖子

83986万

积分

荣誉群

传说中的Bunny大神~!

积分
839861514
QQ
发表于 2006-7-12 14:12:40 | 显示全部楼层
其实主角是可以超过4人的,人物也可以做成储存的形式。

人物仓库:http://zhuchao.go1.icpcn.com/rgss.htm
超过4人:http://tian.icworx.org/union/index.htm
其他所有的Bunny神都素我的部下XD~ 小教程范例收集 Orz感谢邪恶萝卜联盟!!!(原因自己去猜)
回复 支持 反对

使用道具 举报

62

主题

332

帖子

3234

积分

⑥精研

人造神经病患者

积分
3234
 楼主| 发表于 2006-7-12 16:56:18 | 显示全部楼层
[s:1]
谢啦!
你那个烂毛挺经典的嘛!
笔没水了,暂时无法签名
回复 支持 反对

使用道具 举报

62

主题

332

帖子

3234

积分

⑥精研

人造神经病患者

积分
3234
 楼主| 发表于 2006-7-12 17:00:19 | 显示全部楼层
麻烦改成"已解决吧"
笔没水了,暂时无法签名
回复 支持 反对

使用道具 举报

10

主题

69

帖子

1659

积分

⑥精研

论坛游人

积分
1659
发表于 2006-7-13 08:53:54 | 显示全部楼层
引用第1楼盗帅冬瓜2006-07-12 14:12发表的“”:
其实主角是可以超过4人的,人物也可以做成储存的形式。

人物仓库:http://zhuchao.go1.icpcn.com/rgss.htm
超过4人:http://tian.icworx.org/union/index.htm

关于掺战人数超过4人的设定!我按照提示修改了RGSS可是测试时老有错误!!到底!给出的脚本是完全替换原来的全部还是只替换响应的部分啊!!比如说!
#==============================================================================
# ■ Scene_Battle (分割定義 2)
#------------------------------------------------------------------------------
#  バトル画面の処理を行うクラスです。
#==============================================================================

class Scene_Battle
  #--------------------------------------------------------------------------
  # ● アクターコマンドウィンドウのセットアップ
  #--------------------------------------------------------------------------
  alias phase3_setup_command_window_actor_change phase3_setup_command_window
  def phase3_setup_command_window
    # 元の処理を実行
    phase3_setup_command_window_actor_change
    # アクターコマンドウィンドウの位置を設定
    @actor_command_window.x = @actor_index * SPRITES_BATTLER
  end
end



这是里面最后一个需要修改的地方!是全部替换掉原来的脚本!还是修改相应的地方就好!!原脚本是下面这样子的!长度和内容明显不一样,是全部替换成上面那样吗?

#==============================================================================
# ■ Scene_Battle (分割定义 2)
#------------------------------------------------------------------------------
#  处理战斗画面的类。
#==============================================================================

class Scene_Battle
  #--------------------------------------------------------------------------
  # ● 开始自由战斗回合
  #--------------------------------------------------------------------------
  def start_phase1
    # 转移到回合 1
    @phase = 1
    # 清除全体同伴的行动
    $game_party.clear_actions
    # 设置战斗事件
    setup_battle_event
  end
  #--------------------------------------------------------------------------
  # ● 刷新画面 (自由战斗回合)
  #--------------------------------------------------------------------------
  def update_phase1
    # 胜败判定
    if judge
      # 胜利或者失败的情况下 : 过程结束
      return
    end
    # 开始同伴命令回合
    start_phase2
  end
  #--------------------------------------------------------------------------
  # ● 开始同伴命令回合
  #--------------------------------------------------------------------------
  def start_phase2
    # 转移到回合 2
    @phase = 2
    # 设置角色为非选择状态
    @actor_index = -1
    @active_battler = nil
    # 有效化同伴指令窗口
    @party_command_window.active = true
    @party_command_window.visible = true
    # 无效化角色指令窗口
    @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
  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  # 逃跑
        # 不能逃跑的情况下
        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
    end
  end
  #--------------------------------------------------------------------------
  # ● 画面更新 (同伴指令回合 : 逃跑)
  #--------------------------------------------------------------------------
  def update_phase2_escape
    # 计算敌人速度的平均值
    enemies_agi = 0
    enemies_number = 0
    for enemy in $game_troop.enemies
      if enemy.exist?
        enemies_agi += enemy.agi
        enemies_number += 1
      end
    end
    if enemies_number > 0
      enemies_agi /= enemies_number
    end
    # 计算角色速度的平均值
    actors_agi = 0
    actors_number = 0
    for actor in $game_party.actors
      if actor.exist?
        actors_agi += actor.agi
        actors_number += 1
      end
    end
    if actors_number > 0
      actors_agi /= actors_number
    end
    # 逃跑成功判定
    success = rand(100) < 50 * actors_agi / enemies_agi
    # 成功逃跑的情况下
    if success
      # 演奏逃跑 SE
      $game_system.se_play($data_system.escape_se)
      # 还原为战斗开始前的 BGM
      $game_system.bgm_play($game_temp.map_bgm)
      # 战斗结束
      battle_end(1)
    # 逃跑失败的情况下
    else
      # 清除全体同伴的行动
      $game_party.clear_actions
      # 开始主回合
      start_phase4
    end
  end
  #--------------------------------------------------------------------------
  # ● 开始结束战斗回合
  #--------------------------------------------------------------------------
  def start_phase5
    # 转移到回合 5
    @phase = 5
    # 演奏战斗结束 ME
    $game_system.me_play($game_system.battle_end_me)
    # 还原为战斗开始前的 BGM
    $game_system.bgm_play($game_temp.map_bgm)
    # 初始化 EXP、金钱、宝物
    exp = 0
    gold = 0
    treasures = []
    # 循环
    for enemy in $game_troop.enemies
      # 敌人不是隐藏状态的情况下
      unless enemy.hidden
        # 获得 EXP、增加金钱
        exp += enemy.exp
        gold += enemy.gold
        # 出现宝物判定
        if rand(100) < enemy.treasure_prob
          if enemy.item_id > 0
            treasures.push($data_items[enemy.item_id])
          end
          if enemy.weapon_id > 0
            treasures.push($data_weapons[enemy.weapon_id])
          end
          if enemy.armor_id > 0
            treasures.push($data_armors[enemy.armor_id])
          end
        end
      end
    end
    # 限制宝物数为 6 个
    treasures = treasures[0..5]
    # 获得 EXP
    for i in 0...$game_party.actors.size
      actor = $game_party.actors
      if actor.cant_get_exp? == false
        last_level = actor.level
        actor.exp += exp
        if actor.level > last_level
          @status_window.level_up(i)
        end
      end
    end
    # 获得金钱
    $game_party.gain_gold(gold)
    # 获得宝物
    for item in treasures
      case item
      when RPG::Item
        $game_party.gain_item(item.id, 1)
      when RPG::Weapon
        $game_party.gain_weapon(item.id, 1)
      when RPG::Armor
        $game_party.gain_armor(item.id, 1)
      end
    end
    # 生成战斗结果窗口
    @result_window = Window_BattleResult.new(exp, gold, treasures)
    # 设置等待计数
    @phase5_wait_count = 100
  end
  #--------------------------------------------------------------------------
  # ● 画面更新 (结束战斗回合)
  #--------------------------------------------------------------------------
  def update_phase5
    # 等待计数大于 0 的情况下
    if @phase5_wait_count > 0
      # 减少等待计数
      @phase5_wait_count -= 1
      # 等待计数为 0 的情况下
      if @phase5_wait_count == 0
        # 显示结果窗口
        @result_window.visible = true
        # 清除主回合标志
        $game_temp.battle_main_phase = false
        # 刷新状态窗口
        @status_window.refresh
      end
      return
    end
    # 按下 C 键的情况下
    if Input.trigger?(Input::C)
      # 战斗结束
      battle_end(0)
    end
  end
end
回复 支持 反对

使用道具 举报

218

主题

1万

帖子

10万

积分

⑧专业

赋予你第五自由

积分
108021
发表于 2006-7-13 10:11:21 | 显示全部楼层
你说的是什么脚本啊

第 五 自 由 -   5th  Freedom   -

回复 支持 反对

使用道具 举报

10

主题

69

帖子

1659

积分

⑥精研

论坛游人

积分
1659
发表于 2006-7-13 11:01:15 | 显示全部楼层
其实我想问的是!!
#更改队伍人数
#收集,修改 BY 玄天
#原作者:MOMOMOMO(日站)。其版权由其原作者拥有,任何人不得非法使用。

#队伍最大人数
ACTORS = 5

#战斗人数
BATTLER_ACTORS = 5

#战斗画面修补
#目标 3人 200, 4人 160, 5人 120
SPRITES_BATTLER = 120

#游戏开始时步行图的显示(1即是角色1的步行图,如此类推)
CHARACTER_GRAPHIC = 1

#========================下面基本不用修改==============================

#==============================================================================
# ■ Game_Actor
#------------------------------------------------------------------------------
#  アクターを扱うクラスです。このクラスは Game_Actors クラス ($game_actors)
# の内部で使用され、Game_Party クラス ($game_party) からも参照されます。
#  处理角色的类。本类在 Game_Actors 类 ($game_actors)
# 的内部使用、Game_Party 类请参考 ($game_party) 。
#==============================================================================

class Game_Actor < Game_Battler
  #--------------------------------------------------------------------------
  # ● バトル画面 X 座標の取得
  # ● 取得战斗画面的 X 坐标
  #--------------------------------------------------------------------------
  def screen_x
    # パーティ内の並び順から X 座標を計算して返す
    # 返回计算后的队伍 X 坐标的排列顺序
    if self.index != nil
      return self.index * SPRITES_BATTLER + 80
    else
      return 0
    end
  end
end

# ●○●○●○●○●○●○●○●○●○●○●○●○●○●○●○●○●○●○●

#==============================================================================
# ■ Game_Party
#------------------------------------------------------------------------------
#  パーティを扱うクラスです。ゴールドやアイテムなどの情報が含まれます。このク
# ラスのインスタンスは $game_party で参照されます。
#  处理同伴的类。包含金钱以及物品的信息。本类的实例
# 请参考 $game_party。
#==============================================================================

class Game_Party
  #--------------------------------------------------------------------------
  # ● アクターを加える
  #     actor_id : アクター ID
  # ● 加入同伴
  #     actor_id : 角色 ID
  #--------------------------------------------------------------------------
  def add_actor(actor_id)
    # アクターを取得
    # 获取角色
    actor = $game_actors[actor_id]
    # パーティ人数が 4 人未満で、このアクターがパーティにいない場合
    # 同伴人数未满 4 人、本角色不在队伍中的情况下
    if @actors.size < ACTORS and not @actors.include?(actor)
      # アクターを追加
      # 添加角色
      @actors.push(actor)
      # プレイヤーをリフレッシュ
      # 还原主角
      $game_player.refresh
    end
  end
  #--------------------------------------------------------------------------
  # ● アクターの配列
  # ● 同伴队列
  #--------------------------------------------------------------------------
  def actors
    a = []
    if $game_temp.in_battle
      for i in 0...[@actors.size, BATTLER_ACTORS].min
        a.push(@actors)
      end
    else
      a = @actors
    end
    return a
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新 (ステータスウィンドウがアクティブの場合)
  #--------------------------------------------------------------------------
  def change_actor(index1, index2)
    temp_skill1 = @actors[index1]
    temp_skill2 = @actors[index2]
    # 実際に入れ替える
    @actors[index1] = temp_skill2
    @actors[index2] = temp_skill1
  end
  #--------------------------------------------------------------------------
  # ● 全員のアクションクリア
  # ● 清除全体的行动
  #--------------------------------------------------------------------------
  def clear_actions
    # パーティ全員のアクションをクリア
    # 清除全体同伴的行为
    for actor in actors
      actor.current_action.clear
    end
  end
  #--------------------------------------------------------------------------
  # ● コマンド入力可能判定
  # ● 可以输入命令的判定
  #--------------------------------------------------------------------------
  def inputable?
    # 一人でもコマンド入力可能なら true を返す
    # 如果一可以输入命令就返回 true
    for actor in actors
      if actor.inputable?
        return true
      end
    end
    return false
  end
  #--------------------------------------------------------------------------
  # ● 対象アクターのランダムな決定
  #     hp0 : HP 0 のアクターに限る
  # ● 对像角色的随机确定
  #     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、中卫的话 n = 3、后卫的话 n = 2
        n = 4 - position
        # ルーレットにアクターを n 回追加
        # 添加角色的轮流 n 回
        n.times do
          roulette.push(actor)
        end
      end
    end
    # ルーレットのサイズが 0 の場合
    # 轮流大小为 0 的情况
    if roulette.size == 0
      return nil
    end
    # ルーレットを回し、アクターを決定
    # 转轮盘赌,决定角色
    return roulette[rand(roulette.size)]
  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
  #--------------------------------------------------------------------------
  # ● 対象アクターのスムーズな決定
  #     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

# ●○●○●○●○●○●○●○●○●○●○●○●○●○●○●○●○●○●○●

#==============================================================================
# ■ Game_Player
#------------------------------------------------------------------------------
#  プレイヤーを扱うクラスです。イベントの起動判定や、マップのスクロールなどの
# 機能を持っています。このクラスのインスタンスは $game_player で参照されます。
#==============================================================================

class Game_Player < Game_Character
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  def refresh
    # パーティ人数が 0 人の場合
    if $game_party.actors.size == 0
      # キャラクターのファイル名と色相をクリア
      @character_name = ""
      @character_hue = 0
      # メソッド終了
      return
    end
    # アクターを取得
    if $game_party.actors.include?($game_actors[CHARACTER_GRAPHIC]) && CHARACTER_GRAPHIC != 0
      actor = $game_actors[CHARACTER_GRAPHIC]
    else
      actor = $game_party.actors[0]
    end
    # キャラクターのファイル名と色相を設定
    @character_name = actor.character_name
    @character_hue = actor.character_hue
    # 不透明度と合成方法を初期化
    @opacity = 255
    @blend_type = 0
  end
end

# ●○●○●○●○●○●○●○●○●○●○●○●○●○●○●○●○●○●○●

#==============================================================================
# ■ Spriteset_Battle
#------------------------------------------------------------------------------
#  バトル画面のスプライトをまとめたクラスです。このクラスは Scene_Battle クラ
# スの内部で使用されます。
#==============================================================================

class Spriteset_Battle
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  def initialize
    # ビューポートを作成
    @viewport1 = Viewport.new(0, 0, 640, 320)
    @viewport2 = Viewport.new(0, 0, 640, 480)
    @viewport3 = Viewport.new(0, 0, 640, 480)
    @viewport4 = Viewport.new(0, 0, 640, 480)
    @viewport2.z = 101
    @viewport3.z = 200
    @viewport4.z = 5000
    # バトルバックスプライトを作成
    @battleback_sprite = Sprite.new(@viewport1)
    # エネミースプライトを作成
    @enemy_sprites = []
    for enemy in $game_troop.enemies.reverse
      @enemy_sprites.push(Sprite_Battler.new(@viewport1, enemy))
    end
    # アクタースプライトを作成
    @actor_sprites = []
    @actor_sprites.push(Sprite_Battler.new(@viewport2))
    @actor_sprites.push(Sprite_Battler.new(@viewport2))
    @actor_sprites.push(Sprite_Battler.new(@viewport2))
    @actor_sprites.push(Sprite_Battler.new(@viewport2))
    @actor_sprites.push(Sprite_Battler.new(@viewport2))
    if BATTLER_ACTORS > 4
      for i in 4...BATTLER_ACTORS
        @actor_sprites.push(Sprite_Battler.new(@viewport2))
      end
    end
    # 天候を作成
    @weather = RPG::Weather.new(@viewport1)
    # ピクチャスプライトを作成
    @picture_sprites = []
    for i in 51..100
      @picture_sprites.push(Sprite_Picture.new(@viewport3,
        $game_screen.pictures))
    end
    # タイマースプライトを作成
    @timer_sprite = Sprite_Timer.new
    # フレーム更新
    update
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新
  #--------------------------------------------------------------------------
  alias update_actor_change update
  def update
    if BATTLER_ACTORS > 4
      for i in 4...BATTLER_ACTORS
        @actor_sprites.battler = $game_party.actors
      end
    end
    update_actor_change
  end
end

# ●○●○●○●○●○●○●○●○●○●○●○●○●○●○●○●○●○●○●

#==============================================================================
# ■ Window_MenuStatus
#------------------------------------------------------------------------------
#  メニュー画面でパーティメンバーのステータスを表示するウィンドウです。
#==============================================================================

class Window_MenuStatus < Window_Selectable
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 480, 480)
    refresh
    self.active = false
    self.index = -1
  end
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  def refresh
    if self.contents != nil
      self.contents.dispose
      self.contents = nil
    end
    @item_max = $game_party.actors.size
    self.contents = Bitmap.new(width - 32, self.row_max * 116 - 16)
    for i in 0...$game_party.actors.size
      x = 64
      y = i * 116
      actor = $game_party.actors
      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
  #--------------------------------------------------------------------------
  # ● カーソル矩形更新
  #--------------------------------------------------------------------------
  def update_cursor_rect
    # カーソル位置が 0 未満の場合
    if @index < 0
      self.cursor_rect.empty
      return
    end
    # 現在の行を取得
    row = @index
    # 現在の行が、表示されている先頭の行より前の場合
    if row < self.top_row
      # 現在の行が先頭になるようにスクロール
      self.top_row = row
    end
    # 現在の行が、表示されている最後尾の行より後ろの場合
    if row > self.top_row + (self.page_row_max - 1)
      # 現在の行が最後尾になるようにスクロール
      self.top_row = row - (self.page_row_max - 1)
    end
    # カーソルの幅を計算
    cursor_width = self.width - 32
    # カーソルの座標を計算
    x = @index % @column_max * (cursor_width + 32)
    y = @index / @column_max * 116 - self.oy
    # カーソルの矩形を更新
    self.cursor_rect.set(x, y, self.width - 32, 100)
  end
  #--------------------------------------------------------------------------
  # ● 先頭の行の取得
  #--------------------------------------------------------------------------
  def top_row
    # ウィンドウ内容の転送元 Y 座標を、1 行の高さ 116 で割る
    return self.oy / 116
  end
  #--------------------------------------------------------------------------
  # ● 先頭の行の設定
  #     row : 先頭に表示する行
  #--------------------------------------------------------------------------
  def top_row=(row)
    # row が 0 未満の場合は 0 に修正
    if row < 0
      row = 0
    end
    # row が row_max - 1 超の場合は row_max - 1 に修正
    if row > row_max - 1
      row = row_max - 1
    end
    # row に 1 行の高さ 116 を掛け、ウィンドウ内容の転送元 Y 座標とする
    self.oy = row * 116
  end
  #--------------------------------------------------------------------------
  # ● 1 ページに表示できる行数の取得
  #--------------------------------------------------------------------------
  def page_row_max
    return 4
  end
end

# ●○●○●○●○●○●○●○●○●○●○●○●○●○●○●○●○●○●○●

#==============================================================================
# ■ Window_BattleStatus
#------------------------------------------------------------------------------
#  バトル画面でパーティメンバーのステータスを表示するウィンドウです。
#==============================================================================

class Window_BattleStatus < Window_Base
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  alias initialize_KGC_LargeParty initialize
  def initialize
    # 元の処理を実行
    initialize_KGC_LargeParty
    # レベルアップフラグを再作成
    @level_up_flags = []
    for i in 0...BATTLER_ACTORS
      @level_up_flags = false
    end
  end
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
#    self.contents.font.size = 18
#    self.contents.draw_text(0, 32, 24, 32, "HP")
#    self.contents.draw_text(0, 64, 24, 32, "MP")
    @item_max = $game_party.actors.size
#    self.contents.font.size = 20
    for i in 0...$game_party.actors.size
      actor = $game_party.actors
      actor_x = i * SPRITES_BATTLER + 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
        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

# ●○●○●○●○●○●○●○●○●○●○●○●○●○●○●○●○●○●○●

#==============================================================================
# ■ Scene_Menu
#------------------------------------------------------------------------------
#  メニュー画面の処理を行うクラスです。
#==============================================================================

class Scene_Menu
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #     menu_index : コマンドのカーソル初期位置
  #--------------------------------------------------------------------------
  def initialize(menu_index = 0)
    @menu_index = menu_index
    @actor_change = false
    @actor_index = nil
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新 (コマンドウィンドウがアクティブの場合)
  #--------------------------------------------------------------------------
  alias update_command_actor_change update_command
  def update_command
    # 元の処理を実行
    update_command_actor_change
    # 方向ボタンの左か右が押された場合
    if Input.trigger?(Input:EFT) || Input.trigger?(Input::RIGHT)
      # 決定 SE を演奏
      $game_system.se_play($data_system.decision_se)
      @command_window.active = false
      @status_window.active = true
      @status_window.index = 0
      @actor_change = true
      @actor_index = nil
      return
    end
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新 (ステータスウィンドウがアクティブの場合)
  #--------------------------------------------------------------------------
  def update_status
    # B ボタンが押された場合
    if Input.trigger?(Input::B)
      # キャンセル SE を演奏
      $game_system.se_play($data_system.cancel_se)
      # コマンドウィンドウをアクティブにする
      @command_window.active = true
      @status_window.active = false
      @status_window.index = -1
      @actor_change = false
      return
    end
    # C ボタンが押された場合
    if Input.trigger?(Input::C)
      if @actor_change
        # 決定 SE を演奏
        $game_system.se_play($data_system.decision_se)
        if @actor_index == nil
          @actor_index = @status_window.index
        else
          $game_party.change_actor(@actor_index, @status_window.index)
          @actor_index = nil
          @status_window.refresh
          if $game_party.actors.include?($game_actors[CHARACTER_GRAPHIC]) == false ||

CHARACTER_GRAPHIC == 0
            $game_player.refresh
          end
        end
        return
      else
        # コマンドウィンドウのカーソル位置で分岐
        case @command_window.index
        when 1  # スキル
          # このアクターの行動制限が 2 以上の場合
          if $game_party.actors[@status_window.index].restriction >= 2
            # ブザー SE を演奏
            $game_system.se_play($data_system.buzzer_se)
            return
          end
          # 決定 SE を演奏
          $game_system.se_play($data_system.decision_se)
          # スキル画面に切り替え
          $scene = Scene_Skill.new(@status_window.index)
        when 2  # 装備
          # 決定 SE を演奏
          $game_system.se_play($data_system.decision_se)
          # 装備画面に切り替え
          $scene = Scene_Equip.new(@status_window.index)
        when 3  # ステータス
          # 決定 SE を演奏
          $game_system.se_play($data_system.decision_se)
          # ステータス画面に切り替え
          $scene = Scene_Status.new(@status_window.index)
        end
        return
      end
    end
  end
end

# ●○●○●○●○●○●○●○●○●○●○●○●○●○●○●○●○●○●○●

#==============================================================================
# ■ Scene_Battle (分割定義 2)
#------------------------------------------------------------------------------
#  バトル画面の処理を行うクラスです。
#==============================================================================

class Scene_Battle
  #--------------------------------------------------------------------------
  # ● アクターコマンドウィンドウのセットアップ
  #--------------------------------------------------------------------------
  alias phase3_setup_command_window_actor_change phase3_setup_command_window
  def phase3_setup_command_window
    # 元の処理を実行
    phase3_setup_command_window_actor_change
    # アクターコマンドウィンドウの位置を設定
    @actor_command_window.x = @actor_index * SPRITES_BATTLER
  end
end

这是设定队伍人数和参战人数的脚本!里面有很多地方需要修改和增加的样子!!
首先第一项是修改Game_Actor里的内容!

#==============================================================================
# ■ Game_Actor
#------------------------------------------------------------------------------
#  アクターを扱うクラスです。このクラスは Game_Actors クラス ($game_actors)
# の内部で使用され、Game_Party クラス ($game_party) からも参照されます。
#  处理角色的类。本类在 Game_Actors 类 ($game_actors)
# 的内部使用、Game_Party 类请参考 ($game_party) 。
#==============================================================================

class Game_Actor < Game_Battler
  #--------------------------------------------------------------------------
  # ● バトル画面 X 座標の取得
  # ● 取得战斗画面的 X 坐标
  #--------------------------------------------------------------------------
  def screen_x
    # パーティ内の並び順から X 座標を計算して返す
    # 返回计算后的队伍 X 坐标的排列顺序
    if self.index != nil
      return self.index * SPRITES_BATTLER + 80
    else
      return 0
    end
  end
end

我不明白的地方是,按照上面单独修改相同部分其他不动,还是替换掉项目内全部内容?
回复 支持 反对

使用道具 举报

218

主题

1万

帖子

10万

积分

⑧专业

赋予你第五自由

积分
108021
发表于 2006-7-13 11:02:52 | 显示全部楼层
不是替换,而是插入一个新的.

第 五 自 由 -   5th  Freedom   -

回复 支持 反对

使用道具 举报

10

主题

69

帖子

1659

积分

⑥精研

论坛游人

积分
1659
发表于 2006-7-13 12:01:56 | 显示全部楼层
终于明白了!本来怎么看都不明白怎么改!!!干脆就下载范例来看一遍!才终于明白!!原来是在新建一个项目,把内容全部复制进去啊!!!本以为是修改RGSS里的项目造成各种效果的!!……………………好象直接修改RGSS里也可以的吧??看到一些背景颜色透明化。移动金钱菜单显示的位置,取消计步器,什么的好象都是直接修改的啊!!!

目前基本上没什么问题了!
回复 支持 反对

使用道具 举报

218

主题

1万

帖子

10万

积分

⑧专业

赋予你第五自由

积分
108021
发表于 2006-7-13 12:11:06 | 显示全部楼层
可以直接覆盖掉,但是比较麻烦

第 五 自 由 -   5th  Freedom   -

回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|幻想森林

GMT+8, 2025-6-28 18:20 , Processed in 0.012633 second(s), 21 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表