设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 179|回复: 5

[有事请教] 想请教关于Resolução 640x480 para RMVX与SBS 3.4d + ATB 1.2c两者的相容

[复制链接]

Lv1.梦旅人

梦石
0
星屑
152
在线时间
26 小时
注册时间
2018-7-26
帖子
11
发表于 2018-7-27 22:39:24 | 显示全部楼层 |阅读模式
1星屑
本帖最后由 show9999 于 2018-7-28 01:45 编辑

使用了版上先辈分享的 SBS 3.4d + ATB 1.2c95%汉化版
然后再加上国外网站分享的 Resolução 640x480 para for RMVX

进入战斗画面后出现 未命名1.jpg

然后到脚本看内容是
     # ATBアクター更新
     if member.actor? && member.at_active && !@command_members.include?(member) && member.movable? && !member.action.forcing <-这行出问题
        # Mithran 1.1h added && !member.action.forcing
        # this flag prevents the command window from being reopened to this character
        return start_auto_action(member) if member.auto_action?
        return @command_members.push(member)
      # ATBエネミー更新
      elsif !member.actor? && member.at_active && !@command_members.include?(member) && member.movable?
        return start_auto_action(member) unless member.action.forcing
      end
    end
  end

请问怪物位置错误还是分辨率错误呢 ? 搞半天还是没看懂 ..

