How MV Reads Sprites

Nova Toby

Veteran
Veteran
Joined
Mar 14, 2012
Messages
31
Reaction score
7
First Language
English
Primarily Uses
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
 

Victor Sant

Veteran
Veteran
Joined
Mar 17, 2012
Messages
1,694
Reaction score
1,452
First Language
Portuguese
Primarily Uses
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.
 
Last edited by a moderator:

Nova Toby

Veteran
Veteran
Joined
Mar 14, 2012
Messages
31
Reaction score
7
First Language
English
Primarily Uses
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.
 

Nova Toby

Veteran
Veteran
Joined
Mar 14, 2012
Messages
31
Reaction score
7
First Language
English
Primarily Uses
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.
 
Last edited by a moderator:

Victor Sant

Veteran
Veteran
Joined
Mar 17, 2012
Messages
1,694
Reaction score
1,452
First Language
Portuguese
Primarily Uses
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.
 

Nova Toby

Veteran
Veteran
Joined
Mar 14, 2012
Messages
31
Reaction score
7
First Language
English
Primarily Uses
I've worked out how to fix it. Thanks. 
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,867
Messages
1,017,061
Members
137,575
Latest member
akekaphol101
Top