Battle Sprite auto-position

battleSpriteAutoPosition0

RPG Maker’s troop editor allows you to visually position troop members. However, the editor assumes you are using a screen resolution of 544×416. This means that if you were using a different resolution, the positions would still be based on the default resolution, resulting in a mismatch between what you see in the editor and what you see in-game.

This script applies a position adjustment by calculating the ratio between the editor’s resolution and your game’s resolution and applies the ratio, allowing you to accurately set up your battles without having to worry about your window resolution.

Download

Script: download here

Usage

Just copy script into editor

Examples

Supposing window size of 640×480, here’s how the two bats from above would look

battleSpriteAutoPosition1

This is how it looks when this script is used

battleSpriteAutoPosition2

You may also like...

5 Responses

  1. aivangrono says:

    На сайте https://izhevsk.soho.menu/ вы сможете заказать вкусные и аппетитные сеты, экзотические роллы, ароматную и свежую пиццу, сытные суши, разнообразные закуски, интересные десерты, созданные из отборных ингредиентов. Также здесь можно заказать и свежайший шашлык из нежного мяса. Рекомендуется попробовать сеты, созданные из самых разнообразных ингредиентов. Они порадуют удивительным калейдоскопом вкусов. Каждый день выкладываются удивительные и интересные предложения, которые вы сможете приобрести с хорошей скидкой. Действуют ограниченное количество времени.

  2. You think like me! Love it!

  3. Anonymous says:

    I put your script it worked fine. Then i removed your script and the enemies were still auto positioned? Is that normal?

  4. Antonio says:

    I tryed to use your script, thank, by the way, but it worked in parts.
    I am making a fan remake of a what was a light novel, and some of the sprites and battles, have no legs, so they must be placed as low as possible, to give the effect that is the camera cutting them. Your script did corrected the sprites postions, but it didn’t put them at the lowest part possible. 

    SO, I got your script, and changed this part 

     new method: adjust enemy battler coords
      #————————————————————————–
      def adjust_coords
        adjust_x = Graphics.width / 544.0
        adjust_y = Graphics.height / 390.0
        @enemies.each do |enemy|
          enemy.screen_x *= adjust_x
          enemy.screen_y *= adjust_y

    and it did corrected the rest. My question is, is there a problem doing that? I am noob in scripting. thanks

    • Hime says:

      By default, the position shown in the troop editor is not the entire screen. Instead, it is only the top 2/3 or something (above the menu).
      So it should be ok to do what you’re doing.

Leave a Reply

Your email address will not be published. Required fields are marked *