请版上各位前辈帮忙指教一下 感谢 (m.o.m)


  1. #==============================================================================
  2. # ■ Scene_Battle for ATB Ver1.2c
  3. #------------------------------------------------------------------------------
  4. #  バトル画面の処理を行うクラスです。
  5. #==============================================================================
  6. class Scene_Battle < Scene_Base
  7. #--------------------------------------------------------------------------
  8. # ● 开始処理
  9. #--------------------------------------------------------------------------
  10. alias start_n02 start
  11. def start
  12. $gauge_stop = true
  13. $game_party.atb_customize
  14. start_n02
  15. end
  16. #--------------------------------------------------------------------------
  17. # ● 终了処理
  18. #--------------------------------------------------------------------------
  19. alias terminate_n02 terminate # Enu code; 1.1e
  20. def terminate
  21. terminate_n02
  22. # 二刀流の持ち替え処理を戻す
  23. for member in $game_party.members
  24. if member.two_swords_change
  25. member.change_equip_by_id(1, member.weapon_id)
  26. member.change_equip_by_id(0, 0)
  27. member.two_swords_change = false
  28. end
  29. member.clear_sprite_effects
  30. end
  31. end
  32. #--------------------------------------------------------------------------
  33. # ● 戦闘开始の処理
  34. #--------------------------------------------------------------------------
  35. alias process_battle_start_n02 process_battle_start
  36. def process_battle_start
  37. @end_member = 0
  38. preemptive if $game_troop.preemptive
  39. surprise if $game_troop.surprise
  40. @status_window.visible = true
  41. process_battle_start_n02
  42. @status_window.refresh
  43. $gauge_stop = false
  44. end
  45. #--------------------------------------------------------------------------
  46. # ● 先制処理
  47. #--------------------------------------------------------------------------
  48. def preemptive
  49. $game_troop.preemptive = false
  50. for member in $game_party.members + $game_troop.members
  51. member.at_count = 1000 if member.actor?
  52. member.at_count = N02::ATB_BACKATTACK * -10 if !member.actor?
  53. end
  54. end
  55. #--------------------------------------------------------------------------
  56. # ● 不意打ち処理
  57. #--------------------------------------------------------------------------
  58. def surprise
  59. $game_troop.surprise = false
  60. for member in $game_party.members + $game_troop.members
  61. member.at_count = N02::ATB_BACKATTACK * -10 if member.actor?
  62. member.at_count = 1000 if !member.actor?
  63. end
  64. end
  65. #--------------------------------------------------------------------------
  66. # ● 情报表示ビューポートの解放
  67. #--------------------------------------------------------------------------
  68. alias dispose_info_viewport_n02 dispose_info_viewport
  69. def dispose_info_viewport
  70. dispose_info_viewport_n02
  71. @cursor.dispose if @cursor != nil && !@cursor.disposed?
  72. @help_window.dispose if @help_window != nil && !@help_window.disposed?
  73. @help_window = nil
  74. @help_window2.dispose if @help_window2 != nil && !@help_window2.disposed?
  75. @help_window2 = nil
  76. @skill_window.dispose if @skill_window != nil && !@skill_window.disposed?
  77. @skill_window = nil
  78. @item_window.dispose if @item_window != nil && !@item_window.disposed?
  79. @item_window = nil # 1.1b
  80. end
  81. #--------------------------------------------------------------------------
  82. # ● フレーム更新 ※再定义
  83. #--------------------------------------------------------------------------
  84. def update
  85. super
  86. update_basic(true)
  87. # plays out party escape; 1.1e
  88. do_party_escape if @escape && $game_party.inputable? unless @judge
  89. unless $game_message.visible # メッセージ表示中以外
  90. return if judge_win_loss if @judge == nil # 胜败判定
  91. update_scene_change
  92. end
  93. end
  94. #--------------------------------------------------------------------------
  95. # ● Update Basic
  96. # frame update, runs the show
  97. # 1.1h - added a method to process the next common event, if necessary
  98. #--------------------------------------------------------------------------
  99. def update_basic(main = false)
  100. Graphics.update unless main # ゲーム画面を更新
  101. Input.update unless main # 入力情报を更新
  102. $game_system.update # タイマーを更新
  103. $game_troop.update # 敌グループを更新
  104. @spriteset.update # スプライトセットを更新
  105. @message_window.update # メッセージウィンドウを更新
  106. update_info_viewport if !$gauge_stop # 情报表示ビューポートを更新
  107. # カーソル更新
  108. @cursor.update if @cursor != nil && @cursor.visible
  109. # メッセージ表示中はこれ以降処理させない
  110. if $game_message.visible
  111. @spriteset.gauge_off
  112. @info_viewport.visible = false
  113. return @message_window.visible = true
  114. end
  115. return if $gauge_stop
  116. # 戦闘中断、シーン切り替えの际これ以降は処理させない
  117. return if @judge
  118. return if $game_temp.next_scene != nil
  119. # ATBを更新
  120. process_battle_event if $game_temp.common_event_id > 0 # run skill common event if necessary
  121. update_atb
  122. # ターゲット更新
  123. update_target if @target_members != nil
  124. # コマンド入力フェイズ
  125. start_actor_command_selection if @command_members.size != 0 && !@command_phase
  126. if @skill_window != nil
  127. update_skill_selection # スキル选択
  128. elsif @item_window != nil
  129. update_item_selection # アイテム选択
  130. elsif @party_command_window.visible && @party_command_window.active
  131. update_party_command_selection # パーティコマンド选択
  132. elsif @actor_command_window.active
  133. update_actor_command_selection # アクターコマンド选択
  134. end
  135. end
  136. #--------------------------------------------------------------------------
  137. # ● ATB Update
  138. # checks and see if any battler is ready to move into the command phase
  139. # if there is a forcing battler present, put them into action
  140. # if there is a battler ready to act, put them into action
  141. #--------------------------------------------------------------------------
  142. def update_atb
  143. prepare_forcing_atb # Mithran Force Action fix 1.1e
  144. if !@forcing_battlers.empty?
  145. if @active_battler == nil
  146. set_next_active_battler
  147. return
  148. end
  149. end # end Mithran Force Action fix 1.1e
  150. for member in $game_party.members + $game_troop.members
  151. # ACT更新
  152. # return start_main(member) if member.act_active && !@action_battlers.include?(member) && !member.union_battler && !member.action.forcing
  153. # 3.4a
  154. return set_next_action_battlers(member) if member.act_active && !@action_battlers.include?(member) && !member.union_battler && !member.action.forcing
  155. # ATBアクター更新
  156. if member.actor? && member.at_active && !@command_members.include?(member) && member.movable? && !member.action.forcing
  157. # Mithran 1.1h added && !member.action.forcing
  158. # this flag prevents the command window from being reopened to this character
  159. return start_auto_action(member) if member.auto_action?
  160. return @command_members.push(member)
  161. # ATBエネミー更新
  162. elsif !member.actor? && member.at_active && !@command_members.include?(member) && member.movable?
  163. return start_auto_action(member) unless member.action.forcing
  164. end
  165. end
  166. end
  167. #--------------------------------------------------------------------------
  168. # ● Set Next Action Battlers *New method 3.4a
  169. # Was start_main(member) but now has own method name rather than using
  170. # an existing one (it is only used in one other method)
  171. #--------------------------------------------------------------------------
  172. def set_next_action_battlers(member)
  173. return if @judge
  174. @message_window.clear
  175. @action_battlers.push(member) # edited
  176. @status_window.refresh
  177. member.charge_start = false
  178. # アクティブバトラーがいなければ次の行动者をセット
  179. set_next_active_battler if @active_battler == nil
  180. end
  181. #--------------------------------------------------------------------------
  182. # ● 自动行动开始
  183. #--------------------------------------------------------------------------
  184. def start_auto_action(member)
  185. return if @judge
  186. # 戦闘行动の作成
  187. member.make_action if member.union_skill_id == 0
  188. # チャージ设定
  189. act_type = charge_set(member)
  190. # 复数回行动の作成
  191. member.act_time = member.action_time[0] if !member.actor?
  192. # 行动ゲージに切り替え
  193. @spriteset.change_act(act_type, member.actor?, member.index)
  194. # チャージアクション
  195. make_charge_action(member)
  196. end
  197. #--------------------------------------------------------------------------
  198. # ++ Charge Set
  199. #--------------------------------------------------------------------------
  200. def charge_set(member)
  201. act_type = member.charge
  202. # 通常攻撃(二刀のチャージ时间は双方武器の平均)
  203. if member.actor? && member.action.attack? && member.weapon_id != 0
  204. act_type = member.weapons[0].charge if member.weapons[0] != nil
  205. act_type2 = member.weapons[1].charge if member.weapons[1] != nil
  206. act_type[1] = (act_type[1] + act_type2[1]) / 2 if act_type2 != nil
  207. elsif member.action.attack?
  208. act_type = $data_weapons[member.weapon_id].charge if member.actor? && member.weapon_id != 0
  209. act_type = $data_weapons[member.weapon].charge if !member.actor? && member.weapon != 0
  210. end
  211. act_type = $data_skills[member.action.skill_id].charge if member.action.skill?
  212. act_type = $data_items[member.action.item_id].charge if member.action.item?
  213. # チャージボーナス加算
  214. if member.actor?
  215. act_type[1] += $data_weapons[member.weapon_id].charge_bonus if member.weapon_id != 0
  216. for i in 0...member.armors.size
  217. act_type[1] += member.armors[i].charge_bonus if member.armors[i] != nil
  218. end
  219. end
  220. # 1.2c
  221. for i in 0...member.states.size
  222. act_type[1] += member.states[i].charge_bonus if member.states[i] != nil
  223. end
  224. return act_type
  225. end
  226. #--------------------------------------------------------------------------
  227. # ● 戦闘行动者の准备 ※再定义 Original
  228. #--------------------------------------------------------------------------
  229. # def start_main(member)
  230. # return if @judge
  231. # @message_window.clear
  232. # @action_battlers.push(member)
  233. # @status_window.refresh
  234. # member.charge_start = false
  235. # アクティブバトラーがいなければ次の行动者をセット
  236. # set_next_active_battler if @active_battler == nil
  237. # end
  238. #--------------------------------------------------------------------------
  239. # ● Start Main *Rewrite
  240. #--------------------------------------------------------------------------
  241. def start_main
  242. # 3.4a
  243. # Contents from the old start_main(members) has been moved to
  244. # set_next_action_battlers(member). This gets rid of the new argument
  245. # tacked on to start_main.
  246. # The original contents of start_main have moved to other methods.
  247. end
  248. #--------------------------------------------------------------------------
  249. # ● ヘルプウインドウの表示 ※再定义
  250. #--------------------------------------------------------------------------
  251. def pop_help(obj)
  252. return if @help_window == nil && obj.extension.include?("HELPHIDE")
  253. return @help_window.visible = false if obj.extension.include?("HELPHIDE")
  254. return if @skill_window != nil && @skill_window.visible
  255. return if @item_window != nil && @item_window.visible
  256. @help_window = Window_Help.new if @help_window == nil
  257. @help_window.set_text(obj.name, 1)
  258. @help_window.visible = true
  259. end
  260. #--------------------------------------------------------------------------
  261. # ● チャージアクション作成
  262. #--------------------------------------------------------------------------
  263. def make_charge_action(member)
  264. action = ""
  265. case member.action.kind
  266. when 0
  267. if member.actor?
  268. action = member.charge[3] if member.weapon_id == 0
  269. action = $data_weapons[member.weapon_id].charge[3] if member.weapon_id != 0
  270. else
  271. action = member.charge[3] if member.weapon == 0
  272. action = $data_weapons[member.weapon].charge[3] if member.weapon != 0
  273. end
  274. when 1;action = member.action.skill.charge[3]
  275. when 2;action = member.action.item.charge[3]
  276. end
  277. member.charge_action = action
  278. return if action == ""
  279. member.charge_start = true
  280. @spriteset.set_action(member.actor?, member.index, member.charge_action)
  281. end
  282. #--------------------------------------------------------------------------
  283. # ● アクション実行中 ※再定义
  284. #--------------------------------------------------------------------------
  285. def playing_action
  286. loop do
  287. break if @judge
  288. update_basic
  289. # アクティブバトラーに格纳されているアクション情报を见る
  290. action = @active_battler.play
  291. next if action == 0
  292. @active_battler.play = 0
  293. if action[0] == "Individual"
  294. individual
  295. elsif action == "Can Collapse"
  296. unimmortaling
  297. elsif action == "Cancel Action"
  298. break action_end
  299. elsif action == "End"
  300. break action_end
  301. elsif action[0] == "OBJ_ANIM"
  302. damage_action(action[1])
  303. end
  304. end
  305. end
  306. #--------------------------------------------------------------------------
  307. # ● 戦闘アクション実行
  308. #--------------------------------------------------------------------------
  309. def process_action
  310. # 合体攻撃処理
  311. union_possibility?
  312. process_union_skill if @active_battler.union_skill_id != 0
  313. return set_next_active_battler if @active_battler.union_battler
  314. # 暴走混乱処理
  315. @active_battler.action.prepare unless @active_battler.action.forcing
  316. # 戦闘行动开始
  317. $in_action = true
  318. @message_window.clear
  319. @active_battler.white_flash = true
  320. # ヘルプウインドウ表示
  321. help_on
  322. # 戦闘アクション実行
  323. execute_action if @active_battler.action.valid? && @active_battler.restriction < 4
  324. # ヘルプウインドウ隠蔽
  325. help_off
  326. # 强制行动などでバトラーが空になったら次の行动者へ
  327. return set_next_active_battler if @active_battler == nil
  328. # HP Slip Damage; 1.1i moved, CrimsonSeas fix
  329. hp_slip_damage(@active_battler) if N02::ATB_SLIP_DAMAGE == 0
  330. # MP Slip Damage
  331. mp_slip_damage(@active_battler) if N02::ATB_SLIP_DAMAGE == 0
  332. # 戦闘アクション终了
  333. @message_window.clear
  334. @active_battler.white_flash = false
  335. $in_action = false
  336. @spriteset.gauge_update
  337. # 合体攻撃终了処理
  338. end_union_skill if @active_battler.union_skill_id != 0
  339. # スキル派生がある场合、行动続行
  340. # return set_next_active_battler if @active_battler.derivation != 0 && !@forcing_battler # Derivation fix, 1.1e
  341. # エネミーの复数回行动
  342. return set_next_active_battler if enemy_order
  343. # 戦闘行动终了
  344. turn_end(@active_battler)
  345. # 次の行动者へ
  346. @action_battlers.delete(@active_battler)
  347. set_next_active_battler
  348. end
  349. #--------------------------------------------------------------------------
  350. # ● ヘルプウインドウ表示
  351. #--------------------------------------------------------------------------
  352. def help_on
  353. @help_window = Window_Help.new if @help_window == nil
  354. @help_window.visible = false
  355. return @help_window.visible = true if @skill_window != nil && @skill_window.visible
  356. return @help_window.visible = true if @item_window != nil && @item_window.visible
  357. return @help_window.visible = true if @active_battler.action.guard?
  358. return @help_window.visible = true if @active_battler.action.kind == 0 && @active_battler.action.basic == 2
  359. end
  360. #--------------------------------------------------------------------------
  361. # ● ヘルプウインドウ隠蔽
  362. #--------------------------------------------------------------------------
  363. def help_off
  364. return if @help_window == nil
  365. return @help_window.visible = true if @skill_window != nil && @skill_window.visible
  366. return @help_window.visible = true if @item_window != nil && @item_window.visible
  367. @help_window.visible = false
  368. end
  369. #--------------------------------------------------------------------------
  370. # ● アクション终了 ※再定义
  371. #--------------------------------------------------------------------------
  372. def action_end
  373. # 初期化
  374. @individual_target = nil
  375. @active_battler.active = false
  376. @active_battler.clear_action_results
  377. # 念のため不死身化解除
  378. unimmortaling
  379. # 反射されていた场合
  380. if @active_battler.reflex != nil
  381. if @active_battler.action.skill?
  382. obj = @active_battler.action.skill
  383. @active_battler.perfect_skill_effect(@active_battler, obj)
  384. elsif @active_battler.action.item?
  385. obj = @active_battler.action.item
  386. @active_battler.item_effect(@active_battler, obj)
  387. else
  388. @active_battler.perfect_attack_effect(@active_battler)
  389. end
  390. pop_damage(@active_battler, obj, @active_battler.reflex)
  391. @active_battler.perform_collapse
  392. @active_battler.reflex = nil
  393. wait(N01::COLLAPSE_WAIT)
  394. end
  395. # 逆吸収で戦闘不能になった场合
  396. if @absorb_dead
  397. @active_battler.perform_collapse
  398. @absorb_dead = false
  399. wait(N01::COLLAPSE_WAIT)
  400. end
  401. # 次の行动までウエイトを挟む
  402. wait(N01::ACTION_WAIT)
  403. end
  404. #--------------------------------------------------------------------------
  405. # ● 合体攻撃判定
  406. #--------------------------------------------------------------------------
  407. def union_skill?(member)
  408. # スキルに合体攻撃设定があるかチェック
  409. for union_action in member.action.skill.union_action
  410. union_skills = union_action if union_action.size != 0 && union_action.include?(member.action.skill_id)
  411. end
  412. return if union_skills == nil
  413. @partners = []
  414. @union_targets = union_target_decision(member, member.action.skill)
  415. @union_target_index = member.action.target_index
  416. # 合体攻撃メンバーが使用可能かチェック
  417. for skill_id in union_skills
  418. for actor in $game_party.members
  419. if actor.skill_can_use?($data_skills[skill_id]) && actor.skill_id_learn?(skill_id)
  420. @partners.push(actor)
  421. actor.union_skill_id = skill_id
  422. end
  423. end
  424. end
  425. # 合体攻撃使用不可
  426. if @partners.size != union_skills.size
  427. for actor in @partners do actor.union_skill_id = 0 end
  428. @partners = nil
  429. member.action.clear if !member.action.guard?
  430. return
  431. end
  432. # 合体攻撃使用可
  433. for actor in @partners
  434. # パートナーアクション决定
  435. actor.action.kind = 1
  436. actor.action.skill_id = actor.union_skill_id
  437. actor.action.target_index = member.action.target_index
  438. # コマンド强制キャンセル
  439. if @command_members.include?(actor)
  440. force_action_command_cansel(actor)
  441. start_auto_action(member)
  442. end
  443. end
  444. $in_union_action = true
  445. @union_size = 0
  446. end
  447. #--------------------------------------------------------------------------
  448. # ● 合体攻撃可能か
  449. #--------------------------------------------------------------------------
  450. def union_possibility?
  451. return if @partners == nil
  452. for member in @partners
  453. union_cansel = true unless member.inputable?
  454. end
  455. return if !union_cansel
  456. end_union_skill
  457. @active_battler.action.clear if !@active_battler.action.guard?
  458. end
  459. #--------------------------------------------------------------------------
  460. # ● 合体攻撃ターゲット决定
  461. #--------------------------------------------------------------------------
  462. def union_target_decision(member, obj)
  463. targets = member.action.make_targets
  464. # デフォルトの复数回攻撃が设定されていれば単体ターゲットに変换
  465. targets = [targets[0]] if obj.for_two? or obj.for_three? or obj.dual?
  466. # ランダムターゲットの场合、一体を选択しランダム范囲を保持
  467. if obj.extension.include?("RANDOMTARGET")
  468. randum_targets = targets.dup
  469. targets = [randum_targets[rand(randum_targets.size)]]
  470. end
  471. # ターゲット情报をバトラースプライトに送る
  472. @spriteset.set_target(member.actor?, member.index, targets)
  473. return targets
  474. end
  475. #--------------------------------------------------------------------------
  476. # ● 合体攻撃処理
  477. #--------------------------------------------------------------------------
  478. def process_union_skill
  479. @union_size += 1
  480. if @union_size != @partners.size
  481. return @active_battler.union_battler = true
  482. end
  483. # 合体攻撃スタート
  484. @action_battlers.delete(@active_battler)
  485. @active_battler.active = false
  486. @active_battler = @partners.shift
  487. @active_battler.act_active = true
  488. @active_battler.active = true
  489. @active_battler.union_battler = false
  490. @active_battler.action.kind = 1
  491. @active_battler.action.skill_id = @active_battler.union_skill_id
  492. @active_battler.action.target_index = @union_target_index
  493. for member in @partners
  494. member.action.kind = 1
  495. member.action.skill_id = member.union_skill_id
  496. member.action.target_index = @union_target_index
  497. member.mp -= member.calc_mp_cost($data_skills[member.action.skill_id]) if member != @active_battler # 3.4a
  498. member.force_target = ["N01target_change", @union_targets]
  499. @spriteset.update_target(true, member.index)
  500. # アクション実行
  501. @spriteset.set_action(true, member.index, member.action.skill.base_action)
  502. end
  503. @status_window.refresh # 3.4a
  504. end
  505. #--------------------------------------------------------------------------
  506. # ● 合体攻撃终了処理
  507. #--------------------------------------------------------------------------
  508. def end_union_skill
  509. @active_battler.union_skill_id = 0
  510. @active_battler.union_battler = false
  511. for member in @partners
  512. member.union_skill_id = 0
  513. member.union_battler = false
  514. member.action.clear
  515. @action_battlers.delete(member)
  516. turn_end(member)
  517. end
  518. @union_size = 0
  519. @partners = nil
  520. $in_union_action = false
  521. end
  522. #--------------------------------------------------------------------------
  523. # ● エネミーの行动回数作成
  524. #--------------------------------------------------------------------------
  525. def enemy_order
  526. return false if @active_battler.actor?
  527. return false if @active_battler.act_time == 0 or !@active_battler.action.valid?
  528. return true if rand(100) < @active_battler.action_time[1]
  529. end
  530. #--------------------------------------------------------------------------
  531. # ● Batter Turn End
  532. # clears action and resets the ATB gauge
  533. # runs 'end of turn' events as in the setup section
  534. #--------------------------------------------------------------------------
  535. def turn_end(member) # rewrite, ATB 1.1h
  536. member = @active_battler
  537. forced = member.action.forcing
  538. member.action.forcing = false # remove forcing flag no matter what
  539. t_index = member.action.target_index
  540. $in_action = false
  541. # アクション终了时のATBゲージ设定
  542. # If you get an error on this line, it means you need to update your
  543. # ATB Configurations script to the latest version.
  544. if !forced || (N02::FORCE_ACTION_CONSUME_GAUGE && forced)
  545. recharge_action(member)
  546. elsif member.act_active && !N02::FORCE_ACTION_CONSUME_GAUGE
  547. @spriteset.gauge_refill(member.actor?, member.index)
  548. end
  549. member.action.clear if !member.action.guard?
  550. member.action.target_index = t_index # perserves target index through action clear
  551. # needed for 'last target' to work in force action
  552. process_battle_event
  553. # ターン経过カウント
  554. @end_member += 1 if !forced || (N02::FORCE_ACTION_INCREASE_TURN && forced)
  555. passage = true if N02::ATB_TURN_COUNT == 2
  556. if @end_member >= $game_party.members.size + $game_troop.members.size
  557. passage = true if N02::ATB_TURN_COUNT == 0
  558. passage = true if N02::ATB_TURN_COUNT == 1 && @end_member == 2
  559. elsif @end_member == ($game_party.members.size + $game_troop.members.size) / 2
  560. passage = true if N02::ATB_TURN_COUNT == 1
  561. end
  562. # スリップダメージ
  563. if @slip_all_damage
  564. for battlers in $game_party.members + $game_troop.members do mp_slip_damage(battlers) end
  565. @slip_all_damage = false
  566. @slip_all_damaged = true
  567. end
  568. return if !passage
  569. # スリップダメージ
  570. if N02::ATB_SLIP_DAMAGE == 1 && !@slip_all_damaged
  571. for battlers in $game_party.members + $game_troop.members do hp_slip_damage(battlers) end
  572. @slip_all_damage = true
  573. end
  574. @slip_all_damaged = false
  575. @end_member = 0
  576. $game_troop.increase_turn
  577. $game_troop.turn_ending = true
  578. process_battle_event # Mithran 1.1h - correct place for processing battle event
  579. # otherwise, 'turn ending' events will not work
  580. $game_troop.turn_ending = false
  581. @status_window.refresh
  582. end
  583. #--------------------------------------------------------------------------
  584. # ● アクション终了时のATBゲージ设定
  585. #--------------------------------------------------------------------------
  586. def recharge_action(member)
  587. member.act_count = 0
  588. recharge = member.recharge
  589. # 通常攻撃(二刀のチャージ时间は双方武器の平均)
  590. if member.actor? && member.action.attack?
  591. recharge = member.weapons[0].recharge if member.weapons[0] != nil
  592. recharge2 = member.weapons[1].recharge if member.weapons[1] != nil
  593. recharge = (recharge + recharge2) / 2 if recharge2 != nil
  594. elsif member.action.attack?
  595. act_type = $data_weapons[member.weapon].charge if member.weapon != 0
  596. end
  597. recharge = $data_skills[member.action.skill_id].recharge if member.action.skill?
  598. recharge = $data_items[member.action.item_id].recharge if member.action.item?
  599. recharge = N02::ATB_GUARD_RESET if member.action.guard?
  600. # ATBゲージに切り替え
  601. @spriteset.change_atb(10 * recharge, member.actor?, member.index)
  602. @spriteset.gauge_refresh(member.actor?, member.index)
  603. end
  604. #--------------------------------------------------------------------------
  605. # ● Set Next Active Battler
  606. # sets the next battler to perform an action
  607. # those that are 'forcing' an action will 'cut in line'
  608. #--------------------------------------------------------------------------
  609. def set_next_active_battler # Redefined 1.1e; Mithran's Force Action/escape fix
  610. @forcing_battlers ||= []
  611. return if $game_party.all_dead? or $game_troop.all_dead?
  612. do_party_escape if @escape && $game_party.inputable? unless @judge # plays out party escape; 1.1e
  613. # 全员の不死身化解除(イベント等で不死身设定がされていれば除く)
  614. prepare_forcing_atb
  615. # エネミー复数回行动时
  616. @action_battlers.shift if @active_battler != nil && !@active_battler.actor? && @active_battler.act_time != 0
  617. loop do
  618. if !@forcing_battlers.empty? # Force Action fix 1.1f
  619. potential = @forcing_battlers.shift
  620. if potential.action.valid?
  621. @action_battlers.delete(potential)
  622. force_action_cleanup(potential)
  623. @active_battler = potential
  624. else
  625. potential.action.clear
  626. end # Force Action fix 1.1f end
  627. else
  628. @active_battler = @action_battlers.shift
  629. end
  630. @active_battler.action.clear if @active_battler != nil && @active_battler.dead?
  631. return if @active_battler == nil
  632. # 戦闘行动开始
  633. return process_action if @active_battler.index != nil
  634. end
  635. end
  636. #--------------------------------------------------------------------------
  637. # ● Process Battle Event
  638. #--------------------------------------------------------------------------
  639. def process_battle_event # Redefined 1.1e
  640. @forcing_battlers ||= []
  641. members_size = $game_party.members.size
  642. loop do
  643. return if judge_win_loss
  644. return if $game_temp.next_scene != nil
  645. $game_troop.interpreter.update
  646. $game_troop.setup_battle_event
  647. @message_window.update
  648. if $game_message.visible
  649. @message_window.visible = true
  650. @status_window.visible = false
  651. end
  652. wait_for_message
  653. @message_window.visible = false
  654. @status_window.visible = true
  655. reset_atb_actor if members_size != $game_party.members.size
  656. prepare_forcing_atb
  657. return unless $game_troop.interpreter.running?
  658. update_basic
  659. end
  660. end
  661. #--------------------------------------------------------------------------
  662. # ● Prepare Force Action for ATB
  663. #--------------------------------------------------------------------------
  664. def prepare_forcing_atb # New method 1.1e; Mithran's Force Action fix
  665. # changed in 1.1h
  666. @forcing_battlers ||= []
  667. if $game_troop.forcing_battler != nil
  668. member = $game_troop.forcing_battler
  669. $game_troop.forcing_battler = nil
  670. force_action_cleanup(member)
  671. @action_battlers.delete(member)
  672. @forcing_battlers.delete(member)
  673. # delete duplicates from the list
  674. @forcing_battlers.push(member)
  675. end
  676. end
  677. #--------------------------------------------------------------------------
  678. # ● Force Action Cleanup
  679. # cleans up all open targeting/selection window, if necessary, in preparation
  680. # for a force action
  681. #--------------------------------------------------------------------------
  682. def force_action_cleanup(member) # new method 1.1h
  683. return if member.nil?
  684. if @commander == member
  685. @message_window.visible = false
  686. @party_command_window.active = false
  687. @party_command_window.visible = false
  688. $in_command = $in_select = $in_target = $in_party_command = false
  689. @target_members = nil
  690. @actor_command_window.active = false
  691. @cursor.visible = false unless $game_party.all_dead? or $game_troop.all_dead?
  692. @command_phase = false
  693. target_select_cleanup # new method 1.1h
  694. end_skill_selection
  695. end_item_selection
  696. @party_command_window.active = @actor_command_window.active = false
  697. @actor_command_window_on = false
  698. @status_window.index = @actor_index = @actor_command_window.index = -1
  699. @command_members.delete(@commander)
  700. @commander = nil
  701. @actor_command_window.active = false
  702. @command_members.delete(member)
  703. @commander = nil
  704. end
  705. end
  706. #--------------------------------------------------------------------------
  707. # ● Target Select Cleanup
  708. # removes visible portion of target selection and unsets the global flag
  709. #--------------------------------------------------------------------------
  710. def target_select_cleanup # new method 1.1h
  711. $in_target = false
  712. @help_window2.dispose if @help_window2 != nil
  713. @help_window2 = nil
  714. @help_window.visible = false if @help_window != nil
  715. @target_members = nil
  716. end
  717. #--------------------------------------------------------------------------
  718. # ● battle_end(result) alias
  719. #--------------------------------------------------------------------------
  720. alias battle_end_forcefix battle_end # Force Action fix 1.1e
  721. def battle_end(result)
  722. @forcing_battlers = []
  723. battle_end_forcefix(result)
  724. end
  725. #--------------------------------------------------------------------------
  726. # ● 全员の不死身化解除
  727. #--------------------------------------------------------------------------
  728. def member_unimmortaling # Redefined, 1.1e
  729. for member in $game_party.members + $game_troop.members # all battlers
  730. next if member.non_dead # stop if they are truly immortal
  731. next if member.dead? # stop if they are already dead
  732. member.set_temp_immortal(false) # make them not immortal
  733. end
  734. end
  735. #--------------------------------------------------------------------------
  736. # ● HPスリップダメージ
  737. #--------------------------------------------------------------------------
  738. def hp_slip_damage(member)
  739. member.clear_action_results
  740. return if !member.exist?
  741. member.slip_damage = false
  742. damage = 0
  743. # 0ターン解除のステートがあるかチェック
  744. for state in member.states
  745. member.remove_state(state.id) if state.extension.include?("ZEROTURNLIFT")
  746. # スリップダメージ実行 state = [ 対象, 定数, 割合, POP, 戦闘不能许可]
  747. next unless state.slip_damage #state.extension.include?("SLIPDAMAGE")
  748. for ext in state.slip_extension
  749. if ext[0] == "hp"
  750. base_damage = ext[1] + member.maxhp * ext[2] / 100
  751. damage += base_damage + base_damage * (rand(5) - rand(5)) / 100
  752. slip_pop = ext[3] unless ext[3] == nil # 3.4a
  753. slip_dead = ext[4] unless ext[4] == nil # 3.4a
  754. slip_damage_flug = true
  755. member.slip_damage = true
  756. end
  757. end
  758. end
  759. # デフォルトのスリップダメージ
  760. # if member.slip_damage? && member.exist? && !slip_damage_flug
  761. # damage += member.apply_variance(member.maxhp / 10, 10)
  762. # slip_dead = false
  763. # slip_pop = true
  764. # slip_damage_flug = true
  765. # member.slip_damage = true
  766. # end
  767. # 防具の自动回复があるか
  768. if member.actor? && member.auto_hp_recover && member.exist?
  769. damage -= member.maxhp / 20
  770. slip_pop = true
  771. end
  772. # 戦闘不能不许可
  773. damage = member.hp - 1 if damage >= member.hp && slip_dead = false
  774. member.hp -= damage
  775. @spriteset.set_damage_pop(member.actor?, member.index, damage) if slip_pop
  776. member.perform_collapse if member.dead? && member.slip_damage
  777. member.clear_action_results
  778. @status_window.refresh
  779. end
  780. #--------------------------------------------------------------------------
  781. # ● MPスリップダメージ
  782. #--------------------------------------------------------------------------
  783. def mp_slip_damage(member)
  784. member.clear_action_results
  785. return if !member.exist? or member.states.size == 0
  786. member.slip_damage = false
  787. mp_damage = 0
  788. for state in member.states
  789. next unless state.slip_damage #state.extension.include?("SLIPDAMAGE")
  790. for ext in state.slip_extension
  791. if ext[0] == "mp"
  792. base_damage = ext[1] + member.maxmp * ext[2] / 100
  793. mp_damage += base_damage + base_damage * (rand(5) - rand(5)) / 100
  794. slip_pop = ext[2]
  795. slip_damage_flug = true
  796. end
  797. end
  798. end
  799. member.mp_damage = mp_damage
  800. member.mp -= mp_damage
  801. @spriteset.set_damage_pop(member.actor?, member.index, mp_damage) if slip_pop
  802. member.clear_action_results
  803. @status_window.refresh
  804. end
  805. #--------------------------------------------------------------------------
  806. # ● 戦闘行动の実行 : 防御 ※再定义
  807. #--------------------------------------------------------------------------
  808. def execute_action_guard
  809. @help_window.set_text(N01::GUARD_HELP_TEXT, 1)
  810. @help_window.visible = true
  811. # バトラーのアクティブ化を解除
  812. @active_battler.active = false
  813. wait(45)
  814. @help_window.visible = false if @help_window != nil
  815. end
  816. #--------------------------------------------------------------------------
  817. # ● 戦闘行动の実行 : 逃走 ※再定义
  818. #--------------------------------------------------------------------------
  819. def execute_action_escape
  820. @spriteset.set_action(false, @active_battler.index, @active_battler.run_success)
  821. @help_window.set_text(N01::ESCAPED_HELP_TEXT, 1)
  822. @help_window.visible = true
  823. # バトラーのアクティブ化を解除
  824. @active_battler.active = false
  825. @active_battler.escape
  826. Sound.play_escape
  827. wait(45)
  828. @help_window.visible = false if @help_window != nil
  829. end
  830. #--------------------------------------------------------------------------
  831. # ● パーティコマンド选択の开始 ※再定义
  832. #--------------------------------------------------------------------------
  833. def start_party_command_selection
  834. @info_viewport.visible = true
  835. @status_window.index = @actor_index = -1
  836. end
  837. #--------------------------------------------------------------------------
  838. # ● 次のアクターのコマンド入力へ ※再定义
  839. #--------------------------------------------------------------------------
  840. def next_actor
  841. end
  842. #--------------------------------------------------------------------------
  843. # ● 前のアクターのコマンド入力へ ※再定义
  844. #--------------------------------------------------------------------------
  845. def prior_actor
  846. end
  847. #--------------------------------------------------------------------------
  848. # ● アクターコマンド选択の开始 ※再定义
  849. #--------------------------------------------------------------------------
  850. def start_actor_command_selection
  851. $in_command = true
  852. @command_phase = true
  853. @command_member_index = 0
  854. @commander = @command_members[@command_member_index]
  855. @status_window.active = true
  856. @status_window.index = @commander.index
  857. # カーソルセット
  858. @cursor = Sprite_Cursor.new if @cursor == nil
  859. @cursor.set(@commander)
  860. # 动けるキャラのみコマンドアクションを
  861. @spriteset.set_action(true, @commander.index,@commander.command_b) if @commander.inputable?
  862. @party_command_window.active = false
  863. @actor_command_window.setup(@commander)
  864. @actor_command_window.active = true
  865. @actor_command_window.index = 0
  866. @actor_command_window_on = true
  867. @status_window.refresh
  868. end
  869. #--------------------------------------------------------------------------
  870. # ● コマンド更新 ※再定义
  871. #--------------------------------------------------------------------------
  872. def update_actor_command_selection
  873. # コマンド入力できる状态でなくなればキャンセル
  874. return reset_command unless commanding?
  875. if Input.trigger?(Input::B)
  876. Input.update
  877. Sound.play_decision
  878. start_party_command
  879. elsif Input.trigger?(Input::C)
  880. Input.update
  881. case @actor_command_window.index
  882. when 0 # 攻撃
  883. Sound.play_decision
  884. @commander.action.set_attack
  885. start_target_enemy_selection
  886. when 1 # スキル
  887. Sound.play_decision
  888. $in_select = true
  889. start_skill_selection
  890. when 2 # 防御
  891. Sound.play_decision
  892. @commander.action.set_guard
  893. end_command
  894. when 3 # アイテム
  895. Sound.play_decision
  896. $in_select = true
  897. start_item_selection
  898. end
  899. # →キーでコマンドキャラ送り
  900. elsif Input.trigger?(Input::RIGHT)
  901. next_commander
  902. # ←キーでコマンドキャラ戻し
  903. elsif Input.trigger?(Input::LEFT)
  904. back_commander
  905. end
  906. end
  907. #--------------------------------------------------------------------------
  908. # ● コマンド入力できる状态か
  909. #--------------------------------------------------------------------------
  910. def commanding?
  911. return false if @judge or $gauge_stop
  912. return false if @commander != nil && !@commander.inputable?
  913. return false if @commander != nil && @commander.union_skill_id != 0
  914. return false if @commander != nil && @commander.at_count < 1000
  915. return true
  916. end
  917. #--------------------------------------------------------------------------
  918. # ● コマンドキャラ送り
  919. #--------------------------------------------------------------------------
  920. def next_commander
  921. return if @command_members.size == 1 or @commander == nil
  922. Audio.se_play("Audio/SE/" + N02::NEXT_SOUND01[2], N02::NEXT_SOUND01[1], N02::NEXT_SOUND01[0])
  923. # 动けるキャラのみコマンド戻りアクションを
  924. @spriteset.set_action(true, @commander.index,@commander.command_a) if @commander.inputable?
  925. # コマンド待ちメンバーのインデックスが最后なら
  926. if @command_member_index == @command_members.size - 1
  927. @command_member_index = 0
  928. # 次のキャラにコマンドを送る
  929. else
  930. @command_member_index += 1
  931. end
  932. @commander = @command_members[@command_member_index]
  933. @status_window.index = @commander.index
  934. @actor_command_window.setup(@commander) # 1.1c
  935. # カーソルセット
  936. @cursor.set(@commander)
  937. # 动けるキャラのみコマンドアクションを
  938. @spriteset.set_action(true, @commander.index,@commander.command_b) if @commander.inputable?
  939. end
  940. #--------------------------------------------------------------------------
  941. # ● コマンドキャラ戻し
  942. #--------------------------------------------------------------------------
  943. def back_commander
  944. return if @command_members.size == 1 or @commander == nil
  945. Audio.se_play("Audio/SE/" + N02::NEXT_SOUND01[2], N02::NEXT_SOUND01[1], N02::NEXT_SOUND01[0])
  946. # 动けるキャラのみコマンド戻りアクションを
  947. @spriteset.set_action(true, @commander.index,@commander.command_a) if @commander.inputable?
  948. # コマンド待ちメンバーのインデックスが最初なら
  949. if @command_member_index == 0
  950. @command_member_index = @command_members.size - 1
  951. # 前のキャラにコマンドを送る
  952. else
  953. @command_member_index -= 1
  954. end
  955. @commander = @command_members[@command_member_index]
  956. @status_window.index = @commander.index
  957. # カーソルセット
  958. @cursor.set(@commander)
  959. # 动けるキャラのみコマンドアクションを
  960. @spriteset.set_action(true, @commander.index,@commander.command_b) if @commander.inputable?
  961. end
  962. #--------------------------------------------------------------------------
  963. # ● パーティコマンド选択の开始
  964. #--------------------------------------------------------------------------
  965. def start_party_command
  966. $in_party_command = true
  967. $in_command = false
  968. @status_window.refresh
  969. @status_window.index = @actor_index = -1
  970. @info_viewport.visible = true
  971. @message_window.visible = false
  972. @pre_a_index = @actor_command_window.index
  973. @actor_command_window.active = false
  974. @actor_command_window.index = -1
  975. @party_command_window.active = true
  976. @party_command_window.index = 0
  977. @party_command_window.visible = true
  978. end
  979. #--------------------------------------------------------------------------
  980. # ● パーティコマンド选択の更新
  981. #--------------------------------------------------------------------------
  982. def update_party_command_selection
  983. # コマンド入力できる状态でなくなればキャンセル
  984. return reset_command unless commanding?
  985. if Input.trigger?(Input::C)
  986. case @party_command_window.index
  987. when 0 # 戦う
  988. Sound.play_decision
  989. @status_window.index = @actor_index = -1
  990. end_party_command
  991. when 1 # 逃げる
  992. return Sound.play_buzzer if $game_troop.can_escape == false
  993. Sound.play_decision
  994. end_party_command
  995. process_escape if !@escape
  996. end
  997. elsif Input.trigger?(Input::B)
  998. Sound.play_cancel
  999. end_party_command
  1000. end
  1001. end
  1002. #--------------------------------------------------------------------------
  1003. # ● パーティコマンド选択の终了
  1004. #--------------------------------------------------------------------------
  1005. def end_party_command
  1006. $in_party_command = false
  1007. $in_command = true
  1008. @status_window.refresh
  1009. @message_window.visible = false
  1010. @party_command_window.active = false
  1011. @actor_command_window.active = true
  1012. @party_command_window.visible = false
  1013. @actor_command_window.index = @pre_a_index
  1014. @status_window.index = @commander.index
  1015. @status_window.active = true
  1016. end
  1017. #--------------------------------------------------------------------------
  1018. # ● 逃走の処理 ※再定义
  1019. #--------------------------------------------------------------------------
  1020. def process_escape # redefined by Mithran
  1021. # escape processing method - trimmed to almost nothing
  1022. @escape = true # sets the escape flag for later use
  1023. closed_window # closes all windows
  1024. end
  1025. #--------------------------------------------------------------------------
  1026. # ● do_party_escape
  1027. #--------------------------------------------------------------------------
  1028. def do_party_escape # new method 1.1e, contains most of the old content
  1029. # of the prior escape method
  1030. # it has been largely reordered to play out more naturally given its current
  1031. # position in the code
  1032. reset_atb_actor # sets the atb of all actors to zero
  1033. if $game_troop.preemptive
  1034. success = true
  1035. else
  1036. success = (rand(100) < @escape_ratio)
  1037. end
  1038. for actor in $game_party.members
  1039. if !actor.non_dead
  1040. actor.set_temp_immortal(false) # technically, line is not reached while the non_dead flag is set
  1041. if actor.hp == 0 and not actor.state?(1)
  1042. actor.add_state(1)
  1043. actor.added_states.push(1)
  1044. end
  1045. end
  1046. # unimmortal all battlers, kill them if necessary
  1047. end
  1048. if $game_party.all_dead? # if everyone is dead, end the battle with defeat
  1049. @escape = false
  1050. @judge = true
  1051. process_defeat
  1052. battle_end(2)
  1053. return true
  1054. end
  1055. for actor in $game_party.members # perform run animation
  1056. unless actor.restriction >= 4
  1057. @spriteset.set_action(true, actor.index, success ? actor.run_success : actor.run_ng )
  1058. end
  1059. end
  1060. @info_viewport.visible = false # hide the info viewport
  1061. @message_window.visible = true # show the message window
  1062. text = sprintf(Vocab::EscapeStart, $game_party.name) # format the escape text
  1063. $game_message.texts.push(text) # add it to the $game_message, so the message window grabs it next update
  1064. Sound.play_escape #play escape sound
  1065. if !success
  1066. $game_message.texts.push('\.' + Vocab::EscapeFailure)
  1067. # add fail message if necessary
  1068. end
  1069. wait_for_message # wait for message
  1070. if success
  1071. @judge = true # cut battle short - it seems this flag is used to indicate that the battle is over
  1072. # and as such, no further actions will be performed
  1073. battle_end(1) # end battle with escape
  1074. return true # cut short the calling method
  1075. else
  1076. @escape_ratio += 10 # add 10 to the escape ratio
  1077. $game_party.clear_actions # clear all actions
  1078. @info_viewport.visible = true # make the party display viewport again visible
  1079. @escape = false # unset the escape flag
  1080. for member in $game_party.members
  1081. member.clear_sprite_effects # clear all sprite effects
  1082. end
  1083. return false # the calling method continues as normal
  1084. end
  1085. end
  1086. #--------------------------------------------------------------------------
  1087. # ● アクターのATBを初期化
  1088. #--------------------------------------------------------------------------
  1089. def reset_atb_actor
  1090. @command_members = []
  1091. @commander = nil
  1092. $in_action = @command_phase = false
  1093. $in_command = $in_target = $in_select = false
  1094. @message_window.clear
  1095. for member in $game_party.members
  1096. @action_battlers.delete(member)
  1097. member.white_flash = false
  1098. member.action.clear
  1099. # ATBゲージに切り替え
  1100. @spriteset.change_atb(N02::ATB_RUN_NG * -10, member.actor?, member.index)
  1101. end
  1102. end
  1103. #--------------------------------------------------------------------------
  1104. # ● 开いているウインドウを闭じる
  1105. #--------------------------------------------------------------------------
  1106. def closed_window
  1107. @cursor.dispose if @cursor != nil
  1108. @cursor = nil
  1109. @help_window.dispose if @help_window != nil
  1110. @help_window = nil
  1111. @help_window2.dispose if @help_window2 != nil
  1112. @help_window2 = nil
  1113. @skill_window.dispose if @skill_window != nil
  1114. @skill_window = nil
  1115. @item_window.dispose if @item_window != nil
  1116. @item_window = nil
  1117. @actor_command_window_on = false if @actor_command_window != nil
  1118. @actor_command_window.active = false if @actor_command_window != nil
  1119. @party_command_window.visible = false if @party_command_window != nil
  1120. @party_command_window.active = false if @party_command_window != nil
  1121. @status_window.index = @actor_index = @actor_command_window.index = -1
  1122. end
  1123. #--------------------------------------------------------------------------
  1124. # ● ターゲット选択の开始 ※再定义
  1125. #--------------------------------------------------------------------------
  1126. def start_target_selection(actor = false)
  1127. $in_target = true
  1128. $in_command = $in_select = false
  1129. @target_actors = actor
  1130. @target_members = $game_party.members if @target_actors
  1131. @target_members = $game_troop.members unless @target_actors
  1132. # 不要なウインドウを消す
  1133. @actor_command_window.active = false
  1134. @skill_window.visible = false if @skill_window != nil
  1135. @item_window.visible = false if @item_window != nil
  1136. # 存在しているターゲットで最も番号の低い対象を最初に指すように
  1137. @index = 0
  1138. @max_index = @target_members.size - 1
  1139. # アクターは戦闘不能者でもターゲットできるようにエネミーと区别
  1140. unless @target_actors
  1141. @target_members.size.times do
  1142. break if @target_members[@index].exist?
  1143. @index += 1
  1144. end
  1145. end
  1146. # カーソルセット
  1147. @cursor.set(@target_members[@index])
  1148. @help_window.visible = false if @help_window != nil
  1149. @help_window2 = Window_Help.new if @help_window2 == nil
  1150. @help_window2.set_text_n01add(@target_members[@index])
  1151. end
  1152. #--------------------------------------------------------------------------
  1153. # ● ターゲット选択更新 ※再定义
  1154. #--------------------------------------------------------------------------
  1155. def update_target
  1156. # コマンド入力できる状态でなくなればキャンセル
  1157. return reset_command unless commanding?
  1158. return end_target_selection(cansel = true) if $game_troop.all_dead?
  1159. cursor_down if !@target_members[@index].actor? && !@target_members[@index].exist?
  1160. if Input.trigger?(Input::B)
  1161. Input.update
  1162. Sound.play_cancel
  1163. end_target_selection(cansel = true)
  1164. elsif Input.trigger?(Input::C)
  1165. Input.update
  1166. Sound.play_decision
  1167. @commander.action.target_index = @index
  1168. end_target_selection
  1169. end_skill_selection
  1170. end_item_selection
  1171. @actor_command_window.active = false
  1172. next_actor
  1173. end
  1174. if Input.repeat?(Input::LEFT)
  1175. if @target_actors
  1176. cursor_down if $back_attack
  1177. cursor_up unless $back_attack
  1178. else
  1179. cursor_up if $back_attack
  1180. cursor_down unless $back_attack
  1181. end
  1182. end
  1183. if Input.repeat?(Input::RIGHT)
  1184. if @target_actors
  1185. cursor_up if $back_attack
  1186. cursor_down unless $back_attack
  1187. else
  1188. cursor_down if $back_attack
  1189. cursor_up unless $back_attack
  1190. end
  1191. end
  1192. cursor_up if Input.repeat?(Input::UP)
  1193. cursor_down if Input.repeat?(Input::DOWN)
  1194. end
  1195. #--------------------------------------------------------------------------
  1196. # ● カーソルを前に移动 ※再定义
  1197. #--------------------------------------------------------------------------
  1198. def cursor_up
  1199. Sound.play_cursor
  1200. @target_members.size.times do
  1201. @index += @target_members.size - 1
  1202. @index %= @target_members.size
  1203. break if @target_actors
  1204. break if @target_members[@index].exist?
  1205. end
  1206. # カーソルセット
  1207. @cursor.set(@target_members[@index])
  1208. @help_window2.set_text_n01add(@target_members[@index]) if @help_window2 != nil
  1209. end
  1210. #--------------------------------------------------------------------------
  1211. # ● カーソルを次に移动 ※再定义
  1212. #--------------------------------------------------------------------------
  1213. def cursor_down
  1214. Sound.play_cursor
  1215. @target_members.size.times do
  1216. @index += 1
  1217. @index %= @target_members.size
  1218. break if @target_actors
  1219. break if @target_members[@index].exist?
  1220. end
  1221. # カーソルセット
  1222. @cursor.set(@target_members[@index])
  1223. @help_window2.set_text_n01add(@target_members[@index]) if @help_window2 != nil
  1224. end
  1225. #--------------------------------------------------------------------------
  1226. # ● ターゲット选択の终了 再定义
  1227. #--------------------------------------------------------------------------
  1228. def end_target_selection(cansel = false)
  1229. $in_target = false
  1230. @help_window2.dispose if @help_window2 != nil
  1231. @help_window2 = nil
  1232. @help_window.visible = false if @help_window != nil
  1233. if @skill_window != nil
  1234. @skill_window.visible = @skill_window.active = true
  1235. @help_window.visible = true if @help_window != nil
  1236. @actor_command_window.active = false if cansel
  1237. $in_select = true if cansel
  1238. elsif @item_window != nil
  1239. @item_window.visible = @item_window.active = true
  1240. @help_window.visible = true if @help_window != nil
  1241. @actor_command_window.active = false if cansel
  1242. $in_select = true if cansel
  1243. end
  1244. @target_members = nil
  1245. end_command if !cansel
  1246. # カーソルセット
  1247. @cursor.set(@commander) if cansel
  1248. $in_command = true if cansel && @actor_command_window.index == 0
  1249. @actor_command_window.active = true if cansel && @actor_command_window.index == 0
  1250. end
  1251. #--------------------------------------------------------------------------
  1252. # ● コマンド初期化
  1253. #--------------------------------------------------------------------------
  1254. def reset_command
  1255. @message_window.visible = false
  1256. @party_command_window.active = false
  1257. @commander.action.clear
  1258. @party_command_window.visible = false
  1259. $in_command = $in_select = $in_target = false
  1260. @target_members = nil
  1261. @actor_command_window.active = false
  1262. @cursor.visible = false unless $game_party.all_dead? or $game_troop.all_dead? # bug fix 1.1b
  1263. @command_phase = false
  1264. end_skill_selection
  1265. end_item_selection
  1266. @party_command_window.active = @actor_command_window.active = false
  1267. @actor_command_window_on = false
  1268. @status_window.index = @actor_index = @actor_command_window.index = -1
  1269. @command_members.delete(@commander)
  1270. @commander = nil
  1271. end
  1272. #--------------------------------------------------------------------------
  1273. # ● 强制行动によるコマンドキャンセル
  1274. #--------------------------------------------------------------------------
  1275. def force_action_command_cansel(member)
  1276. return if !member.inputable?
  1277. # Force Action fix 1.1e
  1278. end_target_selection if @commander == member # 1.1f
  1279. return if member.nil?
  1280. @pre_a_index ||= 0
  1281. end_party_command if @commander == member
  1282. # end Force Action fix 1.1e
  1283. # チャージ设定
  1284. act_type = charge_set(member)
  1285. # 行动ゲージに切り替え
  1286. @spriteset.change_act(act_type, member.actor?, member.index)
  1287. # 动けるキャラのみコマンド戻りアクションを
  1288. @spriteset.set_action(true, member.index,member.command_a) if member.actor? && member.inputable?
  1289. # チャージアクション
  1290. make_charge_action(member)
  1291. # 以下の処理はコマンド入力中のアクター限定
  1292. return if !member.actor? or @commander != member
  1293. # カーソル消去
  1294. @cursor.visible = false
  1295. @command_phase = false
  1296. # ウインドウ初期化
  1297. end_skill_selection
  1298. end_item_selection
  1299. $in_target = false
  1300. @help_window2.dispose if @help_window2 != nil
  1301. @help_window2 = nil
  1302. @help_window.visible = false if @help_window != nil
  1303. @party_command_window.active = @actor_command_window.active = false
  1304. @actor_command_window_on = false
  1305. @status_window.index = @actor_index = @actor_command_window.index = -1
  1306. @command_members.delete(member)
  1307. @commander = nil
  1308. @message_window.visible = false
  1309. @party_command_window.active = false
  1310. @party_command_window.visible = false
  1311. $in_command = $in_select = $in_target = false
  1312. end
  1313. #--------------------------------------------------------------------------
  1314. # ● コマンド入力终了
  1315. #--------------------------------------------------------------------------
  1316. def end_command
  1317. return if !@commander.inputable?
  1318. $in_command = false
  1319. $in_select = false
  1320. # カーソル消去
  1321. @cursor.visible = false if @cursor.visible != nil # 1.2a
  1322. @command_phase = false
  1323. # アクション実行时间チェック
  1324. act_type = charge_set(@commander)
  1325. # 行动ゲージに切り替え
  1326. @spriteset.change_act(act_type, true, @commander.index)
  1327. # 动けるキャラのみコマンド戻りアクションを
  1328. @spriteset.set_action(true, @commander.index,@commander.command_a) if @commander.inputable?
  1329. # チャージアクション
  1330. make_charge_action(@commander)
  1331. # 合体攻撃チェック
  1332. union_skill?(@commander) if @commander.action.skill? && @partners == nil
  1333. # ウインドウ初期化
  1334. @party_command_window.active = @actor_command_window.active = false
  1335. @actor_command_window_on = false
  1336. @status_window.index = @actor_index = @actor_command_window.index = -1
  1337. @command_members.delete(@commander)
  1338. @commander = nil
  1339. end
  1340. #--------------------------------------------------------------------------
  1341. # ● 情报表示ビューポートの作成 ※再定义
  1342. #--------------------------------------------------------------------------
  1343. def create_info_viewport
  1344. @command_members = []
  1345. @action_battlers = []
  1346. @info_viewport = Viewport.new(0, 288, 544, 128)
  1347. @info_viewport.z = 100
  1348. @status_window = Window_BattleStatus.new
  1349. @party_command_window = Window_PartyCommand2.new
  1350. @actor_command_window = Window_ActorCommand.new
  1351. @status_window.viewport = @info_viewport
  1352. @actor_command_window.viewport = @info_viewport
  1353. @status_window.x = 128
  1354. @actor_command_window.x = 672
  1355. @info_viewport.visible = false
  1356. @party_command_window.visible = false
  1357. @info_viewport.ox = 128
  1358. end
  1359. #--------------------------------------------------------------------------
  1360. # ● 情报表示ビューポートの更新 ※再定义
  1361. #--------------------------------------------------------------------------
  1362. def update_info_viewport
  1363. @party_command_window.update if @party_command_window.active
  1364. @actor_command_window.update if @actor_command_window.active
  1365. @status_window.update if @status_window.active
  1366. @message_window.visible = false if !$game_message.visible
  1367. @info_viewport.visible = true if !@message_window.visible
  1368. @actor_command_window.x += 32 if @actor_command_window.x < 672 && !@actor_command_window_on
  1369. @actor_command_window.x -= 32 if @actor_command_window.x > 544 && @actor_command_window_on
  1370. end
  1371. #--------------------------------------------------------------------------
  1372. # ● スキル选択の开始 ※再定义
  1373. #--------------------------------------------------------------------------
  1374. def start_skill_selection
  1375. @help_window = Window_Help.new if @help_window == nil
  1376. @help_window.visible = true
  1377. @skill_window = Window_Skill.new(0, 56, 544, 232, @commander)
  1378. @skill_window.z = 1000
  1379. @skill_window.help_window = @help_window
  1380. @actor_command_window.active = false
  1381. end
  1382. #--------------------------------------------------------------------------
  1383. # ● スキル选択の更新 ※再定义
  1384. #--------------------------------------------------------------------------
  1385. def update_skill_selection
  1386. # コマンド入力できる状态でなくなればキャンセル
  1387. return reset_command unless commanding?
  1388. @skill_window.active = true
  1389. @skill_window.update
  1390. @help_window.update
  1391. if Input.trigger?(Input::B)
  1392. Sound.play_cancel
  1393. end_skill_selection
  1394. $in_command = true
  1395. elsif Input.trigger?(Input::C)
  1396. @skill = @skill_window.skill
  1397. if @skill != nil
  1398. @commander.last_skill_id = @skill.id
  1399. end
  1400. if @commander.skill_can_use?(@skill)
  1401. return Sound.play_buzzer if @commander.union_skill?(@skill.id) && !@commander.union_skill_can_use?(@skill.id)
  1402. Sound.play_decision
  1403. determine_skill
  1404. else
  1405. Sound.play_buzzer
  1406. end
  1407. end
  1408. end
  1409. #--------------------------------------------------------------------------
  1410. # ● スキルの决定 ※再定义
  1411. #--------------------------------------------------------------------------
  1412. def determine_skill
  1413. @commander.action.set_skill(@skill.id)
  1414. @skill_window.active = false
  1415. if @skill.need_selection?
  1416. if @skill.for_opponent?
  1417. start_target_enemy_selection
  1418. else
  1419. start_target_actor_selection
  1420. end
  1421. else
  1422. end_skill_selection
  1423. end_target_selection
  1424. end
  1425. end
  1426. #--------------------------------------------------------------------------
  1427. # ● スキル选択の终了
  1428. #--------------------------------------------------------------------------
  1429. alias end_skill_selection_n01 end_skill_selection
  1430. def end_skill_selection
  1431. end_skill_selection_n01
  1432. $in_select = false
  1433. end
  1434. #--------------------------------------------------------------------------
  1435. # ● アイテム选択の开始 ※再定义
  1436. #--------------------------------------------------------------------------
  1437. def start_item_selection
  1438. @help_window = Window_Help.new if @help_window == nil
  1439. @help_window.visible = true
  1440. @item_window = Window_Item.new(0, 56, 544, 232)
  1441. @item_window.z = 1000
  1442. @item_window.help_window = @help_window
  1443. @actor_command_window.active = false
  1444. end
  1445. #--------------------------------------------------------------------------
  1446. # ● アイテム选択の更新 ※再定义
  1447. #--------------------------------------------------------------------------
  1448. def update_item_selection
  1449. # コマンド入力できる状态でなくなればキャンセル
  1450. return reset_command unless commanding?
  1451. @item_window.active = true
  1452. @item_window.update
  1453. @help_window.update
  1454. if Input.trigger?(Input::B)
  1455. Sound.play_cancel
  1456. end_item_selection
  1457. $in_command = true # 1.1b
  1458. elsif Input.trigger?(Input::C)
  1459. @item = @item_window.item
  1460. if @item != nil
  1461. $game_party.last_item_id = @item.id
  1462. end
  1463. if $game_party.item_can_use?(@item)
  1464. Sound.play_decision
  1465. determine_item
  1466. else
  1467. Sound.play_buzzer
  1468. end
  1469. end
  1470. end
  1471. #--------------------------------------------------------------------------
  1472. # ● アイテムの决定 ※再定义
  1473. #--------------------------------------------------------------------------
  1474. def determine_item
  1475. @commander.action.set_item(@item.id)
  1476. @item_window.active = false
  1477. if @item.need_selection?
  1478. if @item.for_opponent?
  1479. start_target_enemy_selection
  1480. else
  1481. start_target_actor_selection
  1482. end
  1483. else
  1484. end_item_selection
  1485. end_target_selection
  1486. end
  1487. end
  1488. #--------------------------------------------------------------------------
  1489. # ● アイテム选択の终了
  1490. #--------------------------------------------------------------------------
  1491. alias end_item_selection_n01 end_item_selection
  1492. def end_item_selection
  1493. end_item_selection_n01
  1494. $in_select = false
  1495. end
  1496. #--------------------------------------------------------------------------
  1497. # ● 胜败判定 ※再定义
  1498. #--------------------------------------------------------------------------
  1499. def judge_win_loss
  1500. return true unless $game_temp.in_battle
  1501. if $game_party.all_dead?
  1502. @judge = true
  1503. $gauge_stop = true
  1504. closed_window
  1505. @spriteset.atb_dispose
  1506. $game_troop.clear_actions
  1507. $game_party.clear_actions
  1508. process_defeat
  1509. return true
  1510. elsif $game_troop.all_dead?
  1511. @judge = true
  1512. $gauge_stop = true
  1513. closed_window
  1514. @spriteset.atb_dispose
  1515. $game_troop.clear_actions
  1516. $game_party.clear_actions
  1517. process_victory
  1518. return true
  1519. else
  1520. return false
  1521. end
  1522. end
  1523. end
