How MV Reads Sprites

I'm having an issue with how RPG Maker MV Reads Sprite sheets. The program always reads the bottom of each frame on a sheet for placement on the map. I need it to read the middle of the frame instead. I have resized my sprites to allow for the sword swing animation.





 





The reason for this is I'm making an action RPG and the characters sword needs to be able to be swung below his feet when facing down but since you cant have anything go below the feet of your sprite it reads it wrong. I've attached some images to help. I have Link as a placeholder to give you an idea of what I mean.





 





The Pink sqaure represents the tile the game thinks the player is on and is the 'collision tile'. If I move the sprite up to the middle it looks right but the collision is wrong. If I move him to the bottom his sword gets cut off and the frame above him overlaps thus his sword appears above his head.





 





Is there a way for the game to read the spritesheets from the middle instead of the bottom?





 



Collision box A.jpg

Collision Box B.jpg

Negative sheet.jpg

Postive sheet.jpg
It's not a matter of "how the maker read the sprites". What you see is just a square of a image.


What you need is to change the placement of the sprite, not how it is readed.


To change this, search for this on the rpg_sprites.js:


Sprite_Character.prototype.initMembers = function() {
this.anchor.x = 0.5;
this.anchor.y = 1;
this._character = null;
this._balloonDuration = 0;
this._tilesetId = 0;
this._upperBody = null;
this._lowerBody = null;
};


change the 'this.anchor.y = 1' to 'this.anchor.y = 0.5'


Notice that this will change the offset of all characters, if you want this to affect only the player you will need to add some conditions on it.


There will be also some issues with the bush display, some adjustment would be needed for the bush to display properly.
OMG you are a genius sir. Thank you so much!  I would prefer it to affect only the player character but I can always adjust the other character sprites. I'm redoing them all anyway.


I'm not concerned about the Bush.

Thanks again.
Ok small problem. The Sprite looks perfect now and collision with other objects also works except there is an invisible tile above the character that stops you from walking close to walls above the character. In other words the world is offset as well as the character.
This is just a lead for you to find your solution, it's not a code to copy/paste and expect it to work.


If you simply change this and nothing else you will for sure have issues.
I've worked out how to fix it. Thanks. 

Original thread: https://forums.rpgmakerweb.com/threads/how-mv-reads-sprites.58873/