Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Battle system zoom-

Script Request Template
A request for a small snippet

Script Title:
Zoom in on target
RMXP or RMVX:
RMXP
Detailed Description:
Pretty much all I want is for the game screen to zoom in on the target you're selecting. I figured this would be better than having a cursor appear over them in the Enu SBS seeing as to how all monsters vary in size, so the cursor will never truly be where you want it. x.x
Screen shots:
N/A I think it's pretty obvious what I want.
Other Scripts I am using (in order):
Weather Script byb Ccoa
Enu SBS
Location_steps by Juan
Particle Engine by Arev
Tons of add-ons by Blizzard
Status by Fyre
Character Shadow by Sprite_Ombre
Map_location by Hunter x
Worldmap_minichars by Charlie Lee
LM by god kknows who? It doesn't say
LBL_Message System by Slipknot
Shop_Status by RPG advocate
LvlUP_Notifier by Blizzard
Blue Magic by Fomar
Heal on lvlUP (I don't know who)
Skip title by (someone?)


if someone asks a specific question, add that detail to this post.
 
hard to make because you have to make everything else zoom out. one of the battle systems made it so happens when things attack. u might be able to copy from it. check the wind master game for script credit
 
I'd rather not take it from another game simply because I want it to integrate perfectly into the sbs. I don't think this would take a lot. All you would have to do is make it zoom in when YOU are selecting a target. It doesn't have to zoom in at any other point.
 
This works with the default battle system.

Code:
#--------------------------------------

# Zoom Battlers instead of arrow - Brew

#--------------------------------------

 

class Sprite_Battler

  def zoom(factor)

    self.zoom_x = factor

    self.zoom_y = factor

  end

end

 

class Spriteset_Battle

  alias zoom_battler_update update 

  def update

    for i in 0...@enemy_sprites.size

      if i == $current_enemy

        # Why enemy_sprite is reversed, I don't know...??

        # Zoom factor here is 10%.  To change, edit this 1.1 

        @enemy_sprites[@enemy_sprites.size - 1 - i].zoom(1.1)

      else

        @enemy_sprites[@enemy_sprites.size - 1 - i].zoom(1.0)

      end

    end

    zoom_battler_update

  end

end

 

class Arrow_Enemy

  alias zoom_battler_update update

  def initialize(viewport)

    super(viewport)

    # Turn off the arrow

#    self.visible = false

  end

  def update

    zoom_battler_update

    $current_enemy = @index

  end

end

 

class Scene_Battle

  alias zoom_battler_end_enemy_select end_enemy_select

  def end_enemy_select

    zoom_battler_end_enemy_select

    $current_enemy = -1

    @spriteset.update

  end

end

 
 
How would I integrate this in to the Enu SBS for XP? I'm a little confused on this part. I looked through the sideview 1 and 2 and there are a few parts where I think I might use this but I'm not sure and I've done so much that I don't want to destroy the game, lol.


Also, with the default battle system, this script does not work correctly.
It zooms in for selection but if you back out after deciding to attack, it leave the battle zoomed in for the rest of battle. I'm not sure if you had that problem or not...
 
I didn't test backing out. (I was a Marine. We never back out of a fight!) :scruff:

"General Puller, it looks like we're surrounded. Well, that simplifies our problem, doesn't it?"

Try again. Updated script above.
 
lol.
I thank you for serving our country...

Anyway, it also stays zoomed in for the rest of battle, lol.
I'll check the new one.


Edit: Not exactly what I was looking for but it does work for simplicity. I'd suggest a zoom in on the battle back ground. Such as that when you're zooming in, you don't see the other enemy on the screen. It would zoom in on the specific target, not just modify the size of the intended target.

Zooming in on an intended target could look bad because if you have a screen sized battler, his outline could show up inside the command boxes.
 
Ah I see. You want the whole battle window to zoom in. You'd have to capture the screen as an image, show the image in a sprite over the top of the existing screen, then zoom in on that area. lots of scripting.
I thought you just wanted an alternate method of indicating which enemy was being selected, other than the arrow.

Be Well
 
I've seen it done in another game before. I couldn't imagine it would take that much but... ok. If you took a screen capture, wouldn't it resize the battle menus too?

A simple zoom in on the screen shouldn't take a whole lot of scripting.. but then again, I know only basic scripting.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top