复制代码



这是版上前辈分享的SBS 3.4d + ATB 1.2c汉化版 156行的地方出现问题
  1. #==============================================================================
  2. # * Resolução 640X480 para VX[resolução XP]
  3. #------------------------------------------------------------------------------
  4. # Résolution 640x480 (pour RPG Maker VX) par Krazplay
  5. # Version 1.0 (23/01/2008)
  6. # Dernière version, commentaires : http://rpgmaker/forum/index.php?topic=12460
  7. #------------------------------------------------------------------------------
  8. # Ce script ne fait pas que changer la résolution, il modifie pas mal de choses
  9. # pour que le jeu soit adapté à sa nouvelle résolution.
  10. # Sachant que ce script redéfinit pas mal de méthodes, il est vivement conseillé
  11. # de le placer au-dessus de vos autres scripts ajoutés (mais en-dessous de ceux
  12. # de base, à part Main évidemment)
  13. #
  14. # Résolution de base : 544x416 (17x13 cases de 32 pixels)
  15. # Nouvelle résolution : 640x480 (20x15 cases de 32 pixels)
  16. # On gagne donc 96x64 pixels
  17. #------------------------------------------------------------------------------
  18. # Toutes les méthodes modifiées :
  19. #
  20. # ? Game_Map : calc_parallax_x, calc_parallax_y, setup_scroll,
  21. # scroll_down, scroll_right
  22. # ? Game_Player : center
  23. # ? Sprite_Base : start_animation
  24. # ? Sprite_Timer : initialize
  25. # ? Spriteset_Map : create_viewports
  26. # ? Spriteset_Battle : create_viewports, create_enemies, create_battleback,
  27. # create_battlefloor
  28. # ? Window_Help, Window_SkillStatus, Window_Equip : initialize
  29. # ? Window_Status, Window_SaveFile, Window_NumberInput : initialize
  30. # ? Window_ShopBuy, Window_ShopStatus : initialize
  31. # ? Window_MenuStatus : initialize, refresh, update_cursor
  32. # ? Window_Message : initialize, reset_window
  33. # ? Scene_Title : create_title_graphic, create_command_window
  34. # ? Scene_Menu : start
  35. # ? Scene_Item : start, show_target_window, hide_target_window
  36. # ? Scene_Skill : start, show_target_window, hide_target_window
  37. # ? Scene_Equip : create_item_windows
  38. # ? Scene_End : create_command_window
  39. # ? Scene_Shop : start
  40. # ? Scene_Battle : create_info_viewport, start_skill_selection,
  41. # start_item_selection
  42. #==============================================================================

  43. # Agrandir les images Title.png et BattleFloor.png si elles sont trop petites.
  44. AGRANDIR_IMAGES = true
  45. Graphics.resize_screen(640, 480)

  46. #==============================================================================
  47. # ¦ Game_Objects
  48. #==============================================================================

  49. # ? Game_Map #
  50. class Game_Map
  51. def calc_parallax_x(bitmap)
  52. if bitmap == nil
  53. return 0
  54. elsif @parallax_loop_x
  55. return @parallax_x / 16
  56. elsif loop_horizontal?
  57. return 0
  58. else
  59. w1 = bitmap.width - 640
  60. w2 = @map.width * 32 - 640
  61. if w1 <= 0 or w2 <= 0
  62. return 0
  63. else
  64. return @parallax_x * w1 / w2 / 8
  65. end
  66. end
  67. end

  68. def calc_parallax_y(bitmap)
  69. if bitmap == nil
  70. return 0
  71. elsif @parallax_loop_y
  72. return @parallax_y / 16
  73. elsif loop_vertical?
  74. return 0
  75. else
  76. h1 = bitmap.height - 480
  77. h2 = @map.height * 32 - 480
  78. if h1 <= 0 or h2 <= 0
  79. return 0
  80. else
  81. return @parallax_y * h1 / h2 / 8
  82. end
  83. end
  84. end

  85. def setup_scroll
  86. @scroll_direction = 2
  87. @scroll_rest = 0
  88. @scroll_speed = 4
  89. @margin_x = (width - 20) * 256 / 2 # ? / 2
  90. @margin_y = (height - 15) * 256 / 2 # ? / 2
  91. end

  92. def scroll_down(distance)
  93. if loop_vertical?
  94. @display_y += distance
  95. @display_y %= @map.height * 256
  96. @parallax_y += distance
  97. else
  98. last_y = @display_y
  99. @display_y = [@display_y + distance, (height - 15) * 256].min
  100. @parallax_y += @display_y - last_y
  101. end
  102. end

  103. def scroll_right(distance)
  104. if loop_horizontal?
  105. @display_x += distance
  106. @display_x %= @map.width * 256
  107. @parallax_x += distance
  108. else
  109. last_x = @display_x
  110. @display_x = [@display_x + distance, (width - 20) * 256].min
  111. @parallax_x += @display_x - last_x
  112. end
  113. end
  114. end

  115. # ? Game_Player #
  116. class Game_Player < Game_Character
  117. CENTER_X = (640 / 2 - 16) * 8 # ? X ? * 8
  118. CENTER_Y = (480 / 2 - 16) * 8 # ? Y ? * 8

  119. def center(x, y)
  120. display_x = x * 256 - CENTER_X # ?
  121. unless $game_map.loop_horizontal? # ?
  122. max_x = ($game_map.width - 20) * 256 # ?
  123. display_x = [0, [display_x, max_x].min].max # ?
  124. end
  125. display_y = y * 256 - CENTER_Y # ?
  126. unless $game_map.loop_vertical? # ?
  127. max_y = ($game_map.height - 15) * 256 # ?
  128. display_y = [0, [display_y, max_y].min].max # ?
  129. end
  130. $game_map.set_display_pos(display_x, display_y) # ?
  131. end
  132. end

  133. #==============================================================================
  134. # ¦ Sprites
  135. #==============================================================================

  136. # ? Sprite_Base #
  137. class Sprite_Base < Sprite
  138. def start_animation(animation, mirror = false)
  139. dispose_animation
  140. @animation = animation
  141. return if @animation == nil
  142. @animation_mirror = mirror
  143. @animation_duration = @animation.frame_max * 4 + 1
  144. load_animation_bitmap
  145. @animation_sprites = []
  146. if @animation.position != 3 or not @@animations.include?(animation)
  147. if @use_sprite
  148. for i in 0..15
  149. sprite = ::Sprite.new(viewport)
  150. sprite.visible = false
  151. @animation_sprites.push(sprite)
  152. end
  153. unless @@animations.include?(animation)
  154. @@animations.push(animation)
  155. end
  156. end
  157. end
  158. if @animation.position == 3
  159. if viewport == nil
  160. @animation_ox = 640 / 2
  161. @animation_oy = 480 / 2
  162. else
  163. @animation_ox = viewport.rect.width / 2
  164. @animation_oy = viewport.rect.height / 2
  165. end
  166. else
  167. @animation_ox = x - ox + width / 2
  168. @animation_oy = y - oy + height / 2
  169. if @animation.position == 0
  170. @animation_oy -= height / 2
  171. elsif @animation.position == 2
  172. @animation_oy += height / 2
  173. end
  174. end
  175. end
  176. end

  177. # ? Sprite_Timer #
  178. class Sprite_Timer < Sprite
  179. def initialize(viewport)
  180. super(viewport)
  181. self.bitmap = Bitmap.new(88, 48)
  182. self.bitmap.font.name = "Arial"
  183. self.bitmap.font.size = 32
  184. self.x = 640 - self.bitmap.width
  185. self.y = 0
  186. self.z = 200
  187. update
  188. end
  189. end

  190. # ? Spriteset_Map #
  191. class Spriteset_Map
  192. def create_viewports
  193. @viewport1 = Viewport.new(0, 0, 640, 480)
  194. @viewport2 = Viewport.new(0, 0, 640, 480)
  195. @viewport3 = Viewport.new(0, 0, 640, 480)
  196. @viewport2.z = 50
  197. @viewport3.z = 100
  198. end
  199. end

  200. # ? Spriteset_Battle #
  201. class Spriteset_Battle
  202. def create_viewports
  203. @viewport1 = Viewport.new(0, 0, 640, 480)
  204. @viewport2 = Viewport.new(0, 0, 640, 480)
  205. @viewport3 = Viewport.new(0, 0, 640, 480)
  206. @viewport2.z = 50
  207. @viewport3.z = 100
  208. end

  209. def create_enemies
  210. @enemy_sprites = []
  211. for enemy in $game_troop.members.reverse
  212. enemy.screen_x += 48 # Recentrage des ennemis
  213. @enemy_sprites.push(Sprite_Battler.new(@viewport1, enemy))
  214. end
  215. end

  216. def create_battleback
  217. source = $game_temp.background_bitmap
  218. bitmap = Bitmap.new(640+96, 480+64)
  219. bitmap.stretch_blt(bitmap.rect, source, source.rect)
  220. bitmap.radial_blur(90, 12)
  221. @battleback_sprite = Sprite.new(@viewport1)
  222. @battleback_sprite.bitmap = bitmap
  223. @battleback_sprite.ox = 320+48
  224. @battleback_sprite.oy = 240+32
  225. @battleback_sprite.x = 320 #272
  226. @battleback_sprite.y = 208 #176
  227. @battleback_sprite.wave_amp = 8
  228. @battleback_sprite.wave_length = 240
  229. @battleback_sprite.wave_speed = 120
  230. end

  231. def create_battlefloor
  232. @battlefloor_sprite = Sprite.new(@viewport1)
  233. battle_floor = Cache.system("BattleFloor")
  234. if AGRANDIR_IMAGES and battle_floor.width < 640
  235. rect_dest = Rect.new(0, 0, 640, battle_floor.height)
  236. new_bitmap = Bitmap.new(640, battle_floor.height)
  237. new_bitmap.stretch_blt(rect_dest, battle_floor, battle_floor.rect)
  238. @battlefloor_sprite.bitmap = new_bitmap
  239. else
  240. @battlefloor_sprite.bitmap = battle_floor
  241. end
  242. @battlefloor_sprite.x = 0
  243. @battlefloor_sprite.y = 192
  244. @battlefloor_sprite.z = 1
  245. @battlefloor_sprite.opacity = 128
  246. end
  247. end

  248. #==============================================================================
  249. # ¦ Windows
  250. #==============================================================================

  251. # ? Window_Help #
  252. class Window_Help < Window_Base
  253. def initialize
  254. super(0, 0, 640, WLH + 32)
  255. end
  256. end

  257. # ? Window_MenuStatus #
  258. class Window_MenuStatus < Window_Selectable
  259. def initialize(x, y)
  260. super(x, y, 480, 480)
  261. refresh
  262. self.active = false
  263. self.index = -1
  264. end

  265. def refresh
  266. self.contents.clear
  267. @item_max = $game_party.members.size
  268. for actor in $game_party.members
  269. draw_actor_face(actor, 2, actor.index * (96+21) + 2, 92)
  270. x = 104
  271. y = actor.index * (96+21) + WLH / 2
  272. draw_actor_name(actor, x, y)
  273. draw_actor_class(actor, x + 120, y)
  274. draw_actor_level(actor, x, y + WLH * 1)
  275. draw_actor_state(actor, x, y + WLH * 2)
  276. draw_actor_hp(actor, x + 120, y + WLH * 1, 216)
  277. draw_actor_mp(actor, x + 120, y + WLH * 2, 216)
  278. end
  279. end

  280. def update_cursor
  281. if @index < 0 # ?
  282. self.cursor_rect.empty
  283. elsif @index < @item_max # ?
  284. self.cursor_rect.set(0, @index * (96+21), contents.width, 96)
  285. elsif @index >= 100 # ?
  286. self.cursor_rect.set(0, (@index - 100) * 96, contents.width, 96)
  287. else # ?
  288. self.cursor_rect.set(0, 0, contents.width, @item_max * 96)
  289. end
  290. end
  291. end

  292. # ? Window_SkillStatus #
  293. class Window_SkillStatus < Window_Base
  294. def initialize(x, y, actor)
  295. super(x, y, 640, WLH + 32)
  296. @actor = actor
  297. refresh
  298. end
  299. end

  300. # ? Window_Equip #
  301. class Window_Equip < Window_Selectable
  302. def initialize(x, y, actor)
  303. super(x, y, 336+96, WLH * 5 + 32)
  304. @actor = actor
  305. refresh
  306. self.index = 0
  307. end
  308. end

  309. # ? Window_Status #
  310. class Window_Status < Window_Base
  311. def initialize(actor)
  312. super(0, 0, 640, 480)
  313. @actor = actor
  314. refresh
  315. end
  316. end

  317. # ? Window_SaveFile #
  318. class Window_SaveFile < Window_Base
  319. def initialize(file_index, filename)
  320. super(0, 56 + file_index % 4 * (90+21), 640, 90)
  321. @file_index = file_index
  322. @filename = filename
  323. load_gamedata
  324. refresh
  325. @selected = false
  326. end
  327. end

  328. # ? Window_NumberInput #
  329. class Window_NumberInput < Window_Base
  330. def initialize
  331. super(0, 0, 640, 64)
  332. @number = 0
  333. @digits_max = 6
  334. @index = 0
  335. self.opacity = 0
  336. self.active = false
  337. self.z += 9999
  338. refresh
  339. update_cursor
  340. end
  341. end

  342. # ? Window_ShopBuy #
  343. class Window_ShopBuy < Window_Selectable
  344. def initialize(x, y)
  345. super(x, y, 304+96, 304+64)
  346. @shop_goods = $game_temp.shop_goods
  347. refresh
  348. self.index = 0
  349. end
  350. end

  351. # ? Window_ShopStatus #
  352. class Window_ShopStatus < Window_Base
  353. def initialize(x, y)
  354. super(x, y, 240, 304+64)
  355. @item = nil
  356. refresh
  357. end
  358. end

  359. # ? Window_Message #
  360. class Window_Message < Window_Selectable
  361. def initialize
  362. super(0, 352, 640, 128)
  363. self.z = 200
  364. self.active = false
  365. self.index = -1
  366. self.openness = 0
  367. @opening = false # ?
  368. @closing = false # ?
  369. @text = nil # ?
  370. @contents_x = 0 # ? X ?
  371. @contents_y = 0 # ? Y ?
  372. @line_count = 0 # ?
  373. @wait_count = 0 # ?
  374. @background = 0 # ?
  375. @position = 2 # ?
  376. @show_fast = false # ?
  377. @line_show_fast = false # ?
  378. @pause_skip = false # ?
  379. create_gold_window
  380. create_number_input_window
  381. create_back_sprite
  382. end

  383. def reset_window
  384. @background = $game_message.background
  385. @position = $game_message.position
  386. if @background == 0 # ?
  387. self.opacity = 255
  388. else # ?
  389. self.opacity = 0
  390. end
  391. case @position
  392. when 0 # ?
  393. self.y = 0
  394. @gold_window.y = 360
  395. when 1 # ?
  396. self.y = 208
  397. @gold_window.y = 0
  398. when 2 # ?
  399. self.y = 352
  400. @gold_window.y = 0
  401. end
  402. end
  403. end

  404. #==============================================================================
  405. # ¦ Scenes
  406. #==============================================================================

  407. # ? Scene_Title #
  408. class Scene_Title
  409. def create_title_graphic
  410. @sprite = Sprite.new
  411. cache_bitmap = Cache.system("Title")
  412. if AGRANDIR_IMAGES
  413. dest_rect = Rect.new(0, 0, Graphics.width, Graphics.height)
  414. bitmap = Bitmap.new(Graphics.width, Graphics.height)
  415. bitmap.stretch_blt(dest_rect, cache_bitmap, cache_bitmap.rect)
  416. @sprite.bitmap = bitmap
  417. else
  418. @sprite.bitmap = cache_bitmap
  419. end
  420. end

  421. def create_command_window
  422. s1 = Vocab::new_game
  423. s2 = Vocab::continue
  424. s3 = Vocab::shutdown
  425. @command_window = Window_Command.new(172, [s1, s2, s3])
  426. @command_window.x = (640 - @command_window.width) / 2
  427. @command_window.y = 288
  428. if @continue_enabled # ?
  429. @command_window.index = 1 # ?
  430. else # ?
  431. @command_window.draw_item(1, false) # ?
  432. end
  433. @command_window.openness = 0
  434. @command_window.open
  435. end
  436. end

  437. # ? Scene_Menu #
  438. class Scene_Menu < Scene_Base
  439. def start
  440. super
  441. create_menu_background
  442. create_command_window
  443. @gold_window = Window_Gold.new(0, 424)
  444. @status_window = Window_MenuStatus.new(160, 0)
  445. end
  446. end

  447. # ? Scene_Item #
  448. class Scene_Item < Scene_Base
  449. def start
  450. super
  451. create_menu_background
  452. @viewport = Viewport.new(0, 0, 640, 480)
  453. @help_window = Window_Help.new
  454. @help_window.viewport = @viewport
  455. @item_window = Window_Item.new(0, 56, 640, 424)
  456. @item_window.viewport = @viewport
  457. @item_window.help_window = @help_window
  458. @item_window.active = false
  459. @target_window = Window_MenuStatus.new(0, 0)
  460. hide_target_window
  461. end

  462. def show_target_window(right)
  463. @item_window.active = false
  464. width_remain = 640 - @target_window.width
  465. @target_window.x = right ? width_remain : 0
  466. @target_window.visible = true
  467. @target_window.active = true
  468. if right
  469. @viewport.rect.set(0, 0, width_remain, 480)
  470. @viewport.ox = 0
  471. else
  472. @viewport.rect.set(@target_window.width, 0, width_remain, 480)
  473. @viewport.ox = @target_window.width
  474. end
  475. end

  476. def hide_target_window
  477. @item_window.active = true
  478. @target_window.visible = false
  479. @target_window.active = false
  480. @viewport.rect.set(0, 0, 640, 480)
  481. @viewport.ox = 0
  482. end
  483. end

  484. # ? Scene_Skill #
  485. class Scene_Skill < Scene_Base
  486. def start
  487. super
  488. create_menu_background
  489. @actor = $game_party.members[@actor_index]
  490. @viewport = Viewport.new(0, 0, 640, 480)
  491. @help_window = Window_Help.new
  492. @help_window.viewport = @viewport
  493. @status_window = Window_SkillStatus.new(0, 56, @actor)
  494. @status_window.viewport = @viewport
  495. @skill_window = Window_Skill.new(0, 112, 640, 368, @actor)
  496. @skill_window.viewport = @viewport
  497. @skill_window.help_window = @help_window
  498. @target_window = Window_MenuStatus.new(0, 0)
  499. hide_target_window
  500. end

  501. def show_target_window(right)
  502. @skill_window.active = false
  503. width_remain = 640 - @target_window.width
  504. @target_window.x = right ? width_remain : 0
  505. @target_window.visible = true
  506. @target_window.active = true
  507. if right
  508. @viewport.rect.set(0, 0, width_remain, 480)
  509. @viewport.ox = 0
  510. else
  511. @viewport.rect.set(@target_window.width, 0, width_remain, 480)
  512. @viewport.ox = @target_window.width
  513. end
  514. end

  515. def hide_target_window
  516. @skill_window.active = true
  517. @target_window.visible = false
  518. @target_window.active = false
  519. @viewport.rect.set(0, 0, 640, 480)
  520. @viewport.ox = 0
  521. end
  522. end

  523. # ? Scene_Equip #
  524. class Scene_Equip < Scene_Base
  525. def create_item_windows
  526. @item_windows = []
  527. for i in 0...EQUIP_TYPE_MAX
  528. @item_windows[i] = Window_EquipItem.new(0, 208, 640, 272, @actor, i)
  529. @item_windows[i].help_window = @help_window
  530. @item_windows[i].visible = (@equip_index == i)
  531. @item_windows[i].active = false
  532. @item_windows[i].index = -1
  533. end
  534. end
  535. end

  536. # ? Scene_End #
  537. class Scene_End < Scene_Base
  538. def create_command_window
  539. s1 = Vocab::to_title
  540. s2 = Vocab::shutdown
  541. s3 = Vocab::cancel
  542. @command_window = Window_Command.new(172, [s1, s2, s3])
  543. @command_window.x = (640 - @command_window.width) / 2
  544. @command_window.y = (480 - @command_window.height) / 2
  545. @command_window.openness = 0
  546. end
  547. end

  548. # ? Scene_Shop #
  549. class Scene_Shop < Scene_Base
  550. def start
  551. super
  552. create_menu_background
  553. create_command_window
  554. @help_window = Window_Help.new
  555. @gold_window = Window_Gold.new(384+96, 56)
  556. @dummy_window = Window_Base.new(0, 112, 640, 368)
  557. @buy_window = Window_ShopBuy.new(0, 112)
  558. @buy_window.active = false
  559. @buy_window.visible = false
  560. @buy_window.help_window = @help_window
  561. @sell_window = Window_ShopSell.new(0, 112, 640, 368)
  562. @sell_window.active = false
  563. @sell_window.visible = false
  564. @sell_window.help_window = @help_window
  565. @number_window = Window_ShopNumber.new(0, 112)
  566. @number_window.active = false
  567. @number_window.visible = false
  568. @status_window = Window_ShopStatus.new(400, 112)
  569. @status_window.visible = false
  570. end
  571. end

  572. # ? Scene_Battle #
  573. class Scene_Battle < Scene_Base
  574. def create_info_viewport
  575. @info_viewport = Viewport.new(0, 288+64, 640, 128)
  576. @info_viewport.z = 100
  577. @status_window = Window_BattleStatus.new
  578. @party_command_window = Window_PartyCommand.new
  579. @actor_command_window = Window_ActorCommand.new
  580. @status_window.viewport = @info_viewport
  581. @party_command_window.viewport = @info_viewport
  582. @actor_command_window.viewport = @info_viewport
  583. @status_window.x = 128
  584. @actor_command_window.x = 544
  585. @info_viewport.visible = false
  586. end

  587. def start_skill_selection
  588. @help_window = Window_Help.new
  589. @skill_window = Window_Skill.new(0, 56, 640, 296, @active_battler)
  590. @skill_window.help_window = @help_window
  591. @actor_command_window.active = false
  592. end

  593. def start_item_selection
  594. @help_window = Window_Help.new
  595. @item_window = Window_Item.new(0, 56, 640, 296)
  596. @item_window.help_window = @help_window
  597. @actor_command_window.active = false
  598. end
  599. end
