查看: 2603|回复: 4

[已经解决] 关于分辨率修改之后 战斗画面怪物位置的问题

[复制链接]
梦石
0
星屑
690
在线时间
10 小时
注册时间
2014-4-14
回帖
3
发表于 2017-1-10 21:57:13 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
如标题
我把分辨率修改成 1024 x 768了   可是战斗画面的怪物只能在原来的左上角位置   战斗画面的大小没有改变
求大神帮帮忙~
梦石
0
星屑
6891
在线时间
7027 小时
注册时间
2013-11-2
回帖
1263

开拓者剧作品鉴家

发表于 2017-1-10 22:13:42 | 显示全部楼层

  1. =begin
  2. ================================================================================
  3. Title: Battle Sprite Auto-position
  4. Author: Hime
  5. Date: Dec 19, 2014
  6. --------------------------------------------------------------------------------
  7. ** Change log
  8. Dec 19, 2014
  9.    - Use ratios to adjust the resolutions rather than offsetting by the
  10.      difference between resolutions
  11. May 6, 2012
  12.    -Initial release
  13. --------------------------------------------------------------------------------
  14. ** Terms of Use
  15. * Free to use in non-commercial projects
  16. * Contact me for commercial use
  17. * No real support. The script is provided as-is
  18. * Will do bug fixes, but no compatibility patches
  19. * Features may be requested but no guarantees, especially if it is non-trivial
  20. * Credits to Hime Works in your project
  21. * Preserve this header
  22. --------------------------------------------------------------------------------
  23. ** Description

  24. This script adjusts the position that the battle sprites are drawn
  25. relative to the game screen size. This allows you to set your enemy
  26. positions in the troop editor without having to consider the size of
  27. your window (544x416 default vs sizes)

  28. --------------------------------------------------------------------------------
  29. ** Installation

  30. In the script editor, place this script below Materials and above Main

  31. --------------------------------------------------------------------------------
  32. ** Usage

  33. Plug-n-play

  34. ==============================================================================
  35. =end
  36. $imported = {} if $imported.nil?
  37. $imported[:TH_BattleSpriteAutoPosition] = true
  38. #===============================================================================
  39. # ** Rest of the Script
  40. #===============================================================================
  41. class Game_Troop < Game_Unit

  42.   #--------------------------------------------------------------------------
  43.   # alias method
  44.   #--------------------------------------------------------------------------
  45.   alias :th_sprite_autopos_setup :setup
  46.   def setup(troop_id)
  47.     th_sprite_autopos_setup(troop_id)
  48.     adjust_coords
  49.   end
  50.   
  51.   #--------------------------------------------------------------------------
  52.   # new method: adjust enemy battler coords
  53.   #--------------------------------------------------------------------------
  54.   def adjust_coords
  55.     adjust_x = Graphics.width / 544.0
  56.     adjust_y = Graphics.height / 416.0
  57.     @enemies.each do |enemy|
  58.       enemy.screen_x *= adjust_x
  59.       enemy.screen_y *= adjust_y
  60.     end
  61.   end
  62. end
复制代码

安装此插件脚本:HimeWorks的”战斗图位置自动调整“

运作原理是在在决定战斗图屏幕位置的地方加入处理,对坐标乘上(当前屏幕大小 除于 默认屏幕大小)的比例。

评分

参与人数 1星屑 +300 收起 理由
VIPArcher + 300 (你看,我的回复不是没意义的。哼~.

查看全部评分

回复

使用道具 举报

梦石
0
星屑
690
在线时间
10 小时
注册时间
2014-4-14
回帖
3
 楼主| 发表于 2017-1-10 22:22:58 | 显示全部楼层
RaidenInfinity 发表于 2017-1-10 22:13
=begin
================================================================================
Title: Bat ...

哇~感谢大神!
回复

使用道具 举报

无限の剣制

梦石
0
星屑
10460
在线时间
5019 小时
注册时间
2013-2-28
回帖
4942

开拓者贵宾

发表于 2017-1-11 00:48:15 | 显示全部楼层
5行脚本就能解决,这个帖子里搜索5 “敌人战斗坐标修正”
https://rpg.blue/thread-378738-1-1.html

评分

参与人数 1星屑 +250 收起 理由
RaidenInfinity + 250 认可答案

查看全部评分

回复

使用道具 举报

梦石
0
星屑
690
在线时间
10 小时
注册时间
2014-4-14
回帖
3
 楼主| 发表于 2017-1-11 08:40:14 | 显示全部楼层
VIPArcher 发表于 2017-1-11 00:48
5行脚本就能解决,这个帖子里搜索5 “敌人战斗坐标修正”
https://rpg.blue/thread-378738-1-1.html ...

感谢大神~
里面还有好多其他有用的东西~
回复

使用道具 举报

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

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部