查看: 2547|回复: 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 | 显示全部楼层
[pre lang="ruby"]
=begin
================================================================================
Title: Battle Sprite Auto-position
Author: Hime
Date: Dec 19, 2014
--------------------------------------------------------------------------------
** Change log
Dec 19, 2014
   - Use ratios to adjust the resolutions rather than offsetting by the
     difference between resolutions
May 6, 2012
   -Initial release
--------------------------------------------------------------------------------
** Terms of Use
* Free to use in non-commercial projects
* Contact me for commercial use
* No real support. The script is provided as-is
* Will do bug fixes, but no compatibility patches
* Features may be requested but no guarantees, especially if it is non-trivial
* Credits to Hime Works in your project
* Preserve this header
--------------------------------------------------------------------------------
** Description

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

--------------------------------------------------------------------------------
** Installation

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

--------------------------------------------------------------------------------
** Usage

Plug-n-play

==============================================================================
=end
$imported = {} if $imported.nil?
$imported[:TH_BattleSpriteAutoPosition] = true
#===============================================================================
# ** Rest of the Script
#===============================================================================
class Game_Troop < Game_Unit

  #--------------------------------------------------------------------------
  # alias method
  #--------------------------------------------------------------------------
  alias :th_sprite_autopos_setup :setup
  def setup(troop_id)
    th_sprite_autopos_setup(troop_id)
    adjust_coords
  end
  
  #--------------------------------------------------------------------------
  # new method: adjust enemy battler coords
  #--------------------------------------------------------------------------
  def adjust_coords
    adjust_x = Graphics.width / 544.0
    adjust_y = Graphics.height / 416.0
    @enemies.each do |enemy|
      enemy.screen_x *= adjust_x
      enemy.screen_y *= adjust_y
    end
  end
end
[/pre]
安装此插件脚本: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
星屑
10445
在线时间
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.

在本版发帖返回顶部