复制代码



然后这是国外网站找到的544x416换640x480


里面内容都没动过 请大侠指点

最佳答案

查看完整内容

嗯,目测大概是因为分辨率扩展的脚本内的619行重新定义了 create_info_viewport 覆盖了ATB里的定义,导致@command_members 未定义。 把那一段的定义替换如下试试?或者把分辨率扩展脚本的位置扔到ATB的上面。

Lv4.逐梦者

送快递的水表员

梦石
10
星屑
1612
在线时间
3084 小时
注册时间
2012-6-27
帖子
7130

开拓者贵宾

发表于 2018-7-27 22:39:25 | 显示全部楼层
嗯,目测大概是因为分辨率扩展的脚本内的619行重新定义了 create_info_viewport 覆盖了ATB里的定义,导致@command_members 未定义。
把那一段的定义替换如下试试?或者把分辨率扩展脚本的位置扔到ATB的上面。
  1. def create_info_viewport
  2. @command_members = []
  3. @action_battlers = []
  4. @info_viewport = Viewport.new(0, 288+64, 640, 128)
  5. @info_viewport.z = 100
  6. @status_window = Window_BattleStatus.new
  7. @party_command_window = Window_PartyCommand2.new
  8. @actor_command_window = Window_ActorCommand.new
  9. @status_window.viewport = @info_viewport
  10. @party_command_window.viewport = @info_viewport
  11. @actor_command_window.viewport = @info_viewport
  12. @status_window.x = 128
  13. @actor_command_window.x = 544
  14. @info_viewport.visible = false
  15. @party_command_window.visible = false
  16. @info_viewport.ox = 128
  17. end
