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

Project1

 找回密码
 注册会员
搜索
查看: 3250|回复: 3

[已经解决] 扩大分辨率后敌群坐标问题

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
212 小时
注册时间
2012-3-5
帖子
228
发表于 2012-10-17 15:00:15 | 显示全部楼层 |阅读模式
在800*600的分辨率下敌群就算放到最下面最右边的位置战斗的时候也是在画面中间,1024分辨率的话更惨不忍睹了。
有使这个敌群设置画面跟分辨率同步的脚本么?
QQ截图20121017145517.jpg

QQ截图20121017145910.jpg

Lv1.梦旅人

哆啦菌

梦石
0
星屑
46
在线时间
795 小时
注册时间
2010-7-24
帖子
3800
发表于 2012-10-17 18:31:50 手机端发表。 | 显示全部楼层
1.到地球村用整合系统中的窗口变换脚本
2.设置坐标时设偏一点
3.自行搜索脚本,我见过,肯定是有的

点评

是你整合的那个么?  发表于 2012-10-17 19:37
随便看看
回复

使用道具 举报

Lv5.捕梦者

梦石
0
星屑
21776
在线时间
8547 小时
注册时间
2011-12-31
帖子
3360
发表于 2012-10-18 16:19:57 | 显示全部楼层
本帖最后由 tseyik 于 2012-10-18 16:44 编辑

