Save-Point
MGC ISO Engine + Extra Movement Frames compatibility - Printable Version

+- Save-Point (https://www.save-point.org)
+-- Forum: Games Development (https://www.save-point.org/forum-4.html)
+--- Forum: Code Support (https://www.save-point.org/forum-20.html)
+--- Thread: MGC ISO Engine + Extra Movement Frames compatibility (/thread-4668.html)



MGC ISO Engine + Extra Movement Frames compatibility - Morrigan Aensland - 05-26-2013

Hi guys, I'm a newbie here!
I'm using VX ACE and I would like to use MGC ISO Engine in addition to Extra Movement Frames script (done by modern algebra) ; I use the last one 'cause I'm using only 16frames-movement characters (in order to make their movements more smooth), it works fine in non-ISO maps, otherwise in ISO-maps I've got two problems:
- Character sprite-set width: I've just correct this issue by modifying "--- MODIFIED CLASSES ---" script module, adjusting the last class definition as follows (see bitmap.width):
Code:
#====================================================================
# MGC ISO Engine
# v.1.0
# Auteur : MGC
#====================================================================
# ** Sprite_Character
#--------------------------------------------------------------------
# Version de classe : 1.0
#====================================================================
class Sprite_Character < Sprite_Base
   #--------------------------------------------------------------------------
   # * Alias : gestion de la touche F12
   #--------------------------------------------------------------------------
   unless @already_aliased_mgc_iso
    alias update_mgc_iso update
    alias update_bitmap_mgc_iso update_bitmap
    @already_aliased_mgc_iso = true
   end
   #--------------------------------------------------------------------------
   # * Frame Update
   #--------------------------------------------------------------------------
   def update
    unless $game_system.mgc_iso
       update_mgc_iso
       return
    end
    update_mgc_iso
    self.tone = @character.in_shadows ? Constants::TONE_BASIC_SHADOW :
    Constants::TONE_BASIC
   end
   #--------------------------------------------------------------------------
   # * Update Transfer Origin Bitmap
   #--------------------------------------------------------------------------
   def update_bitmap
    unless $game_system.mgc_iso
       update_bitmap_mgc_iso
       return
    end
       if @tile_id != @character.tile_id or
          @character_name != @character.character_name or
          @character_index != @character.character_index
         @tile_id = @character.tile_id
         @character_name = @character.character_name
         @character_index = @character.character_index
         if @tile_id > 0
           sx = (@tile_id / 128 % 2 * 8 + @tile_id % 8) * 32;
           sy = @tile_id % 256 / 8 % 16 * 32;
           self.bitmap = tileset_bitmap(@tile_id)
           self.src_rect.set(sx, sy, 32, 32)
           self.ox = 16
           self.oy = 32
         else
         if @character_name == ""
           @character.ground = true
         end
         self.bitmap = Cache.character(@character_name)
         sign = @character_name[/^[\!\$]./]
         if sign != nil and sign.include?('$')
           @cw = bitmap.width / 16
           @ch = bitmap.height / 4
         else
           @cw = bitmap.width / 64
           @ch = bitmap.height / 8
         end
         self.ox = @cw / 2
         self.oy = @ch - (@character.ground ? 11 : 0)
         end
       oh = @character.ground ? 32 : 16
       if @character_name == ""
          @character.height = 0
          @character.real_height = 0
        else
          @character.height = (@ch - oh) / 16
          @character.real_height = @ch - oh
        end
        @character.real_width = @cw
      end
   end
end
- Character sprite movement: in any ISO-map, the character can move but its sprites-cycle don't run correctly and it appears almost motionless. Cry I don't know how to correct that, please could you help me? I'd be grateful!!

Thank you,
Morrigan Blushing + Cheery


RE: MGC ISO Engine + Extra Movement Frames compatibility - evindom - 10-26-2013

Apologies for the Necropost; I swear I won't make a habit of it. Your second problem is caused by how Modern Algebra's script deals with the movement cycle. MA's script takes the first (or fifth, or whatever one you set...) frame of animation and repeats it every other frame. For example, using the default settings the script will play the first frame, then the second, then the first, then the third, and so on until it runs through the entire graphic. The result is it looks like your character is floating when used with really large (i.e. 16 frame) sprites. I'm pretty sure it's set up like that to make it easier to port XP sprites to VX or VXA.

To fix the problem you either have to modify MA's script (which I have idea how to do) or use a different animation script such as Victor Sant's which can be found at http://victorscripts.wordpress.com/rpg-maker-vx-ace/utility-scripts/multi-frames/. You'll need to install the basic module as well for this to work, and I've thus far had no luck making the Character Control or Diagonal Movement scripts work with MGC Iso but the Extended Frames script definitely works with the mod you've made.

Hope that helps, and thanks for posting your script fix, it saved me a lot of headache.