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.

Modifying the base of a Sprite or Player

Kipe

Member

Hello,

I am looking for a RMXP script which will adjust the base of specific sprites or the Player, using a comment within the event itself, or the Script event command. This script would halve the base in which a player stands on, but allow graphics which extend below that base to be visible (as shown with the black stick in the image below). I have included an image for reference.

This will be used for displaying sprites which are holding objects that extend below their feet; such as spears, or other long weapons.

I am willing to pay for your time. Please leave a reply here if you can do this or if you have any additional questions.

Thank you

wilgdc.png
 

mawk

Sponsor

It's not the most elegant solution, but I think you could accomplish this without scripting by just giving each frame of the spritesheets in question more space around the sprite itself. It'd take a little experimentation to keep the alignment constant, but once you figured it out I don't think there'd be any perceptible difference. Your images would take up a bit more filesize, of course, but sound is always the biggest filesize problem and people don't even scoff at 300mb downloads anymore.

I see a potential problem, though, depending on how RMXP decides which parts of a sprite take layering priority. Seems worth a try, all the same, since there's only really one way to find out.

e: vvv Oh, I hadn't even thought of that! Yikes.
 

Kipe

Member

Yes, but by doing that, the X and Y position of the sprite will be different than what the graphic of the sprite is showing.

The main problem is with swinging a weapon while facing down. The weapon must extend beyond the players feet, and this causes the player to shift upward quite a bit. This is because the tip of the weapon is the base of the sprite now, rather than the feet of the character. Hope that makes sense.

A great example of this is with this sprite used in Blizzards ABS sample game.
6fytkp.png


Without a script to modify the new base of the sprite when facing downward, the character seems to teleport upward when moving down.
 

Kipe

Member

Works perfectly. I owe you $0.07, don't let me forget! lol.

It would be nice to toggle this on and off for certain events, but if it is too complicated, this will work for me.

Thanks!
 
Yeh, it would be a bitch to have to edit every character set.

The easiest way I can think of doing this is to include a specific string in the filename of any sprite you want offset.
For example "_offset", so you'd modify Aluxes character set & rename it: 001-Fighter01_offset.png

then,...

replace the one line:

self.oy = @ch

with:

Code:
        if @character_name[/offset/] != nil

          self.oy = @ch / 2

        else

          self.oy = @ch

        end

 
 

Kipe

Member

I believe I can do those. How about starting with Deep One? Were you wanting this sprite in the RMXP style? I can attempt a VX style monster, but I have never done sprites for RMVX.

deep%20one.jpg

Does this portray what you would want? I like this one because it gives me a great example of how this creature would stand and walk.
 

Kipe

Member

Cool, well give me about a week or so before I start on this sprite. I'm currently working on animating another guys sprites that I started on a few days ago. Once I'm done with that I'll be able to start on this.
 

Kipe

Member

Bumping this thread to inform you of a very pre-mature update, but before I continue much further I would like to see if this projected size is fine by you:

dczdrm.png


Please keep in mind that what I have in mind for walking animation will cause the sprite to crouch, reducing the body size. I feel that crouching the sprite will look better than a very upright pose. Also, keep in mind that the red outline shown here is not final, and it may change as needed.

I also plan to make the face a bit larger, depending on how I decide to do the body. The shoulder length of this character seems to be about as wide as the head. We'll see once I get started on that part of it though.
 

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