Centering larger sprites (Falcao Pearl ABS)

I'm hoping this is the right place to post this? If not, I'm sorry. ^^; But basically, I'm using a script, Falcao Pearl ABS and I'm trying to create a projectile that is basically a flame wall. I have the flame wall sprite made, however, when using it as the Tool Graphic for the projectile skill, it's one-sided.

Basically, a projectile for this script is like shooting out an NPC. And in this case, it just treats the flame wall like a very tall NPC, with the bottom of the graphic starting from the bottom not the center. I was wondering if anyone had an idea how I could set things so sprites would shoot from the center.

The sprite in question:
O9H96g7.png

As well as the script:

https://www.rpgmakercentral.com/topic/8809-falcao-pearl-abs-liquid-v3-update/
There might be parameters in Pearl for this kind of thing, but have you tried just adding blank space to the edges of the sprite? I think you'd want to add ~16 pixels of blank space to both the top and bottom for the "vertical" sprites, and ~16 pixels to the left and right edges of the "horizontal" sprites, making sure that the additions total 32 pixels (or some multiple of 32) to keep things clean.
Hmmm, the sprite comes out cleanly from what I can see, it's just the matter of it being "lopsided".
can you give an example of what exactly you mean by "lopsided"?

I can think of only two possible causes at the moment:
Either the sprite itself is not correctly centered (which would have to be corrected in an image program) or you failed to declare it as an object sprite (! at the beginning of the filename) because objects align to the grid, people sprites are shifted to walk inside the grid.
can you post a screenshot of how it looks and how it should look like?
I've helped another used a few days ago with a similar problem.... it shouldn't be hard to just copy that solution.
This is what I mean:
nJH1Ltt.png

Rather than shooting from the center, it shoots from the side, starting "feet first" like a really tall NPC.

Here's a halfassed representation MS Paint of what it should look like |,D

FpA8KaJ.png
Code:
class Sprite_Character < Sprite_Base
 alias set_character_bitmap_orig set_character_bitmap
 def set_character_bitmap
  fx = nil
  set_character_bitmap_orig
  array = ["name1", "name2", "name3", "nameN"]
  fx = array.any?{|name| @character_name[/#{name.to_s.downcase}/i]}
  if fx != nil
   self.oy = @ch / 2
  end
 end
end

try this.
replace the "nameX" names in the array, with whatever name you gave to that sheet, or sheets if there's more than one, it should handle multiple sheets.
Sprites are always centered bottom by default - NOT absolutely centered. The reason is that because otherwise, larger people-sprites will not look as if they are walking on the roads while being bigger.
To change that you'll need to modify the engine itself - and that always has a risk of breaking other parts of the engine, especially with a script that already changes the engine to an ABS. I hope the solution above will work for you because there are no real alternatives.
The code works but it causes all graphics to be adjusted down half way. My map had the character not able to reach the top and gets cut off at the bottom.
The better way would be to put the event for the graphic at the top of the trees. then it will show as you intended.
The code works but it causes all graphics to be adjusted down half way. My map had the character not able to reach the top and gets cut off at the bottom.
The better way would be to put the event for the graphic at the top of the trees. then it will show as you intended.

That's, uh...not how it works. ^^; I don't set the event location. It shoots from the player like a projectile. You are basically shooting an event. You could even shoot NPCs if you wanted to. Because the sprite comes from the player, I don't get decide where it goes. All I can (hopefully) do is center it.

EDIT: Although maybe this is the answer after all? Maybe instead of centering the sprite, perhaps there's a way to alter the script so the event itself shoots out from a different spot. I.e. 4 tiles below the player? And perhaps I could add a comment tag that determines this number. I would need to make sure that only the sprite is moved and not the projectile itself.

Sprites are always centered bottom by default - NOT absolutely centered. The reason is that because otherwise, larger people-sprites will not look as if they are walking on the roads while being bigger.
To change that you'll need to modify the engine itself - and that always has a risk of breaking other parts of the engine, especially with a script that already changes the engine to an ABS. I hope the solution above will work for you because there are no real alternatives.

I'm aware. gstv's solution does do what I want...but unfortunately it effects all NPCs. I'm hoping it's possible to have this effect only occur with projectiles. I don't know enough about Ruby or scripting to know if it's possible. Maybe when I get home I can monkey around, figure out how the projectile script works and maybe jury-rig something involving gstv's solution.
Sorry, forgot it's the pearl abs script.
it will only affect the sprites you specify in the array, by name.
make sure your custom sprites have unique names.
Maybe I'm misunderstanding something then. ^^;

Code:
class Sprite_Character < Sprite_Base
 alias set_character_bitmap_orig set_character_bitmap
 def set_character_bitmap
  fx = nil
  set_character_bitmap_orig
  array = ["$FireWall"]
  fx = array.any?{|name| @character_name[/#{name.to_s.downcase}/i]}
  if fx != nil
   self.oy = @ch / 2
  end
 end
end

This is how I'm using the code, with $FireWall being the name of the sprite the projectile is using.

zKZmfTi.png


The wall of flames are centered...but...so is the door....and the sign. XD
try replacing the IF statement.
Code:
if array.any?{|name| @character_name[/#{name.to_s.downcase}/i]}

remove fx = array....
I was thinking it would return the actual string, but maybe it's returning true to the .any?, so fx is true, and indeed not-nil, and the condition is validating every time.
Code:
class Sprite_Character < Sprite_Base
 alias set_character_bitmap_orig set_character_bitmap
 def set_character_bitmap
  fx = nil
  set_character_bitmap_orig
  array = ["FireWall"]
  if array.any?{|name| @character_name[/#{name.to_s.downcase}/i]}
   self.oy = @ch / 2
  end
 end
end

It works. Posting the full code in case anyone else wants to use it. Thanks for the help!
fx = nil => array = nil

or, remove it altogether, it's not needed anymore

Original thread: https://forums.rpgmakerweb.com/threads/centering-larger-sprites-falcao-pearl-abs.108872/