Sprite "hotspot"

Normally, if you add a large event sprite, it is aligned to the bottom-middle. Is there a way to move the active area up or down, or left or right?

K1ospzC.png


You can see in the above sprite that the active area of the event sprite is at the bottom-middle, but this is not appropriate for the car. (This is just an easy example.)
The alignment is to the bottom middle of the cell, independently of where in the cell the Pixels are. If you want the active area nearer to the sprite, you'll need to move the car down inside the cell.
I can't do that, since if the car is pointing north or south, it gets clipped off so only a portion of the car is showing.

m0FvQMU.png
I don't understand your statement, but sure you can. All sprite should be aligned to the bottom of the cell. I'm not sure why you have all that whitespace. Work out how tall your tallest sprite is, and make all cells that height. Then move all sprites to the bottom of the cell. You don't have to align the shorter sprites to the middle vertically.
If the car is moving, it will not look good when changing directions. You should try it yourself first before commenting.

This applies to other types of objects, too, such as a monster that is wider than a tile. Not just for cars.
If you look at the default character sprites, they are ALL aligned to the bottom of the grid.

However, you clearly do not want my assistance, so I'll stay out of your way and let you sort it out yourself.
If you look at the default character sprites, they are ALL aligned to the bottom of the grid.
And, I just wanted to know if it were possible to move the hotspot to somewhere else. I don't see why that's such a hard question to answer?
The answer was no, an explanation was given, and an alternative suggested, within the first two replies you got.

The default characters are all aligned to the bottom BECAUSE that's where the hotspot is.

You should try it yourself first before commenting
I have one or two more posts than you do - I think I know what I'm talking about. You don't need to be rude to people answering your questions just because you don't like the answers.
I have one or two more posts than you do - I think I know what I'm talking about. You don't need to be rude to people answering your questions just because you don't like the answers.
That wasn't rude. You *should* try implementing a large mobile sprite first to understand the issues I'm facing. (Or should have, instead of simply blowing me off.)
As for 2D sprites, another game I have experience with is Jagged Alliance 2. JA2 aligns sprites to a coordinate (0,0) that lies directly beneath the feet of the character. There's no limit AFAIK on how far the sprite extends away (north , south, east or west) from that center coordinate, however.

merc_anatomy.png


For a car, this point would lie between the wheels and below the center of mass instead of the feet. But, while possible in JA2, in RMMV there's no room for the entire car if the "hotspot" is all the way at the bottom.
I don't need to try. I just need to see how the default sprites are done and I know what the engine is doing with them.

There is no point comparing a sprite that was not designed for RPG Maker and saying "it should do this", because RPG Maker doesn't draw sprites and hotspots the same way. You need to look at other sprites that WERE designed for RPG Maker.

If you want it to do something different to what it was designed to do, then you are going to have to get someone to write a plugin to do it the way you want. And that will affect every other event sprite as well, so you might get undesired effects.
Can I modify a sprite's pixel coordinates using a script or plugin? (JavaScript?) That would be a good place to start.
Theoretically yes, practically no.
You would have to rewrite most of the collision and movement and display functions for the engine, and that requires a lot of programming knowledge and several months of work.
You could build on what's already there ...

If your spritesheet has ! as one of the first two characters (might have to be the first one), when it's drawn, it's aligned with the grid.
If it doesn't have ! at the start, it's drawn 6 pixels higher.

You could add to that and modify the function to draw the sprite lower.

Code:
Game_CharacterBase.prototype.shiftY = function() {
    return this.isObjectCharacter() ? 0 : 6;
};

but you might have to deal with issues of a larger character with map scrolling (disappearing as it moves off the screen rather than AFTER it's off the screen)
You could build on what's already there ...
You could add to that and modify the function to draw the sprite lower.

Code:
Game_CharacterBase.prototype.shiftY = function() {
    return this.isObjectCharacter() ? 0 : 6;
};

This wouldn't eliminate the collision issues would it? I suppose I could also make the road the car drives on inaccessible to characters.
The collision area will still be 48x48 pixels. But if you car is higher than the collision area (the tile the event is on), you could do something with the script above (in a plugin) to make it draw the sprite that much lower. The event will still be on the same tile, and the collision area will still be on the same tile, but the car will be over the collision area rather than above it.

Original thread: https://forums.rpgmakerweb.com/threads/sprite-hotspot.93692/