Centering a zoomed sprite

I'm using this script: http://rpgmaker.net/scripts/205/code/

and the problem is that when sprites are zoomed, they align to the bottom of the grid rather than in the center.

1. Shrinking (75%) via an autorun that has a pre-centered sprite from a drawing program:

Screenshot_1.png

2. Shrinking (75%) via this script:

Screenshot_2.png

Is there a way to center the image to the respective grid box during the zoom?

Attached the spritesheet with the pre-centered sprite.

Player.png
Hmmm, I think I made a script for this once, let me check here.

Edit:

Checked, I was thinking about this script: http://forums.rpgmakerweb.com/index.php?/topic/40077-hudell-character-effects/

And while it also has a zoom option, the "center" feature that I did was for the rotation and not the zoom. I'll test if it works with zoom too.
So maybe this could be done by setting an origin point/anchor point for the zoom?

I'm not sure how to do this in ruby u.u I'll continue to try to check out stuff on my end. Thank you for the reply, though!
Here, just add this on your script editor:

Code:
class Sprite_Character < Sprite_Base  alias :hudell_sprite_character_update_position :update_position  def update_position    hudell_sprite_character_update_position    self.x += zoom_offset_x    self.y += zoom_offset_y  end  def zoom_offset_x    new_width = 32 * self.zoom_x    (new_width - 32) / 4  end  def zoom_offset_y    new_height = 32 * self.zoom_y    (new_height - 32) / 4  endend
Your script seems to be centering the sprite vertically, but not horizontally. Example:

With your addon (sprites have been shrinked to emphasize point)

2MiVSFx.png


Without:

nFx5muK.png


In fact, if only I could combine the two pictures, I'm pretty sure it'd be centered correctly xD

EDIT: I do, however, have other scripts installed, so I'm going to try it in a new project because judging by the code it should work correctly...

EDIT2: It works correctly in the new project. I'll start seeing which of the scripts is conflicting..
Ah, of course, RPG Maker shows the event horizontally centered by default, I removed the part that was changing the X position:

Code:
class Sprite_Character < Sprite_Base  alias :hudell_sprite_character_update_position :update_position  def update_position    hudell_sprite_character_update_position    self.y += ((32 * self.zoom_y) - 32) / 4  endend
It works perfectly now, thank you very much!

(Credit as 'Hudell', yes?)
It works perfectly now, thank you very much!

(Credit as 'Hudell', yes?)
Yup,

But only if you want to, I never ask for credits.

Original thread: https://forums.rpgmakerweb.com/threads/centering-a-zoomed-sprite.43532/