Enlarging Weapons1 File under System File

● ARCHIVED · READ-ONLY
Started by Grunwave 7 posts View original ↗
  1. I want to make my SV Actors larger for multiple reasons, but their weapons are too small then.

    When I enlarge the Weapons1 File the MV engine misreads the component graphics.

    Can anyone instruct me how to put larger weapons into my game?



    Thank you in advance,

    GEA
  2. The weapon sprite's pattern size is part of the game's code. It can be changed with a plugin. Feel free to try the plugin below.
    Code:
    // WeaponSize.js
    // Created on 9/27/2018
    
    /*:
    * @plugindesc This plugin is meant to allow the game
    * creator to use weapon sprites of a nonstandard size.
    * @author Yethwhinger
    *
    * @help This plugin allows the use of weapon sprites that
    * do not conform to the usual 96-pixel pattern width and
    * 64-pixel pattern height. Weapon patterns still need to
    * be laid out in columns that are six weapons tall
    * and three patterns wide. Weapons1 and Weapons2 images
    * still need to have 2 weapon columns and Weapons3 is
    * still only 1 column.
    */
    
    //----------------------------
    // Changes to Sprite_Weapon
    //----------------------------
    
    Sprite_Weapon.prototype.updateFrame = function () {
        if (this._weaponImageId > 0) {
            var index = (this._weaponImageId - 1) % 12;
            var w = this.patternWidth();
            var h = this.patternHeight();
            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);
        }
    };
    
    Sprite_Weapon.prototype.patternWidth = function () {
        var pageId = Math.floor((this._weaponImageId - 1) / 12) + 1;
        if (pageId == 3) {
            return this.bitmap.width / 3;
        } else {
            return this.bitmap.width / 6;
        }
    };
    
    Sprite_Weapon.prototype.patternHeight = function () {
        return this.bitmap.height / 6;
    };
  3. Awesome, will check it out. Thank you.
  4. Are you enlarging the image by random expand dragging or by using a set % in resizing? because i use a 150% resized weapon sheet and it works seamlessly, and i simply reposition the weapon graphics inside its corresponding column if they are mis aligned.
    You have to work in multiples of the base size for it to work.
  5. BK-tdm said:
    Are you enlarging the image by random expand dragging or by using a set % in resizing? because i use a 150% resized weapon sheet and it works seamlessly, and i simply reposition the weapon graphics inside its corresponding column if they are mis aligned.
    You have to work in multiples of the base size for it to work.


    I could have easily been resizing them improperly. The base size is 48, correct?
  6. 96x64 per single weapon image, which gives you 288x64 for a single 3 frame weapon animation, sheet size is 576x384.
    6 rows x 2 columns, 12 weapons total.