Animation Sheet Formats

Discussion in 'Resource Support' started by Rishi Raj Jain, Mar 6, 2018.

  1. Rishi Raj Jain

    Rishi Raj Jain Pokemon MV Maker Veteran

    Messages:
    204
    Likes Received:
    47
    Location:
    India
    First Language:
    English
    Primarily Uses:
    RMMV
    How big Animation sheet (Move animations not character animation) can we import in Rpg Maker MV, a single animation image is 192×192 pixel there a already many size like 5X5 animation sheet, 5×6 animation sheet, etc.

    But I'm not able to import 7×7 (1344×1344 pixel) animation sheet.
     
    Last edited: Mar 7, 2018
    #1
  2. Shaz

    Shaz Veteran Veteran

    Messages:
    37,810
    Likes Received:
    11,519
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    Animation sheets (as used in the Animations tab) can only be 5 across, and I think up to 20 down. Your 7x7 is too many across.
     
    #2
  3. Rishi Raj Jain

    Rishi Raj Jain Pokemon MV Maker Veteran

    Messages:
    204
    Likes Received:
    47
    Location:
    India
    First Language:
    English
    Primarily Uses:
    RMMV
    Thank you @Shaz that was very helpful, but maybe MV is not able to read 7 across but why it adding the same number of blank box when I import it in Animation.

    In short I get a 49 animation strip with 14 Blankspaces, when I import a 7×7 animation sheet
     
    #3
  4. Shaz

    Shaz Veteran Veteran

    Messages:
    37,810
    Likes Received:
    11,519
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    I'm not really sure, not being able to see into the editor code. In MV an animation can use two animation sheets. At a guess, I'd say you might be getting 35 images from your 7x7 animation sheet (the 5 allowable columns x your 7 rows) and extra blank rows because you don't have a second animation sheet selected.

    If you read the help file (F1 from the editor) and go to Documentation > Asset Standards > Image Assets > Animation Patters, you'll find this:

     
    #4
  5. slimmmeiske2

    slimmmeiske2 Little Red Riding Hood Moderator

    Messages:
    5,685
    Likes Received:
    4,162
    Location:
    Belgium
    First Language:
    Dutch
    Primarily Uses:
    RMXP

    Rishi Raj Jain, I've moved this topic as this has nothing to do with sprite sheet formats.

     
    #5
  6. gstv87

    gstv87 Veteran Veteran

    Messages:
    1,800
    Likes Received:
    829
    First Language:
    Spanish
    Primarily Uses:
    RMVXA
    Ace
    Code:
    def animation_set_sprites(frame)
        cell_data = frame.cell_data
        @ani_sprites.each_with_index do |sprite, i|
          next unless sprite
          pattern = cell_data[i, 0]
          if !pattern || pattern < 0
            sprite.visible = false
            next
          end
          sprite.bitmap = pattern < 100 ? @ani_bitmap1 : @ani_bitmap2
          sprite.visible = true
          sprite.src_rect.set(pattern % 5 * 192, pattern % 100 / 5 * 192, 192, 192) #<<<<<<<<<<<<<<<<<<
          if @ani_mirror
            sprite.x = @ani_ox - cell_data[i, 1]
            sprite.y = @ani_oy + cell_data[i, 2]
            sprite.angle = (360 - cell_data[i, 4])
            sprite.mirror = (cell_data[i, 5] == 0)
          else
            sprite.x = @ani_ox + cell_data[i, 1]
            sprite.y = @ani_oy + cell_data[i, 2]
            sprite.angle = cell_data[i, 4]
            sprite.mirror = (cell_data[i, 5] == 1)
          end
          #sprite.z = self.z + 300 + i
          sprite.z = self.z + i
          sprite.ox = 96
          sprite.oy = 96
          sprite.zoom_x = cell_data[i, 3] / 100.0
          sprite.zoom_y = cell_data[i, 3] / 100.0
          sprite.opacity = cell_data[i, 6] * self.opacity / 255.0
          sprite.blend_type = cell_data[i, 7]
        end
    MV
    Code:
    Sprite_Animation.prototype.updateCellSprite = function(sprite, cell) {
        var pattern = cell[0];
        if (pattern >= 0) {
            var sx = pattern % 5 * 192;
            var sy = Math.floor(pattern % 100 / 5) * 192; <<<<<<<<<<<<<
            var mirror = this._mirror;
            sprite.bitmap = pattern < 100 ? this._bitmap1 : this._bitmap2;
            sprite.setFrame(sx, sy, 192, 192);
            sprite.x = cell[1];
            sprite.y = cell[2];
            if (this._mirror) {
                sprite.x *= -1;
            }
            sprite.rotation = cell[4] * Math.PI / 180;
            sprite.scale.x = cell[3] / 100;
            if ((cell[5] && !mirror) || (!cell[5] && mirror)) {
                sprite.scale.x *= -1;
            }
            sprite.scale.y = cell[3] / 100;
            sprite.opacity = cell[6];
            sprite.blendMode = cell[7];
            sprite.visible = this._target.visible;
        } else {
            sprite.visible = false;
        }
    };
    

    *cropping a half-image from a larger image* requires a set of coordinates (X,Y,Width,Height) (and, the actual bitmap file of course)
    just modify the coordinates and it should read any grid size you throw at it.
     
    #6

Share This Page