由於修改瞭解象度
而出現了戦鬥畫面怪物座標不正常的問題
以下腳本可修正敌群坐标

  1. #==============================================================================
  2. # ■ Sprite_Battler
  3. #------------------------------------------------------------------------------
  4. #  BUG修復:調整分辨率後敵人相對位置錯誤。
  5. #==============================================================================

  6. class Sprite_Battler < Sprite_Base
  7.   #--------------------------------------------------------------------------
  8.   # ● 更新位置
  9.   #--------------------------------------------------------------------------
  10.   def update_position
  11.     self.x = @battler.screen_x + (Graphics.width - 544)/2[code
  12.     self.z = @battler.screen_z
  13.   end
  14. end
复制代码
這個則連標題画面/戦闘背景和其他……一併也修正和放大了

  1. #--------------------------------------------------------------------------
  2. # ■ WindMesser 解像度640x480対応プロジェクト(VX Ace版) ver1.00
  3. #--------------------------------------------------------------------------
  4. #   作成者:塵風
  5. #      URL:http://windmesser.tm.land.to/index.html
  6. #     MAIL:[email protected]
  7. #--------------------------------------------------------------------------
  8. #     概要:RPGツクールVX Aceの解像度を640x480に変更します。
  9. #     仕様:タイトル、ゲームオーバー、戦闘時の背景画像を自動的に拡大します。
  10. #           戦闘背景は 672x512 になるように、
  11. #           それ以外は 640x480 になるように拡大します。
  12. #           また、戦闘時の敵の初期位置を解像度に合わせて修正します。
  13. #           ウィンドウ表示についても若干のレイアウト調整が加えられています。
  14. #
  15. # 使用条件:各素材の推奨画像サイズは以下となっています。
  16. #           ※トランジション素材は必須です。
  17. #
  18. #           ・タイトル(Graphics/System/Titles1, Graphics/System/Titles2)
  19. #               640x480
  20. #           ・ゲームオーバー(Graphics/System/GameOver.png)
  21. #               640x480
  22. #           ・戦闘背景(Graphics/BattleBacks1, Graphics/BattleBacks2)
  23. #               672x512
  24. #           ・トランジション(Graphics/System/BattleStart.png)
  25. #               640x480
  26. #         
  27. # 使用方法:スクリプトエディタの「▼素材」以下に挿入してください
  28. #--------------------------------------------------------------------------
  29. #  ver1.00:ウィンドウ表示まわりのレイアウト調整
  30. #           HPゲージやアイテム名表示領域などを広げ、
  31. #           なるべくウィンドウがスカスカにみえないようにしています。
  32. #  ver0.91:戦闘背景を一回り大きなサイズになるように拡大
  33. #           拡大しないようにするには画像サイズを 676x512 にします。
  34. #  ver0.90:背景画像等の拡大調整のみのシンプルなバージョン
  35. #--------------------------------------------------------------------------

  36. #==============================================================================
  37. # ▼ 内部仕様の定数
  38. #==============================================================================

  39. # 解像度640x480プロジェクト使用フラグ
  40. # ※他スクリプト素材配布者様向けの判断用フラグ変数です
  41. #   (Graphics.width, Graphics.height で判断する事もできます)
  42. $VXA_640x480 = true

  43. # VX Ace デフォルト解像度
  44. $VXA_O_WIDTH = 544
  45. $VXA_O_HEIGHT = 416

  46. # 解像度を640x480に変更
  47. Graphics.resize_screen(800, 600)

  48. #==============================================================================
  49. # ▼ 追加メソッド
  50. #==============================================================================

  51. class Sprite

  52.   #--------------------------------------------------------------------------
  53.   # ● スプライト拡大メソッド
  54.   #    使用素材幅がデフォルト解像度に準拠していれば拡大
  55.   #--------------------------------------------------------------------------
  56.   def vxa_640x480_zoom(add_w = 0, add_h = 0)
  57.    
  58.     self.zoom_x = (Graphics.width + add_w) * 1.0 / width
  59.     self.zoom_y = (Graphics.height + add_h) * 1.0 / height

  60.   end

  61. end

  62. #==============================================================================
  63. # ▼ プリセットスクリプト再定義1:画像拡大など
  64. #==============================================================================

  65. #==============================================================================
  66. # ■ Scene_Title
  67. #------------------------------------------------------------------------------
  68. #  タイトル画面の処理を行うクラスです。
  69. #==============================================================================

  70. class Scene_Title < Scene_Base

  71.   if !method_defined?(:create_background_vga)
  72.     alias create_background_vga create_background
  73.   end

  74.   #--------------------------------------------------------------------------
  75.   # ● 背景の作成
  76.   #--------------------------------------------------------------------------
  77.   def create_background
  78.     create_background_vga
  79.    
  80.     # タイトル画像の拡大
  81.     @sprite1.vxa_640x480_zoom
  82.     @sprite2.vxa_640x480_zoom

  83.   end

  84. end

  85. #==============================================================================
  86. # ■ Scene_Gameover
  87. #------------------------------------------------------------------------------
  88. #  ゲームオーバー画面の処理を行うクラスです。
  89. #==============================================================================

  90. class Scene_Gameover < Scene_Base

  91.   if !method_defined?(:create_background_vga)
  92.     alias create_background_vga create_background
  93.   end

  94.   #--------------------------------------------------------------------------
  95.   # ● 背景の作成
  96.   #--------------------------------------------------------------------------
  97.   def create_background
  98.     create_background_vga
  99.    
  100.     # ゲームオーバー画像の拡大
  101.     @sprite.vxa_640x480_zoom
  102.    
  103.   end

  104. end

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

  111. class Spriteset_Battle

  112.   if !method_defined?(:create_battleback1_vga)
  113.     alias create_battleback1_vga create_battleback1
  114.     alias create_battleback2_vga create_battleback2
  115.     alias create_enemies_vga create_enemies
  116.   end

  117.   #--------------------------------------------------------------------------
  118.   # ● 戦闘背景(床)スプライトの作成
  119.   #--------------------------------------------------------------------------
  120.   def create_battleback1
  121.     create_battleback1_vga
  122.    
  123.     # 戦闘背景の拡大
  124.     @back1_sprite.vxa_640x480_zoom(36, 32)
  125.    
  126.   end
  127.   #--------------------------------------------------------------------------
  128.   # ● 戦闘背景(壁)スプライトの作成
  129.   #--------------------------------------------------------------------------
  130.   def create_battleback2
  131.     create_battleback2_vga
  132.    
  133.     # 戦闘背景の拡大
  134.     @back2_sprite.vxa_640x480_zoom(36, 32)
  135.    
  136.   end

  137. end

  138. #==============================================================================
  139. # ■ Game_Troop
  140. #------------------------------------------------------------------------------
  141. #  敵グループおよび戦闘に関するデータを扱うクラスです。バトルイベントの処理も
  142. # 行います。このクラスのインスタンスは $game_troop で参照されます。
  143. #==============================================================================

  144. class Game_Troop < Game_Unit

  145.   if !method_defined?(:setup_vga)
  146.     alias setup_vga setup
  147.   end

  148.   #--------------------------------------------------------------------------
  149.   # ● セットアップ
  150.   #--------------------------------------------------------------------------
  151.   def setup(troop_id)
  152.     setup_vga(troop_id)
  153.    
  154.     # トループ座標の修正
  155.     @enemies.each do |enemy|
  156.       enemy.screen_x = (enemy.screen_x * (Graphics.width * 1.0 / $VXA_O_WIDTH)).to_i
  157.       enemy.screen_y = (enemy.screen_y * (Graphics.height * 1.0 / $VXA_O_HEIGHT)).to_i
  158.     end
  159.    
  160.   end

  161. end

  162. #==============================================================================
  163. # ▼ プリセットスクリプト再定義2:ウィンドウレイアウト調整など
  164. #==============================================================================

  165. #==============================================================================
  166. # ■ Window_Base
  167. #------------------------------------------------------------------------------
  168. #  ゲーム中の全てのウィンドウのスーパークラスです。
  169. #==============================================================================

  170. class Window_Base < Window
  171.   if !method_defined?(:draw_actor_name_vga)
  172.     alias draw_actor_name_vga draw_actor_name
  173.     alias draw_actor_class_vga draw_actor_class
  174.     alias draw_actor_hp_vga draw_actor_hp
  175.     alias draw_actor_mp_vga draw_actor_mp
  176.     alias draw_actor_tp_vga draw_actor_tp
  177.     alias draw_item_name_vga draw_item_name
  178.   end

  179.   #--------------------------------------------------------------------------
  180.   # ● 名前の描画
  181.   #--------------------------------------------------------------------------
  182.   def draw_actor_name(actor, x, y, width = 144)
  183.     draw_actor_name_vga(actor, x, y, width)
  184.   end
  185.   #--------------------------------------------------------------------------
  186.   # ● 職業の描画
  187.   #--------------------------------------------------------------------------
  188.   def draw_actor_class(actor, x, y, width = 144)
  189.     draw_actor_class_vga(actor, x, y, width)
  190.   end
  191.   #--------------------------------------------------------------------------
  192.   # ● HP の描画
  193.   #--------------------------------------------------------------------------
  194.   def draw_actor_hp(actor, x, y, width = 188)
  195.     draw_actor_hp_vga(actor, x, y, width)
  196.   end
  197.   #--------------------------------------------------------------------------
  198.   # ● MP の描画
  199.   #--------------------------------------------------------------------------
  200.   def draw_actor_mp(actor, x, y, width = 188)
  201.     draw_actor_mp_vga(actor, x, y, width)
  202.   end
  203.   #--------------------------------------------------------------------------
  204.   # ● TP の描画
  205.   #--------------------------------------------------------------------------
  206.   def draw_actor_tp(actor, x, y, width = 188)
  207.     draw_actor_tp_vga(actor, x, y, width)
  208.   end
  209.   #--------------------------------------------------------------------------
  210.   # ● シンプルなステータスの描画
  211.   #--------------------------------------------------------------------------
  212.   def draw_actor_simple_status(actor, x, y)
  213.     draw_actor_name(actor, x, y)
  214.     draw_actor_level(actor, x, y + line_height * 1)
  215.     draw_actor_icons(actor, x, y + line_height * 2)
  216.     draw_actor_class(actor, x + 152, y)
  217.     draw_actor_hp(actor, x + 152, y + line_height * 1)
  218.     draw_actor_mp(actor, x + 152, y + line_height * 2)
  219.   end
  220.   #--------------------------------------------------------------------------
  221.   # ● 能力値の描画
  222.   #--------------------------------------------------------------------------
  223.   def draw_actor_param(actor, x, y, param_id)
  224.     change_color(system_color)
  225.     draw_text(x, y, 152, line_height, Vocab::param(param_id))
  226.     change_color(normal_color)
  227.     draw_text(x + 152, y, 36, line_height, actor.param(param_id), 2)
  228.   end
  229.   #--------------------------------------------------------------------------
  230.   # ● アイテム名の描画
  231.   #     enabled : 有効フラグ。false のとき半透明で描画
  232.   #--------------------------------------------------------------------------
  233.   def draw_item_name(item, x, y, enabled = true, width = 236)
  234.     draw_item_name_vga(item, x, y, enabled, width)
  235.   end

  236. end

  237. #==============================================================================
  238. # ■ Window_Status
  239. #------------------------------------------------------------------------------
  240. #  ステータス画面で表示する、フル仕様のステータスウィンドウです。
  241. #==============================================================================

  242. class Window_Status < Window_Selectable

  243.   #--------------------------------------------------------------------------
  244.   # ● ブロック 1 の描画
  245.   #--------------------------------------------------------------------------
  246.   def draw_block1(y)
  247.     draw_actor_name(@actor, 4, y)
  248.     draw_actor_class(@actor, 128, y)
  249.     draw_actor_nickname(@actor, 336, y)
  250.   end
  251.   #--------------------------------------------------------------------------
  252.   # ● ブロック 2 の描画
  253.   #--------------------------------------------------------------------------
  254.   def draw_block2(y)
  255.     draw_actor_face(@actor, 8, y)
  256.     draw_basic_info(136, y)
  257.     draw_exp_info(336, y)
  258.   end
  259.   #--------------------------------------------------------------------------
  260.   # ● ブロック 3 の描画
  261.   #--------------------------------------------------------------------------
  262.   def draw_block3(y)
  263.     draw_parameters(32, y)
  264.     draw_equipments(336, y)
  265.   end
  266.   #--------------------------------------------------------------------------
  267.   # ● 経験値情報の描画
  268.   #--------------------------------------------------------------------------
  269.   def draw_exp_info(x, y)
  270.     s1 = @actor.max_level? ? "-------" : @actor.exp
  271.     s2 = @actor.max_level? ? "-------" : @actor.next_level_exp - @actor.exp
  272.     s_next = sprintf(Vocab::ExpNext, Vocab::level)
  273.     change_color(system_color)
  274.     draw_text(x, y + line_height * 0, 180, line_height, Vocab::ExpTotal)
  275.     draw_text(x, y + line_height * 2, 180, line_height, s_next)
  276.     change_color(normal_color)
  277.     draw_text(x, y + line_height * 1, 180, line_height, s1, 2)
  278.     draw_text(x, y + line_height * 3, 180, line_height, s2, 2)
  279.   end

  280. end

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

  286. class Window_BattleStatus < Window_Selectable
  287.   #--------------------------------------------------------------------------
  288.   # ● ゲージエリアの幅を取得
  289.   #--------------------------------------------------------------------------
  290.   def gauge_area_width
  291.     return 284
  292.   end
  293.   #--------------------------------------------------------------------------
  294.   # ● ゲージエリアの描画(TP あり)
  295.   #--------------------------------------------------------------------------
  296.   def draw_gauge_area_with_tp(rect, actor)
  297.     draw_actor_hp(actor, rect.x + 0, rect.y, 136)
  298.     draw_actor_mp(actor, rect.x + 146, rect.y, 64)
  299.     draw_actor_tp(actor, rect.x + 220, rect.y, 64)
  300.   end
  301.   #--------------------------------------------------------------------------
  302.   # ● ゲージエリアの描画(TP なし)
  303.   #--------------------------------------------------------------------------
  304.   def draw_gauge_area_without_tp(rect, actor)
  305.     draw_actor_hp(actor, rect.x + 0, rect.y, 166)
  306.     draw_actor_mp(actor, rect.x + 176,  rect.y, 108)
  307.   end
  308. end
复制代码

点评

我用了这个,但似乎播放动画不能扩大  发表于 2012-12-3 00:00
回复

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
1019 小时
注册时间
2012-4-25
帖子
799
发表于 2012-12-3 00:05:22 | 显示全部楼层
1.png

用了下面那个脚本还有这个问题。
回复

使用道具 举报

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

本版积分规则

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

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-3-29 23:59

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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