Status
Not open for further replies.

vigokrell

Warper
Member
Joined
May 6, 2016
Messages
2
Reaction score
0
First Language
English
Primarily Uses
Hi guys,

Absolute noob to all of this stuff.  Just figured out how to up-rez the game to native resolution (1920x1080), and had no trouble scaling my battle sprites to much larger size (via gimp), and they look great.  But I can't for the life of me figure out how to scale the weapon sprites to match the attacks.  If I just rescale the weapons.png to the larger size like I did with the SV actor.png, doesn't work at all.

I searched the web for an hour buy couldn't find anything on it.  Forgive me if this is an idiotic question, I just got this program a few days ago, and it has quite a learning curve.  Is there any plugin or method to fix this problem so I can get larger weapons to scale with my larger battlers?
 

OKIComputer

Villager
Member
Joined
Mar 20, 2016
Messages
17
Reaction score
8
First Language
English
Primarily Uses
So let me begin by saying I have no idea what I'm doing. I've been messing around with RPGMaker MV for about 2-3 weeks. But I had pretty much the exact problem you had, and did the googling, and that's how I found your post.


Big warning: this might have unforseen consequences, so make copies of your files or put comments in the script files accordingly so you can go in and edit them. Also, if you have no idea how to edit a javascript file in notepad, it is way beyond my abilities to explain it to you accurately. I'm still figuring this stuff out.


I don't think there's a good stand-alone plug-in to do this. However, if you have larger sprites, you can also upscale your animations by going into the javascript for the game and altering some values (height/width values, etc). I have battler sprites that are 125% the normal size (80x80 instead of 64x64), so I first (as a test) upsized the weapon animation spritesheets by 125%.


First, go into rpg_sprites.js and find this chunk of code:


Sprite_Weapon.prototype.updateFrame = function() {
    if (this._weaponImageId > 0) {
        var index = (this._weaponImageId - 1) % 12;
        var w = 96;
        var h = 64;

        var sx = (Math.floor(index / 6) * 3 + this._pattern) * w;
        var sy = Math.floor(index % 6) * h;
        this.setFrame(sx, sy, w, h);
    } else {
        this.setFrame(0, 0, 0, 0);
    }
};


The parts I bolded are the width and height dimensions of the weapon spritesheet. A normal weapon is 96 x 64. change those values to what your new weapon sheet uses.


Now the PROBLEM is that these new giant weapons aren't going to anchor to the sprites correctly. The game uses offset x and y values to figure out where the sprites hands are, but those are based on teeny tiny sprites rather than your big beefy boys.


So you're going to have to change a second value. Find this chunk of code


Sprite_Weapon.prototype.initMembers = function() {
    this._weaponImageId = 0;
    this._animationCount = 0;
    this._pattern = 0;
    this.anchor.x = 0.5;
    this.anchor.y = 1;
    this.x = -16;
};


Now the way I think this works after testing is that that X value you see is an offset value, along the x-y axis - it's offsetting the weapon sprite by -16 pixels on the x axis. You want to play with this value until the sprites sit in your characters hand.


In addition, you want to add the following:


this.y = -15;


(use whatever number you want besides -15, that's just what I'm using for my game!)


where y is the number you want, just like this.x. It works the exact same way, but for the y axis. Ordinarily, there is no y offset, but if you add this it creates one.


There might be a better way to do this, but this is my novice way to accomplish this. I hope it's helpful.
 

vigokrell

Warper
Member
Joined
May 6, 2016
Messages
2
Reaction score
0
First Language
English
Primarily Uses
God bless you, you glorious magnificent bastard!  It worked like a charm.  AMAZING that no one has made an easy fix for something this obvious!  Thank you so much for taking the time to write all that out, you are a prince among men.  Cheers!
 

Chantal

Warper
Member
Joined
Oct 3, 2012
Messages
4
Reaction score
1
First Language
Dutch
Primarily Uses
RMMV
Thank you so very much!
I'd also been googling for a very long time before stumbling across this post. Works perfectly :D
 
Status
Not open for further replies.

Latest Threads

Latest Posts

Latest Profile Posts

unknown.png

A sketch of a character for an upcoming chapter. I am pre-preparing the heck out of this one and future chapters, don't want to spend time figuring the story out again. :blush:
Today *Fix the game UI
RMMZ maxRows make me tired.
The game supports real-time language switching (really interesting).
8laFKAa.png


jBYDFzZ.png


lYbvPth.png

mY99lgU.png

Swag collecting in the new randomly generated area. Now the mini map also shows the randomly generated features... And even illustrates the whole "bubble" system" that I made to manage memory... Though that part's inadvertent. We'll just call that "the fog of war"... Yes, that's what we'll do. Nobody will be the wiser! :kaopride:
not me being not lazy for 5 seconds and drawing another char portrait (her name is hazel)
its_hazel.png
Been a while since the last time I made a song remix. Had a blast making this

Forum statistics

Threads
110,456
Messages
1,053,452
Members
143,548
Latest member
Dolidodzik
Top