复制代码

评分

参与人数 1+1 收起 理由
show9999 + 1 认可答案

查看全部评分

回复

使用道具 举报

Lv4.逐梦者

送快递的水表员

梦石
10
星屑
1612
在线时间
3084 小时
注册时间
2012-6-27
帖子
7130

开拓者贵宾

发表于 2018-7-27 23:56:20 | 显示全部楼层
发生未定义错误,直觉上看是@command_members 未定义。感觉和分辨率扩展应该没关系
楼主自己改过ATB脚本吗?而且为啥把ATB改叫Scene_Battle了
方便把脚本贴出来吗?
回复

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
152
在线时间
26 小时
注册时间
2018-7-26
帖子
11
 楼主| 发表于 2018-7-28 01:43:56 | 显示全部楼层
Password 发表于 2018-7-27 23:56
发生未定义错误,直觉上看是@command_members 未定义。感觉和分辨率扩展应该没关系
楼主自己改过ATB脚本吗 ...

这样可以吗 ?
回复

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
152
在线时间
26 小时
注册时间
2018-7-26
帖子
11
 楼主| 发表于 2018-7-29 01:40:34 | 显示全部楼层
本帖最后由 show9999 于 2018-7-29 09:38 编辑
Password 发表于 2018-7-28 12:41
嗯,目测大概是因为分辨率扩展的脚本内的619行重新定义了 create_info_viewport 覆盖了ATB里的定义,导致@c ...


替换了没效果 不过把分辨率放到了ATB之上就可以开启了 多谢大神啊
回复

使用道具 举报

Lv2.观梦者

会吐槽的画师

梦石
0
星屑
487
在线时间
3424 小时
注册时间
2011-6-10
帖子
6535
发表于 2018-8-7 08:42:57 | 显示全部楼层
这个系统很多视窗是暂时移到窗口之外的范围,如果要扩展分辨率,每一个视窗都要补充写完透明和释放,非常麻烦
RPGmaker MV交流群: 377293241 提供RPGmakerMV资源共享下载
了解更多新RM游戏,游戏制作请加入RPGmaker支援群:113622890
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:fux2@moe9th.com|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2019-1-19 21:27

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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