Sujet n°3258
Posté par Alex le 21 Mar - 23:36 (2009)
Titre : Anti Gros Pixel
[Script] Anti Gros Pixel

Ce script, permet de ne plus avoir l'effet gros pixel, et donc de plus ressembler à Pokémon.

-De quoi ai-je besoin ?

Vous aurez besoin:
  • Des script fournis
  • D'un interrupteur libre
  • De la dll du Mode7 (Téléchargement: Cliquez Ici à mettre dans la racine du jeu)
-Oui, et ensuite ?

Maintenant, placer les 5 script qui suivent, au dessus de Main:
Script 1:

Spoiler
 
Code:


#============================================================================
# This script emulates the snes mode 7 feature.
# Written by MGCaladtogel
# Neo Mode 7 - 12/05/08
#----------------------------------------------------------------------------
# Instructions :
# You must add to the map's name :
#- [NM7] : to activate Neo Mode 7
#- [#XX] : XX is the angle of slant (in degree) : 0 -> 89
#- [%XXX]: XXX is the angle of rotation (in degree) : 0 -> 359
#- [L]   : to enable map looping
#- [A]   : animated autotiles (with 4 patterns)
#- [H]   : to have a white horizon
#- [RX]  : X = 1 -> high resolution (default)
#        : X = 2 -> medium resolution (to increase performance)
#        : X = 3 -> low resolution (to increase performance)
#- [F]   : activate the filer (to increase performance) : strongly recommanded
#
# OR :
# see the "$mode7_maps_settings" below (l.68) to prepare your settings
#----------------------------------------------------------------------------
# - To set a new angle of slant (0~89) :
# $scene.spriteset.tilemap.set_alpha(new angle)
# To slide progressively into a new angle of slant :
# $scene.spriteset.tilemap.to_alpha(new angle, speed)
# To increase/decrease the slant :
# $scene.spriteset.tilemap.increase_alpha(value)
# - To set a new angle of rotation (0~379) :
# $scene.spriteset.tilemap.set_theta(new angle)
# To slide progressively into a new angle of rotation :
# $scene.spriteset.tilemap.to_theta(angle, speed, dir)
# To increase/decrease the angle of rotation :
# $scene.spriteset.tilemap.increase_theta(value)
# - To set a new zoom level  :
# $scene.spriteset.tilemap.set_zoom(new value)
# To slide progressively into a new zoom level :
# $scene.spriteset.tilemap.to_zoom(value, speed)
# To increase/decrease the zoom level :
# $scene.spriteset.tilemap.increase_zoom(value)
# - The pivot's value (32~480) represents the screenline's number considered
# as the axis for map trasformations.
# By default its value is 256.
# To set a new value :
# $scene.spriteset.tilemap.set_pivot(new value)
# To slide progressively into a new pivot's value :
# $scene.spriteset.tilemap.to_pivot(value, speed)
# To increase/decrease the pivot's value :
# $scene.spriteset.tilemap.increase_pivot(value)
# - Pivot's value and zoom level are saved from
# one map to another. You have to reinitialize
# them manually if you need it.

# - To set the altitude of a vertical event :
# add a comment in the event's commands list with : "Heigth X", where X is the
# height value ("Heigth 2" will draw the event 64 pixels above its original
# position - you can use floats)
# - To set the altitude of the player :
# use : $game_player.height = X
#============================================================================
# The map is drawn from all the tiles of the three layers that do not have a
# terrain_tag's value of 1 or 2.
# The other tiles (terrain_tag = 1 or 2) form elements that are drawn vertically,
# like the 3rd-layer elements in the old version.
# The 2 terrains ID used to form vertical elements
$terrain_tags_vertical_tiles = [1, 2] # You can modify these values
# To access maps names
$data_maps = load_data("Data/MapInfos.rxdata")
$neoM7_maps_settings = {}
# Prepare your own settings for mode7 maps
# Just put the first parameter in a map's name
# For example :
$neoM7_maps_settings["Worldmap"] = ["#60", "L", "A", "H", "F"]
# -> will  be called  when "Worldmap" is included in the name
$neoM7_maps_settings["Smallslant"] = ["#20", "A", "F"]
# Add any number of settings you want

# enable/disable mode7 for mode7 maps (not on the fly, just when the map is loaded), enabled by default
$enable_neoM7_number = 17 # switch number : change this value !

# - Number of directions for the player on mode 7 maps :
$player_directions = 4 # you can change this value !
# the character set used in that case must have the default name + "_m7"
# - To set the number of directions of a vertical event :
# add a comment in the event's commands list with : "Directions X"

# rows of character sets : the first represents the character that faces the screen,
# then the character rotates in the trigonometric direction
$dirs = {}
# 4 directions :
$dirs[4] = [0, 2, 3, 1]
# 8 directions :
$dirs[8] = [0, 6, 2, 7, 3, 5, 1, 4]
# you can change these values or add directions

#============================================================================
# Neo Mode 7
# Written by MGCaladtogel
# 12/05/08
#
# Part 1
#
# class Game_Switches
#   initialize                : aliased
#
# class Game_System
#   initialize                : aliased
#   neoM7_reset               : new method
#
# class Game_Temp
#   initialize                : aliased
#
#============================================================================

#============================================================================
# ■ Game_Switches
#============================================================================

class Game_Switches
  #--------------------------------------------------------------------------
  # * Aliased methods (F12 compatibility)
  #--------------------------------------------------------------------------
  if !@already_aliased
    alias initialize_neoM7_game_player initialize
    @already_aliased = true
  end
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    initialize_neoM7_game_player
    self[$enable_neoM7_number] = true
  end
end

#============================================================================
# ■ Game_System
#----------------------------------------------------------------------------
# Add attributes to this class
#============================================================================

class Game_System
  #--------------------------------------------------------------------------
  # * Aliased methods (F12 compatibility)
  #--------------------------------------------------------------------------
  if !@already_aliased
    alias initialize_neoM7_game_system initialize
    @already_aliased = true
  end
  #--------------------------------------------------------------------------
  # * Attributes
  #--------------------------------------------------------------------------
  attr_accessor :neoM7 # true : neo mode 7
  attr_accessor :neoM7_loop # true : map looping in x and y
  attr_accessor :neoM7_animated # true : animated autotiles for neoM7 maps
  attr_accessor :neoM7_white_horizon # true : white line horizon for neoM7 maps
  attr_accessor :neoM7_alpha # angle of slant (in degree)
  attr_accessor :neoM7_theta # angle of rotation (in degree)
  attr_accessor :neoM7_horizon # horizon's distance
  attr_accessor :neoM7_resolution # 1:max, 2:med, 3:low
  attr_accessor :neoM7_filter # true : enable filter (increase perf., blurry when moving)
  attr_accessor :neoM7_pivot # screenline's number of the slant/rotation pivot
  attr_accessor :neoM7_zoom # zoom level (percentage, 100 = no zoom)
  attr_accessor :neoM7_center_y # center screen y-coordinate (depend on pivot)
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    initialize_neoM7_game_system
    self.neoM7 = false
    self.neoM7_loop = false
    self.neoM7_animated = false
    self.neoM7_white_horizon = false
    self.neoM7_alpha = 0
    self.neoM7_theta = 0
    self.neoM7_horizon = 960
    self.neoM7_resolution = 1
    self.neoM7_filter = false
    neoM7_reset
  end
  #--------------------------------------------------------------------------
  # * Reset zoom, pivot, and screen's center_y
  #--------------------------------------------------------------------------
  def neoM7_reset
    self.neoM7_pivot = 256
    self.neoM7_zoom = 100
    self.neoM7_center_y = Game_Player::CENTER_Y
  end
end

#============================================================================
# ■ Game_Temp
#----------------------------------------------------------------------------
# Add attributes to this class / Avoid using too many global variables
#============================================================================

class Game_Temp
  #--------------------------------------------------------------------------
  # * Aliased methods (F12 compatibility)
  #--------------------------------------------------------------------------
  if !@already_aliased
    alias initialize_neoM7_game_temp initialize
    @already_aliased = true
  end
  #--------------------------------------------------------------------------
  # * Attributes
  #--------------------------------------------------------------------------
  attr_accessor :pivot # screenline's number of the pivot
  attr_accessor :pivot_map # same as pivot (depend of resolution)
  attr_accessor :neoM7_height_limit # horizon
  attr_accessor :height_limit_sprites # horizon for vertical sprites
  attr_accessor :distance_h # distance between the center of the map (halfwidth, pivot) and the point of view
  attr_accessor :slope_value # intermediate value used to calculate x-coordinate
  attr_accessor :slope_value_map # same as slope_value (depend of resolution) (* 262144)
  attr_accessor :corrective_value # intermediate value used to calculate x-coordinate
  attr_accessor :corrective_value_map # same as corrective_value (depend of resolution) (* 262144)
  attr_accessor :cos_alpha # cosinus of the angle of slant (* 4096)
  attr_accessor :sin_alpha # sinus of the angle of slant (* 4096)
  attr_accessor :cos_theta # cosinus of the angle of rotation (* 4096)
  attr_accessor :sin_theta # sinus of the angle of rotation (* 4096)
  attr_accessor :distance_p # distance between the center of the map (halfwidth, pivot) and the projection plane surface
  attr_accessor :zoom_map # zoom level (map) (percentage * 4096)
  attr_accessor :zoom_sprites # same as zoom_map (ratio)
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    initialize_neoM7_game_temp
    self.pivot = 0
    self.pivot_map = 0
    self.neoM7_height_limit = 0
    self.height_limit_sprites = 0
    self.distance_h = 0
    self.slope_value = 0.0
    self.slope_value = 0
    self.corrective_value = 0.0
    self.corrective_value_map = 0
    self.cos_alpha = 0
    self.sin_alpha = 0
    self.cos_theta = 0
    self.sin_theta = 0
    self.distance_p = 0
    self.zoom_map = 1
    self.zoom_sprites = 1.0
  end
end






Script 2:

Spoiler
 
Code:


#============================================================================
# Neo Mode 7
# Written by MGCaladtogel
# 12/05/08
#
# Part 2
#
# class Game_Map
#   scroll_down               : aliased
#   scroll_left               : aliased
#   scroll_right              : aliased
#   scroll_up                 : aliased
#   valid?                    : aliased
#   passable?                 : aliased
#   setup                     : aliased
#
# class Game_Character
#   initialize                : aliased
#   update                    : aliased
#
# class Game_Event
#   check_commands            : new method
#   refresh                   : aliased
#
# class Game_player
#   initialize                : aliased
#   center                    : aliased
#   update                    : aliased
#
#============================================================================

#============================================================================
# ■ Game_Map
#----------------------------------------------------------------------------
# Methods modifications to handle map looping
#============================================================================

class Game_Map
  #--------------------------------------------------------------------------
  # * Aliased methods (F12 compatibility)
  #--------------------------------------------------------------------------
  if !@already_aliased
    alias scroll_down_neoM7_game_map scroll_down
    alias scroll_left_neoM7_game_map scroll_left
    alias scroll_right_neoM7_game_map scroll_right
    alias scroll_up_neoM7_game_map scroll_up
    alias valid_neoM7_game_map? valid?
    alias passable_neoM7_game_map? passable?
    alias old_setup_neoM7 setup
    @already_aliased = true
  end
  #--------------------------------------------------------------------------
  # * Scroll Down
  #     distance : scroll distance
  #--------------------------------------------------------------------------
  def scroll_down(distance)
    if !$game_system.neoM7
      scroll_down_neoM7_game_map(distance)
      return
    end
    @display_y = @display_y + distance
  end
  #--------------------------------------------------------------------------
  # * Scroll Left
  #     distance : scroll distance
  #--------------------------------------------------------------------------
  def scroll_left(distance)
    if !$game_system.neoM7
      scroll_left_neoM7_game_map(distance)
      return
    end
    @display_x = @display_x - distance
  end
  #--------------------------------------------------------------------------
  # * Scroll Right
  #     distance : scroll distance
  #--------------------------------------------------------------------------
  def scroll_right(distance)
    if !$game_system.neoM7
      scroll_right_neoM7_game_map(distance)
      return
    end
    @display_x = @display_x + distance
  end
  #--------------------------------------------------------------------------
  # * Scroll Up
  #     distance : scroll distance
  #--------------------------------------------------------------------------
  def scroll_up(distance)
    if !$game_system.neoM7
      scroll_up_neoM7_game_map(distance)
      return
    end
    @display_y = @display_y - distance
  end
  #--------------------------------------------------------------------------
  # * Determine Valid Coordinates
  #     x          : x-coordinate
  #     y          : y-coordinate
  #   Allow the hero to go out of the map when map looping
  #--------------------------------------------------------------------------
  def valid?(x, y)
    if !$game_system.neoM7
      return (valid_neoM7_game_map?(x, y))
    end
    return true if $game_system.neoM7_loop
    return (x >= 0 and x < width and y >= 0 and y < height)
  end
  #--------------------------------------------------------------------------
  # * Determine if Passable
  #     x          : x-coordinate
  #     y          : y-coordinate
  #     d          : direction (0,2,4,6,8,10)
  #                  *  0,10 = determine if all directions are impassable
  #     self_event : Self (If event is determined passable)
  #--------------------------------------------------------------------------
  def passable?(x, y, d, self_event = nil)
    if !$game_system.neoM7
      return(passable_neoM7_game_map?(x, y, d, self_event))
    end
    unless valid?(x, y)
      return false
    end
    bit = (1 << (d / 2 - 1)) & 0x0f
    for event in events.values
      if event.tile_id >= 0 and event != self_event and
         event.x == x and event.y == y and not event.through
        if @passages[event.tile_id] & bit != 0
          return false
        elsif @passages[event.tile_id] & 0x0f == 0x0f
          return false
        elsif @priorities[event.tile_id] == 0
          return true
        end
      end
    end
    for i in [2, 1, 0]
      tile_id = data[x % width, y % height, i] # handle map looping
      if tile_id == nil
        return false
      elsif @passages[tile_id] & bit != 0
        return false
      elsif @passages[tile_id] & 0x0f == 0x0f
        return false
      elsif @priorities[tile_id] == 0
        return true
      end
    end
    return true
  end
  #--------------------------------------------------------------------------
  # * Setup
  #     map_id : map ID
  #--------------------------------------------------------------------------
  def setup(map_id)
    old_setup_neoM7(map_id)
    if !$game_switches[$enable_neoM7_number]
      $game_system.neoM7 = false
      $game_system.neoM7_loop = false
      $game_system.neoM7_animated = false
      $game_system.neoM7_white_horizon = false
      $game_system.neoM7_alpha = 0
      $game_system.neoM7_theta = 0
      $game_system.neoM7_horizon = 960
      $game_system.neoM7_resolution = 1
      $game_system.neoM7_filter = false
      return
    end
    map_data = $data_maps[$game_map.map_id]
    for keyword in $neoM7_maps_settings.keys
      if map_data.name2.include?(keyword)
        command_list = $neoM7_maps_settings[keyword]
        $game_system.neoM7 = map_data.name2.include?("[NM7]")
        $game_system.neoM7_loop = map_data.name2.include?("[L]")
        $game_system.neoM7_animated = map_data.name2.include?("[A]")
        $game_system.neoM7_white_horizon = map_data.name2.include?("[H]")
        $game_system.neoM7_filter = map_data.name2.include?("[F]")
        for command in command_list
          if command.include?("R")
            $game_system.neoM7_resolution = (command.slice(1, 1)).to_i
            $game_system.neoM7_resolution = [[$game_system.neoM7_resolution, 1].max, 3].min
          end
          if command.include?("#")
            $game_system.neoM7_alpha = (command.slice(1, 2)).to_i
            $game_system.neoM7_alpha = [[$game_system.neoM7_alpha, 0].max, 89].min
          end
          if command.include?("%")
            $game_system.neoM7_theta = (command.slice(1, 3)).to_i
            $game_system.neoM7_theta = [[$game_system.neoM7_theta, 0].max, 359].min
          end
        end
        return
      end
    end
    $game_system.neoM7 = map_data.name2.include?("[NM7]")
    $game_system.neoM7_loop = map_data.name2.include?("[L]")
    $game_system.neoM7_animated = map_data.name2.include?("[A]")
    $game_system.neoM7_white_horizon = map_data.name2.include?("[H]")
    $game_system.neoM7_filter = map_data.name2.include?("[F]")
    if $game_system.neoM7
      map_data.name2 =~ /\[R[ ]*([1-3]+)\]/i
      $game_system.neoM7_resolution = $1.to_i
      $game_system.neoM7_resolution = [[$game_system.neoM7_resolution, 1].max, 3].min
      map_data.name2 =~ /\[#[ ]*([00-99]+)\]/i
      $game_system.neoM7_alpha = $1.to_i
      $game_system.neoM7_alpha = [[$game_system.neoM7_alpha, 0].max, 89].min
      map_data.name2 =~ /\[%[ ]*([000-999]+)\]/i
      $game_system.neoM7_theta = $1.to_i
      $game_system.neoM7_theta = [[$game_system.neoM7_theta, 0].max, 359].min
    end
  end
end

#============================================================================
# ■ Game_Character
#----------------------------------------------------------------------------
# "update" method modifications to handle map looping
#============================================================================

class Game_Character
  #--------------------------------------------------------------------------
  # * Aliased methods (F12 compatibility)
  #--------------------------------------------------------------------------
  if !@already_aliased
    alias initialize_neoM7_game_character initialize
    alias update_neoM7_game_character update
    @already_aliased = true
  end
  #--------------------------------------------------------------------------
  # * Attributes
  #--------------------------------------------------------------------------
  attr_accessor           :x          
  attr_accessor :y
  attr_accessor :real_x
  attr_accessor :real_y
  attr_accessor :height # altitude
  attr_accessor :directions # number of directions
  attr_accessor :map_number_x # map's number with X-looping
  attr_accessor :map_number_y # map's number with Y-looping
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    initialize_neoM7_game_character
    self.height = 0.0
    self.map_number_x = 0
    self.map_number_y = 0
    self.directions = 4
  end
  #--------------------------------------------------------------------------
  # * Update : handle map looping
  #--------------------------------------------------------------------------
  def update
    if !$game_system.neoM7
      update_neoM7_game_character
      return
    end
    # if x-coordinate is out of the map
    if !(x.between?(0, $game_map.width - 1))
      difference = 128 * x - real_x
      if self.is_a?(Game_Player)
        # increase or decrease map's number
        self.map_number_x += difference / (difference.abs)
      end
      # x-coordinate is equal to its equivalent in the map
      self.x %= $game_map.width
      self.real_x = 128 * x - difference
    end
    # if y-coordinate is out of the map
    if !(y.between?(0, $game_map.height - 1))
      difference = 128 * y - real_y
      if self.is_a?(Game_Player)
        # increase or decrease map's number
        self.map_number_y += difference / (difference.abs)
      end
      # y-coordinate is equal to its equivalent in the map
      self.y %= $game_map.height
      self.real_y = 128 * y - difference
    end
    update_neoM7_game_character
  end
end

#==============================================================================
# ■ Game_Event
#----------------------------------------------------------------------------
# Add methods to handle altitude and directions number for vertical event
#============================================================================

class Game_Event < Game_Character
  #--------------------------------------------------------------------------
  # * Aliased methods (F12 compatibility)
  #--------------------------------------------------------------------------
  if !@already_aliased
    alias refresh_neoM7_game_character refresh
    @already_aliased = true
  end
  #--------------------------------------------------------------------------
  # * scan the event's commands list
  #     page : the scanned page (RPG::Event::Page)
  #--------------------------------------------------------------------------
  def check_commands(page)
    @height = 0.0
    command_list = page.list
    for k in 0..command_list.length - 2
      command = command_list[k]
      if (command.parameters[0].to_s).include?("Height")
        @height = (command.parameters[0][7,command.parameters[0].length-1]).to_f
      end
      if (command.parameters[0].to_s).include?("Directions")
        self.directions = (command.parameters[0][11,command.parameters[0].length-1]).to_i
      end
    end
  end
  #--------------------------------------------------------------------------
  # * scan the event's commands list of the current page when refreshed
  #--------------------------------------------------------------------------
  def refresh
    refresh_neoM7_game_character
    check_commands(@page) if @page != nil
  end
end

#============================================================================
# ■ Game_Player
#----------------------------------------------------------------------------
# Add attributes to have a well-working panorama's scrolling
#============================================================================

class Game_Player < Game_Character
  #--------------------------------------------------------------------------
  # * Aliased methods (F12 compatibility)
  #--------------------------------------------------------------------------
  if !@already_aliased
    alias initialize_neoM7_game_player initialize
    alias center_neoM7_game_player center
    alias update_neoM7_game_player update
    @already_aliased = true
  end
  #--------------------------------------------------------------------------
  # * Object Initialization : add "directions" attribute
  #--------------------------------------------------------------------------
  def initialize
    initialize_neoM7_game_player
    self.directions = $player_directions
  end
  #--------------------------------------------------------------------------
  # * Always center around the hero in mode 7
  #--------------------------------------------------------------------------
  def center(x, y)
    if !$game_system.neoM7
      center_neoM7_game_player(x, y)
      return
    end
    $game_map.display_x = x * 128 - CENTER_X
    $game_map.display_y = y * 128 - $game_system.neoM7_center_y
  end
  #--------------------------------------------------------------------------
  # * Frame Update : CENTER_Y replaced by $game_system.neoM7_center_y
  # to handle pivot's values different from 256
  #--------------------------------------------------------------------------
  def update
    if !$game_system.neoM7
      update_neoM7_game_player
      return
    end
    # Remember whether or not moving in local variables
    last_moving = moving?
    # If moving, event running, move route forcing, and message window
    # display are all not occurring
    unless moving? or $game_system.map_interpreter.running? or
           @move_route_forcing or $game_temp.message_window_showing
      # Move player in the direction the directional button is being pressed
      case Input.dir4
      when 2
        move_down
      when 4
        move_left
      when 6
        move_right
      when 8
        move_up
      end
    end
    # Remember coordinates in local variables
    last_real_x = @real_x
    last_real_y = @real_y
    super
    # If character moves down and is positioned lower than the center
    # of the screen
    if @real_y > last_real_y and @real_y - $game_map.display_y > $game_system.neoM7_center_y
      # Scroll map down
      $game_map.scroll_down(@real_y - last_real_y)
    end
    # If character moves left and is positioned more let on-screen than
    # center
    if @real_x < last_real_x and @real_x - $game_map.display_x < CENTER_X
      # Scroll map left
      $game_map.scroll_left(last_real_x - @real_x)
    end
    # If character moves right and is positioned more right on-screen than
    # center
    if @real_x > last_real_x and @real_x - $game_map.display_x > CENTER_X
      # Scroll map right
      $game_map.scroll_right(@real_x - last_real_x)
    end
    # If character moves up and is positioned higher than the center
    # of the screen
    if @real_y < last_real_y and @real_y - $game_map.display_y < $game_system.neoM7_center_y
      # Scroll map up
      $game_map.scroll_up(last_real_y - @real_y)
    end
    # If not moving
    unless moving?
      # If player was moving last time
      if last_moving
        # Event determinant is via touch of same position event
        result = check_event_trigger_here([1,2])
        # If event which started does not exist
        if result == false
          # Disregard if debug mode is ON and ctrl key was pressed
          unless $DEBUG and Input.press?(Input::CTRL)
            # Encounter countdown
            if @encounter_count > 0
              @encounter_count -= 1
            end
          end
        end
      end
      # If C button was pressed
      if Input.trigger?(Input::C)
        # Same position and front event determinant
        check_event_trigger_here([0])
        check_event_trigger_there([0,1,2])
      end
    end
  end
end 






Script 3:

Spoiler
 
Code:


#============================================================================
# Neo Mode 7
# Written by MGCaladtogel
# 12/05/08
#
# Part 3
#
# class Sprite
#   neoM7_x                   : new method
#   neoM7_y                   : new method
#   neoM7                     : new method
#   neoM7_zoom                : new method
#   on_screen_x               : new method
#   on_screen_y               : new method
#   neoM7_character_x         : new method
#   neoM7_character_y         : new method
#   neoM7_character           : new method
#
# class RPG::Sprite
#   animation_set_sprites     : redefined
#
# class Sprite_Character
#   update                    : aliased
#   refresh                   : aliased
#
# class Sprite_V              : new class
#
# class Spriteset_Map
#   initialize                : aliased
#   dispose                   : redefined
#   update                    : aliased
#
#============================================================================

#============================================================================
# ■ Sprite
#============================================================================

class Sprite
  #--------------------------------------------------------------------------
  # * Attributes
  #--------------------------------------------------------------------------
  attr_accessor :length # sprite's width
  attr_accessor :height # sprite's height
  #--------------------------------------------------------------------------
  # calculate x_coordinate in mode 7 for a vertical sprite
  #--------------------------------------------------------------------------
  def neoM7_x(x_map, y_map)
    x_map = 32 * x_map
    y_map = 32 * y_map
    y_init = $game_temp.zoom_sprites * (y_map - $game_temp.pivot - $game_map.display_y.to_i / 4)
    x_init = $game_temp.zoom_sprites * (x_map - 320 - $game_map.display_x.to_i / 4)
    y_intermediate = (((y_init * $game_temp.cos_theta -
    x_init * $game_temp.sin_theta).to_i) >> 12)
    x_intermediate = (((x_init * $game_temp.cos_theta +
    y_init * $game_temp.sin_theta).to_i) >> 12)
    y_int_2 = $game_temp.pivot + ($game_temp.distance_h * y_intermediate *
    $game_temp.cos_alpha) / ((($game_temp.distance_h) << 12) - y_intermediate *
    $game_temp.sin_alpha)
    return (320 + ($game_temp.slope_value * y_int_2 +
    $game_temp.corrective_value) * x_intermediate)
  end
  #--------------------------------------------------------------------------
  # calculate y_coordinate in mode 7 for a vertical sprite
  #--------------------------------------------------------------------------
  def neoM7_y(x_map, y_map)
    x_map = 32 * x_map
    y_map = 32 * y_map
    y_init = $game_temp.zoom_sprites * (y_map - $game_temp.pivot - $game_map.display_y.to_i / 4)
    x_init = $game_temp.zoom_sprites * (x_map - 320 - $game_map.display_x.to_i / 4)
    y_intermediate = (((y_init * $game_temp.cos_theta -
    x_init * $game_temp.sin_theta).to_i) >> 12)
    return ($game_temp.pivot + ($game_temp.distance_h * y_intermediate *
    $game_temp.cos_alpha) / ((($game_temp.distance_h) << 12) - y_intermediate *
    $game_temp.sin_alpha))
  end
  #--------------------------------------------------------------------------
  # calculate x and y coordinates in mode 7 for a vertical sprite
  #--------------------------------------------------------------------------
  def neoM7(x_map, y_map)
    x_map = 32 * x_map
    y_map = 32 * y_map
    y_init = $game_temp.zoom_sprites * (y_map - $game_temp.pivot - $game_map.display_y.to_i / 4)
    x_init = $game_temp.zoom_sprites * (x_map - 320 - $game_map.display_x.to_i / 4)
    y_intermediate = (((y_init * $game_temp.cos_theta -
    x_init * $game_temp.sin_theta).to_i) >> 12)
    x_intermediate = (((x_init * $game_temp.cos_theta +
    y_init * $game_temp.sin_theta).to_i) >> 12)
    self.y = $game_temp.pivot + ($game_temp.distance_h * y_intermediate *
    $game_temp.cos_alpha) / ((($game_temp.distance_h) << 12) - y_intermediate *
    $game_temp.sin_alpha)
    self.x = (320 + ($game_temp.slope_value * y +
    $game_temp.corrective_value) * x_intermediate)
  end
  #--------------------------------------------------------------------------
  # calculate the zoom level in mode 7 for a vertical sprite
  #--------------------------------------------------------------------------
  def neoM7_zoom(x_screen, y_screen)
    self.zoom_x = $game_temp.zoom_sprites * ($game_temp.slope_value * y +
    $game_temp.corrective_value)
    self.zoom_y = zoom_x
  end
  #--------------------------------------------------------------------------
  # check if value_x (in pixels) is on screen
  #--------------------------------------------------------------------------
  def on_screen_x(value_x)
    return (value_x.between?(- self.length / 2, 640 + self.length / 2))
  end
  #--------------------------------------------------------------------------
  # check if value_y (in pixels) is on screen
  #--------------------------------------------------------------------------
  def on_screen_y(value_y)
    return (value_y.between?($game_temp.height_limit_sprites, 480 + self.height))
  end
  #--------------------------------------------------------------------------
  # calculate x_coordinate in mode 7 for a character sprite
  #--------------------------------------------------------------------------
  def neoM7_character_x(x_screen, y_screen)
    y_init = $game_temp.zoom_sprites * (y_screen - $game_temp.pivot)
    x_init = $game_temp.zoom_sprites * (x_screen - 320)
    y_intermediate = (((y_init * $game_temp.cos_theta -
    x_init * $game_temp.sin_theta).to_i)>>12)
    x_intermediate = (((x_init * $game_temp.cos_theta +
    y_init * $game_temp.sin_theta).to_i)>>12)
    y_int_2 = $game_temp.pivot + ($game_temp.distance_h * y_intermediate *
    $game_temp.cos_alpha) / ((($game_temp.distance_h) << 12) - y_intermediate *
    $game_temp.sin_alpha)
    return (320 + ($game_temp.slope_value * y_int_2 +
    $game_temp.corrective_value) * x_intermediate)
  end
  #--------------------------------------------------------------------------
  # calculate y_coordinate in mode 7 for a character sprite
  #--------------------------------------------------------------------------
  def neoM7_character_y(x_screen, y_screen)
    y_init = $game_temp.zoom_sprites * (y_screen - $game_temp.pivot)
    x_init = $game_temp.zoom_sprites * (x_screen - 320)
    y_intermediate = (((y_init * $game_temp.cos_theta -
    x_init * $game_temp.sin_theta).to_i)>>12)
    return ($game_temp.pivot + ($game_temp.distance_h * y_intermediate *
    $game_temp.cos_alpha) / ((($game_temp.distance_h) << 12) - y_intermediate *
    $game_temp.sin_alpha))
  end
  #--------------------------------------------------------------------------
  # calculate x and y coordinates in mode 7 for a character sprite
  #--------------------------------------------------------------------------
  def neoM7_character(x_screen, y_screen)
    y_init = $game_temp.zoom_sprites * (y_screen - $game_temp.pivot)
    x_init = $game_temp.zoom_sprites * (x_screen - 320)
    y_intermediate = (((y_init * $game_temp.cos_theta -
    x_init * $game_temp.sin_theta).to_i)>>12)
    x_intermediate = (((x_init * $game_temp.cos_theta +
    y_init * $game_temp.sin_theta).to_i)>>12)
    self.y = $game_temp.pivot + ($game_temp.distance_h * y_intermediate *
    $game_temp.cos_alpha) / ((($game_temp.distance_h) << 12) - y_intermediate *
    $game_temp.sin_alpha)
    self.x = (320 + ($game_temp.slope_value * y +
    $game_temp.corrective_value) * x_intermediate)
  end
end

#============================================================================
# ■ RPG::Sprite
#============================================================================
module RPG
  class Sprite < ::Sprite
    #--------------------------------------------------------------------------
    # * Rewritten method : the sprite's zoom level is applied to its animations
    #--------------------------------------------------------------------------
    def animation_set_sprites(sprites, cell_data, position)
      for i in 0..15
        sprite = sprites[i]
        pattern = cell_data[i, 0]
        if sprite == nil or pattern == nil or pattern == -1
          sprite.visible = false if sprite != nil
          next
        end
        sprite.visible = true
        sprite.src_rect.set(pattern % 5 * 192, pattern / 5 * 192, 192, 192)
        if position == 3
          if self.viewport != nil
            sprite.x = self.viewport.rect.width / 2
            sprite.y = self.viewport.rect.height - 160
          else
            sprite.x = 320
            sprite.y = 240
          end
        else
          sprite.x = self.x - self.ox + self.src_rect.width / 2
          sprite.y = self.y - self.oy + self.src_rect.height / 2
          sprite.y -= self.src_rect.height / 4 if position == 0
          sprite.y += self.src_rect.height / 4 if position == 2
        end
        sprite.x += zoom_x * cell_data[i, 1]
        sprite.y += zoom_y * cell_data[i, 2]
        sprite.z = z
        sprite.ox = 96
        sprite.oy = 96
        sprite.zoom_x = zoom_x * cell_data[i, 3] / 100.0
        sprite.zoom_y = zoom_y * cell_data[i, 3] / 100.0
        sprite.angle = cell_data[i, 4]
        sprite.mirror = (cell_data[i, 5] == 1)
        sprite.opacity = cell_data[i, 6] * self.opacity / 255.0
        sprite.blend_type = cell_data[i, 7]
      end
    end
  end
end

#============================================================================
# ■ Sprite_Character
#----------------------------------------------------------------------------
# Calculate x-coordinate and y-coordinate for a neoM7 map 
#============================================================================

class Sprite_Character < RPG::Sprite
  #--------------------------------------------------------------------------
  # * Aliased methods (F12 compatibility)
  #--------------------------------------------------------------------------
  if !@already_aliased
    alias update_neoM7_sprite_character update
    @already_aliased = true
  end
  #--------------------------------------------------------------------------
  # * Update
  #--------------------------------------------------------------------------
  def update
    if !$game_system.neoM7
      update_neoM7_sprite_character
      return
    end
    super
    if @tile_id != @character.tile_id or
       @character_name != @character.character_name or
       @character_hue != @character.character_hue
      @tile_id = @character.tile_id
      @character_name = @character.character_name
      @character_hue = @character.character_hue
      if @tile_id >= 384
        self.bitmap = RPG::Cache.tile($game_map.tileset_name,
          @tile_id, @character.character_hue)
        self.src_rect.set(0, 0, 32, 32)
        self.ox = 16
        self.oy = 32
      else
        if @character.is_a?(Game_Player) and FileTest.exist?("Graphics/Characters/" +
          @character.character_name + "_m7.png")
          self.bitmap = RPG::Cache.character(@character.character_name + "_m7",
            @character.character_hue)
        else
          self.bitmap = RPG::Cache.character(@character.character_name,
            @character.character_hue)
        end
        @cw = bitmap.width / 4
        @ch = bitmap.height / @character.directions
        self.ox = @cw / 2
        self.oy = @ch
        # pivot correction (intersection between the map and this sprite)
        self.oy -= 4
      end
    end
    self.visible = (not @character.transparent)
    if @tile_id == 0
      sx = @character.pattern * @cw
      current_direction = (@character.direction - 2) / 2
      if $scene.spriteset != nil and $scene.spriteset.tilemap.is_a?(Tilemap_neoM7)
        directions_list = $dirs[@character.directions]
        list_size = directions_list.size
        current_direction = directions_list[(directions_list.index(current_direction) +
        (($scene.spriteset.tilemap.theta + (180 / list_size)) % 360) / (360 / list_size)) % list_size]
      end
      sy = current_direction * @ch
      self.src_rect.set(sx, sy, @cw, @ch)
      self.length = @cw
      self.height = @ch
    end
    x_intermediate = @character.screen_x
    y_intermediate = @character.screen_y - 4

    if $game_system.neoM7_loop
      diff_y = ($game_player.y - @character.y).to_i
      offset_y = ($game_map.height << 5) * (diff_y >= 0 ?
      (diff_y / ($game_map.height >> 1)) :
      (diff_y / ($game_map.height >> 1)) + 1)
      diff_x = ($game_player.x - @character.x).to_i
      offset_x = ($game_map.width << 5) * (diff_x >= 0 ?
      (diff_x / ($game_map.width >> 1)) :
      (diff_x / ($game_map.width >> 1)) + 1)
      neoM7_character(x_intermediate + offset_x, y_intermediate + offset_y)
    else
      neoM7_character(x_intermediate, y_intermediate)
    end
    if !on_screen_x(x) or !on_screen_y(y)
      self.opacity = 0
      return
    end
    neoM7_zoom(x, y)
    self.opacity = 255
    self.z = 4 * y
    self.y -= 32 * @character.height * zoom_y # height correction

    self.blend_type = @character.blend_type
    self.bush_depth = @character.bush_depth
    if @character.animation_id != 0
      animation = $data_animations[@character.animation_id]
      animation(animation, true)
      @character.animation_id = 0
    end
  end
end

#============================================================================
# ■ Sprite_V (Vertical Sprites)
#----------------------------------------------------------------------------
#  Sprites corresponding to the vertical elements formed by tiles
#============================================================================

class Sprite_V < Sprite
  attr_accessor :x_map # sprite's x_coordinates (in squares) (Float)
  attr_accessor :y_map # sprite's y_coordinates (in squares) (Float)
  attr_accessor :square_y # sprite's y_coordinates (in squares) (Integer)
  attr_accessor :priority # sprite's priority
  attr_accessor :animated # True if animated
  attr_accessor :list_bitmap # list of sprite's bitmaps (Bitmap)
  #--------------------------------------------------------------------------
  # * Update
  #--------------------------------------------------------------------------
  def update
    if $game_system.neoM7_loop
      diff_y = ($game_player.y - y_map).to_i
      offset_y = $game_map.height * (diff_y >= 0 ?
      (diff_y / ($game_map.height >> 1)) :
      (diff_y / ($game_map.height >> 1)) + 1)
      diff_x = ($game_player.x - x_map).to_i
      offset_x = $game_map.width * (diff_x >= 0 ?
      (diff_x / ($game_map.width >> 1)) :
      (diff_x / ($game_map.width >> 1)) + 1)
      neoM7(x_map + offset_x, y_map + offset_y)
    else
      neoM7(x_map, y_map)
    end
    if !on_screen_x(x) or !on_screen_y(y)
      self.opacity = 0
      return
    end
    neoM7_zoom(x, y)
    self.opacity = 255
    self.z = 4 * y + 32 * priority
  end
  #--------------------------------------------------------------------------
  # * Update bitmap for animation
  #     index  : 0..3 : animation's index
  #--------------------------------------------------------------------------
  def update_animated(index)
    self.bitmap = @list_bitmap[index]
  end
end

#============================================================================
# ■ Spriteset_Map
#----------------------------------------------------------------------------
#  Modifications to call a neoM7 map
#============================================================================

class Spriteset_Map
  #--------------------------------------------------------------------------
  # * Aliased methods (F12 compatibility)
  #--------------------------------------------------------------------------
  if !@already_aliased
    alias initialize_neoM7_spriteset_map initialize
    alias update_neoM7_spriteset_map update
    @already_aliased = true
  end
  #--------------------------------------------------------------------------
  # * Attributes
  #--------------------------------------------------------------------------
  attr_accessor :tilemap # just to be able to access the tilemap
  #--------------------------------------------------------------------------
  # * Initialize Object
  #   Rewritten to call a map with neoM7
  #--------------------------------------------------------------------------
  def initialize
    if !$game_system.neoM7
      initialize_neoM7_spriteset_map
      return
    end
    @viewport1 = Viewport.new(0, 0, 640, 480)
    @viewport2 = Viewport.new(0, 0, 640, 480)
    @viewport3 = Viewport.new(0, 0, 640, 480)
    @viewport2.z = 200
    @viewport3.z = 5000
    # neoM7 map
    @tilemap = Tilemap_neoM7.new(@viewport1, self)
    @panorama = Plane.new(@viewport1)
    # sprites drawn at the horizon's level have a negative z, and with a z value
    # of -100000 the panorama is still below
    @panorama.z = ($game_system.neoM7 ? -100000 : -1000)
    @fog = Plane.new(@viewport1)
    @fog.z = 3000
    @character_sprites = []
    for i in $game_map.events.keys.sort
      sprite = Sprite_Character.new(@viewport1, $game_map.events[i])
      @character_sprites.push(sprite)
    end
    @character_sprites.push(Sprite_Character.new(@viewport1, $game_player))
    @weather = RPG::Weather.new(@viewport1)
    @picture_sprites = []
    for i in 1..50
      @picture_sprites.push(Sprite_Picture.new(@viewport2,
        $game_screen.pictures[i]))
    end
    @timer_sprite = Sprite_Timer.new
    update
    update if $game_system.neoM7_filter
  end
  #--------------------------------------------------------------------------
  # * Dispose
  #--------------------------------------------------------------------------
  def dispose
    if @tilemap.tileset != nil
      @tilemap.tileset.dispose
      for i in 0..6
        @tilemap.autotiles[i].dispose
      end
    end
    @tilemap.dispose
    @panorama.dispose
    @fog.dispose
    for sprite in @character_sprites
      sprite.dispose
    end
    @weather.dispose
    for sprite in @picture_sprites
      sprite.dispose
    end
    @timer_sprite.dispose
    @viewport1.dispose
    @viewport2.dispose
    @viewport3.dispose
  end
  #--------------------------------------------------------------------------
  # * Update
  #--------------------------------------------------------------------------
  def update
    if !$game_system.neoM7
      update_neoM7_spriteset_map
      return
    end
    if @panorama_name != $game_map.panorama_name or
       @panorama_hue != $game_map.panorama_hue
      @panorama_name = $game_map.panorama_name
      @panorama_hue = $game_map.panorama_hue
      if @panorama.bitmap != nil
        @panorama.bitmap.dispose
        @panorama.bitmap = nil
      end
      if @panorama_name != ""
        @panorama.bitmap = RPG::Cache.panorama(@panorama_name, @panorama_hue)
      end
      Graphics.frame_reset
    end
    if @fog_name != $game_map.fog_name or @fog_hue != $game_map.fog_hue
      @fog_name = $game_map.fog_name
      @fog_hue = $game_map.fog_hue
      if @fog.bitmap != nil
        @fog.bitmap.dispose
        @fog.bitmap = nil
      end
      if @fog_name != ""
        @fog.bitmap = RPG::Cache.fog(@fog_name, @fog_hue)
      end
      Graphics.frame_reset
    end
    # update animated tiles each 20 frames
    if Graphics.frame_count % 20 == 0 and $game_system.neoM7_animated
      @tilemap.update_animated
    end
    @tilemap.update
    # to have a fluent panorama scrolling
    @panorama.ox = 6 * ((tilemap.theta * 4.0 / 3).to_i)
    @panorama.oy = - $game_temp.neoM7_height_limit
    @fog.zoom_x = $game_map.fog_zoom / 100.0
    @fog.zoom_y = $game_map.fog_zoom / 100.0
    @fog.opacity = $game_map.fog_opacity
    @fog.blend_type = $game_map.fog_blend_type
    @fog.ox = $game_map.display_x / 4 + $game_map.fog_ox
    @fog.oy = $game_map.display_y / 4 + $game_map.fog_oy
    @fog.tone = $game_map.fog_tone
    for sprite in @character_sprites
      sprite.update
    end
    @weather.type = $game_screen.weather_type
    @weather.max = $game_screen.weather_max
    @weather.ox = $game_map.display_x / 4
    @weather.oy = $game_map.display_y / 4
    @weather.update
    for sprite in @picture_sprites
      sprite.update
    end
    @timer_sprite.update
    @viewport1.tone = $game_screen.tone
    @viewport1.ox = $game_screen.shake
    @viewport3.color = $game_screen.flash_color
    @viewport1.update
    @viewport3.update
  end
end 






Script 4:

Spoiler
 
Code:


#============================================================================
# Neo Mode 7
# Written by MGCaladtogel
# 12/05/08
#
# Part 4
#
# class Scene_Map             : spriteset = attr_accessor
#
# class Bitmap
#   neoM7                     : new method
#   clean_limit               : new method
#
# class Data_Autotiles        : new class
#
# class Data_Vertical_Sprites : new class
#
# class RPG::Cache_Tile       : new class
#
# class RPG::Cache_Datamap    : new class
#
# class RPG::Cache_Tileset    : new class
#
# class RPG::Cache
#   self.autotile_base        : new method
#   self.save_autotile        : new method
#   self.load_autotile        : new method
#
# class RPG::MapInfo
#   name                      : redefined
#   name2                     : new method
#
#============================================================================

#============================================================================
# ■ Scene_Map
#============================================================================
class Scene_Map
  #--------------------------------------------------------------------------
  # * Attributes
  #--------------------------------------------------------------------------
  attr_accessor :spriteset # just need to access the spriteset
end

#============================================================================
# ■ Bitmap
#----------------------------------------------------------------------------
# Add neoM7 functions (dll calls)
#============================================================================

class Bitmap
  #--------------------------------------------------------------------------
  # mode 7 transformation
  #--------------------------------------------------------------------------
  def neoM7(function, tileset, data, map_width, map_height, off_x, off_y)
    raise RGSSError.new("Disposed bitmap") if disposed?
    func=Win32API.new("MGCmode7.dll", function, "llllllllllllllll", "")
    func.call(self.__id__, tileset.__id__, data.__id__, off_x, off_y,
    $game_temp.cos_alpha, $game_temp.sin_alpha, $game_temp.distance_h,
    $game_temp.pivot_map, $game_temp.slope_value_map,
    $game_temp.corrective_value_map, $game_temp.neoM7_height_limit,
    $game_temp.cos_theta, $game_temp.sin_theta, $game_temp.distance_p,
    $game_temp.zoom_map)
  end
  #--------------------------------------------------------------------------
  # delete pixels beyond the horizon
  #--------------------------------------------------------------------------
  def clean_limit(old_limit, new_limit)
    raise RGSSError.new("Disposed bitmap") if disposed?
    func=Win32API.new("MGCmode7.dll", "CleanHeightLimit", "lll", "")
    func.call(self.__id__, old_limit, new_limit)
  end
end

#============================================================================
# ■ Data_Autotiles
#----------------------------------------------------------------------------
# Creates the set of tiles from an autotile's file
#============================================================================

class Data_Autotiles < Bitmap
  # data list to form tiles from an atotiles file
  Data_creation = [[27,28,33,34],[5,28,33,34],[27,6,33,34],[5,6,33,34],
  [27,28,33,12],[5,28,33,12],[27,6,33,12],[5,6,33,12],[27,28,11,34],
  [5,28,11,34],[27,6,11,34],[5,6,11,34],[27,28,11,12],[5,28,11,12],
  [27,6,11,12],[5,6,11,12],[25,26,31,32],[25,6,31,32],[25,26,31,12],
  [25,6,31,12],[15,16,21,22],[15,16,21,12],[15,16,11,22],[15,16,11,12],
  [29,30,35,36],[29,30,11,36],[5,30,35,36],[5,30,11,36],[39,40,45,46],
  [5,40,45,46],[39,6,45,46],[5,6,45,46],[25,30,31,36],[15,16,45,46],
  [13,14,19,20],[13,14,19,12],[17,18,23,24],[17,18,11,24],[41,42,47,48],
  [5,42,47,48],[37,38,43,44],[37,6,43,44],[13,18,19,24],[13,14,43,44],
  [37,42,43,48],[17,18,47,48],[13,18,43,48],[13,18,43,48]]
  #--------------------------------------------------------------------------
  # * Attributes
  #--------------------------------------------------------------------------
  attr_accessor :number # autotile's number to identify it
  attr_accessor :animated # TRUE if the autotile is animated
  #--------------------------------------------------------------------------
  # * Initialize Object
  #     file   : autotiles file's bitmap (Bitmap)
  #     l      : 0..3 : pattern's number for animated autotiles
  #--------------------------------------------------------------------------
  def initialize(file, l)
    super(8*32, 6*32)
    create(file, l)
  end
  #--------------------------------------------------------------------------
  # * Create the tiles set
  #     file   : autotiles file's bitmap (Bitmap)
  #     l      : 0..3 : pattern's number for animated autotiles
  #--------------------------------------------------------------------------
  def create(file, l)
    l = (file.width > 96 ? l : 0)
    self.animated = (file.width > 96)
    for i in 0..5
      for j in 0..7
        data = Data_creation[8 * i + j]
        for number in data
          number -= 1
          m = 16 * (number % 6)
          n = 16 * (number / 6)
          blt(32 * j + m % 32, 32 * i + n % 32, file,
          Rect.new(m + 96 * l, n, 16, 16))
        end
      end
    end
  end
end

#============================================================================
# ■ Data_Vertical_Sprites
#----------------------------------------------------------------------------
# Create a list of vertical sprites for the three layers of a map
# "V" for "Vertical" in the script
# "num" for "number"
#============================================================================

class Data_Vertical_Sprites
  #--------------------------------------------------------------------------
  # * Attributes
  #--------------------------------------------------------------------------
  attr_accessor  :list_sprites_V # list of vertical sprites
  attr_accessor  :list_sprites_V_animated # list of animated vertical sprites
  #--------------------------------------------------------------------------
  # * A little method to compare terrain_tags
  #     value  : tile's ID
  #     num    : reference terrain_tag's value
  #--------------------------------------------------------------------------
  def suitable?(value, num)
    return ($game_map.terrain_tags[value] == num)
  end
  #--------------------------------------------------------------------------
  # * This algorithm scans each layer and create a sprites formed by tiles
  #   in contact
  #     viewport : Viewport
  #--------------------------------------------------------------------------
  def initialize(viewport)
    @viewport = viewport
    # lists initialization
    self.list_sprites_V = []
    self.list_sprites_V_animated = []
    # @num_tiles : list of tiles coordinates that form a vertical sprite
    @num_tiles = []
    # create copy of map's data
    @dataV = ($game_map.data).clone
    # scan each layer
    for h in 0..2
      # scan each row
      for i in 0..$game_map.height
        # scan each column
        for j in 0..$game_map.width
          value = @dataV[j, i, h].to_i
          # if tile's terrain tag is declared to give vertical sprites
          if $terrain_tags_vertical_tiles.include?($game_map.terrain_tags[value])
            @reference_terrain_tag = $game_map.terrain_tags[value]
            @num_tiles.push([j, i])
            # the following algorithm is so complex that I really don't know how
            # it works exactly
            list_end = 0
            length = 0
            while j + length + 1 < $game_map.width and
              suitable?(@dataV[j +length+ 1, i, h].to_i, @reference_terrain_tag)
              @num_tiles.push([j + length+ 1,i])
              length += 1
            end
            list_start = j
            list_end = length + j
            indicator = true
            row = 0
            j2 = j
            while indicator
              row += 1
              break if (i + row) == $game_map.height
              list_start2 = j2
              length2 = 0
              indicator = false
              if length >= 2
                for k in (j2 + 1)..(j2 + length -1)
                  if suitable?(@dataV[k, i + row, h].to_i,
                    @reference_terrain_tag)
                    if !indicator
                      list_start2 = k
                    else
                      length2 = k - list_start2
                    end
                    indicator = true
                    @num_tiles.push([k, i + row])
                  elsif !indicator
                    length2 -= 1
                  end
                end
              end
              if suitable?(@dataV[j2 + length, i + row, h].to_i,
                @reference_terrain_tag)
                length2 = j2 + length - list_start2
                indicator = true
                @num_tiles.push([j2 + length, i + row])
                length3 = 1
                while j2 + length + length3 < $game_map.width and
                  suitable?(@dataV[j2 + length + length3, i + row, h].to_i,
                  @reference_terrain_tag)
                  @num_tiles.push([j2 + length + length3, i + row])
                  length3 += 1
                  length2 += 1
                  if j2 + length + length3 > list_end
                    list_end = j2 + length + length3
                  end
                end
              end
              if suitable?(@dataV[j2, i + row, h].to_i, @reference_terrain_tag)
                list_start3 = list_start2 - j2
                length2 = length2 + list_start3
                list_start2 = j2
                indicator = true
                @num_tiles.push([j2, i + row])
                length3 = 1
                while j2 - length3 >= 0 and
                  suitable?(@dataV[j2 - length3, i + row, h].to_i,
                  @reference_terrain_tag)
                  @num_tiles.push([j2 - length3, i + row])
                  length3 += 1
                  length2 += 1
                  list_start2 -= 1
                  if list_start2 < list_start
                    list_start = list_start2
                  end
                end
              end
              length = length2
              j2 = list_start2
            end
            row -= 1
            # create a bitmap and a sprite from the tiles listed in @num_tiles
            create_bitmap(i, list_start, row, list_end - list_start, h)
            # clear the used tiles
            clear_data(h)
            # reinitialize the list of tiles
            @num_tiles = []
          end
        end
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Clear the used data to prevent from reusing them
  #     layer  : current scanned layer
  #--------------------------------------------------------------------------
  def clear_data(layer)
    for num in @num_tiles
      @dataV[num[0], num[1], layer] = 0
    end
  end
  #--------------------------------------------------------------------------
  # * Create a Bitmap from the listed tiles in @num_tiles and its associated
  #   sprite (Sprite_V)
  #     row     : start row's value
  #     column  : start column's value
  #     height  : sprite's height (in tiles)
  #     width   : sprite's width (in tiles)
  #     layer   : current scanned layer
  #--------------------------------------------------------------------------
  def create_bitmap(row, column, height, width, layer)
    bmp = Bitmap.new((1+width)<<5, (1+height)<<5)
    rect = Rect.new(0, 0, 32, 32)
    @num_tiles.sort! {|a, b|  -(a[1] - b[1])}
    sprite = Sprite_V.new(@viewport)
    # initialize sprite's attributes
    sprite.animated = false
    sprite.list_bitmap = []
    # draw the bitmap
    for tile_coordinates in @num_tiles
      value = @dataV[tile_coordinates[0], tile_coordinates[1], layer].to_i
      # if tile is a normal tile
      if value > 383
        bitmap = RPG::Cache.tile($game_map.tileset_name, value, 0)
      else # tile is an autotile
        file = (value / 48) - 1
        num_file = 4 * file
        if !sprite.animated
          autotile_name = $game_map.autotile_names[file]
          fichier = RPG::Cache.autotile(autotile_name)
          sprite.animated = (fichier.width > 96 ? true : false)
        end
        bitmap = RPG::Cache.autotile_base(num_file, value)
      end
      bmp.blt(32 * (tile_coordinates[0] - column),
      32 * (tile_coordinates[1] - row), bitmap, rect)
    end
    sprite.list_bitmap.push(bmp)
    # create 3 additionnal bitmaps for animated sprites
    if sprite.animated
      for j in 1..3
        bmp = Bitmap.new((1 + width)<<5, (1 + height)<<5)
        for tile_coordinates in @num_tiles
          value = @dataV[tile_coordinates[0], tile_coordinates[1], layer].to_i
          if value > 383
            bitmap = RPG::Cache.tile($game_map.tileset_name, value, 0)
          else
            num_file = 4 * ((value / 48) - 1)
            bitmap = RPG::Cache.autotile_base(num_file + j, value)
          end
          bmp.blt((tile_coordinates[0] - column)<<5,
          (tile_coordinates[1] - row)<<5, bitmap, rect)
        end
        sprite.list_bitmap.push(bmp)
      end
    end
    value = @dataV[@num_tiles[0][0], @num_tiles[0][1], layer].to_i
    # set sprite's priority
    sprite.priority = $game_map.priorities[value]
    # set sprite's coordinates (in squares (32 * 32 pixels))
    sprite.x_map = (column.to_f) + ((bmp.width)>>6)
    sprite.x_map += 0.5 if width % 2 == 0
    sprite.y_map = (row + height).to_f + 0.5
    sprite.square_y = sprite.y_map.to_i # Integer
    # set the y_pivot (intersection between the map and the sprite)
    sprite.oy = bmp.height - 16
    sprite.ox = bmp.width / 2
    sprite.height = bmp.height
    sprite.length = bmp.width
    sprite.bitmap = sprite.list_bitmap[0]
    self.list_sprites_V.push(sprite)
    self.list_sprites_V_animated.push(sprite) if sprite.animated
  end
end

#============================================================================
# ■ RPG::Cache_Tile
#----------------------------------------------------------------------------
# The tiles resulting in a superimposing of several tiles are kept in memory
# for a faster call
# valueX : tile's ID
#============================================================================

module RPG
  module Cache_Tile
    @cache = {}
    #------------------------------------------------------------------------
    # * Superimposing of two tiles, offset = pattern's number for animated
    # autotiles
    #------------------------------------------------------------------------
    def self.load(value1, value2, offset=0)
      if not @cache.include?([value1, value2, offset])
        bitmap = Bitmap.new(32, 32)
        rect = Rect.new(0, 0, 32, 32)
        if value1 > 383 # normal tile
          bitmap.blt(0, 0, RPG::Cache.tile($game_map.tileset_name, value1, 0),
          rect)
        else # autotile
          num = ((value1 / 48) - 1)<<2 + offset
          bitmap.blt(0, 0, RPG::Cache.autotile_base(num, value1), rect)
        end
        if value2 > 383 # normal tile
          bitmap.blt(0, 0, RPG::Cache.tile($game_map.tileset_name, value2, 0),
          rect)
        else # autotile
          num = ((value2 / 48) - 1)<<2 + offset
          bitmap.blt(0, 0, RPG::Cache.autotile_base(num, value2), rect)
        end
        @cache[[value1, value2, offset]] = bitmap
      end
      @cache[[value1, value2, offset]]
    end
    #------------------------------------------------------------------------
    # * Superimposing of three tiles
    #------------------------------------------------------------------------
    def self.load2(value1, value2, value3, offset = 0)
      if not @cache.include?([value1, value2, value3, offset])
        bitmap = Bitmap.new(32, 32)
        rect = Rect.new(0, 0, 32, 32)
        if value1 > 383 # normal tile
          bitmap.blt(0, 0, RPG::Cache.tile($game_map.tileset_name, value1, 0),
          rect)
        else # autotile
          num = ((value1 / 48) - 1)<<2 + offset
          bitmap.blt(0, 0, RPG::Cache.autotile_base(num, value1), rect)
        end
        if value2 > 383 # normal tile
          bitmap.blt(0, 0, RPG::Cache.tile($game_map.tileset_name, value2, 0),
          rect)
        else # autotile
          num = ((value2 / 48) - 1)<<2 + offset
          bitmap.blt(0, 0, RPG::Cache.autotile_base(num, value2), rect)
        end
        if value3 > 383 # normal tile
          bitmap.blt(0, 0, RPG::Cache.tile($game_map.tileset_name, value3, 0),
          rect)
        else # autotile
          num = ((value3 / 48) - 1)<<2 + offset
          bitmap.blt(0, 0, RPG::Cache.autotile_base(num, value3), rect)
        end
        @cache[[value1, value2, value3, offset]] = bitmap
      end
      @cache[[value1, value2, value3, offset]]
    end
    #------------------------------------------------------------------------
    # * Clear the Cache
    #------------------------------------------------------------------------
    def self.clear
      @cache = {}
      GC.start
    end
  end
end

#============================================================================
# ■ RPG::Cache_Datamap
#----------------------------------------------------------------------------
# Maps drawn with neoM7 are kept in memory to have a faster call the next
# times they need to be drawn
#============================================================================

module RPG
  module Cache_Datamap
    @cache = {}
    #------------------------------------------------------------------------
    # * Check if the map is in the Cache
    #   map_id : map's ID
    #------------------------------------------------------------------------
    def self.in_cache(map_id)
      return @cache.include?(map_id)
    end
    #------------------------------------------------------------------------
    # * Return the map's drawing (Bitmap)
    #   map_id : map's ID
    #   num    : pattern's number for animated autotiles
    #------------------------------------------------------------------------
    def self.load(map_id, num = 0)
      return @cache[map_id][num]
    end
    #------------------------------------------------------------------------
    # * Save the map's drawing in the Cache
    #   map_id : map's ID
    #   bitmap    : map's drawing (Bitmap)
    #   num    : pattern's number for animated autotiles
    #------------------------------------------------------------------------
    def self.save(map_id, bitmap, num = 0)
      @cache[map_id] = [] if !self.in_cache(map_id)
      @cache[map_id][num] = bitmap
    end
    #------------------------------------------------------------------------
    # * Clear the Cache
    #------------------------------------------------------------------------
    def self.clear
      @cache = {}
      GC.start
    end
  end
end

#============================================================================
# ■ RPG::Cache_Tileset
#----------------------------------------------------------------------------
# Maps drawn with neoM7 are kept in memory to have a faster call the next
# times they need to be drawn
#============================================================================

module RPG
  module Cache_Tileset
    @cache = {}
    #------------------------------------------------------------------------
    # * Check if the map is in the Cache
    #   map_id : map's ID
    #------------------------------------------------------------------------
    def self.in_cache(map_id)
      return @cache.include?(map_id)
    end
    #------------------------------------------------------------------------
    # * Return the map's drawing (Bitmap)
    #   map_id : map's ID
    #   num    : pattern's number for animated autotiles
    #------------------------------------------------------------------------
    def self.load(map_id, num = 0)
      return @cache[map_id][num]
    end
    #------------------------------------------------------------------------
    # * Save the map's drawing in the Cache
    #   map_id : map's ID
    #   bitmap    : map's drawing (Bitmap)
    #   num    : pattern's number for animated autotiles
    #------------------------------------------------------------------------
    def self.save(map_id, bitmap, num = 0)
      @cache[map_id] = [] if !self.in_cache(map_id)
      @cache[map_id][num] = bitmap
    end
    #------------------------------------------------------------------------
    # * Clear the Cache
    #------------------------------------------------------------------------
    def self.clear
      @cache = {}
      GC.start
    end
  end
end

#============================================================================
# ■ RPG::Cache
#----------------------------------------------------------------------------
# The tiles from autotiles files are kept in memory for a faster call
#============================================================================

module RPG
  module Cache
    #------------------------------------------------------------------------
    # * Check if the map is in the Cache
    #   num    : autotiles file's ID
    #   value    : tile's ID
    #------------------------------------------------------------------------
    def self.autotile_base(num, value)
      key = [num, value]
      if not @cache.include?(key) or @cache[key].disposed?
        @cache[key] = Bitmap.new(32, 32)
        num_tile = value % 48
        sx = 32 * (num_tile %           8)          
        sy = 32 * (num_tile /           8)          
        rect = Rect.new(sx, sy, 32, 32)
        @cache[key].blt(0, 0, self.load_autotile(num), rect)
      end
        @cache[key]
    end
    #------------------------------------------------------------------------
    # * Save the tile's drawing in the Cache
    #   bitmap : tile's drawing (Bitmap)
    #   key    : tile's ID
    #------------------------------------------------------------------------
    def self.save_autotile(bitmap, key)
      @cache[key] = bitmap
    end
    #------------------------------------------------------------------------
    # * Return the tile's drawing (Bitmap)
    #   key    : tile's ID
    #------------------------------------------------------------------------
    def self.load_autotile(key)
      @cache[key]
    end
  end
end

#============================================================================
# ■ RPG::MapInfo
#============================================================================

class RPG::MapInfo
  # defines the map's name as the name without anything within brackets,
  # including brackets
  def name
    return @name.gsub(/\[.*\]/) {""}
  end
  #--------------------------------------------------------------------------
  # the original name with the codes
  def name2
    return @name
  end
end 






Script 5:

Spoiler
 
Code:


#============================================================================
# Neo Mode 7
# Written by MGCaladtogel
# 12/05/08
#
# Part 5
#
# class Tilemap_neoM7         : new class
#
#============================================================================

#============================================================================
# ■ Tilemap_neoM7
#----------------------------------------------------------------------------
# This new Tilemap class handles the drawing of a neo neoM7 map
#============================================================================

class Tilemap_neoM7
  #--------------------------------------------------------------------------
  # * Attributes
  #--------------------------------------------------------------------------
  attr_accessor  :tilesets_list # contains tilesets graphics
  attr_reader :spriteset # spriteset that called this class
  attr_accessor  :sprite # sprite used to contain the map's drawing
  attr_accessor  :alpha # angle of slant
  attr_accessor  :theta # angle of rotation
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     viewport  : viewport
  #--------------------------------------------------------------------------
  def initialize(viewport, spriteset)
    @even = true
    @viewport = viewport
    @spriteset = spriteset
    @id = $game_map.map_id # map's ID : used to load or save the map in Cache
    self.tilesets_list = [] # contains tilesets (Bitmap)
    @height = $game_map.height << 5 # @height : map's height (in pixel)
    @width = $game_map.width << 5 # @width : map's width (in pixel)
    @function_name = "BitmapMode7" # dll's function called to apply mode 7
    @function_name += "Loop" if $game_system.neoM7_loop
    @current_function_name = @function_name
    @zoom = $game_system.neoM7_zoom # zoom level of the map
    $game_temp.zoom_sprites = @zoom.to_f / 100
    $game_temp.zoom_map = (4096 * (1.0 / $game_temp.zoom_sprites)).to_i

    # tilesets graphics and data map are loaded if already in Cache
    if RPG::Cache_Datamap.in_cache(@id)
      @bitmap_data = RPG::Cache_Datamap.load(@id)
      @map_tileset = RPG::Cache_Tileset.load(@id)
      self.tilesets_list.push(@map_tileset)
      if $game_system.neoM7_animated
        @map_tileset_2 = RPG::Cache_Tileset.load(@id, 1)
        @map_tileset_3 = RPG::Cache_Tileset.load(@id, 2)
        @map_tileset_4 = RPG::Cache_Tileset.load(@id, 3)
        self.tilesets_list.push(@map_tileset_2)
        self.tilesets_list.push(@map_tileset_3)
        self.tilesets_list.push(@map_tileset_4)
      end
    else # draw the data map and the tileset and save them in the Cache
      draw_map
    end

    # create vertical elements from tiles
    data_V = Data_Vertical_Sprites.new(viewport)
    # @vertical_sprites : list of vertical sprites (Sprite_V)
    @vertical_sprites = data_V.list_sprites_V
    # @vertical_sprites_animated : list of animated vertical sprites (Sprite_V)
    @vertical_sprites_animated = data_V.list_sprites_V_animated
    
    # angle of rotation (theta)
    self.theta = $game_system.neoM7_theta
    theta_rad = (Math::PI * theta) / 180
    # easier to work with integer value than floats ('>>' and '<<' operations)
    $game_temp.cos_theta = (4096 * Math.cos(theta_rad)).to_i
    $game_temp.sin_theta = (4096 * Math.sin(theta_rad)).to_i
    
    # offsets : equivalent to display_x and display_y
    @offset_x = 0
    @offset_y = 0

    $game_temp.distance_h = 480 # distance between the center of the map (halfwidth, pivot) and the point of view
    # screenline's number of the slant's pivot = y-coordinate of the rotation center
    $game_temp.pivot = $game_system.neoM7_pivot # character sprites
    $game_temp.pivot_map = $game_temp.pivot /
    ($game_system.neoM7_resolution == 1 ? 1 :
    ($game_system.neoM7_resolution == 2 ? 1.33 : 2)) # map sprite
     # distance between the center of the map (halfwidth, pivot) and the projection plane surface
    $game_temp.distance_p = $game_temp.distance_h - $game_temp.distance_h /
    ($game_system.neoM7_resolution == 1 ? 1 :
    ($game_system.neoM7_resolution == 2 ? 1.334 :  2))
    # zoom value of the map sprite
    @coeff_resolution = ($game_system.neoM7_resolution == 1 ? 1 :
    ($game_system.neoM7_resolution == 2 ? 1.334 : 2))
    # x-offset for the 3 resolutions
    @offset_x_res = ($game_system.neoM7_resolution == 1 ? 0 :
    ($game_system.neoM7_resolution == 2 ? 80 : 160))
    # y-offset for the 3 resolutions
    @offset_y_res = $game_temp.pivot - $game_temp.pivot_map
    @index_animated = 0 # 0..3 : index of animated tiles pattern

    # map sprite
    self.sprite = Sprite.new(@viewport)
    self.sprite.x = 0
    self.sprite.y = 0
    self.sprite.z = - 99999 # map must not mask vertical elements
    if $game_system.neoM7_resolution != 1
      self.sprite.bitmap = ($game_system.neoM7_resolution == 2 ?
      Bitmap.new(480, 360) : Bitmap.new(320, 240))
    else
      self.sprite.bitmap = Bitmap.new(640, 480) # screen dimensions
    end

    # angle of slant (alpha)
    self.alpha = $game_system.neoM7_alpha
    refresh_alpha

  end
  #--------------------------------------------------------------------------
  # * Dispose
  #--------------------------------------------------------------------------
  def dispose
    # dispose of map sprite and vertical sprites
    self.sprite.dispose
    for sprite in @vertical_sprites + @vertical_sprites_animated
      sprite.dispose
    end
    @vertical_sprites.clear
    @vertical_sprites_animated.clear
    @tilesets_list.clear
  end
  #--------------------------------------------------------------------------
  # * Refresh all the parameters dependent on the angle of slant
  #--------------------------------------------------------------------------
  def refresh_alpha
    # angle of slant
    alpha_rad = (Math::PI * alpha) / 180
    $game_temp.cos_alpha = (4096 * Math.cos(alpha_rad)).to_i
    $game_temp.sin_alpha = (4096 * Math.sin(alpha_rad)).to_i
    $game_system.neoM7_alpha = alpha
    $game_system.neoM7_pivot = $game_temp.pivot
    # h0,  z0 : intermediate values used to calculate the slope
    h0 = (- ($game_temp.distance_h) * $game_temp.pivot *
    $game_temp.cos_alpha) / ((($game_temp.distance_h) << 12) +
    $game_temp.pivot * $game_temp.sin_alpha) + $game_temp.pivot
    z0 = (($game_temp.distance_h) << 12).to_f /
    ((($game_temp.distance_h) << 12) + $game_temp.pivot * $game_temp.sin_alpha)
    # slope
    $game_temp.slope_value = (1.0 - z0) / ($game_temp.pivot - h0)
    $game_temp.slope_value_map = (262144 * $game_temp.slope_value).to_i
    $game_temp.corrective_value = 1.0 - $game_temp.pivot * $game_temp.slope_value
    $game_temp.corrective_value_map = (262144 * $game_temp.corrective_value / @coeff_resolution).to_i
    last_line = - $game_temp.pivot_map - $game_system.neoM7_horizon
    old_limit = $game_temp.neoM7_height_limit
    $game_temp.neoM7_height_limit = (($game_temp.distance_h - $game_temp.distance_p) *
    last_line * $game_temp.cos_alpha) / ((($game_temp.distance_h) << 12) -
    last_line * $game_temp.sin_alpha) + $game_temp.pivot_map
    if $game_system.neoM7_white_horizon
      @current_function_name = @function_name +
      ($game_temp.neoM7_height_limit > 0 ? "H" : "")
    end
    $game_temp.neoM7_height_limit = [$game_temp.neoM7_height_limit.to_i, 0].max
    $game_temp.height_limit_sprites = $game_temp.neoM7_height_limit * @coeff_resolution
    @even = ((old_limit - $game_temp.neoM7_height_limit) % 2 == 0 ? @even : !@even)
    # delete lines beyond the new horizon
    self.sprite.bitmap.clean_limit(old_limit,
    $game_temp.neoM7_height_limit) if old_limit < $game_temp.neoM7_height_limit
  end
  #--------------------------------------------------------------------------
  # * Increase (or decrease) the angle of slant
  #--------------------------------------------------------------------------
  def increase_alpha(value)
    self.alpha = [[alpha + value, 89].min, 0].max
    refresh_alpha
  end
  #--------------------------------------------------------------------------
  # * Increase (or decrease) the angle of rotation
  #--------------------------------------------------------------------------
  def increase_theta(value)
    self.theta += value
    self.theta %= 360
    theta_rad = (Math::PI * theta) / 180
    $game_temp.cos_theta = (4096 * Math.cos(theta_rad)).to_i
    $game_temp.sin_theta = (4096 * Math.sin(theta_rad)).to_i
    $game_system.neoM7_theta = theta
  end
  #--------------------------------------------------------------------------
  # * Increase (or decrease) the zoom level
  #--------------------------------------------------------------------------
  def increase_zoom(value)
    value = value.to_f / 100
    @zoom = [[@zoom * (2 ** value), 10000].min, 1].max
    $game_temp.zoom_sprites = @zoom.to_f / 100
    $game_temp.zoom_map = (4096 * (1.0 / $game_temp.zoom_sprites)).to_i
    $game_system.neoM7_zoom = @zoom
  end
  #--------------------------------------------------------------------------
  # * Increase the pivot's value
  #--------------------------------------------------------------------------
  def increase_pivot(value)
    res = [[$game_temp.pivot + value, 480].min, 32].max
    $game_map.display_y -= ((res - $game_temp.pivot) << 2)
    $game_system.neoM7_center_y += ((res - $game_temp.pivot) << 2)
    $game_temp.pivot = res
    $game_temp.pivot_map = $game_temp.pivot /
    ($game_system.neoM7_resolution == 1 ? 1 :
    ($game_system.neoM7_resolution == 2 ? 1.33 : 2))
    @offset_y_res = $game_temp.pivot - $game_temp.pivot_map
    refresh_alpha
  end
  #--------------------------------------------------------------------------
  # * Set the angle of slant
  #--------------------------------------------------------------------------
  def set_alpha(value)
    self.alpha = [[value, 89].min, 0].max
    refresh_alpha
  end
  #--------------------------------------------------------------------------
  # * Set the angle of rotation
  #--------------------------------------------------------------------------
  def set_theta(value)
    self.theta = value % 360
    theta_rad = (Math::PI * theta) / 180
    $game_temp.cos_theta = (4096 * Math.cos(theta_rad)).to_i
    $game_temp.sin_theta = (4096 * Math.sin(theta_rad)).to_i
    $game_system.neoM7_theta = theta
  end
  #--------------------------------------------------------------------------
  # * Set the zoom level
  #--------------------------------------------------------------------------
  def set_zoom(value)
    @zoom = [[value, 10000].min, 1].max
    $game_temp.zoom_sprites = @zoom.to_f / 100
    $game_temp.zoom_map = (4096 * (1.0 / $game_temp.zoom_sprites)).to_i
    $game_system.neoM7_zoom = @zoom
  end
  #--------------------------------------------------------------------------
  # * Set the pivot's value
  #--------------------------------------------------------------------------
  def set_pivot(value)
    res = [[value, 480].min, 32].max
    $game_map.display_y -= ((res - $game_temp.pivot) << 2)
    $game_system.neoM7_center_y += ((res - $game_temp.pivot) << 2)
    $game_temp.pivot = res
    $game_temp.pivot_map = $game_temp.pivot /
    ($game_system.neoM7_resolution == 1 ? 1 :
    ($game_system.neoM7_resolution == 2 ? 1.33 : 2))
    @offset_y_res = $game_temp.pivot - $game_temp.pivot_map
    refresh_alpha
  end
  #--------------------------------------------------------------------------
  # * Slide from the current alpha into the target value
  #--------------------------------------------------------------------------
  def to_alpha(value, speed)
    value = [[value, 89].min, 0].max
    while value > alpha
      increase_alpha([speed, value - alpha].min)
      spriteset.update
      Graphics.update
    end
    while value < alpha
      increase_alpha(-([speed, alpha - value].min))
      spriteset.update
      Graphics.update
    end
  end
  #--------------------------------------------------------------------------
  # * Slide from the current theta into the target value
  #--------------------------------------------------------------------------
  def to_theta(value, speed, direction)
    value %= 360
    while value != theta
      increase_theta(direction * ([(value - theta).abs, speed].min))
      spriteset.update
      Graphics.update
    end
  end
  #--------------------------------------------------------------------------
  # * Slide from the current zoom level into the target value
  #--------------------------------------------------------------------------
  def to_zoom(value, speed)
    value = [[value, 10000].min, 1].max
    while value > @zoom
      increase_zoom(speed)
      if value < @zoom
        set_zoom(value)
      end
      spriteset.update
      Graphics.update
    end
    while value < @zoom
      increase_zoom(-speed)
      if value > @zoom
        set_zoom(value)
      end
      spriteset.update
      Graphics.update
    end
  end
  #--------------------------------------------------------------------------
  # * Slide from the current pivot's value into the target value
  #--------------------------------------------------------------------------
  def to_pivot(value, speed)
    value = [[value, 480].min, 32].max
    while value > $game_temp.pivot
      increase_pivot([speed, value - $game_temp.pivot].min)
      spriteset.update
      Graphics.update
    end
    while value < $game_temp.pivot
      increase_pivot(-([speed, $game_temp.pivot - value].min))
      spriteset.update
      Graphics.update
    end
  end
  #--------------------------------------------------------------------------
  # * Update the map sprite and the vertical sprites
  #--------------------------------------------------------------------------
  def update
    # update map sprite
    @offset_x = $game_map.display_x / 4 + @offset_x_res
    @offset_y = $game_map.display_y / 4 + @offset_y_res
    current_function_name = @current_function_name
    if $game_system.neoM7_filter
      current_function_name += (@even ? "Even" : "Odd")
      @even = !@even
    end
    self.sprite.bitmap.neoM7(current_function_name, @map_tileset,
    @bitmap_data, @width, @height, @offset_x, @offset_y)
    self.sprite.zoom_x = @coeff_resolution
    self.sprite.zoom_y = @coeff_resolution
    # update vertical sprites
    for vertical_sprite in @vertical_sprites
      vertical_sprite.update
    end
  end
  #--------------------------------------------------------------------------
  # * Update animation for animated tiles
  #--------------------------------------------------------------------------
  def update_animated
    @index_animated += 1
    @index_animated %= 4
    @map_tileset = tilesets_list[@index_animated]
    # update vertical sprites
    for vertical_sprite in @vertical_sprites_animated
      vertical_sprite.update_animated(@index_animated)
    end
  end
  #--------------------------------------------------------------------------
  # * Create a data bitmap representing the map, and its associated tilesets
  #--------------------------------------------------------------------------
  def draw_map
    data = $game_map.data
    # Table where animated tiles are flagged
    data_animated = []
    # Bitmap that will be filled with the 3-layers map data
    @bitmap_data = Bitmap.new(@width / 32, @height / 32)
    color = Color.new(0,0,0) 
    rect = Rect.new(0, 0, 32, 32)
    
    # Create autotiles graphics
    RPG::Cache.clear
    @autotiles = []
    for i in 0..6
      autotile_name = $game_map.autotile_names[i]
      fichier = RPG::Cache.autotile(autotile_name)
      for l in 0..3
        data_autotile = Data_Autotiles.new(fichier,l)
        data_autotile.number = 4*i + l
        RPG::Cache.save_autotile(data_autotile, data_autotile.number)
        @autotiles.push(data_autotile)
      end
    end
    
    # Create a list of used terrain tiles (3 layers), and fill the data bitmap
    tiles_list = {}
    tiles_count = 0
    for i in 0...$game_map.height
      for j in 0...$game_map.width
        value1 = ($terrain_tags_vertical_tiles.include?(
        $game_map.terrain_tags[data[j, i, 0]]) ? 0 : data[j, i, 0])
        value2 = ($terrain_tags_vertical_tiles.include?(
        $game_map.terrain_tags[data[j, i, 1]]) ? 0 : data[j, i, 1])
        value3 = ($terrain_tags_vertical_tiles.include?(
        $game_map.terrain_tags[data[j, i, 2]]) ? 0 : data[j, i, 2])
        if !tiles_list.has_key?([value1, value2, value3])
          tiles_count += 1
          tiles_list[[value1, value2, value3]] = tiles_count
        end
        count = tiles_list[[value1, value2, value3]]
        color.set(count % 256, count / 256, 0) # up to 65536 different tiles for one map (should be sufficient)
        @bitmap_data.set_pixel(j, i, color)
      end
    end
    
    # Create a specific tileset (using the 3 layers) for the map
    tileset_height = (1 + (tiles_count /           8)          ) * 32
    @map_tileset = Bitmap.new(256, tileset_height)
    @tilesets_list.push(@map_tileset)
    for k in 1..tiles_count
      list_values = tiles_list.index(k)
      value1 = list_values[0]
      value2 = list_values[1]
      value3 = list_values[2]
      if value1 != 0
        if value2 == 0
          if value3 == 0
            if value1 > 383
              bitmap = RPG::Cache.tile($game_map.tileset_name, value1, 0)
            else
              num = 4*((value1 / 48) - 1)
              bitmap = RPG::Cache.autotile_base(num, value1)
              data_animated.push(k) if @autotiles[num].animated
            end
          else
            bitmap = RPG::Cache_Tile.load(value1, value3)
            animated = false
            if value1 < 384
              num = 4*((value1 / 48) - 1)
              animated = @autotiles[num].animated
            end
            if value3 < 384
              num = 4*((value3 / 48) - 1)
              animated = @autotiles[num].animated
            end
            data_animated.push(k) if animated
          end
        else
          if value3 == 0
            bitmap = RPG::Cache_Tile.load(value1, value2)
            animated = false
            if value1 < 384
              num = 4*((value1 / 48) - 1)
              animated = @autotiles[num].animated
            end
            if value2 < 384
              num = 4*((value2 / 48) - 1)
              animated = @autotiles[num].animated
            end
            data_animated.push(k) if animated
          else
            bitmap = RPG::Cache_Tile.load2(value1, value2, value3)
            animated = false
            if value1 < 384
              num = 4*((value1 / 48) - 1)
              animated = @autotiles[num].animated
            end
            if value2 < 384
              num = 4*((value2 / 48) - 1)
              animated = @autotiles[num].animated
            end
            if value3 < 384
              num = 4*((value3 / 48) - 1)
              animated = @autotiles[num].animated
            end
            data_animated.push(k) if animated
          end
        end
      else
        if value2 == 0
          if value3 != 0
            if value3 > 383
              bitmap = RPG::Cache.tile($game_map.tileset_name, value3, 0)
            else
              num = 4*((value3 / 48) - 1)
              bitmap = RPG::Cache.autotile_base(num, value3)
              data_animated.push(k) if @autotiles[num].animated
            end
          end
        else
          if value3 == 0
            if value2 > 383
              bitmap = RPG::Cache.tile($game_map.tileset_name, value2, 0)
            else
              num = 4*((value2 / 48) - 1)
              bitmap = RPG::Cache.autotile_base(num, value2)
              data_animated.push(k) if @autotiles[num].animated
            end
          else
            bitmap = RPG::Cache_Tile.load(value2, value3)
            animated = false
            if value2 < 384
              num = 4*((value2 / 48) - 1)
              animated = @autotiles[num].animated
            end
            if value3 < 384
              num = 4*((value3 / 48) - 1)
              animated = @autotiles[num].animated
            end
            data_animated.push(k) if animated
          end
        end
      end
      @map_tileset.blt(32 * ((k - 1) %           8)          , 32 * ((k - 1) /           8)          , bitmap, rect)
    end
    
    # save the data map and the tileset in the Cache
    RPG::Cache_Datamap.save(@id, @bitmap_data)
    RPG::Cache_Tileset.save(@id, @map_tileset)

    # create 3 other tilesets in case of animated tiles (4 patterns)
    if !$game_system.neoM7_animated
      tiles_list.clear
      return
    end
    @map_tileset_2 = @map_tileset.clone
    @map_tileset_3 = @map_tileset.clone
    @map_tileset_4 = @map_tileset.clone
    @tilesets_list.push(@map_tileset_2)
    @tilesets_list.push(@map_tileset_3)
    @tilesets_list.push(@map_tileset_4)
    for k in data_animated
      list_values = tiles_list.index(k)
      value1 = list_values[0]
      value2 = list_values[1]
      value3 = list_values[2]
      if value1 != 0
        if value2 == 0
          if value3 == 0
            num = 4*((value1 / 48) - 1)
            bitmap_2 = RPG::Cache.autotile_base(num+1, value1)
            bitmap_3 = RPG::Cache.autotile_base(num+2, value1)
            bitmap_4 = RPG::Cache.autotile_base(num+3, value1)
          else
            bitmap_2 = RPG::Cache_Tile.load(value1, value3, 1)
            bitmap_3 = RPG::Cache_Tile.load(value1, value3, 2)
            bitmap_4 = RPG::Cache_Tile.load(value1, value3, 3)
          end
        else
          if value3 == 0
            bitmap_2 = RPG::Cache_Tile.load(value1, value2, 1)
            bitmap_3 = RPG::Cache_Tile.load(value1, value2, 2)
            bitmap_4 = RPG::Cache_Tile.load(value1, value2, 3)
          else
            bitmap_2 = RPG::Cache_Tile.load2(value1, value2, value3, 1)
            bitmap_3 = RPG::Cache_Tile.load2(value1, value2, value3, 2)
            bitmap_4 = RPG::Cache_Tile.load2(value1, value2, value3, 3)
          end
        end
      else
        if value2 != 0
          if value3 == 0
            bitmap_2 = RPG::Cache.autotile_base(num+1, value2)
            bitmap_3 = RPG::Cache.autotile_base(num+2, value2)
            bitmap_4 = RPG::Cache.autotile_base(num+3, value2)
          else
            bitmap_2 = RPG::Cache_Tile.load(value2, value3, 1)
            bitmap_3 = RPG::Cache_Tile.load(value2, value3, 2)
            bitmap_4 = RPG::Cache_Tile.load(value2, value3, 3)
          end
        else
          if value3 != 0
            bitmap_2 = RPG::Cache.autotile_base(num+1, value3)
            bitmap_3 = RPG::Cache.autotile_base(num+2, value3)
            bitmap_4 = RPG::Cache.autotile_base(num+3, value3)
          end
        end
      end
      @map_tileset_2.blt(32 * ((k - 1) %           8)          , 32 * ((k - 1) /           8)          , bitmap_2, rect)
      @map_tileset_3.blt(32 * ((k - 1) %           8)          , 32 * ((k - 1) /           8)          , bitmap_3, rect)
      @map_tileset_4.blt(32 * ((k - 1) %           8)          , 32 * ((k - 1) /           8)          , bitmap_4, rect)
    end
    # save the three additional maps in the Cache
    RPG::Cache_Tileset.save(@id, @map_tileset_2, 1)
    RPG::Cache_Tileset.save(@id, @map_tileset_3, 2)
    RPG::Cache_Tileset.save(@id, @map_tileset_4, 3)
    tiles_list.clear
  end
  #--------------------------------------------------------------------------
  # * no tileset for neoM7 maps
  #--------------------------------------------------------------------------
  def tileset
    return nil
  end
end 







Pour le bug du menu, dans le script 3, vous supprimez ce morceau :

 
Code:


if $scene.spriteset != nil and $scene.spriteset.tilemap.is_a?(Tilemap_neoM7)
        directions_list = $dirs[@character.directions]
        list_size = directions_list.size
        current_direction = directions_list[(directions_list.index(current_direction) +
        (($scene.spriteset.tilemap.theta + (180 / list_size)) % 360) / (360 / list_size)) % list_size]
      end 


Script 2, ligne 194

 
Code:

$game_system.neoM7 = map_data.name2.include?("[NM7]") 




Remplacez par
 
Code:

$game_system.neoM7 = map_data.name2 




Script 2, ligne 197, pour les autotiles

 
Code:

$game_system.neoM7_animated = map_data.name2.include?("[A]") 



Remplacez par
 
Code:

$game_system.neoM7_animated = map_data.name2 




REMARQUE : chez certains, cela va planter. Vous allez donc devoir jouer sans autotiles animés.
Et script 1, ligne 185

Code:


self.neoM7_zoom = 100 




remplacez par
 
Code:

self.neoM7_zoom = 50 



Ensuite, pour ne pas avoir à activer d'interrupteur, et par conséquent ne pas riquer d'avoir de interférences avec d'autres fonctions du script
Toujours script 2, ligne environ 158, vous trouverez :

 
Code:

$game_system.neoM7 = false 


Remplacer par:

 
Code:

$game_system.neoM7 = true 



Maintenant, sur vos map, TOUTES les cases doivent êtres remplies (mettez une case noir pour les cases vides).
-Screen ?

Oui, un ici:
(Mapping pour test)


Et voilà, normalement, tout marche.
Pour tout bug, ou erreur, demander.

Je remercie Sphinx, Krosk, Lén et Palbolsky qui m'ont aidé à l'adapter à PSP et au créateur du Mode7.

Cordialement,
Alex.

           
           

Posté par Lunatic le 22 Mar - 00:32 (2009)
Si ca marche c'est super.
Mais quels sont les bugs a redouter ?
Sinon moi quand je demarre une nouvelle partie, ca me dit qu'il y a une erreur dans le script 4, ici :
   func=Win32API.new("MGCmode7.dll", function, "llllllllllllllll", "")



............
Des fois je suis vraiment une ciche -_-'

Edit :
Donc les bugs :
Probleme de superposition (plus aucune)
Probleme au niveau des fogs

Et enfaite, c'est dommage, ca dézoome juste, et du coup, la carte est miniscule... :(

Posté par Ace Attorney Man le 22 Mar - 11:05 (2009)
---------- Erreur de script : Neo mode 7 5 ----------
----- Type
TypeError

----- Message
can't convert NilClass into Bitmap

----- Position dans Neo mode 7 5
Ligne 493

----- Backtrace
Script : Neo mode 7 5 | Ligne : 493 | Méthode : in `blt'
Script : Neo mode 7 5 | Ligne : 493 | Méthode : in `draw_map'
Script : Neo mode 7 5 | Ligne : 399 | Méthode : in `each'
Script : Neo mode 7 5 | Ligne : 399 | Méthode : in `draw_map'
Script : Neo mode 7 5 | Ligne : 60 | Méthode : in `initialize'
Script : Neo mode 7 3 | Ligne : 392 | Méthode : in `new'
Script : Neo mode 7 3 | Ligne : 392 | Méthode : in `initialize'
Script : Scene_Map | Ligne : 13 | Méthode : in `new'
Script : Scene_Map | Ligne : 13 | Méthode : in `main'
Script : Main | Ligne : 50

quand je fais nouvelle partie >_<

Posté par Sphinx le 22 Mar - 11:22 (2009)
le bout de script qui bugge ? =)

Posté par Ace Attorney Man le 22 Mar - 11:24 (2009)
Mince...
Mais c'est bon ça marche, juste que sur une map vide(intro) ça buggait xP
Mais comme l'a fait remarqué Lunatic c'est moche, les extérieurs sont maintenant minus ...
C'est pour ça qu'il est préférable de faire comme moi : garder les maps extérieurs et les maps intérieurs ou autre les mettre en nm7 =D

Posté par Alex le 22 Mar - 11:34 (2009)
Je sais pas pour les map extérieur ><.
Je testerais dans la journée ^^.

Posté par Ace Attorney Man le 22 Mar - 11:39 (2009)
log
 
Code:
---------- Erreur de script : Neo mode 7 3 ----------
----- Type
NoMethodError

----- Message
- ARGS - []
undefined method `spriteset' for #<POKEMON_S::Pokemon_Menu:0x81b13a0>

----- Position dans Neo mode 7 3
Ligne 265

----- Backtrace
Script : Neo mode 7 3 | Ligne : 265 | Méthode : in `update'
Script : Sprite_Character | Ligne : 21 | Méthode : in `initialize'
Script : Neo mode 7 3 | Ligne : 401 | Méthode : in `new'
Script : Neo mode 7 3 | Ligne : 401 | Méthode : in `initialize'
Script : Neo mode 7 3 | Ligne : 400 | Méthode : in `each'
Script : Neo mode 7 3 | Ligne : 400 | Méthode : in `initialize'
Script : Pokemon_Menu | Ligne : 31 | Méthode : in `new'
Script : Pokemon_Menu | Ligne : 31 | Méthode : in `main'
Script : Main | Ligne : 50 

Quand j'ouvre le menu quand la map est réduite
ligne qui bug
Code:
    self.visible = (not @character.transparent)
    if @tile_id == 0
      sx = @character.pattern * @cw
      current_direction = (@character.direction - 2) / 2
  CETTE LIGNE QUI BUG ==== >    if $scene.spriteset != nil and $scene.spriteset.tilemap.is_a?(Tilemap_neoM7)
        directions_list = $dirs[@character.directions]
        list_size = directions_list.size
        current_direction = directions_list[(directions_list.index(current_direction) +
        (($scene.spriteset.tilemap.theta + (180 / list_size)) % 360) / (360 / list_size)) % list_size]
      end

Posté par Pαlвσlѕку le 22 Mar - 11:41 (2009)
Vous allez déguster... Vous allez voir tout les bugs qui vont se déclencher.
Chez moi :
- Le mapplink ne fonctionne pas
- Le mappanel non plus

Vous aurez un beau bug avec le menu.
Vous aurez aussi un bug avec le tag 7 de l'eau.

Donc le script n'est pas vraiment conseillé. Enfin vous faite comme vous voulez '-_-

Par chance, j'ai déjà corrigé plein de petit bug, je vous passe le script dès que je l'aurais retrouvé.

Posté par Alex le 22 Mar - 11:47 (2009)
Erf, désolé pour tout les bug, j'ai vu que sur la map sa marché, donc je me suis dit que sa marché pour tout -_-".

Encore désolé :(

Posté par Pαlвσlѕку le 22 Mar - 11:49 (2009)
Alex >> Je me suis fait avoir au début moi aussi.

Posté par Alex le 22 Mar - 11:50 (2009)
Il n'y a vraiment aucun moyen pour le menu ?

Le mapling c'est pas trop grave, car beaucoup de personne ne l'utilise pas, mais le menu si :(.

Posté par Koalix le 22 Mar - 11:51 (2009)
Moi je trouve que le rendu est moche, sinon le tuto est bien travaillé.

PS: Je trouve que le rendu est moche parce que le mur on perdu leur motif et que le résultat est trop petit

Posté par Pαlвσlѕку le 22 Mar - 12:04 (2009)
Alex >> Pour le menu, je connais la solution. Il faut juste que j'aille récupérer le script, que j'ai mis quelque part.

Koalix >> Le MAPLINK est vraiment le système que j'aprouve le plus. Je l'utilise, et le rendu est niquel (il y a juste des bugs graphiques à cause des characters)

Posté par Alex le 22 Mar - 12:09 (2009)
Okay, merci Pal ^^.

Posté par Lén le 22 Mar - 12:34 (2009)
Excellent Alex

C'est normal que maplink bug car il utilise des coordonnées qui n'existe plus... (enfin je crois).

Posté par Sphinx le 22 Mar - 12:40 (2009)
Ace, normal, faut attendre 1 frame ou 2, le temps que le système soit complètement revenu sur la map Clin d'œil foireux

Posté par Ace Attorney Man le 22 Mar - 12:51 (2009)
Désolé ...
j'ai encore relevé des bugs et j'ai totalement enlevé ce système : a améliorer (je ferais une liste plus tard)

Posté par Pαlвσlѕку le 22 Mar - 14:02 (2009)
Pour le bug du menu :

Dans le script 3, vous supprimez ce morceau :
Code:
if $scene.spriteset != nil and $scene.spriteset.tilemap.is_a?(Tilemap_neoM7)
        directions_list = $dirs[@character.directions]
        list_size = directions_list.size
        current_direction = directions_list[(directions_list.index(current_direction) +
        (($scene.spriteset.tilemap.theta + (180 / list_size)) % 360) / (360 / list_size)) % list_size]
      end

Par contre, quelqu'un pourrait tester pour le MAPPANEL ? car chez moi ça fonctionne mais comme j'ai modifié le script du MAPPANEL, les résultats sont donc faussés.

Posté par Alex le 22 Mar - 14:08 (2009)
MàJ du Tuto, merci Palbolsky ^^.

Posté par Pαlвσlѕку le 22 Mar - 15:10 (2009)
Pour plus d'information, vous pouvez aller ici :
http://rpgcreative.forumpro.fr/scripts-pour-map-f60/script-neo-mode-7-t1483…

Cela explique en détaille le fonctionnement du NM7.

Posté par Newtiteuf le 22 Mar - 19:17 (2009)
Juste comme ca, vu nque je l'utilise, je tien a vous dire qu'il ne faut pas que vous laissiez des carreaux "vide" ... il vous faut les remplir (au minimum) de noir sinon ... pam le bug ^^

Posté par Alex le 22 Mar - 19:45 (2009)
Merci NT, j'espère que tu ne m'en veux pas d'avoir "pris" ton système .

Je rajouterais ça dans la prochaine MàJ du tuto ^^.

Posté par Newtiteuf le 22 Mar - 21:03 (2009)
Disons, que je ne t'en veux pas ...

c'est sur tu me prend "mon" systeme mais on prend bien a nintendo les garphisme les nom le concept de pokémon ^^

Posté par Sphinx le 22 Mar - 23:32 (2009)
Clin d'œil foireux joliment expliqué

8) je n'aurais pas fait mieux 8)


>> sérieusement, pk t'as sauté des lignes dans tes bouts de codes ? =)

Alex a écrit:
Code:


$enable_neoM7_number = 17 # switch number : change this value !




Pk ne pas avoir mis :

Code:
$enable_neoM7_number = 17 # switch number : change this value !


à la place ? ^o^ (idem pour les autres)

>> sinon, bon tuto =) (et qui, apparemment, marche ! O_O ou presque ^o^)

Posté par Alex le 22 Mar - 23:34 (2009)
J'ai riens sauté, c'est juste quand je met édité, ça me saute des lignes à chaque code xD.


Merci, quelque bug à corriger encore ^^.

Posté par Lén le 23 Mar - 18:48 (2009)
Mmmm le NM7 fait aussi partit de GEMME mais j'en dirais pas plus car il est peu utilisé (enfin pas souvent).

D'ailleurs dans mes souvenirs c'est moi qui en ait parlé ici en preum's na 8)

(enfin je crois).

Posté par Dark' le 28 Mar - 18:46 (2009)
J'ai un bug quand je change de map...


Code:
  def on_screen_x(value_x)
   return (value_x.between?(- self.length / 2, 640 + self.length / 2))
  end


c'est la ligne du milieu qui bug :
RPG Maker a écrit:
- ARGS - [2]
undefined method `/' for nil:NilClass

Note : le bug n'a pas lieu entre des map de meme zoom.
...

Aussi, je sais pas pour vous, mais chez moi ça désactive la superposition vis à vis du héros.

Posté par Ace Attorney Man le 28 Mar - 19:08 (2009)
Juste Clin d'œil foireux
Aussi, ac ce script, les modifications du ton de l'ecran, même en dehors d'une map neomode7é, est augmenter(ça fait plus foncer) et après ça ne veut plus jamais partir :s

Encore plus, les animations dont la cellule ch'ais plus combien (Une nouveauté de 0.7 pour les animations de combats qui permettait de faire bouger le POKéMON) ne marche pas, le POKéMON ne bouge pas et c'est l'image de la cellule qui s'affiche :s

Enfin peu de compatibilité désolé ...

Posté par Newtiteuf le 28 Mar - 19:24 (2009)
Voila la correction dark je crois:
Newtiteuf a écrit:


Juste comme ca, vu nque je l'utilise, je tien a vous dire qu'il ne faut pas que vous laissiez des carreaux "vide" ... il vous faut les remplir (au minimum) de noir sinon ... pam le bug ^^




Dsl je me suis trompé, le bug viens du fait que tu es mis un élément de ton tileset en apparence pour un event, il faut mettre uniquement des charas.

Posté par Dark' le 29 Mar - 06:57 (2009)
Je ne pense pas avoir mis d'element du tileset en event, mais je vais vérifier. C'est pour le bug de teleport ou seulement pour la superposition ?

Posté par Newtiteuf le 29 Mar - 12:08 (2009)
En fait, sur la map ou tu téléporte ton hero, il y a un event qui a pour apparence ... un rocher du tileset, ou un lampadaire ou meme un livre ... afin n'importe quoi ! Il faut que tu l'enleve. Pour info, j'ai mis 4 jours a détecter le bug ! A chaque fois je refesait la map et je mettais les event un par un, et j'ai remarqué quel event buguait, puis j'ai remarqué que c'était le seul a utilisé un élément du tileset.

Posté par Dark' le 29 Mar - 12:57 (2009)
ok, merci NT. Et pour la superposition, ça mâche chez toi ? Et pour pouvoir utiliser les élément, il fait les mettre en chara, donc. As tu déjà fait les ressources ? si oui, tu peux les partager ici ?

Posté par Newtiteuf le 29 Mar - 14:18 (2009)
dsl, je n'ai pas fait les tileset en charas .. pas encore ^^

Pour la superposition:

 
Code:
 $terrain_tags_vertical_tiles = [1, 2] # You can modify these values
il y a ca dans le premier script, ce la veux dire que ces 2 tags terrains seront utilisés pour les élément au dessus (donc superposés) il te faut donc reprogrammer ton tiles ^^.

Posté par Alex le 29 Mar - 14:27 (2009)
Ou bien mettre:
Code:

$terrain_tags_vertical_tiles = [4, 5] # You can modify these values

??

Posté par Newtiteuf le 29 Mar - 14:41 (2009)
nn, puisque de toute facon il faudras tojjour modifier ton tileset et mettre le tag 5 ou 4 sur les carreaux les plus haut !

Posté par Dark' le 30 Mar - 12:20 (2009)
Cela signifie-t-il qu'il n'y a plus que deux étages de superposition disponible ?
Aïe, j'en utilise moi-même déjà au moins 3... je verrais si je peux m'arranger, j'ai vraiment besoin de ce script.

Merci beaucoup NT, ça va bien me servir.

Posté par Newtiteuf le 30 Mar - 15:38 (2009)
Pour en mettre 3 tu fais ca:
Code:

$terrain_tags_vertical_tiles = [1, 2, 3] # You can modify these values



Tu peux en mettre de 1 à 7 !

EDIT: Au fait, un seul suffit:

Imaginons que tu es mis un tag "1" qui est ta superposition, il te suffit de changer la priorité de superposition par le biais de la commande habituelle.

Posté par Sphinx le 30 Mar - 16:04 (2009)
>> question : pk la superposition n'est pas active "par défaut" sur tous les tags ? :?

Posté par Newtiteuf le 30 Mar - 16:30 (2009)
parceque a la base, le Mode 7 est fait pour bouger la camera pour avoir un effet 3D. Et nous, nous détournons cela pour juste faire un dézoom. Au départ les tags précédents ont été programmés pour avoir un effet de hauteur. Ce qui fait qu'il sont par dessus et que dans ce cas la priorité de superposition n'est pas utilisée !

Si tu n'as pas compris .. je peux pas expliquer mieux !

Posté par Dark' le 31 Mar - 11:39 (2009)
Récapitulons : si je met seulement le 1, et que je met tout mes tags en 1, sauf eux spéciaux psp... Je peux utiliser la superposition normal ?

Posté par Newtiteuf le 31 Mar - 13:48 (2009)
Non, car dans ce cas ton heros apparaitras en dessous de tes tiles ^^

Il faut juste que tu mete un tag 1 sur tout tes carreaux avec une priorité !

Posté par Dark' le 1 Avr - 12:49 (2009)
Il est possible aussi de ne pas avoir à mettre ni le [NM7] ni la ligne de code pour le 50% dans chaque map; mais plutot une ligne de code de 100% dans les maps isolées qui ne doivent pas prendre ce système :

Script 2, ligne 194

Code:
$game_system.neoM7 = map_data.name2.include?("NM7")


Remplacez par
Code:
$game_system.neoM7 = map_data.name2


Et script 1, ligne 185

Code:
    self.neoM7_zoom = 100


remplacez par
Code:
    self.neoM7_zoom = 50


Voili-voilou !


Alors, juste. Le Neo Mode 7 désactive les autotiles. Il y a une commande pour les activer ([A] dans le nom de la map). Or, quand j'active ce fameux A, j'ai un message d'erreur. Quelqu'un pourrait-il tester s'il vous plait ?



Et NT, j'ai fait ce que tu m'as dit (Programmer toutes les superpositions avec le tag concerné), ça marche, mais les carreaux concernés sont décalé de un ou deux pixels sur le haut et le côté... ça t'as fait ça aussi ?

Posté par Newtiteuf le 1 Avr - 19:45 (2009)
Pour le bug de décalage, c'est au déplacement c'est ca ? Et bien oui c'est normal !

Posté par Dark' le 2 Avr - 00:35 (2009)
Euh, moi ça décale tout le temps... C'est assez horible, je verrais quoi faire ce week end.

Posté par Pαlвσlѕку le 2 Avr - 07:29 (2009)
Dark' >> Idem, moi aussi j'ai ce bug graphique.

Posté par Dark' le 2 Avr - 12:25 (2009)
Et pour les autotiles ? Quelqu'un pourrait tester ?

Posté par nnahoy1 le 4 Avr - 18:43 (2009)
---------- Erreur de script : 5 ----------
----- Type
TypeError

----- Message
can't convert NilClass into Bitmap

----- Position dans 5
Ligne 493

----- Backtrace
Script : 5 | Ligne : 493 | Méthode : in `blt'
Script : 5 | Ligne : 493 | Méthode : in `draw_map'
Script : 5 | Ligne : 399 | Méthode : in `each'
Script : 5 | Ligne : 399 | Méthode : in `draw_map'
Script : 5 | Ligne : 60 | Méthode : in `initialize'
Script : 3 | Ligne : 392 | Méthode : in `new'
Script : 3 | Ligne : 392 | Méthode : in `initialize'
Script : Scene_Map | Ligne : 13 | Méthode : in `new'
Script : Scene_Map | Ligne : 13 | Méthode : in `old_main'
Script : JourNuitVirtuel | Ligne : 284 | Méthode : in `main'
Script : Main | Ligne : 58

Merci d'avance Bouche extensiblek:

Posté par Newtiteuf le 6 Avr - 17:06 (2009)
Newtiteuf a écrit:

Juste comme ca, vu nque je l'utilise, je tien a vous dire qu'il ne faut pas que vous laissiez des carreaux "vide" ... il vous faut les remplir (au minimum) de noir sinon ... pam le bug ^^

Posté par nnahoy1 le 8 Avr - 11:44 (2009)
tous mes carreaux son remplis

Posté par Newtiteuf le 9 Avr - 15:36 (2009)
s'ils sont rempli avec du blanc ca ne vas pas ! (enfin je me comprend)

Posté par Dark' le 11 Avr - 13:06 (2009)
Bon, j'ai étudié le script en détail cette semaine, à la main après l'avoir imprimé. Voici son focntionnement :

Les Event, Character et Player sont transformés en Vertical Sprites (VSp dans la suite de mon explication), ainsi que les terrains taggés par les tags sélectionnés en début de script. Le reste de la map est transformé en image.
Les VSp réagissent de manière différentes aux transformations telles que inclinaison de la map, rotation, caméra... que la map elle même.

Par exemple, lors de la 3D, la map s'incline, et les VSp changent de taille en fonction de leur distance au centre la map.

De cette manière la 3D est possible seulement... La Map est une image. Une seule. Raison pour laquelle la superposition ne marche plus.

En revanche, la superposition est active pour les éléments de la map entre eux, ainsi que pour les VSp entre eux.

Donc voilà, maintenant on sait le pourquoi du comment. Donc NT à raison, il suffit de mettre un des tags sur les éléments à superposé. Pour ceux qui n'aiment pas le script, maintenant.


Il est possible aussi de ne pas avoir à mettre ni le [NM7] ni la ligne de code pour le 50% dans chaque map; mais plutot une ligne de code de 100% dans les maps isolées qui ne doivent pas prendre ce système :

Script 2, ligne 194
Code:
$game_system.neoM7 = map_data.name2.include?("[NM7]")


Remplacez par
Code:
$game_system.neoM7 = map_data.name2


Script 2, ligne 197, pour les autotiles
Code:
$game_system.neoM7_animated = map_data.name2.include?("[A]")


Remplacez par
Code:
$game_system.neoM7_animated = map_data.name2


REMARQUE : chez certains, cela va planter. Vous allez donc devoir jouer sans autotiles animés.
Et script 1, ligne 185

Code:
    self.neoM7_zoom = 100


remplacez par
Code:
    self.neoM7_zoom = 50



Ensuite, pour ne pas avoir à activer d'interrupteur, et par conséquent ne pas risquer d'avoir de interférences avec d'autres fonctions du script
Toujours script 2, ligne environ 158, vous trouverez :
Code:
      $game_system.neoM7 = false


Remplacez "false" par "true"

Voili-voilou !

Posté par Alex le 11 Avr - 13:17 (2009)
Et bien merci Dark', je l'ajoute au premier post :]

[Edit]: MàJ du premier post :]

Posté par Lén le 11 Avr - 21:20 (2009)
...
Wahou
...

Déjà imprimer un script de plusieurs centaines (qui a dit milliers :D) de lignes et l'analyser ... wahou !
bon boulot!

Posté par Dark' le 12 Avr - 09:02 (2009)
41 pages Colibri 9 sans marge...

Je me suis fait une belle entorse a la cheville ya qq temps, j'avais pas mal de temps libre a la place du sport ^^.

Merci Alex pour le 1er post !

Posté par X le 26 Mai - 17:33 (2009)
chez moi il n'y a aucun bug et aucun resultat :(

Posté par Pαlвσlѕку le 26 Mai - 21:46 (2009)
Tu as pensé à ajouter [NM7] dans le nom de la map ?

Posté par Evilmad le 27 Mai - 04:09 (2009)
Je crois que j'ai aussi eu a faire à une histoire de décalage(de sprite de héros ) et j'ai donc utilisé un sprite comme ceci pour mon héros :*


Pour feinter de faire ce genre de chara j'ai juste pris un charset normal que j'ai mis en double sur une image comme ça :


et finnalement je n'ai plus eu de problème de vue.... Petit saligaud mal élevé
(J'en connais un qui va s'empresser de me dire que c'était déjà réglé comme d'hab)

Mais j'ai une question (avant que je fasse subir des tas de bugs à mon jeu) : Je ne peux utliser la ligne de script  ,
  1. $game_system.neoM7_animated = map_data.name2.include?("[A]")
à la place de l'autre en utilisant [NM7] dans le nom de la map ?

Posté par Pαlвσlѕку le 27 Mai - 11:33 (2009)
Pour les autotileset, ne surtout pas les mettre que la couche numéro 1.

Evilmad >> Au début du script, NM7 1, il aurait fallut changer un 8 en 4. Ce n'est pas grave, puisque tu as trouvé une alternative.
Donc oui, c'était déjà régler ^^'.

Je ne comprends pas ta question. Clin d'œil foireux

Posté par X le 28 Mai - 16:40 (2009)
---------- Erreur de script : Script3 ----------
----- Type
NoMethodError
----- Message
- ARGS - []
undefined method `-@' for nil:NilClass
----- Position dans Script3
Ligne 107
----- Backtrace
Script : Script3 | Ligne : 107 | Méthode : in `on_screen_x'
Script : Script3 | Ligne : 286 | Méthode : in `update'
Script : Sprite_Character | Ligne : 21 | Méthode : in `initialize'
Script : Script3 | Ligne : 395 | Méthode : in `new'
Script : Script3 | Ligne : 395 | Méthode : in `initialize'
Script : Script3 | Ligne : 394 | Méthode : in `each'
Script : Script3 | Ligne : 394 | Méthode : in `initialize'
Script : Scene_Map | Ligne : 13 | Méthode : in `new'
Script : Scene_Map | Ligne : 13 | Méthode : in `main'
Script : Main | Ligne : 57

Posté par Newtiteuf le 28 Mai - 18:06 (2009)
X : T'es bête ou quoi ? comment veux-tu qu'on t'aide si tu ne met pas le moment ou te rencontre ce bug :x

Mais si tu avais lu le reste ctu aurais su que ton problème viens:

- soit du fait que tu es un element de ton tilemset comme apparence d'un event,
- ou alors qu'un de tes case n'est pas remplie !

Posté par poussi le 20 Juin - 06:16 (2009)
euh Rien ne se pass dans psp 4G !

Posté par poussi le 20 Juin - 06:22 (2009)
cool voila il marche mas c'est lent !

Posté par Hot-Salmon le 4 Sep - 20:30 (2009)
Suis-je le seul con à avoir une erreur de synthaxe à la ligne 2 du premier script alors que celle-ci est un commentaire ?
(Et pour les futures questions, il n'y a QUE du commentaire sur cette ligne, aucun caractère flottant...)

Posté par Antoine' le 4 Sep - 20:58 (2009)
Idem pour moi

Posté par Slash le 4 Sep - 21:49 (2009)
J'ai essayer ce script avec les modif d'indiquer et il est truffer de bugs cela ne marche pas le moin du monde donc j'abandonne

Posté par Pαlвσlѕку le 4 Sep - 22:31 (2009)
D'après vous, d'où vient le système de 1*1 pixel de Pokémon Version Echoes ?

Il vient de là. Donc, si il ne fonctionne pas correctement, c'est que vous avez mal lu comment il fonctionnait. Cependant, quelques modifications sont nécessaires pour éviter certains bugs, où rajouter des fonctions supprimés (le surf par exemple).

Posté par Hot-Salmon le 6 Sep - 18:02 (2009)
Que c'est clair ! *ironie inside*
Et non, on a bien suivi le tuto mal foutu.

Posté par Newtiteuf le 6 Sep - 18:09 (2009)
Le tuto est tres compréhensible !

Posté par Slash le 6 Sep - 19:29 (2009)
bah moi ca ne marche pas du tout en suivant le tuto
ce script est il fait pour PSP0.7 ou 4G+

Posté par Schtroumpf Anarchiste le 6 Sep - 21:29 (2009)
J'ai pas très bien compris ... En fait, pour l'extérieur, est-ce que ça réduira en fait la carte à 50 % ( ce qui veut dire que le joueur verra TOUTE la map d'un coup, ce qui n'est pas très malin pour les endroits dit " secrets " et les autres trucs qui ne devraient pas être vu du premier coup d'oeil si vous voyez ce que je veux dire ) ou non ?

Posté par Antoine' le 7 Sep - 12:51 (2009)
Slash a écrit:

bah moi ca ne marche pas du tout en suivant le tuto
ce script est il fait pour PSP0.7 ou 4G+


Moi je pense que c'est pour PSP0.7 J'ai regarder le projet de Pal' Et Rabzuz et j'ai remarquer que tout les 2 Utilisait 0.7 et aussi le Pixel 1x1  ,  J'ai voulu essayer mais le lien pour le telecharger et mort  :x  

Posté par Newtiteuf le 7 Sep - 13:53 (2009)
Pour info, pour le script , je n'utilise pas la tuto puisque effectivement j'ai été le premier a l'utiliser (le script) !

Donc j'utilise le script sous PSP 4G  (sans le "+") (d'ailleur merci slash ^^)

Et il semblerai que 4G+ est subis beaucoup de modif ce qui explique la grande incompatibilité !
Au fait il faudrait penser a apprendre a lire les infos dans les titres (sous-titres) des tutos :


 
Citation:
  [Script] Anti Gros Pixel
[PSP 0.7/X/Testé]

Posté par Antoine' le 7 Sep - 13:55 (2009)
Slash Aussi A Pas Lu xP

Mais J'aimerai 0.7 Pour essayer Mais Le Lien Et Mort

Posté par Slash le 8 Sep - 16:03 (2009)
mmmh alors je comprend pas pourquoi ca marche pas sous PSP0.7 avec correctif 6

Posté par Hot-Salmon le 8 Sep - 17:44 (2009)
Le script/explications? est foireux.

Posté par Antoine' le 8 Sep - 17:53 (2009)
Non Le Tuto Est Tres Bien Expliquer , C'est Le Script Qui Est Foireux Comme Tu Dit

Posté par Pαlвσlѕку le 8 Sep - 21:50 (2009)
Je ne conseil pas trop d'utiliser PSP4G+ avec le NM7. Ce start kit a le désavantage de demander plus en mémoire que PSP0.7, et le NM7 étant très gourmand, bonjour les lags.

Pokémon Version Echoes est victime du lag malheureusement. Cependant, le NM7 possède une fonction qui réduit la qualité de l'image lors du déplacement. Moins de mémoires graphiques, moins de lags. Clin d'œil foireux

Posté par Newtiteuf le 9 Sep - 12:16 (2009)
Pal, tu utilise la fonction pour réduire la qualité (le truc [F] filtre dans la nom de la map) ? ... C'est pas super , utilise plutôt dans un premier temps le "Antilag le plus performant" ... et puis si il te reste encore du lag, augmente la vitesse de tes persos de 1 et tout iras bien !

Posté par Antoine' le 13 Sep - 17:37 (2009)
Bonjour moi sa fonctionne mais quand je met new partis sa bug Script 3 ligne 107 Pleurnicheur comment faire pour le regler voici le log et la ligne que bug

  return (value_x.between?(- self.length / 2, 640 + self.length / 2)) ligne 107

Le LOG :

---------- Erreur de script : S3 ----------
----- Type
NoMethodError

----- Message
- ARGS - []
undefined method `-@' for nil:NilClass

----- Position dans S3
Ligne 107

----- Backtrace
Script : S3 | Ligne : 107 | Méthode : in `on_screen_x'
Script : S3 | Ligne : 286 | Méthode : in `update'
Script : Sprite_Character | Ligne : 21 | Méthode : in `initialize'
Script : S3 | Ligne : 395 | Méthode : in `new'
Script : S3 | Ligne : 395 | Méthode : in `initialize'
Script : S3 | Ligne : 394 | Méthode : in `each'
Script : S3 | Ligne : 394 | Méthode : in `initialize'
Script : Scene_Map | Ligne : 13 | Méthode : in `new'
Script : Scene_Map | Ligne : 13 | Méthode : in `main'
Script : Main | Ligne : 57


Voila en m'expliquant comment le regler

Posté par Antoine' le 17 Sep - 13:51 (2009)
Up ? Aque Personne

Posté par Drakhaine le 21 Sep - 07:31 (2009)
Ouvre n'importe quel script, fais CTRL+SHIFT+F (shift c'est la touche majuscule)
Ensuite mets ça en recherche : "-@" (sans les guillemets)

Si mon pressentiment est bon, tu auras -@ suivi d'un espace puis d'un mot quelconque. Essaie d'enlever l'espace, ça devrait le faire Clin d'œil foireux Regarde quand même quelle ligne c'est, histoire que si je me trompe, tu puisses remettre l'espace

Posté par Newtiteuf le 27 Sep - 18:40 (2009)
-Antooinne a écrit:
Bonjour moi sa fonctionne mais quand je met new partis sa bug Script 3 ligne 107 Pleurnicheur comment faire pour le regler voici le log et la ligne que bug

  return (value_x.between?(- self.length / 2, 640 + self.length / 2)) ligne 107

Le LOG :

---------- Erreur de script : S3 ----------
----- Type
NoMethodError

----- Message
- ARGS - []
undefined method `-@' for nil:NilClass

----- Position dans S3
Ligne 107

----- Backtrace
Script : S3 | Ligne : 107 | Méthode : in `on_screen_x'
Script : S3 | Ligne : 286 | Méthode : in `update'
Script : Sprite_Character | Ligne : 21 | Méthode : in `initialize'
Script : S3 | Ligne : 395 | Méthode : in `new'
Script : S3 | Ligne : 395 | Méthode : in `initialize'
Script : S3 | Ligne : 394 | Méthode : in `each'
Script : S3 | Ligne : 394 | Méthode : in `initialize'
Script : Scene_Map | Ligne : 13 | Méthode : in `new'
Script : Scene_Map | Ligne : 13 | Méthode : in `main'
Script : Main | Ligne : 57


Voila en m'expliquant comment le regler


"Maintenant, sur vos map, TOUTES les cases doivent êtres remplies (mettez une case noir pour les cases vides)."

Ou alors tu as utilisé un élément du tileset en event !

Posté par antoinedu92 le 13 Oct - 17:48 (2009)
Regardez les beaux bugs que ça me fait:


Quelqu'un a-t'il  une solution :shock:
Merci
PS: j'ai suivis toutes les étapes du tuto et toutes les modifications sur les scripts.

Posté par Newtiteuf le 16 Oct - 16:42 (2009)
Tu as mal programmé le tileset (enfait c'est pas marqué dans le tuto) mais quand tu met l'effet 3D c'est galere pour le reglage ! vas voir sur google !

Posté par Evilmad le 17 Oct - 00:55 (2009)
Ce serait plus simple de dire comment il fonctionne ici .
Tout est expliqué dans le premier script , il ne vous reste qu'a comprendre l'anglais (j'ai pas le temps de traduire aujourd'hui desolé)

Réglez les tags terrains dans la base de données , cela réglera la hauteur : utilisez 0 pour le sol et 1 ou 2 pour les éléments hauts, comme les arbres ou batiments .
La troisime couche est au dessus de tout alors évitez la.

Posté par Azuroh le 17 Oct - 15:21 (2009)
Excuse-moi, mais quand vous disez dans la " racine " du jeu, tu veux dire où précisément ?  :shock: Merci ^^ 

Posté par Pαlвσlѕку le 17 Oct - 17:08 (2009)
Le dossier racine c'est le dossier qui mène au dossier Graphics, Audio et Data et c'est là qu'on lance le jeu. Imbécile heureux

Posté par Azuroh le 17 Oct - 17:24 (2009)
Merci Palbolsky ^^ T'es génial ! Peut-être à bientôt pour étaler mon ignorance devant des maîtres du rpg making ^^

Posté par Azuroh le 18 Oct - 11:49 (2009)
Je l'ai dit que je reviendrais ^^'

The bug :


 
Code:
 ---------- Erreur de script : 1x1 Pixel-4 ----------
----- Type
RuntimeError

----- Message
LoadLibrary: MGCmode7.dll


----- Position dans 1x1 Pixel-4
Ligne 57

----- Backtrace
Script : 1x1 Pixel-4 | Ligne : 57 | Méthode : in `initialize'
Script : 1x1 Pixel-4 | Ligne : 57 | Méthode : in `new'
Script : 1x1 Pixel-4 | Ligne : 57 | Méthode : in `neoM7'
Script : 1x1 Pixel-5 | Ligne : 327 | Méthode : in `update'
Script : 1x1 Pixel-3 | Ligne : 471 | Méthode : in `update'
Script : 1x1 Pixel-3 | Ligne : 406 | Méthode : in `initialize'
Script : Scene_Map | Ligne : 13 | Méthode : in `new'
Script : Scene_Map | Ligne : 13 | Méthode : in `old_main'
Script : TempsJourNuit | Ligne : 237 | Méthode : in `main_passminimap'
Script : Minimap | Ligne : 31 | Méthode : in `main'
Script : Main | Ligne : 49



La ligne qui bug :


 
Code:
     func=Win32API.new("MGCmode7.dll", function, "llllllllllllllll", "")

^^ Mici

Posté par Sphinx le 18 Oct - 17:46 (2009)
tu as le fichier MGCmode7.dll au moins ?

Posté par Azuroh le 18 Oct - 17:55 (2009)
Je l'ai installé, mais pour l'ouvrir à partir de mes téléchargement, un message s'affiche :

" Descripteur de menu non valide "

Je l'ai tout de même placer dans le fichier de mon projet ( où il y a bien les dossier de ressources et mon game.exe )

Donc je ne sais point se qu'il faut faire ^^"

Grand Sphinx ^^

Posté par Sphinx le 18 Oct - 18:28 (2009)
Clin d'œil foireux tu n'as pas besoin d'ouvrir un fichier dll

faut juste qu'il se trouve dans le dossier de ton jeu

Posté par Azuroh le 19 Oct - 11:50 (2009)
Sphinx, je l'es bien placé dans le répertoire de mon projet rmxp, j'ai bien mis les " [MN7][#XX][%XXX], ect... dans le nom de chaque de mes maps, sur toutes mes maps, il n'y a aucune case vide a par en couche 3 pour faire passer le héros ou non ^^"

Grand Scribe, peux tu abattre se vilain bug ? ^^' mici

Posté par Sphinx le 19 Oct - 12:05 (2009)
(^^' je ne suis absolument pas spécialiste du NM7, tu sais...)

Posté par Azuroh le 19 Oct - 16:54 (2009)
Donc il faut que j'attende la venue de Alex ^^"

Merci tout de même ^^

Posté par Schtroumpf Anarchiste le 25 Oct - 14:55 (2009)
EDIT : J'ai toujours pas compris pour la superposition et le maplink.

Azuroh : C'est simple. Le nom de ton fichier est " mgcmode7-c8ab84.dll ", pas " mgcmode7.dll ".
Il faut donc rajouter " -c8ab84.dll " sur la ligne qui bug. Enfin, c'est ce que j'ai fais et ça marche.
En gros, tu remplace ça :

Code:


func=Win32API.new("MGCmode7.dll", function, "llllllllllllllll", "") 



par ça :

Code:


func=Win32API.new("MGCmode7-c8ab84.dll", function, "llllllllllllllll", "")



Posté par Hot-Salmon le 25 Oct - 17:11 (2009)
Bon j'en ai vraiment ras le bol, j'ai remplis toutes mes cases (à moins qu'il faille le faire sur toutes les couches mais alors c'est vraiment chiant), etc et j'ai un bug au moment où je fais une nouvelle partie, le même bug que recontre le première personne qui a posté sur ce topic, et auquel vous n'avez pas répondu : (au moment de créer une nouvelle partie)

le log :

---------- Erreur de script : Mode 7 04 ----------
----- Type
TypeError

----- Message
can't convert NilClass into Bitmap

----- Position dans Mode 7 04
Ligne 537

----- Backtrace
Script : Mode 7 04 | Ligne : 537 | Méthode : in `blt'
Script : Mode 7 04 | Ligne : 537 | Méthode : in `autotile_base'
Script : Mode 7 04 | Ligne : 403 | Méthode : in `load2'
Script : Mode 7 05 | Ligne : 534 | Méthode : in `draw_map'
Script : Mode 7 05 | Ligne : 511 | Méthode : in `each'
Script : Mode 7 05 | Ligne : 511 | Méthode : in `draw_map'
Script : Mode 7 05 | Ligne : 60 | Méthode : in `initialize'
Script : Mode 7 03 | Ligne : 386 | Méthode : in `new'
Script : Mode 7 03 | Ligne : 386 | Méthode : in `initialize'
Script : Scene_Map | Ligne : 13 | Méthode : in `new'
Script : Scene_Map | Ligne : 13 | Méthode : in `main'
Script : Main | Ligne : 57


J'aimerais vraiment de l'aide quoi...

Posté par Azuroh le 25 Oct - 18:47 (2009)
Merci  Aym'n'ms, t'as résolu mon bug en même temps ^^





Posté par Ace Attorney Man le 25 Oct - 19:06 (2009)
Hot-Salmon a écrit:
Bon j'en ai vraiment ras le bol, j'ai remplis toutes mes cases (à moins qu'il faille le faire sur toutes les couches mais alors c'est vraiment chiant), etc et j'ai un bug au moment où je fais une nouvelle partie, le même bug que recontre le première personne qui a posté sur ce topic, et auquel vous n'avez pas répondu : (au moment de créer une nouvelle partie)

le log :

---------- Erreur de script : Mode 7 04 ----------
----- Type
TypeError

----- Message
can't convert NilClass into Bitmap

----- Position dans Mode 7 04
Ligne 537

----- Backtrace
Script : Mode 7 04 | Ligne : 537 | Méthode : in `blt'
Script : Mode 7 04 | Ligne : 537 | Méthode : in `autotile_base'
Script : Mode 7 04 | Ligne : 403 | Méthode : in `load2'
Script : Mode 7 05 | Ligne : 534 | Méthode : in `draw_map'
Script : Mode 7 05 | Ligne : 511 | Méthode : in `each'
Script : Mode 7 05 | Ligne : 511 | Méthode : in `draw_map'
Script : Mode 7 05 | Ligne : 60 | Méthode : in `initialize'
Script : Mode 7 03 | Ligne : 386 | Méthode : in `new'
Script : Mode 7 03 | Ligne : 386 | Méthode : in `initialize'
Script : Scene_Map | Ligne : 13 | Méthode : in `new'
Script : Scene_Map | Ligne : 13 | Méthode : in `main'
Script : Main | Ligne : 57


J'aimerais vraiment de l'aide quoi...


Fait attendre 10 framme dans un event en demarrage auto sur cette map et dis-moi si ça marche.

Posté par Schtroumpf Anarchiste le 25 Oct - 20:28 (2009)
Oups j'ai dû me tromper, en effet, c'était à toi que je parlais Azuroh ^^*
Moi, ça bug au moment du maplink entre deux map où la taille est différente l'une de l'autre.

Script :

#--------------------------------------------------------------------------
  def neoM7_zoom(x_screen, y_screen)
    self.zoom_x = $game_temp.zoom_sprites * ($game_temp.slope_value * y +
    $game_temp.corrective_value)
    self.zoom_y = zoom_x
  end
  #--------------------------------------------------------------------------
  # check if value_x (in pixels) is on screen
  #--------------------------------------------------------------------------
  def on_screen_x(value_x)
    return (value_x.between?(- self.length / 2, 640 + self.length / 2)) **********************************************
  end
  #--------------------------------------------------------------------------
  # check if value_y (in pixels) is on screen
  #--------------------------------------------------------------------------
  def on_screen_y(value_y)
    return (value_y.between?($game_temp.height_limit_sprites, 480 + self.height))
  end

Ligne qui bug avec plein d'étoiles pas belles.
Ensuite, l'erreur :



Et enfin le log.txt :

---------- Erreur de script : Script 3 NM7 ----------
----- Type
NoMethodError

----- Message
- ARGS - []
undefined method `-@' for nil:NilClass

----- Position dans Script 3 NM7
Ligne 107

----- Backtrace
Script : Script 3 NM7 | Ligne : 107 | Méthode : in `on_screen_x'
Script : Script 3 NM7 | Ligne : 286 | Méthode : in `update'
Script : Sprite_Character | Ligne : 21 | Méthode : in `initialize'
Script : Script 3 NM7 | Ligne : 395 | Méthode : in `new'
Script : Script 3 NM7 | Ligne : 395 | Méthode : in `initialize'
Script : Script 3 NM7 | Ligne : 394 | Méthode : in `each'
Script : Script 3 NM7 | Ligne : 394 | Méthode : in `initialize'
Script : Scene_Map | Ligne : 202 | Méthode : in `new'
Script : Scene_Map | Ligne : 202 | Méthode : in `transfer_passminimap'
Script : Minimap | Ligne : 50 | Méthode : in `transfer_player'
Script : Scene_Map | Ligne : 63 | Méthode : in `alias_update'
Script : Scene_Map | Ligne : 48 | Méthode : in `loop'
Script : Scene_Map | Ligne : 67 | Méthode : in `alias_update'
Script : MAPPANEL | Ligne : 90 | Méthode : in `old_update'
Script : TempsJourNuit | Ligne : 248 | Méthode : in `update_passminimap'
Script : Minimap | Ligne : 44 | Méthode : in `update'
Script : Scene_Map | Ligne : 25 | Méthode : in `old_main'
Script : Scene_Map | Ligne : 19 | Méthode : in `loop'
Script : Scene_Map | Ligne : 30 | Méthode : in `old_main'
Script : TempsJourNuit | Ligne : 237 | Méthode : in `main_passminimap'
Script : Minimap | Ligne : 31 | Méthode : in `main'
Script : Main | Ligne : 49

Posté par pascal_bouchard le 28 Nov - 04:19 (2009)
c'est un très beau scripts c'est dommage qu'il a plein de bug comme le maplink, la téléportation avec l'animation de l'ouverture des porte ensuite la superposition des obstacle on marche dessus au lieu qu'on est sensé être cacher derrière comme exemple les arbres,et le menu.


ce serait cool que tu puisse régler les bug car il aurrait beaucoup de monde qu'il l'utiliserait dont moi.

Posté par Ace Attorney Man le 28 Nov - 12:43 (2009)
>> Il est noté comment le corriger dans ce topic, cherche.

Posté par pascal_bouchard le 28 Nov - 16:30 (2009)
ben enfin de compte je l'utiliseras pas u que j'ai psp4g+cor4 mais il est quand même génial ce scripts et le maplink 

Posté par FinalArt le 29 Nov - 17:42 (2009)
Hey, j'ai PSP4G+, je l'utilise et il marche ^^

Posté par Ace Attorney Man le 29 Nov - 17:44 (2009)
pascal_bouchard a écrit:

ben enfin de compte je l'utiliseras pas u que j'ai psp4g+cor4 mais il est quand même génial ce scripts et le maplink 
Quel bug se produisent ?

Posté par Antoine' le 30 Nov - 20:19 (2009)
PokéAzur a écrit:

Hey, j'ai PSP4G+, je l'utilise et il marche ^^

Moi aussi sa marche graçe a pokéazur :p

Posté par Ace Attorney Man le 30 Nov - 20:22 (2009)
Et comment t'as fait ? =o

Posté par Antoine' le 30 Nov - 20:26 (2009)
Envoi MP A pokéazur

il t'expliquera tout correctement

Posté par Ace Attorney Man le 30 Nov - 20:37 (2009)
Ok ^_^.

Posté par Sphinx le 30 Nov - 23:10 (2009)
-Antooinne a écrit:
Envoi MP A pokéazur

il t'expliquera tout correctement


Ca serait plus judicieux d'expliquer la manip ici, pour que tous ceux qui souhaitent installer le script anti gros pixels le puissent sans avoir besoin de MP PokeAzur... Mollasse enragé Enfin moi, je dis ca, je ne dis rien... Je ne suis pas trop concerné après tout...

Posté par Ace Attorney Man le 1 Déc - 18:25 (2009)
>> En fait, il m'a dit via msn qu'il n'avait réussi à faire que le déplacement 16*16 avec NM7, le reste il utilise autre chose.
Bonne journée.

Posté par xxdylanxx le 2 Déc - 13:20 (2009)
Oui sa sera simpa que PokéAzur nous explique ici!

Posté par FinalArt le 3 Déc - 17:53 (2009)
Voici le mp envoyé à - Antooine

|=>

----------------------------------

Donc tu vas dans ta base de donnée, au dessus de main, tu créer 5 script qui porte respectivement les noms :

1x1 Pixel-1
1x1 Pixel-2
1x1 Pixel-3
1x1 Pixel-4
1x1 Pixel-5

Dans le premier script tu colle ceci :


 
Code:
  #============================================================================

# This script emulates the snes mode 7 feature.

# Written by MGCaladtogel

# Neo Mode 7 - 12/05/08

#----------------------------------------------------------------------------

# Instructions :

# You must add to the map's name :

#- [NM7] : to activate Neo Mode 7

#- [#XX] : XX is the angle of slant (in degree) : 0 -> 89

#- [%XXX]: XXX is the angle of rotation (in degree) : 0 -> 359

#- [L]   : to enable map looping

#- [A]   : animated autotiles (with 4 patterns)

#- [H]   : to have a white horizon

#- [RX]  : X = 1 -> high resolution (default)

#        : X = 2 -> medium resolution (to increase performance)

#        : X = 3 -> low resolution (to increase performance)

#- [F]   : activate the filer (to increase performance) : strongly recommanded

#

# OR :

# see the "$mode7_maps_settings" below (l.68) to prepare your settings

#----------------------------------------------------------------------------

# - To set a new angle of slant (0~89) :

# $scene.spriteset.tilemap.set_alpha(new angle)

# To slide progressively into a new angle of slant :

# $scene.spriteset.tilemap.to_alpha(new angle, speed)

# To increase/decrease the slant :

# $scene.spriteset.tilemap.increase_alpha(value)

# - To set a new angle of rotation (0~379) :

# $scene.spriteset.tilemap.set_theta(new angle)

# To slide progressively into a new angle of rotation :

# $scene.spriteset.tilemap.to_theta(angle, speed, dir)

# To increase/decrease the angle of rotation :

# $scene.spriteset.tilemap.increase_theta(value)

# - To set a new zoom level  :

# $scene.spriteset.tilemap.set_zoom(new value)

# To slide progressively into a new zoom level :

# $scene.spriteset.tilemap.to_zoom(value, speed)

# To increase/decrease the zoom level :

# $scene.spriteset.tilemap.increase_zoom(value)

# - The pivot's value (32~480) represents the screenline's number considered

# as the axis for map trasformations.

# By default its value is 256.

# To set a new value :

# $scene.spriteset.tilemap.set_pivot(new value)

# To slide progressively into a new pivot's value :

# $scene.spriteset.tilemap.to_pivot(value, speed)

# To increase/decrease the pivot's value :

# $scene.spriteset.tilemap.increase_pivot(value)

# - Pivot's value and zoom level are saved from

# one map to another. You have to reinitialize

# them manually if you need it.

#

# - To set the altitude of a vertical event :

# add a comment in the event's commands list with : "Heigth X", where X is the

# height value ("Heigth 2" will draw the event 64 pixels above its original

# position - you can use floats)

# - To set the altitude of the player :

# use : $game_player.height = X

#============================================================================

# The map is drawn from all the tiles of the three layers that do not have a

# terrain_tag's value of 1 or 2.

# The other tiles (terrain_tag = 1 or 2) form elements that are drawn vertically,

# like the 3rd-layer elements in the old version.

# The 2 terrains ID used to form vertical elements

$terrain_tags_vertical_tiles = [1, 2] # You can modify these values

# To access maps names

$data_maps = load_data("Data/MapInfos.rxdata")

$neoM7_maps_settings = {}

# Prepare your own settings for mode7 maps

# Just put the first parameter in a map's name

# For example :

$neoM7_maps_settings["Worldmap"] = ["#60", "L", "A", "H", "F"]

# -> will  be called  when "Worldmap" is included in the name

$neoM7_maps_settings["Smallslant"] = ["#20", "A", "F"]

# Add any number of settings you want



# enable/disable mode7 for mode7 maps (not on the fly, just when the map is loaded), enabled by default

$enable_neoM7_number = 17 # switch number : change this value !



# - Number of directions for the player on mode 7 maps :

$player_directions = 4 # you can change this value !

# the character set used in that case must have the default name + "_m7"

# - To set the number of directions of a vertical event :

# add a comment in the event's commands list with : "Directions X"



# rows of character sets : the first represents the character that faces the screen,

# then the character rotates in the trigonometric direction

$dirs = {}

# 4 directions :

$dirs[4] = [0, 2, 3, 1]

# 8 directions :

$dirs[8] = [0, 6, 2, 7, 3, 5, 1, 4]

# you can change these values or add directions



#============================================================================

# Neo Mode 7

# Written by MGCaladtogel

# 12/05/08

#

# Part 1

#

# class Game_Switches

#   initialize                : aliased

#

# class Game_System

#   initialize                : aliased

#   neoM7_reset               : new method

#

# class Game_Temp

#   initialize                : aliased

#

#============================================================================



#============================================================================

# ■ Game_Switches

#============================================================================



class Game_Switches

  #--------------------------------------------------------------------------

  # * Aliased methods (F12 compatibility)

  #--------------------------------------------------------------------------

  if !@already_aliased

    alias initialize_neoM7_game_player initialize

    @already_aliased = true

  end

  #--------------------------------------------------------------------------

  # * Object Initialization

  #--------------------------------------------------------------------------

  def initialize

    initialize_neoM7_game_player

    self[$enable_neoM7_number] = true

  end

end



#============================================================================

# ■ Game_System

#----------------------------------------------------------------------------

# Add attributes to this class

#============================================================================



class Game_System

  #--------------------------------------------------------------------------

  # * Aliased methods (F12 compatibility)

  #--------------------------------------------------------------------------

  if !@already_aliased

    alias initialize_neoM7_game_system initialize

    @already_aliased = true

  end

  #--------------------------------------------------------------------------

  # * Attributes

  #--------------------------------------------------------------------------

  attr_accessor :neoM7 # true : neo mode 7

  attr_accessor :neoM7_loop # true : map looping in x and y

  attr_accessor :neoM7_animated # true : animated autotiles for neoM7 maps

  attr_accessor :neoM7_white_horizon # true : white line horizon for neoM7 maps

  attr_accessor :neoM7_alpha # angle of slant (in degree)

  attr_accessor :neoM7_theta # angle of rotation (in degree)

  attr_accessor :neoM7_horizon # horizon's distance

  attr_accessor :neoM7_resolution # 1:max, 2:med, 3:low

  attr_accessor :neoM7_filter # true : enable filter (increase perf., blurry when moving)

  attr_accessor :neoM7_pivot # screenline's number of the slant/rotation pivot

  attr_accessor :neoM7_zoom # zoom level (percentage, 100 = no zoom)

  attr_accessor :neoM7_center_y # center screen y-coordinate (depend on pivot)

  #--------------------------------------------------------------------------

  # * Object Initialization

  #--------------------------------------------------------------------------

  def initialize

    initialize_neoM7_game_system

    self.neoM7 = false

    self.neoM7_loop = false

    self.neoM7_animated = false

    self.neoM7_white_horizon = false

    self.neoM7_alpha = 0

    self.neoM7_theta = 0

    self.neoM7_horizon = 960

    self.neoM7_resolution = 1

    self.neoM7_filter = false

    neoM7_reset

  end

  #--------------------------------------------------------------------------

  # * Reset zoom, pivot, and screen's center_y

  #--------------------------------------------------------------------------

  def neoM7_reset

    self.neoM7_pivot = 256

    self.neoM7_zoom = 50

    self.neoM7_center_y = Game_Player::CENTER_Y

  end

end



#============================================================================

# ■ Game_Temp

#----------------------------------------------------------------------------

# Add attributes to this class / Avoid using too many global variables

#============================================================================



class Game_Temp

  #--------------------------------------------------------------------------

  # * Aliased methods (F12 compatibility)

  #--------------------------------------------------------------------------

  if !@already_aliased

    alias initialize_neoM7_game_temp initialize

    @already_aliased = true

  end

  #--------------------------------------------------------------------------

  # * Attributes

  #--------------------------------------------------------------------------

  attr_accessor :pivot # screenline's number of the pivot

  attr_accessor :pivot_map # same as pivot (depend of resolution)

  attr_accessor :neoM7_height_limit # horizon

  attr_accessor :height_limit_sprites # horizon for vertical sprites

  attr_accessor :distance_h # distance between the center of the map (halfwidth, pivot) and the point of view

  attr_accessor :slope_value # intermediate value used to calculate x-coordinate

  attr_accessor :slope_value_map # same as slope_value (depend of resolution) (* 262144)

  attr_accessor :corrective_value # intermediate value used to calculate x-coordinate

  attr_accessor :corrective_value_map # same as corrective_value (depend of resolution) (* 262144)

  attr_accessor :cos_alpha # cosinus of the angle of slant (* 4096)

  attr_accessor :sin_alpha # sinus of the angle of slant (* 4096)

  attr_accessor :cos_theta # cosinus of the angle of rotation (* 4096)

  attr_accessor :sin_theta # sinus of the angle of rotation (* 4096)

  attr_accessor :distance_p # distance between the center of the map (halfwidth, pivot) and the projection plane surface

  attr_accessor :zoom_map # zoom level (map) (percentage * 4096)

  attr_accessor :zoom_sprites # same as zoom_map (ratio)

  #--------------------------------------------------------------------------

  # * Object Initialization

  #--------------------------------------------------------------------------

  def initialize

    initialize_neoM7_game_temp

    self.pivot = 0

    self.pivot_map = 0

    self.neoM7_height_limit = 0

    self.height_limit_sprites = 0

    self.distance_h = 0

    self.slope_value = 0.0

    self.slope_value = 0

    self.corrective_value = 0.0

    self.corrective_value_map = 0

    self.cos_alpha = 0

    self.sin_alpha = 0

    self.cos_theta = 0

    self.sin_theta = 0

    self.distance_p = 0

    self.zoom_map = 1

    self.zoom_sprites = 1.0

  end

end











Dans le deuxième :


 
Code:
  #============================================================================

# Neo Mode 7

# Written by MGCaladtogel

# 12/05/08

#

# Part 2

#

# class Game_Map

#   scroll_down               : aliased

#   scroll_left               : aliased

#   scroll_right              : aliased

#   scroll_up                 : aliased

#   valid?                    : aliased

#   passable?                 : aliased

#   setup                     : aliased

#

# class Game_Character

#   initialize                : aliased

#   update                    : aliased

#

# class Game_Event

#   check_commands            : new method

#   refresh                   : aliased

#

# class Game_player

#   initialize                : aliased

#   center                    : aliased

#   update                    : aliased

#

#============================================================================



#============================================================================

# ■ Game_Map

#----------------------------------------------------------------------------

# Methods modifications to handle map looping

#============================================================================



class Game_Map

  #--------------------------------------------------------------------------

  # * Aliased methods (F12 compatibility)

  #--------------------------------------------------------------------------

  if !@already_aliased

    alias scroll_down_neoM7_game_map scroll_down

    alias scroll_left_neoM7_game_map scroll_left

    alias scroll_right_neoM7_game_map scroll_right

    alias scroll_up_neoM7_game_map scroll_up

    alias valid_neoM7_game_map? valid?

    alias passable_neoM7_game_map? passable?

    alias old_setup_neoM7 setup

    @already_aliased = true

  end

  #--------------------------------------------------------------------------

  # * Scroll Down

  #     distance : scroll distance

  #--------------------------------------------------------------------------

  def scroll_down(distance)

    if !$game_system.neoM7

      scroll_down_neoM7_game_map(distance)

      return

    end

    @display_y = @display_y + distance

  end

  #--------------------------------------------------------------------------

  # * Scroll Left

  #     distance : scroll distance

  #--------------------------------------------------------------------------

  def scroll_left(distance)

    if !$game_system.neoM7

      scroll_left_neoM7_game_map(distance)

      return

    end

    @display_x = @display_x - distance

  end

  #--------------------------------------------------------------------------

  # * Scroll Right

  #     distance : scroll distance

  #--------------------------------------------------------------------------

  def scroll_right(distance)

    if !$game_system.neoM7

      scroll_right_neoM7_game_map(distance)

      return

    end

    @display_x = @display_x + distance

  end

  #--------------------------------------------------------------------------

  # * Scroll Up

  #     distance : scroll distance

  #--------------------------------------------------------------------------

  def scroll_up(distance)

    if !$game_system.neoM7

      scroll_up_neoM7_game_map(distance)

      return

    end

    @display_y = @display_y - distance

  end

  #--------------------------------------------------------------------------

  # * Determine Valid Coordinates

  #     x          : x-coordinate

  #     y          : y-coordinate

  #   Allow the hero to go out of the map when map looping

  #--------------------------------------------------------------------------

  def valid?(x, y)

    if !$game_system.neoM7

      return (valid_neoM7_game_map?(x, y))

    end

    return true if $game_system.neoM7_loop

    return (x >= 0 and x < width and y >= 0 and y < height)

  end

  #--------------------------------------------------------------------------

  # * Determine if Passable

  #     x          : x-coordinate

  #     y          : y-coordinate

  #     d          : direction (0,2,4,6,8,10)

  #                  *  0,10 = determine if all directions are impassable

  #     self_event : Self (If event is determined passable)

  #--------------------------------------------------------------------------

  def passable?(x, y, d, self_event = nil)

    if !$game_system.neoM7

      return(passable_neoM7_game_map?(x, y, d, self_event))

    end

    unless valid?(x, y)

      return false

    end

    bit = (1 << (d / 2 - 1)) & 0x0f

    for event in events.values

      if event.tile_id >= 0 and event != self_event and

         event.x == x and event.y == y and not event.through

        if @passages[event.tile_id] & bit != 0

          return false

        elsif @passages[event.tile_id] & 0x0f == 0x0f

          return false

        elsif @priorities[event.tile_id] == 0

          return true

        end

      end

    end

    for i in [2, 1, 0]

      tile_id = data[x % width, y % height, i] # handle map looping

      if tile_id == nil

        return false

      elsif @passages[tile_id] & bit != 0

        return false

      elsif @passages[tile_id] & 0x0f == 0x0f

        return false

      elsif @priorities[tile_id] == 0

        return true

      end

    end

    return true

  end

  #--------------------------------------------------------------------------

  # * Setup

  #     map_id : map ID

  #--------------------------------------------------------------------------

  def setup(map_id)

    old_setup_neoM7(map_id)

    if !$game_switches[$enable_neoM7_number]

      $game_system.neoM7 = true

      $game_system.neoM7_loop = false

      $game_system.neoM7_animated = false

      $game_system.neoM7_white_horizon = false

      $game_system.neoM7_alpha = 0

      $game_system.neoM7_theta = 0

      $game_system.neoM7_horizon = 960

      $game_system.neoM7_resolution = 1

      $game_system.neoM7_filter = false

      return

    end

    map_data = $data_maps[$game_map.map_id]

    for keyword in $neoM7_maps_settings.keys

      if map_data.name2.include?(keyword)

        command_list = $neoM7_maps_settings[keyword]

        $game_system.neoM7 = map_data.name2.include?("[NM7]")

        $game_system.neoM7_loop = map_data.name2.include?("[L]")

        $game_system.neoM7_animated = map_data.name2.include?("[A]")

        $game_system.neoM7_white_horizon = map_data.name2.include?("[H]")

        $game_system.neoM7_filter = map_data.name2.include?("[F]")

        for command in command_list

          if command.include?("R")

            $game_system.neoM7_resolution = (command.slice(1, 1)).to_i

            $game_system.neoM7_resolution = [[$game_system.neoM7_resolution, 1].max, 3].min

          end

          if command.include?("#")

            $game_system.neoM7 = map_data.name2

            $game_system.neoM7_alpha = [[$game_system.neoM7_alpha, 0].max, 89].min

          end

          if command.include?("%")

            $game_system.neoM7_theta = (command.slice(1, 3)).to_i

            $game_system.neoM7_theta = [[$game_system.neoM7_theta, 0].max, 359].min

          end

        end

        return

      end

    end

    $game_system.neoM7 = map_data.name2.include?("[NM7]")

    $game_system.neoM7_loop = map_data.name2.include?("[L]")

    $game_system.neoM7_animated = map_data.name2   

    $game_system.neoM7_white_horizon = map_data.name2.include?("[H]")

    $game_system.neoM7_filter = map_data.name2.include?("[F]")

    if $game_system.neoM7

      map_data.name2 =~ /\[R[ ]*([1-3]+)\]/i

      $game_system.neoM7_resolution = $1.to_i

      $game_system.neoM7_resolution = [[$game_system.neoM7_resolution, 1].max, 3].min

      map_data.name2 =~ /\[#[ ]*([00-99]+)\]/i

      $game_system.neoM7_alpha = $1.to_i

      $game_system.neoM7_alpha = [[$game_system.neoM7_alpha, 0].max, 89].min

      map_data.name2 =~ /\[%[ ]*([000-999]+)\]/i

      $game_system.neoM7_theta = $1.to_i

      $game_system.neoM7_theta = [[$game_system.neoM7_theta, 0].max, 359].min

    end

  end

end



#============================================================================

# ■ Game_Character

#----------------------------------------------------------------------------

# "update" method modifications to handle map looping

#============================================================================



class Game_Character

  #--------------------------------------------------------------------------

  # * Aliased methods (F12 compatibility)

  #--------------------------------------------------------------------------

  if !@already_aliased

    alias initialize_neoM7_game_character initialize

    alias update_neoM7_game_character update

    @already_aliased = true

  end

  #--------------------------------------------------------------------------

  # * Attributes

  #--------------------------------------------------------------------------

  attr_accessor          :x         

  attr_accessor :y

  attr_accessor :real_x

  attr_accessor :real_y

  attr_accessor :height # altitude

  attr_accessor :directions # number of directions

  attr_accessor :map_number_x # map's number with X-looping

  attr_accessor :map_number_y # map's number with Y-looping

  #--------------------------------------------------------------------------

  # * Object Initialization

  #--------------------------------------------------------------------------

  def initialize

    initialize_neoM7_game_character

    self.height = 0.0

    self.map_number_x = 0

    self.map_number_y = 0

    self.directions = 4

  end

  #--------------------------------------------------------------------------

  # * Update : handle map looping

  #--------------------------------------------------------------------------

  def update

    if !$game_system.neoM7

      update_neoM7_game_character

      return

    end

    # if x-coordinate is out of the map

    if !(x.between?(0, $game_map.width - 1))

      difference = 128 * x - real_x

      if self.is_a?(Game_Player)

        # increase or decrease map's number

        self.map_number_x += difference / (difference.abs)

      end

      # x-coordinate is equal to its equivalent in the map

      self.x %= $game_map.width

      self.real_x = 128 * x - difference

    end

    # if y-coordinate is out of the map

    if !(y.between?(0, $game_map.height - 1))

      difference = 128 * y - real_y

      if self.is_a?(Game_Player)

        # increase or decrease map's number

        self.map_number_y += difference / (difference.abs)

      end

      # y-coordinate is equal to its equivalent in the map

      self.y %= $game_map.height

      self.real_y = 128 * y - difference

    end

    update_neoM7_game_character

  end

end



#==============================================================================

# ■ Game_Event

#----------------------------------------------------------------------------

# Add methods to handle altitude and directions number for vertical event

#============================================================================



class Game_Event < Game_Character

  #--------------------------------------------------------------------------

  # * Aliased methods (F12 compatibility)

  #--------------------------------------------------------------------------

  if !@already_aliased

    alias refresh_neoM7_game_character refresh

    @already_aliased = true

  end

  #--------------------------------------------------------------------------

  # * scan the event's commands list

  #     page : the scanned page (RPG::Event::Page)

  #--------------------------------------------------------------------------

  def check_commands(page)

    @height = 0.0

    command_list = page.list

    for k in 0..command_list.length - 2

      command = command_list[k]

      if (command.parameters[0].to_s).include?("Height")

        @height = (command.parameters[0][7,command.parameters[0].length-1]).to_f

      end

      if (command.parameters[0].to_s).include?("Directions")

        self.directions = (command.parameters[0][11,command.parameters[0].length-1]).to_i

      end

    end

  end

  #--------------------------------------------------------------------------

  # * scan the event's commands list of the current page when refreshed

  #--------------------------------------------------------------------------

  def refresh

    refresh_neoM7_game_character

    check_commands(@page) if @page != nil

  end

end



#============================================================================

# ■ Game_Player

#----------------------------------------------------------------------------

# Add attributes to have a well-working panorama's scrolling

#============================================================================



class Game_Player < Game_Character

  #--------------------------------------------------------------------------

  # * Aliased methods (F12 compatibility)

  #--------------------------------------------------------------------------

  if !@already_aliased

    alias initialize_neoM7_game_player initialize

    alias center_neoM7_game_player center

    alias update_neoM7_game_player update

    @already_aliased = true

  end

  #--------------------------------------------------------------------------

  # * Object Initialization : add "directions" attribute

  #--------------------------------------------------------------------------

  def initialize

    initialize_neoM7_game_player

    self.directions = $player_directions

  end

  #--------------------------------------------------------------------------

  # * Always center around the hero in mode 7

  #--------------------------------------------------------------------------

  def center(x, y)

    if !$game_system.neoM7

      center_neoM7_game_player(x, y)

      return

    end

    $game_map.display_x = x * 128 - CENTER_X

    $game_map.display_y = y * 128 - $game_system.neoM7_center_y

  end

  #--------------------------------------------------------------------------

  # * Frame Update : CENTER_Y replaced by $game_system.neoM7_center_y

  # to handle pivot's values different from 256

  #--------------------------------------------------------------------------

  def update

    if !$game_system.neoM7

      update_neoM7_game_player

      return

    end

    # Remember whether or not moving in local variables

    last_moving = moving?

    # If moving, event running, move route forcing, and message window

    # display are all not occurring

    unless moving? or $game_system.map_interpreter.running? or

           @move_route_forcing or $game_temp.message_window_showing

      # Move player in the direction the directional button is being pressed

      case Input.dir4

      when 2

        move_down

      when 4

        move_left

      when 6

        move_right

      when 8

        move_up

      end

    end

    # Remember coordinates in local variables

    last_real_x = @real_x

    last_real_y = @real_y

    super

    # If character moves down and is positioned lower than the center

    # of the screen

    if @real_y > last_real_y and @real_y - $game_map.display_y > $game_system.neoM7_center_y

      # Scroll map down

      $game_map.scroll_down(@real_y - last_real_y)

    end

    # If character moves left and is positioned more let on-screen than

    # center

    if @real_x < last_real_x and @real_x - $game_map.display_x < CENTER_X

      # Scroll map left

      $game_map.scroll_left(last_real_x - @real_x)

    end

    # If character moves right and is positioned more right on-screen than

    # center

    if @real_x > last_real_x and @real_x - $game_map.display_x > CENTER_X

      # Scroll map right

      $game_map.scroll_right(@real_x - last_real_x)

    end

    # If character moves up and is positioned higher than the center

    # of the screen

    if @real_y < last_real_y and @real_y - $game_map.display_y < $game_system.neoM7_center_y

      # Scroll map up

      $game_map.scroll_up(last_real_y - @real_y)

    end

    # If not moving

    unless moving?

      # If player was moving last time

      if last_moving

        # Event determinant is via touch of same position event

        result = check_event_trigger_here([1,2])

        # If event which started does not exist

        if result == false

          # Disregard if debug mode is ON and ctrl key was pressed

          unless $DEBUG and Input.press?(Input::CTRL)

            # Encounter countdown

            if @encounter_count > 0

              @encounter_count -= 1

            end

          end

        end

      end

      # If C button was pressed

      if Input.trigger?(Input::C)

        # Same position and front event determinant

        check_event_trigger_here([0])

        check_event_trigger_there([0,1,2])

      end

    end

  end

end











Dans le trosième :


 
Code:
  #============================================================================

# Neo Mode 7

# Written by MGCaladtogel

# 12/05/08

#

# Part 3

#

# class Sprite

#   neoM7_x                   : new method

#   neoM7_y                   : new method

#   neoM7                     : new method

#   neoM7_zoom                : new method

#   on_screen_x               : new method

#   on_screen_y               : new method

#   neoM7_character_x         : new method

#   neoM7_character_y         : new method

#   neoM7_character           : new method

#

# class RPG::Sprite

#   animation_set_sprites     : redefined

#

# class Sprite_Character

#   update                    : aliased

#   refresh                   : aliased

#

# class Sprite_V              : new class

#

# class Spriteset_Map

#   initialize                : aliased

#   dispose                   : redefined

#   update                    : aliased

#

#============================================================================



#============================================================================

# ■ Sprite

#============================================================================



class Sprite

  #--------------------------------------------------------------------------

  # * Attributes

  #--------------------------------------------------------------------------

  attr_accessor :length # sprite's width

  attr_accessor :height # sprite's height

  #--------------------------------------------------------------------------

  # calculate x_coordinate in mode 7 for a vertical sprite

  #--------------------------------------------------------------------------

  def neoM7_x(x_map, y_map)

    x_map = 32 * x_map

    y_map = 32 * y_map

    y_init = $game_temp.zoom_sprites * (y_map - $game_temp.pivot - $game_map.display_y.to_i / 4)

    x_init = $game_temp.zoom_sprites * (x_map - 320 - $game_map.display_x.to_i / 4)

    y_intermediate = (((y_init * $game_temp.cos_theta -

    x_init * $game_temp.sin_theta).to_i) >> 12)

    x_intermediate = (((x_init * $game_temp.cos_theta +

    y_init * $game_temp.sin_theta).to_i) >> 12)

    y_int_2 = $game_temp.pivot + ($game_temp.distance_h * y_intermediate *

    $game_temp.cos_alpha) / ((($game_temp.distance_h) << 12) - y_intermediate *

    $game_temp.sin_alpha)

    return (320 + ($game_temp.slope_value * y_int_2 +

    $game_temp.corrective_value) * x_intermediate)

  end

  #--------------------------------------------------------------------------

  # calculate y_coordinate in mode 7 for a vertical sprite

  #--------------------------------------------------------------------------

  def neoM7_y(x_map, y_map)

    x_map = 32 * x_map

    y_map = 32 * y_map

    y_init = $game_temp.zoom_sprites * (y_map - $game_temp.pivot - $game_map.display_y.to_i / 4)

    x_init = $game_temp.zoom_sprites * (x_map - 320 - $game_map.display_x.to_i / 4)

    y_intermediate = (((y_init * $game_temp.cos_theta -

    x_init * $game_temp.sin_theta).to_i) >> 12)

    return ($game_temp.pivot + ($game_temp.distance_h * y_intermediate *

    $game_temp.cos_alpha) / ((($game_temp.distance_h) << 12) - y_intermediate *

    $game_temp.sin_alpha))

  end

  #--------------------------------------------------------------------------

  # calculate x and y coordinates in mode 7 for a vertical sprite

  #--------------------------------------------------------------------------

  def neoM7(x_map, y_map)

    x_map = 32 * x_map

    y_map = 32 * y_map

    y_init = $game_temp.zoom_sprites * (y_map - $game_temp.pivot - $game_map.display_y.to_i / 4)

    x_init = $game_temp.zoom_sprites * (x_map - 320 - $game_map.display_x.to_i / 4)

    y_intermediate = (((y_init * $game_temp.cos_theta -

    x_init * $game_temp.sin_theta).to_i) >> 12)

    x_intermediate = (((x_init * $game_temp.cos_theta +

    y_init * $game_temp.sin_theta).to_i) >> 12)

    self.y = $game_temp.pivot + ($game_temp.distance_h * y_intermediate *

    $game_temp.cos_alpha) / ((($game_temp.distance_h) << 12) - y_intermediate *

    $game_temp.sin_alpha)

    self.x = (320 + ($game_temp.slope_value * y +

    $game_temp.corrective_value) * x_intermediate)

  end

  #--------------------------------------------------------------------------

  # calculate the zoom level in mode 7 for a vertical sprite

  #--------------------------------------------------------------------------

  def neoM7_zoom(x_screen, y_screen)

    self.zoom_x = $game_temp.zoom_sprites * ($game_temp.slope_value * y +

    $game_temp.corrective_value)

    self.zoom_y = zoom_x

  end

  #--------------------------------------------------------------------------

  # check if value_x (in pixels) is on screen

  #--------------------------------------------------------------------------

  def on_screen_x(value_x)

    return (value_x.between?(- self.length / 2, 640 + self.length / 2))

  end

  #--------------------------------------------------------------------------

  # check if value_y (in pixels) is on screen

  #--------------------------------------------------------------------------

  def on_screen_y(value_y)

    return (value_y.between?($game_temp.height_limit_sprites, 480 + self.height))

  end

  #--------------------------------------------------------------------------

  # calculate x_coordinate in mode 7 for a character sprite

  #--------------------------------------------------------------------------

  def neoM7_character_x(x_screen, y_screen)

    y_init = $game_temp.zoom_sprites * (y_screen - $game_temp.pivot)

    x_init = $game_temp.zoom_sprites * (x_screen - 320)

    y_intermediate = (((y_init * $game_temp.cos_theta -

    x_init * $game_temp.sin_theta).to_i)>>12)

    x_intermediate = (((x_init * $game_temp.cos_theta +

    y_init * $game_temp.sin_theta).to_i)>>12)

    y_int_2 = $game_temp.pivot + ($game_temp.distance_h * y_intermediate *

    $game_temp.cos_alpha) / ((($game_temp.distance_h) << 12) - y_intermediate *

    $game_temp.sin_alpha)

    return (320 + ($game_temp.slope_value * y_int_2 +

    $game_temp.corrective_value) * x_intermediate)

  end

  #--------------------------------------------------------------------------

  # calculate y_coordinate in mode 7 for a character sprite

  #--------------------------------------------------------------------------

  def neoM7_character_y(x_screen, y_screen)

    y_init = $game_temp.zoom_sprites * (y_screen - $game_temp.pivot)

    x_init = $game_temp.zoom_sprites * (x_screen - 320)

    y_intermediate = (((y_init * $game_temp.cos_theta -

    x_init * $game_temp.sin_theta).to_i)>>12)

    return ($game_temp.pivot + ($game_temp.distance_h * y_intermediate *

    $game_temp.cos_alpha) / ((($game_temp.distance_h) << 12) - y_intermediate *

    $game_temp.sin_alpha))

  end

  #--------------------------------------------------------------------------

  # calculate x and y coordinates in mode 7 for a character sprite

  #--------------------------------------------------------------------------

  def neoM7_character(x_screen, y_screen)

    y_init = $game_temp.zoom_sprites * (y_screen - $game_temp.pivot)

    x_init = $game_temp.zoom_sprites * (x_screen - 320)

    y_intermediate = (((y_init * $game_temp.cos_theta -

    x_init * $game_temp.sin_theta).to_i)>>12)

    x_intermediate = (((x_init * $game_temp.cos_theta +

    y_init * $game_temp.sin_theta).to_i)>>12)

    self.y = $game_temp.pivot + ($game_temp.distance_h * y_intermediate *

    $game_temp.cos_alpha) / ((($game_temp.distance_h) << 12) - y_intermediate *

    $game_temp.sin_alpha)

    self.x = (320 + ($game_temp.slope_value * y +

    $game_temp.corrective_value) * x_intermediate)

  end

end



#============================================================================

# ■ RPG::Sprite

#============================================================================

module RPG

  class Sprite < ::Sprite

    #--------------------------------------------------------------------------

    # * Rewritten method : the sprite's zoom level is applied to its animations

    #--------------------------------------------------------------------------

    def animation_set_sprites(sprites, cell_data, position)

      for i in 0..15

        sprite = sprites[i]

        pattern = cell_data[i, 0]

        if sprite == nil or pattern == nil or pattern == -1

          sprite.visible = false if sprite != nil

          next

        end

        sprite.visible = true

        sprite.src_rect.set(pattern % 5 * 192, pattern / 5 * 192, 192, 192)

        if position == 3

          if self.viewport != nil

            sprite.x = self.viewport.rect.width / 2

            sprite.y = self.viewport.rect.height - 160

          else

            sprite.x = 320

            sprite.y = 240

          end

        else

          sprite.x = self.x - self.ox + self.src_rect.width / 2

          sprite.y = self.y - self.oy + self.src_rect.height / 2

          sprite.y -= self.src_rect.height / 4 if position == 0

          sprite.y += self.src_rect.height / 4 if position == 2

        end

        sprite.x += zoom_x * cell_data[i, 1]

        sprite.y += zoom_y * cell_data[i, 2]

        sprite.z = z

        sprite.ox = 96

        sprite.oy = 96

        sprite.zoom_x = zoom_x * cell_data[i, 3] / 100.0

        sprite.zoom_y = zoom_y * cell_data[i, 3] / 100.0

        sprite.angle = cell_data[i, 4]

        sprite.mirror = (cell_data[i, 5] == 1)

        sprite.opacity = cell_data[i, 6] * self.opacity / 255.0

        sprite.blend_type = cell_data[i, 7]

      end

    end

  end

end



#============================================================================

# ■ Sprite_Character

#----------------------------------------------------------------------------

# Calculate x-coordinate and y-coordinate for a neoM7 map

#============================================================================



class Sprite_Character < RPG::Sprite

  #--------------------------------------------------------------------------

  # * Aliased methods (F12 compatibility)

  #--------------------------------------------------------------------------

  if !@already_aliased

    alias update_neoM7_sprite_character update

    @already_aliased = true

  end

  #--------------------------------------------------------------------------

  # * Update

  #--------------------------------------------------------------------------

  def update

    if !$game_system.neoM7

      update_neoM7_sprite_character

      return

    end

    super

    if @tile_id != @character.tile_id or

       @character_name != @character.character_name or

       @character_hue != @character.character_hue

      @tile_id = @character.tile_id

      @character_name = @character.character_name

      @character_hue = @character.character_hue

      if @tile_id >= 384

        self.bitmap = RPG::Cache.tile($game_map.tileset_name,

          @tile_id, @character.character_hue)

        self.src_rect.set(0, 0, 32, 32)

        self.ox = 16

        self.oy = 32

      else

        if @character.is_a?(Game_Player) and FileTest.exist?("Graphics/Characters/" +

          @character.character_name + "_m7.png")

          self.bitmap = RPG::Cache.character(@character.character_name + "_m7",

            @character.character_hue)

        else

          self.bitmap = RPG::Cache.character(@character.character_name,

            @character.character_hue)

        end

        @cw = bitmap.width / 4

        @ch = bitmap.height / @character.directions

        self.ox = @cw / 2

        self.oy = @ch

        # pivot correction (intersection between the map and this sprite)

        self.oy -= 4

      end

    end

    self.visible = (not @character.transparent)

    if @tile_id == 0

      sx = @character.pattern * @cw

      current_direction = (@character.direction - 2) / 2

      sy = current_direction * @ch

      self.src_rect.set(sx, sy, @cw, @ch)

      self.length = @cw

      self.height = @ch

    end

    x_intermediate = @character.screen_x

    y_intermediate = @character.screen_y - 4



    if $game_system.neoM7_loop

      diff_y = ($game_player.y - @character.y).to_i

      offset_y = ($game_map.height << 5) * (diff_y >= 0 ?

      (diff_y / ($game_map.height >> 1)) :

      (diff_y / ($game_map.height >> 1)) + 1)

      diff_x = ($game_player.x - @character.x).to_i

      offset_x = ($game_map.width << 5) * (diff_x >= 0 ?

      (diff_x / ($game_map.width >> 1)) :

      (diff_x / ($game_map.width >> 1)) + 1)

      neoM7_character(x_intermediate + offset_x, y_intermediate + offset_y)

    else

      neoM7_character(x_intermediate, y_intermediate)

    end

    if !on_screen_x(x) or !on_screen_y(y)

      self.opacity = 0

      return

    end

    neoM7_zoom(x, y)

    self.opacity = 255

    self.z = 4 * y

    self.y -= 32 * @character.height * zoom_y # height correction



    self.blend_type = @character.blend_type

    self.bush_depth = @character.bush_depth

    if @character.animation_id != 0

      animation = $data_animations[@character.animation_id]

      animation(animation, true)

      @character.animation_id = 0

    end

  end

end



#============================================================================

# ■ Sprite_V (Vertical Sprites)

#----------------------------------------------------------------------------

#  Sprites corresponding to the vertical elements formed by tiles

#============================================================================



class Sprite_V < Sprite

  attr_accessor :x_map # sprite's x_coordinates (in squares) (Float)

  attr_accessor :y_map # sprite's y_coordinates (in squares) (Float)

  attr_accessor :square_y # sprite's y_coordinates (in squares) (Integer)

  attr_accessor :priority # sprite's priority

  attr_accessor :animated # True if animated

  attr_accessor :list_bitmap # list of sprite's bitmaps (Bitmap)

  #--------------------------------------------------------------------------

  # * Update

  #--------------------------------------------------------------------------

  def update

    if $game_system.neoM7_loop

      diff_y = ($game_player.y - y_map).to_i

      offset_y = $game_map.height * (diff_y >= 0 ?

      (diff_y / ($game_map.height >> 1)) :

      (diff_y / ($game_map.height >> 1)) + 1)

      diff_x = ($game_player.x - x_map).to_i

      offset_x = $game_map.width * (diff_x >= 0 ?

      (diff_x / ($game_map.width >> 1)) :

      (diff_x / ($game_map.width >> 1)) + 1)

      neoM7(x_map + offset_x, y_map + offset_y)

    else

      neoM7(x_map, y_map)

    end

    if !on_screen_x(x) or !on_screen_y(y)

      self.opacity = 0

      return

    end

    neoM7_zoom(x, y)

    self.opacity = 255

    self.z = 4 * y + 32 * priority

  end

  #--------------------------------------------------------------------------

  # * Update bitmap for animation

  #     index  : 0..3 : animation's index

  #--------------------------------------------------------------------------

  def update_animated(index)

    self.bitmap = @list_bitmap[index]

  end

end



#============================================================================

# ■ Spriteset_Map

#----------------------------------------------------------------------------

#  Modifications to call a neoM7 map

#============================================================================



class Spriteset_Map

  #--------------------------------------------------------------------------

  # * Aliased methods (F12 compatibility)

  #--------------------------------------------------------------------------

  if !@already_aliased

    alias initialize_neoM7_spriteset_map initialize

    alias update_neoM7_spriteset_map update

    @already_aliased = true

  end

  #--------------------------------------------------------------------------

  # * Attributes

  #--------------------------------------------------------------------------

  attr_accessor :tilemap # just to be able to access the tilemap

  #--------------------------------------------------------------------------

  # * Initialize Object

  #   Rewritten to call a map with neoM7

  #--------------------------------------------------------------------------

  def initialize

    if !$game_system.neoM7

      initialize_neoM7_spriteset_map

      return

    end

    @viewport1 = Viewport.new(0, 0, 640, 480)

    @viewport2 = Viewport.new(0, 0, 640, 480)

    @viewport3 = Viewport.new(0, 0, 640, 480)

    @viewport2.z = 200

    @viewport3.z = 5000

    # neoM7 map

    @tilemap = Tilemap_neoM7.new(@viewport1, self)

    @panorama = Plane.new(@viewport1)

    # sprites drawn at the horizon's level have a negative z, and with a z value

    # of -100000 the panorama is still below

    @panorama.z = ($game_system.neoM7 ? -100000 : -1000)

    @fog = Plane.new(@viewport1)

    @fog.z = 3000

    @character_sprites = []

    for i in $game_map.events.keys.sort

      sprite = Sprite_Character.new(@viewport1, $game_map.events[i])

      @character_sprites.push(sprite)

    end

    @character_sprites.push(Sprite_Character.new(@viewport1, $game_player))

    @weather = RPG::Weather.new(@viewport1)

    @picture_sprites = []

    for i in 1..50

      @picture_sprites.push(Sprite_Picture.new(@viewport2,

        $game_screen.pictures[i]))

    end

    @timer_sprite = Sprite_Timer.new

    update

    update if $game_system.neoM7_filter

  end

  #--------------------------------------------------------------------------

  # * Dispose

  #--------------------------------------------------------------------------

  def dispose

    if @tilemap.tileset != nil

      @tilemap.tileset.dispose

      for i in 0..6

        @tilemap.autotiles[i].dispose

      end

    end

    @tilemap.dispose

    @panorama.dispose

    @fog.dispose

    for sprite in @character_sprites

      sprite.dispose

    end

    @weather.dispose

    for sprite in @picture_sprites

      sprite.dispose

    end

    @timer_sprite.dispose

    @viewport1.dispose

    @viewport2.dispose

    @viewport3.dispose

  end

  #--------------------------------------------------------------------------

  # * Update

  #--------------------------------------------------------------------------

  def update

    if !$game_system.neoM7

      update_neoM7_spriteset_map

      return

    end

    if @panorama_name != $game_map.panorama_name or

       @panorama_hue != $game_map.panorama_hue

      @panorama_name = $game_map.panorama_name

      @panorama_hue = $game_map.panorama_hue

      if @panorama.bitmap != nil

        @panorama.bitmap.dispose

        @panorama.bitmap = nil

      end

      if @panorama_name != ""

        @panorama.bitmap = RPG::Cache.panorama(@panorama_name, @panorama_hue)

      end

      Graphics.frame_reset

    end

    if @fog_name != $game_map.fog_name or @fog_hue != $game_map.fog_hue

      @fog_name = $game_map.fog_name

      @fog_hue = $game_map.fog_hue

      if @fog.bitmap != nil

        @fog.bitmap.dispose

        @fog.bitmap = nil

      end

      if @fog_name != ""

        @fog.bitmap = RPG::Cache.fog(@fog_name, @fog_hue)

      end

      Graphics.frame_reset

    end

    # update animated tiles each 20 frames

    if Graphics.frame_count % 20 == 0 and $game_system.neoM7_animated

      @tilemap.update_animated

    end

    @tilemap.update

    # to have a fluent panorama scrolling

    @panorama.ox = 6 * ((tilemap.theta * 4.0 / 3).to_i)

    @panorama.oy = - $game_temp.neoM7_height_limit

    @fog.zoom_x = $game_map.fog_zoom / 100.0

    @fog.zoom_y = $game_map.fog_zoom / 100.0

    @fog.opacity = $game_map.fog_opacity

    @fog.blend_type = $game_map.fog_blend_type

    @fog.ox = $game_map.display_x / 4 + $game_map.fog_ox

    @fog.oy = $game_map.display_y / 4 + $game_map.fog_oy

    @fog.tone = $game_map.fog_tone

    for sprite in @character_sprites

      sprite.update

    end

    @weather.type = $game_screen.weather_type

    @weather.max = $game_screen.weather_max

    @weather.ox = $game_map.display_x / 4

    @weather.oy = $game_map.display_y / 4

    @weather.update

    for sprite in @picture_sprites

      sprite.update

    end

    @timer_sprite.update

    @viewport1.tone = $game_screen.tone

    @viewport1.ox = $game_screen.shake

    @viewport3.color = $game_screen.flash_color

    @viewport1.update

    @viewport3.update

  end

end











Dans le quatrième :


 
Code:
  #============================================================================

# Neo Mode 7

# Written by MGCaladtogel

# 12/05/08

#

# Part 4

#

# class Scene_Map             : spriteset = attr_accessor

#

# class Bitmap

#   neoM7                     : new method

#   clean_limit               : new method

#

# class Data_Autotiles        : new class

#

# class Data_Vertical_Sprites : new class

#

# class RPG::Cache_Tile       : new class

#

# class RPG::Cache_Datamap    : new class

#

# class RPG::Cache_Tileset    : new class

#

# class RPG::Cache

#   self.autotile_base        : new method

#   self.save_autotile        : new method

#   self.load_autotile        : new method

#

# class RPG::MapInfo

#   name                      : redefined

#   name2                     : new method

#

#============================================================================



#============================================================================

# ■ Scene_Map

#============================================================================

class Scene_Map

  #--------------------------------------------------------------------------

  # * Attributes

  #--------------------------------------------------------------------------

  attr_accessor :spriteset # just need to access the spriteset

end



#============================================================================

# ■ Bitmap

#----------------------------------------------------------------------------

# Add neoM7 functions (dll calls)

#============================================================================



class Bitmap

  #--------------------------------------------------------------------------

  # mode 7 transformation

  #--------------------------------------------------------------------------

  def neoM7(function, tileset, data, map_width, map_height, off_x, off_y)

    raise RGSSError.new("Disposed bitmap") if disposed?

    func=Win32API.new("mgcmode7-c8ab84(2).dll", function, "llllllllllllllll", "")  

    func.call(self.__id__, tileset.__id__, data.__id__, off_x, off_y,

    $game_temp.cos_alpha, $game_temp.sin_alpha, $game_temp.distance_h,

    $game_temp.pivot_map, $game_temp.slope_value_map,

    $game_temp.corrective_value_map, $game_temp.neoM7_height_limit,

    $game_temp.cos_theta, $game_temp.sin_theta, $game_temp.distance_p,

    $game_temp.zoom_map)

  end

  #--------------------------------------------------------------------------

  # delete pixels beyond the horizon

  #--------------------------------------------------------------------------

  def clean_limit(old_limit, new_limit)

    raise RGSSError.new("Disposed bitmap") if disposed?

    func=Win32API.new("MGCmode7.dll", "CleanHeightLimit", "lll", "")

    func.call(self.__id__, old_limit, new_limit)

  end

end



#============================================================================

# ■ Data_Autotiles

#----------------------------------------------------------------------------

# Creates the set of tiles from an autotile's file

#============================================================================



class Data_Autotiles < Bitmap

  # data list to form tiles from an atotiles file

  Data_creation = [[27,28,33,34],[5,28,33,34],[27,6,33,34],[5,6,33,34],

  [27,28,33,12],[5,28,33,12],[27,6,33,12],[5,6,33,12],[27,28,11,34],

  [5,28,11,34],[27,6,11,34],[5,6,11,34],[27,28,11,12],[5,28,11,12],

  [27,6,11,12],[5,6,11,12],[25,26,31,32],[25,6,31,32],[25,26,31,12],

  [25,6,31,12],[15,16,21,22],[15,16,21,12],[15,16,11,22],[15,16,11,12],

  [29,30,35,36],[29,30,11,36],[5,30,35,36],[5,30,11,36],[39,40,45,46],

  [5,40,45,46],[39,6,45,46],[5,6,45,46],[25,30,31,36],[15,16,45,46],

  [13,14,19,20],[13,14,19,12],[17,18,23,24],[17,18,11,24],[41,42,47,48],

  [5,42,47,48],[37,38,43,44],[37,6,43,44],[13,18,19,24],[13,14,43,44],

  [37,42,43,48],[17,18,47,48],[13,18,43,48],[13,18,43,48]]

  #--------------------------------------------------------------------------

  # * Attributes

  #--------------------------------------------------------------------------

  attr_accessor :number # autotile's number to identify it

  attr_accessor :animated # TRUE if the autotile is animated

  #--------------------------------------------------------------------------

  # * Initialize Object

  #     file   : autotiles file's bitmap (Bitmap)

  #     l      : 0..3 : pattern's number for animated autotiles

  #--------------------------------------------------------------------------

  def initialize(file, l)

    super(8*32, 6*32)

    create(file, l)

  end

  #--------------------------------------------------------------------------

  # * Create the tiles set

  #     file   : autotiles file's bitmap (Bitmap)

  #     l      : 0..3 : pattern's number for animated autotiles

  #--------------------------------------------------------------------------

  def create(file, l)

    l = (file.width > 96 ? l : 0)

    self.animated = (file.width > 96)

    for i in 0..5

      for j in 0..7

        data = Data_creation[8 * i + j]

        for number in data

          number -= 1

          m = 16 * (number % 6)

          n = 16 * (number / 6)

          blt(32 * j + m % 32, 32 * i + n % 32, file,

          Rect.new(m + 96 * l, n, 16, 16))

        end

      end

    end

  end

end



#============================================================================

# ■ Data_Vertical_Sprites

#----------------------------------------------------------------------------

# Create a list of vertical sprites for the three layers of a map

# "V" for "Vertical" in the script

# "num" for "number"

#============================================================================



class Data_Vertical_Sprites

  #--------------------------------------------------------------------------

  # * Attributes

  #--------------------------------------------------------------------------

  attr_accessor  :list_sprites_V # list of vertical sprites

  attr_accessor  :list_sprites_V_animated # list of animated vertical sprites

  #--------------------------------------------------------------------------

  # * A little method to compare terrain_tags

  #     value  : tile's ID

  #     num    : reference terrain_tag's value

  #--------------------------------------------------------------------------

  def suitable?(value, num)

    return ($game_map.terrain_tags[value] == num)

  end

  #--------------------------------------------------------------------------

  # * This algorithm scans each layer and create a sprites formed by tiles

  #   in contact

  #     viewport : Viewport

  #--------------------------------------------------------------------------

  def initialize(viewport)

    @viewport = viewport

    # lists initialization

    self.list_sprites_V = []

    self.list_sprites_V_animated = []

    # @num_tiles : list of tiles coordinates that form a vertical sprite

    @num_tiles = []

    # create copy of map's data

    @dataV = ($game_map.data).clone

    # scan each layer

    for h in 0..2

      # scan each row

      for i in 0..$game_map.height

        # scan each column

        for j in 0..$game_map.width

          value = @dataV[j, i, h].to_i

          # if tile's terrain tag is declared to give vertical sprites

          if $terrain_tags_vertical_tiles.include?($game_map.terrain_tags[value])

            @reference_terrain_tag = $game_map.terrain_tags[value]

            @num_tiles.push([j, i])

            # the following algorithm is so complex that I really don't know how

            # it works exactly

            list_end = 0

            length = 0

            while j + length + 1 < $game_map.width and

              suitable?(@dataV[j +length+ 1, i, h].to_i, @reference_terrain_tag)

              @num_tiles.push([j + length+ 1,i])

              length += 1

            end

            list_start = j

            list_end = length + j

            indicator = true

            row = 0

            j2 = j

            while indicator

              row += 1

              break if (i + row) == $game_map.height

              list_start2 = j2

              length2 = 0

              indicator = false

              if length >= 2

                for k in (j2 + 1)..(j2 + length -1)

                  if suitable?(@dataV[k, i + row, h].to_i,

                    @reference_terrain_tag)

                    if !indicator

                      list_start2 = k

                    else

                      length2 = k - list_start2

                    end

                    indicator = true

                    @num_tiles.push([k, i + row])

                  elsif !indicator

                    length2 -= 1

                  end

                end

              end

              if suitable?(@dataV[j2 + length, i + row, h].to_i,

                @reference_terrain_tag)

                length2 = j2 + length - list_start2

                indicator = true

                @num_tiles.push([j2 + length, i + row])

                length3 = 1

                while j2 + length + length3 < $game_map.width and

                  suitable?(@dataV[j2 + length + length3, i + row, h].to_i,

                  @reference_terrain_tag)

                  @num_tiles.push([j2 + length + length3, i + row])

                  length3 += 1

                  length2 += 1

                  if j2 + length + length3 > list_end

                    list_end = j2 + length + length3

                  end

                end

              end

              if suitable?(@dataV[j2, i + row, h].to_i, @reference_terrain_tag)

                list_start3 = list_start2 - j2

                length2 = length2 + list_start3

                list_start2 = j2

                indicator = true

                @num_tiles.push([j2, i + row])

                length3 = 1

                while j2 - length3 >= 0 and

                  suitable?(@dataV[j2 - length3, i + row, h].to_i,

                  @reference_terrain_tag)

                  @num_tiles.push([j2 - length3, i + row])

                  length3 += 1

                  length2 += 1

                  list_start2 -= 1

                  if list_start2 < list_start

                    list_start = list_start2

                  end

                end

              end

              length = length2

              j2 = list_start2

            end

            row -= 1

            # create a bitmap and a sprite from the tiles listed in @num_tiles

            create_bitmap(i, list_start, row, list_end - list_start, h)

            # clear the used tiles

            clear_data(h)

            # reinitialize the list of tiles

            @num_tiles = []

          end

        end

      end

    end

  end

  #--------------------------------------------------------------------------

  # * Clear the used data to prevent from reusing them

  #     layer  : current scanned layer

  #--------------------------------------------------------------------------

  def clear_data(layer)

    for num in @num_tiles

      @dataV[num[0], num[1], layer] = 0

    end

  end

  #--------------------------------------------------------------------------

  # * Create a Bitmap from the listed tiles in @num_tiles and its associated

  #   sprite (Sprite_V)

  #     row     : start row's value

  #     column  : start column's value

  #     height  : sprite's height (in tiles)

  #     width   : sprite's width (in tiles)

  #     layer   : current scanned layer

  #--------------------------------------------------------------------------

  def create_bitmap(row, column, height, width, layer)

    bmp = Bitmap.new((1+width)<<5, (1+height)<<5)

    rect = Rect.new(0, 0, 32, 32)

    @num_tiles.sort! {|a, b|  -(a[1] - b[1])}

    sprite = Sprite_V.new(@viewport)

    # initialize sprite's attributes

    sprite.animated = false

    sprite.list_bitmap = []

    # draw the bitmap

    for tile_coordinates in @num_tiles

      value = @dataV[tile_coordinates[0], tile_coordinates[1], layer].to_i

      # if tile is a normal tile

      if value > 383

        bitmap = RPG::Cache.tile($game_map.tileset_name, value, 0)

      else # tile is an autotile

        file = (value / 48) - 1

        num_file = 4 * file

        if !sprite.animated

          autotile_name = $game_map.autotile_names[file]

          fichier = RPG::Cache.autotile(autotile_name)

          sprite.animated = (fichier.width > 96 ? true : false)

        end

        bitmap = RPG::Cache.autotile_base(num_file, value)

      end

      bmp.blt(32 * (tile_coordinates[0] - column),

      32 * (tile_coordinates[1] - row), bitmap, rect)

    end

    sprite.list_bitmap.push(bmp)

    # create 3 additionnal bitmaps for animated sprites

    if sprite.animated

      for j in 1..3

        bmp = Bitmap.new((1 + width)<<5, (1 + height)<<5)

        for tile_coordinates in @num_tiles

          value = @dataV[tile_coordinates[0], tile_coordinates[1], layer].to_i

          if value > 383

            bitmap = RPG::Cache.tile($game_map.tileset_name, value, 0)

          else

            num_file = 4 * ((value / 48) - 1)

            bitmap = RPG::Cache.autotile_base(num_file + j, value)

          end

          bmp.blt((tile_coordinates[0] - column)<<5,

          (tile_coordinates[1] - row)<<5, bitmap, rect)

        end

        sprite.list_bitmap.push(bmp)

      end

    end

    value = @dataV[@num_tiles[0][0], @num_tiles[0][1], layer].to_i

    # set sprite's priority

    sprite.priority = $game_map.priorities[value]

    # set sprite's coordinates (in squares (32 * 32 pixels))

    sprite.x_map = (column.to_f) + ((bmp.width)>>6)

    sprite.x_map += 0.5 if width % 2 == 0

    sprite.y_map = (row + height).to_f + 0.5

    sprite.square_y = sprite.y_map.to_i # Integer

    # set the y_pivot (intersection between the map and the sprite)

    sprite.oy = bmp.height - 16

    sprite.ox = bmp.width / 2

    sprite.height = bmp.height

    sprite.length = bmp.width

    sprite.bitmap = sprite.list_bitmap[0]

    self.list_sprites_V.push(sprite)

    self.list_sprites_V_animated.push(sprite) if sprite.animated

  end

end



#============================================================================

# ■ RPG::Cache_Tile

#----------------------------------------------------------------------------

# The tiles resulting in a superimposing of several tiles are kept in memory

# for a faster call

# valueX : tile's ID

#============================================================================



module RPG

  module Cache_Tile

    @cache = {}

    #------------------------------------------------------------------------

    # * Superimposing of two tiles, offset = pattern's number for animated

    # autotiles

    #------------------------------------------------------------------------

    def self.load(value1, value2, offset=0)

      if not @cache.include?([value1, value2, offset])

        bitmap = Bitmap.new(32, 32)

        rect = Rect.new(0, 0, 32, 32)

        if value1 > 383 # normal tile

          bitmap.blt(0, 0, RPG::Cache.tile($game_map.tileset_name, value1, 0),

          rect)

        else # autotile

          num = ((value1 / 48) - 1)<<2 + offset

          bitmap.blt(0, 0, RPG::Cache.autotile_base(num, value1), rect)

        end

        if value2 > 383 # normal tile

          bitmap.blt(0, 0, RPG::Cache.tile($game_map.tileset_name, value2, 0),

          rect)

        else # autotile

          num = ((value2 / 48) - 1)<<2 + offset

          bitmap.blt(0, 0, RPG::Cache.autotile_base(num, value2), rect)

        end

        @cache[[value1, value2, offset]] = bitmap

      end

      @cache[[value1, value2, offset]]

    end

    #------------------------------------------------------------------------

    # * Superimposing of three tiles

    #------------------------------------------------------------------------

    def self.load2(value1, value2, value3, offset = 0)

      if not @cache.include?([value1, value2, value3, offset])

        bitmap = Bitmap.new(32, 32)

        rect = Rect.new(0, 0, 32, 32)

        if value1 > 383 # normal tile

          bitmap.blt(0, 0, RPG::Cache.tile($game_map.tileset_name, value1, 0),

          rect)

        else # autotile

          num = ((value1 / 48) - 1)<<2 + offset

          bitmap.blt(0, 0, RPG::Cache.autotile_base(num, value1), rect)

        end

        if value2 > 383 # normal tile

          bitmap.blt(0, 0, RPG::Cache.tile($game_map.tileset_name, value2, 0),

          rect)

        else # autotile

          num = ((value2 / 48) - 1)<<2 + offset

          bitmap.blt(0, 0, RPG::Cache.autotile_base(num, value2), rect)

        end

        if value3 > 383 # normal tile

          bitmap.blt(0, 0, RPG::Cache.tile($game_map.tileset_name, value3, 0),

          rect)

        else # autotile

          num = ((value3 / 48) - 1)<<2 + offset

          bitmap.blt(0, 0, RPG::Cache.autotile_base(num, value3), rect)

        end

        @cache[[value1, value2, value3, offset]] = bitmap

      end

      @cache[[value1, value2, value3, offset]]

    end

    #------------------------------------------------------------------------

    # * Clear the Cache

    #------------------------------------------------------------------------

    def self.clear

      @cache = {}

      GC.start

    end

  end

end



#============================================================================

# ■ RPG::Cache_Datamap

#----------------------------------------------------------------------------

# Maps drawn with neoM7 are kept in memory to have a faster call the next

# times they need to be drawn

#============================================================================



module RPG

  module Cache_Datamap

    @cache = {}

    #------------------------------------------------------------------------

    # * Check if the map is in the Cache

    #   map_id : map's ID

    #------------------------------------------------------------------------

    def self.in_cache(map_id)

      return @cache.include?(map_id)

    end

    #------------------------------------------------------------------------

    # * Return the map's drawing (Bitmap)

    #   map_id : map's ID

    #   num    : pattern's number for animated autotiles

    #------------------------------------------------------------------------

    def self.load(map_id, num = 0)

      return @cache[map_id][num]

    end

    #------------------------------------------------------------------------

    # * Save the map's drawing in the Cache

    #   map_id : map's ID

    #   bitmap    : map's drawing (Bitmap)

    #   num    : pattern's number for animated autotiles

    #------------------------------------------------------------------------

    def self.save(map_id, bitmap, num = 0)

      @cache[map_id] = [] if !self.in_cache(map_id)

      @cache[map_id][num] = bitmap

    end

    #------------------------------------------------------------------------

    # * Clear the Cache

    #------------------------------------------------------------------------

    def self.clear

      @cache = {}

      GC.start

    end

  end

end



#============================================================================

# ■ RPG::Cache_Tileset

#----------------------------------------------------------------------------

# Maps drawn with neoM7 are kept in memory to have a faster call the next

# times they need to be drawn

#============================================================================



module RPG

  module Cache_Tileset

    @cache = {}

    #------------------------------------------------------------------------

    # * Check if the map is in the Cache

    #   map_id : map's ID

    #------------------------------------------------------------------------

    def self.in_cache(map_id)

      return @cache.include?(map_id)

    end

    #------------------------------------------------------------------------

    # * Return the map's drawing (Bitmap)

    #   map_id : map's ID

    #   num    : pattern's number for animated autotiles

    #------------------------------------------------------------------------

    def self.load(map_id, num = 0)

      return @cache[map_id][num]

    end

    #------------------------------------------------------------------------

    # * Save the map's drawing in the Cache

    #   map_id : map's ID

    #   bitmap    : map's drawing (Bitmap)

    #   num    : pattern's number for animated autotiles

    #------------------------------------------------------------------------

    def self.save(map_id, bitmap, num = 0)

      @cache[map_id] = [] if !self.in_cache(map_id)

      @cache[map_id][num] = bitmap

    end

    #------------------------------------------------------------------------

    # * Clear the Cache

    #------------------------------------------------------------------------

    def self.clear

      @cache = {}

      GC.start

    end

  end

end



#============================================================================

# ■ RPG::Cache

#----------------------------------------------------------------------------

# The tiles from autotiles files are kept in memory for a faster call

#============================================================================



module RPG

  module Cache

    #------------------------------------------------------------------------

    # * Check if the map is in the Cache

    #   num    : autotiles file's ID

    #   value    : tile's ID

    #------------------------------------------------------------------------

    def self.autotile_base(num, value)

      key = [num, value]

      if not @cache.include?(key) or @cache[key].disposed?

        @cache[key] = Bitmap.new(32, 32)

        num_tile = value % 48

        sx = 32 * (num_tile %          8)         

        sy = 32 * (num_tile /          8)         

        rect = Rect.new(sx, sy, 32, 32)

        @cache[key].blt(0, 0, self.load_autotile(num), rect)

      end

        @cache[key]

    end

    #------------------------------------------------------------------------

    # * Save the tile's drawing in the Cache

    #   bitmap : tile's drawing (Bitmap)

    #   key    : tile's ID

    #------------------------------------------------------------------------

    def self.save_autotile(bitmap, key)

      @cache[key] = bitmap

    end

    #------------------------------------------------------------------------

    # * Return the tile's drawing (Bitmap)

    #   key    : tile's ID

    #------------------------------------------------------------------------

    def self.load_autotile(key)

      @cache[key]

    end

  end

end



#============================================================================

# ■ RPG::MapInfo

#============================================================================



class RPG::MapInfo

  # defines the map's name as the name without anything within brackets,

  # including brackets

  def name

    return @name.gsub(/\[.*\]/) {""}

  end

  #--------------------------------------------------------------------------

  # the original name with the codes

  def name2

    return @name

  end

end











Dans le cinquième :


 
Code:
  #============================================================================

# Neo Mode 7

# Written by MGCaladtogel

# 12/05/08

#

# Part 5

#

# class Tilemap_neoM7         : new class

#

#============================================================================



#============================================================================

# ■ Tilemap_neoM7

#----------------------------------------------------------------------------

# This new Tilemap class handles the drawing of a neo neoM7 map

#============================================================================



class Tilemap_neoM7

  #--------------------------------------------------------------------------

  # * Attributes

  #--------------------------------------------------------------------------

  attr_accessor  :tilesets_list # contains tilesets graphics

  attr_reader :spriteset # spriteset that called this class

  attr_accessor  :sprite # sprite used to contain the map's drawing

  attr_accessor  :alpha # angle of slant

  attr_accessor  :theta # angle of rotation

  #--------------------------------------------------------------------------

  # * Object Initialization

  #     viewport  : viewport

  #--------------------------------------------------------------------------

  def initialize(viewport, spriteset)

    @even = true

    @viewport = viewport

    @spriteset = spriteset

    @id = $game_map.map_id # map's ID : used to load or save the map in Cache

    self.tilesets_list = [] # contains tilesets (Bitmap)

    @height = $game_map.height << 5 # @height : map's height (in pixel)

    @width = $game_map.width << 5 # @width : map's width (in pixel)

    @function_name = "BitmapMode7" # dll's function called to apply mode 7

    @function_name += "Loop" if $game_system.neoM7_loop

    @current_function_name = @function_name

    @zoom = $game_system.neoM7_zoom # zoom level of the map

    $game_temp.zoom_sprites = @zoom.to_f / 100

    $game_temp.zoom_map = (4096 * (1.0 / $game_temp.zoom_sprites)).to_i



    # tilesets graphics and data map are loaded if already in Cache

    if RPG::Cache_Datamap.in_cache(@id)

      @bitmap_data = RPG::Cache_Datamap.load(@id)

      @map_tileset = RPG::Cache_Tileset.load(@id)

      self.tilesets_list.push(@map_tileset)

      if $game_system.neoM7_animated

        @map_tileset_2 = RPG::Cache_Tileset.load(@id, 1)

        @map_tileset_3 = RPG::Cache_Tileset.load(@id, 2)

        @map_tileset_4 = RPG::Cache_Tileset.load(@id, 3)

        self.tilesets_list.push(@map_tileset_2)

        self.tilesets_list.push(@map_tileset_3)

        self.tilesets_list.push(@map_tileset_4)

      end

    else # draw the data map and the tileset and save them in the Cache

      draw_map

    end



    # create vertical elements from tiles

    data_V = Data_Vertical_Sprites.new(viewport)

    # @vertical_sprites : list of vertical sprites (Sprite_V)

    @vertical_sprites = data_V.list_sprites_V

    # @vertical_sprites_animated : list of animated vertical sprites (Sprite_V)

    @vertical_sprites_animated = data_V.list_sprites_V_animated

    

    # angle of rotation (theta)

    self.theta = $game_system.neoM7_theta

    theta_rad = (Math::PI * theta) / 180

    # easier to work with integer value than floats ('>>' and '<<' operations)

    $game_temp.cos_theta = (4096 * Math.cos(theta_rad)).to_i

    $game_temp.sin_theta = (4096 * Math.sin(theta_rad)).to_i

    

    # offsets : equivalent to display_x and display_y

    @offset_x = 0

    @offset_y = 0



    $game_temp.distance_h = 480 # distance between the center of the map (halfwidth, pivot) and the point of view

    # screenline's number of the slant's pivot = y-coordinate of the rotation center

    $game_temp.pivot = $game_system.neoM7_pivot # character sprites

    $game_temp.pivot_map = $game_temp.pivot /

    ($game_system.neoM7_resolution == 1 ? 1 :

    ($game_system.neoM7_resolution == 2 ? 1.33 : 2)) # map sprite

     # distance between the center of the map (halfwidth, pivot) and the projection plane surface

    $game_temp.distance_p = $game_temp.distance_h - $game_temp.distance_h /

    ($game_system.neoM7_resolution == 1 ? 1 :

    ($game_system.neoM7_resolution == 2 ? 1.334 :  2))

    # zoom value of the map sprite

    @coeff_resolution = ($game_system.neoM7_resolution == 1 ? 1 :

    ($game_system.neoM7_resolution == 2 ? 1.334 : 2))

    # x-offset for the 3 resolutions

    @offset_x_res = ($game_system.neoM7_resolution == 1 ? 0 :

    ($game_system.neoM7_resolution == 2 ? 80 : 160))

    # y-offset for the 3 resolutions

    @offset_y_res = $game_temp.pivot - $game_temp.pivot_map

    @index_animated = 0 # 0..3 : index of animated tiles pattern



    # map sprite

    self.sprite = Sprite.new(@viewport)

    self.sprite.x = 0

    self.sprite.y = 0

    self.sprite.z = - 99999 # map must not mask vertical elements

    if $game_system.neoM7_resolution != 1

      self.sprite.bitmap = ($game_system.neoM7_resolution == 2 ?

      Bitmap.new(480, 360) : Bitmap.new(320, 240))

    else

      self.sprite.bitmap = Bitmap.new(640, 480) # screen dimensions

    end



    # angle of slant (alpha)

    self.alpha = $game_system.neoM7_alpha

    refresh_alpha



  end

  #--------------------------------------------------------------------------

  # * Dispose

  #--------------------------------------------------------------------------

  def dispose

    # dispose of map sprite and vertical sprites

    self.sprite.dispose

    for sprite in @vertical_sprites + @vertical_sprites_animated

      sprite.dispose

    end

    @vertical_sprites.clear

    @vertical_sprites_animated.clear

    @tilesets_list.clear

  end

  #--------------------------------------------------------------------------

  # * Refresh all the parameters dependent on the angle of slant

  #--------------------------------------------------------------------------

  def refresh_alpha

    # angle of slant

    alpha_rad = (Math::PI * alpha) / 180

    $game_temp.cos_alpha = (4096 * Math.cos(alpha_rad)).to_i

    $game_temp.sin_alpha = (4096 * Math.sin(alpha_rad)).to_i

    $game_system.neoM7_alpha = alpha

    $game_system.neoM7_pivot = $game_temp.pivot

    # h0,  z0 : intermediate values used to calculate the slope

    h0 = (- ($game_temp.distance_h) * $game_temp.pivot *

    $game_temp.cos_alpha) / ((($game_temp.distance_h) << 12) +

    $game_temp.pivot * $game_temp.sin_alpha) + $game_temp.pivot

    z0 = (($game_temp.distance_h) << 12).to_f /

    ((($game_temp.distance_h) << 12) + $game_temp.pivot * $game_temp.sin_alpha)

    # slope

    $game_temp.slope_value = (1.0 - z0) / ($game_temp.pivot - h0)

    $game_temp.slope_value_map = (262144 * $game_temp.slope_value).to_i

    $game_temp.corrective_value = 1.0 - $game_temp.pivot * $game_temp.slope_value

    $game_temp.corrective_value_map = (262144 * $game_temp.corrective_value / @coeff_resolution).to_i

    last_line = - $game_temp.pivot_map - $game_system.neoM7_horizon

    old_limit = $game_temp.neoM7_height_limit

    $game_temp.neoM7_height_limit = (($game_temp.distance_h - $game_temp.distance_p) *

    last_line * $game_temp.cos_alpha) / ((($game_temp.distance_h) << 12) -

    last_line * $game_temp.sin_alpha) + $game_temp.pivot_map

    if $game_system.neoM7_white_horizon

      @current_function_name = @function_name +

      ($game_temp.neoM7_height_limit > 0 ? "H" : "")

    end

    $game_temp.neoM7_height_limit = [$game_temp.neoM7_height_limit.to_i, 0].max

    $game_temp.height_limit_sprites = $game_temp.neoM7_height_limit * @coeff_resolution

    @even = ((old_limit - $game_temp.neoM7_height_limit) % 2 == 0 ? @even : !@even)

    # delete lines beyond the new horizon

    self.sprite.bitmap.clean_limit(old_limit,

    $game_temp.neoM7_height_limit) if old_limit < $game_temp.neoM7_height_limit

  end

  #--------------------------------------------------------------------------

  # * Increase (or decrease) the angle of slant

  #--------------------------------------------------------------------------

  def increase_alpha(value)

    self.alpha = [[alpha + value, 89].min, 0].max

    refresh_alpha

  end

  #--------------------------------------------------------------------------

  # * Increase (or decrease) the angle of rotation

  #--------------------------------------------------------------------------

  def increase_theta(value)

    self.theta += value

    self.theta %= 360

    theta_rad = (Math::PI * theta) / 180

    $game_temp.cos_theta = (4096 * Math.cos(theta_rad)).to_i

    $game_temp.sin_theta = (4096 * Math.sin(theta_rad)).to_i

    $game_system.neoM7_theta = theta

  end

  #--------------------------------------------------------------------------

  # * Increase (or decrease) the zoom level

  #--------------------------------------------------------------------------

  def increase_zoom(value)

    value = value.to_f / 100

    @zoom = [[@zoom * (2 ** value), 10000].min, 1].max

    $game_temp.zoom_sprites = @zoom.to_f / 100

    $game_temp.zoom_map = (4096 * (1.0 / $game_temp.zoom_sprites)).to_i

    $game_system.neoM7_zoom = @zoom

  end

  #--------------------------------------------------------------------------

  # * Increase the pivot's value

  #--------------------------------------------------------------------------

  def increase_pivot(value)

    res = [[$game_temp.pivot + value, 480].min, 32].max

    $game_map.display_y -= ((res - $game_temp.pivot) << 2)

    $game_system.neoM7_center_y += ((res - $game_temp.pivot) << 2)

    $game_temp.pivot = res

    $game_temp.pivot_map = $game_temp.pivot /

    ($game_system.neoM7_resolution == 1 ? 1 :

    ($game_system.neoM7_resolution == 2 ? 1.33 : 2))

    @offset_y_res = $game_temp.pivot - $game_temp.pivot_map

    refresh_alpha

  end

  #--------------------------------------------------------------------------

  # * Set the angle of slant

  #--------------------------------------------------------------------------

  def set_alpha(value)

    self.alpha = [[value, 89].min, 0].max

    refresh_alpha

  end

  #--------------------------------------------------------------------------

  # * Set the angle of rotation

  #--------------------------------------------------------------------------

  def set_theta(value)

    self.theta = value % 360

    theta_rad = (Math::PI * theta) / 180

    $game_temp.cos_theta = (4096 * Math.cos(theta_rad)).to_i

    $game_temp.sin_theta = (4096 * Math.sin(theta_rad)).to_i

    $game_system.neoM7_theta = theta

  end

  #--------------------------------------------------------------------------

  # * Set the zoom level

  #--------------------------------------------------------------------------

  def set_zoom(value)

    @zoom = [[value, 10000].min, 1].max

    $game_temp.zoom_sprites = @zoom.to_f / 100

    $game_temp.zoom_map = (4096 * (1.0 / $game_temp.zoom_sprites)).to_i

    $game_system.neoM7_zoom = @zoom

  end

  #--------------------------------------------------------------------------

  # * Set the pivot's value

  #--------------------------------------------------------------------------

  def set_pivot(value)

    res = [[value, 480].min, 32].max

    $game_map.display_y -= ((res - $game_temp.pivot) << 2)

    $game_system.neoM7_center_y += ((res - $game_temp.pivot) << 2)

    $game_temp.pivot = res

    $game_temp.pivot_map = $game_temp.pivot /

    ($game_system.neoM7_resolution == 1 ? 1 :

    ($game_system.neoM7_resolution == 2 ? 1.33 : 2))

    @offset_y_res = $game_temp.pivot - $game_temp.pivot_map

    refresh_alpha

  end

  #--------------------------------------------------------------------------

  # * Slide from the current alpha into the target value

  #--------------------------------------------------------------------------

  def to_alpha(value, speed)

    value = [[value, 89].min, 0].max

    while value > alpha

      increase_alpha([speed, value - alpha].min)

      spriteset.update

      Graphics.update

    end

    while value < alpha

      increase_alpha(-([speed, alpha - value].min))

      spriteset.update

      Graphics.update

    end

  end

  #--------------------------------------------------------------------------

  # * Slide from the current theta into the target value

  #--------------------------------------------------------------------------

  def to_theta(value, speed, direction)

    value %= 360

    while value != theta

      increase_theta(direction * ([(value - theta).abs, speed].min))

      spriteset.update

      Graphics.update

    end

  end

  #--------------------------------------------------------------------------

  # * Slide from the current zoom level into the target value

  #--------------------------------------------------------------------------

  def to_zoom(value, speed)

    value = [[value, 10000].min, 1].max

    while value > @zoom

      increase_zoom(speed)

      if value < @zoom

        set_zoom(value)

      end

      spriteset.update

      Graphics.update

    end

    while value < @zoom

      increase_zoom(-speed)

      if value > @zoom

        set_zoom(value)

      end

      spriteset.update

      Graphics.update

    end

  end

  #--------------------------------------------------------------------------

  # * Slide from the current pivot's value into the target value

  #--------------------------------------------------------------------------

  def to_pivot(value, speed)

    value = [[value, 480].min, 32].max

    while value > $game_temp.pivot

      increase_pivot([speed, value - $game_temp.pivot].min)

      spriteset.update

      Graphics.update

    end

    while value < $game_temp.pivot

      increase_pivot(-([speed, $game_temp.pivot - value].min))

      spriteset.update

      Graphics.update

    end

  end

  #--------------------------------------------------------------------------

  # * Update the map sprite and the vertical sprites

  #--------------------------------------------------------------------------

  def update

    # update map sprite

    @offset_x = $game_map.display_x / 4 + @offset_x_res

    @offset_y = $game_map.display_y / 4 + @offset_y_res

    current_function_name = @current_function_name

    if $game_system.neoM7_filter

      current_function_name += (@even ? "Even" : "Odd")

      @even = !@even

    end

    self.sprite.bitmap.neoM7(current_function_name, @map_tileset,

    @bitmap_data, @width, @height, @offset_x, @offset_y)

    self.sprite.zoom_x = @coeff_resolution

    self.sprite.zoom_y = @coeff_resolution

    # update vertical sprites

    for vertical_sprite in @vertical_sprites

      vertical_sprite.update

    end

  end

  #--------------------------------------------------------------------------

  # * Update animation for animated tiles

  #--------------------------------------------------------------------------

  def update_animated

    @index_animated += 1

    @index_animated %= 4

    @map_tileset = tilesets_list[@index_animated]

    # update vertical sprites

    for vertical_sprite in @vertical_sprites_animated

      vertical_sprite.update_animated(@index_animated)

    end

  end

  #--------------------------------------------------------------------------

  # * Create a data bitmap representing the map, and its associated tilesets

  #--------------------------------------------------------------------------

  def draw_map

    data = $game_map.data

    # Table where animated tiles are flagged

    data_animated = []

    # Bitmap that will be filled with the 3-layers map data

    @bitmap_data = Bitmap.new(@width / 32, @height / 32)

    color = Color.new(0,0,0)

    rect = Rect.new(0, 0, 32, 32)

    

    # Create autotiles graphics

    RPG::Cache.clear

    @autotiles = []

    for i in 0..6

      autotile_name = $game_map.autotile_names[i]

      fichier = RPG::Cache.autotile(autotile_name)

      for l in 0..3

        data_autotile = Data_Autotiles.new(fichier,l)

        data_autotile.number = 4*i + l

        RPG::Cache.save_autotile(data_autotile, data_autotile.number)

        @autotiles.push(data_autotile)

      end

    end

    

    # Create a list of used terrain tiles (3 layers), and fill the data bitmap

    tiles_list = {}

    tiles_count = 0

    for i in 0...$game_map.height

      for j in 0...$game_map.width

        value1 = ($terrain_tags_vertical_tiles.include?(

        $game_map.terrain_tags[data[j, i, 0]]) ? 0 : data[j, i, 0])

        value2 = ($terrain_tags_vertical_tiles.include?(

        $game_map.terrain_tags[data[j, i, 1]]) ? 0 : data[j, i, 1])

        value3 = ($terrain_tags_vertical_tiles.include?(

        $game_map.terrain_tags[data[j, i, 2]]) ? 0 : data[j, i, 2])

        if !tiles_list.has_key?([value1, value2, value3])

          tiles_count += 1

          tiles_list[[value1, value2, value3]] = tiles_count

        end

        count = tiles_list[[value1, value2, value3]]

        color.set(count % 256, count / 256, 0) # up to 65536 different tiles for one map (should be sufficient)

        @bitmap_data.set_pixel(j, i, color)

      end

    end

    

    # Create a specific tileset (using the 3 layers) for the map

    tileset_height = (1 + (tiles_count /          8)         ) * 32

    @map_tileset = Bitmap.new(256, tileset_height)

    @tilesets_list.push(@map_tileset)

    for k in 1..tiles_count

      list_values = tiles_list.index(k)

      value1 = list_values[0]

      value2 = list_values[1]

      value3 = list_values[2]

      if value1 != 0

        if value2 == 0

          if value3 == 0

            if value1 > 383

              bitmap = RPG::Cache.tile($game_map.tileset_name, value1, 0)

            else

              num = 4*((value1 / 48) - 1)

              bitmap = RPG::Cache.autotile_base(num, value1)

              data_animated.push(k) if @autotiles[num].animated

            end

          else

            bitmap = RPG::Cache_Tile.load(value1, value3)

            animated = false

            if value1 < 384

              num = 4*((value1 / 48) - 1)

              animated = @autotiles[num].animated

            end

            if value3 < 384

              num = 4*((value3 / 48) - 1)

              animated = @autotiles[num].animated

            end

            data_animated.push(k) if animated

          end

        else

          if value3 == 0

            bitmap = RPG::Cache_Tile.load(value1, value2)

            animated = false

            if value1 < 384

              num = 4*((value1 / 48) - 1)

              animated = @autotiles[num].animated

            end

            if value2 < 384

              num = 4*((value2 / 48) - 1)

              animated = @autotiles[num].animated

            end

            data_animated.push(k) if animated

          else

            bitmap = RPG::Cache_Tile.load2(value1, value2, value3)

            animated = false

            if value1 < 384

              num = 4*((value1 / 48) - 1)

              animated = @autotiles[num].animated

            end

            if value2 < 384

              num = 4*((value2 / 48) - 1)

              animated = @autotiles[num].animated

            end

            if value3 < 384

              num = 4*((value3 / 48) - 1)

              animated = @autotiles[num].animated

            end

            data_animated.push(k) if animated

          end

        end

      else

        if value2 == 0

          if value3 != 0

            if value3 > 383

              bitmap = RPG::Cache.tile($game_map.tileset_name, value3, 0)

            else

              num = 4*((value3 / 48) - 1)

              bitmap = RPG::Cache.autotile_base(num, value3)

              data_animated.push(k) if @autotiles[num].animated

            end

          end

        else

          if value3 == 0

            if value2 > 383

              bitmap = RPG::Cache.tile($game_map.tileset_name, value2, 0)

            else

              num = 4*((value2 / 48) - 1)

              bitmap = RPG::Cache.autotile_base(num, value2)

              data_animated.push(k) if @autotiles[num].animated

            end

          else

            bitmap = RPG::Cache_Tile.load(value2, value3)

            animated = false

            if value2 < 384

              num = 4*((value2 / 48) - 1)

              animated = @autotiles[num].animated

            end

            if value3 < 384

              num = 4*((value3 / 48) - 1)

              animated = @autotiles[num].animated

            end

            data_animated.push(k) if animated

          end

        end

      end

      @map_tileset.blt(32 * ((k - 1) %          8)         , 32 * ((k - 1) /          8)         , bitmap, rect)

    end

    

    # save the data map and the tileset in the Cache

    RPG::Cache_Datamap.save(@id, @bitmap_data)

    RPG::Cache_Tileset.save(@id, @map_tileset)



    # create 3 other tilesets in case of animated tiles (4 patterns)

    if !$game_system.neoM7_animated

      tiles_list.clear

      return

    end

    @map_tileset_2 = @map_tileset.clone

    @map_tileset_3 = @map_tileset.clone

    @map_tileset_4 = @map_tileset.clone

    @tilesets_list.push(@map_tileset_2)

    @tilesets_list.push(@map_tileset_3)

    @tilesets_list.push(@map_tileset_4)

    for k in data_animated

      list_values = tiles_list.index(k)

      value1 = list_values[0]

      value2 = list_values[1]

      value3 = list_values[2]

      if value1 != 0

        if value2 == 0

          if value3 == 0

            num = 4*((value1 / 48) - 1)

            bitmap_2 = RPG::Cache.autotile_base(num+1, value1)

            bitmap_3 = RPG::Cache.autotile_base(num+2, value1)

            bitmap_4 = RPG::Cache.autotile_base(num+3, value1)

          else

            bitmap_2 = RPG::Cache_Tile.load(value1, value3, 1)

            bitmap_3 = RPG::Cache_Tile.load(value1, value3, 2)

            bitmap_4 = RPG::Cache_Tile.load(value1, value3, 3)

          end

        else

          if value3 == 0

            bitmap_2 = RPG::Cache_Tile.load(value1, value2, 1)

            bitmap_3 = RPG::Cache_Tile.load(value1, value2, 2)

            bitmap_4 = RPG::Cache_Tile.load(value1, value2, 3)

          else

            bitmap_2 = RPG::Cache_Tile.load2(value1, value2, value3, 1)

            bitmap_3 = RPG::Cache_Tile.load2(value1, value2, value3, 2)

            bitmap_4 = RPG::Cache_Tile.load2(value1, value2, value3, 3)

          end

        end

      else

        if value2 != 0

          if value3 == 0

            bitmap_2 = RPG::Cache.autotile_base(num+1, value2)

            bitmap_3 = RPG::Cache.autotile_base(num+2, value2)

            bitmap_4 = RPG::Cache.autotile_base(num+3, value2)

          else

            bitmap_2 = RPG::Cache_Tile.load(value2, value3, 1)

            bitmap_3 = RPG::Cache_Tile.load(value2, value3, 2)

            bitmap_4 = RPG::Cache_Tile.load(value2, value3, 3)

          end

        else

          if value3 != 0

            bitmap_2 = RPG::Cache.autotile_base(num+1, value3)

            bitmap_3 = RPG::Cache.autotile_base(num+2, value3)

            bitmap_4 = RPG::Cache.autotile_base(num+3, value3)

          end

        end

      end

      @map_tileset_2.blt(32 * ((k - 1) %          8)         , 32 * ((k - 1) /          8)         , bitmap_2, rect)

      @map_tileset_3.blt(32 * ((k - 1) %          8)         , 32 * ((k - 1) /          8)         , bitmap_3, rect)

      @map_tileset_4.blt(32 * ((k - 1) %          8)         , 32 * ((k - 1) /          8)         , bitmap_4, rect)

    end

    # save the three additional maps in the Cache

    RPG::Cache_Tileset.save(@id, @map_tileset_2, 1)

    RPG::Cache_Tileset.save(@id, @map_tileset_3, 2)

    RPG::Cache_Tileset.save(@id, @map_tileset_4, 3)

    tiles_list.clear

  end

  #--------------------------------------------------------------------------

  # * no tileset for neoM7 maps

  #--------------------------------------------------------------------------

  def tileset

    return nil

  end

end











Puis tu télécharge la DDl qui est en première page du topic, tu la met dans le dossier de ton jeu.

Puis sur toutes tes map, aucune case vides, toujours remplis sur au moins une couche, et sur chacun des noms de maps, tu rajoute :

[NM7][#XX][%XXX][L][A][H][RX][F]

à la fin du nom et directement collés au nom

au fait, tu ne doit pas non plus utilisé des autotiles, sa pourrait beuger, mais si sa beug pas, utilise les ^^

Posté par Sphinx le 3 Déc - 17:56 (2009)
balises spoilers ?

Posté par Usk le 3 Déc - 18:17 (2009)
pourquoi sa me fais sa? 


Spoiler

Posté par Ace Attorney Man le 3 Déc - 18:37 (2009)
Car le maplink n'est pas compatible avec ce script.

Posté par Usk le 3 Déc - 18:44 (2009)
et il y a un autre moyen?

Posté par FinalArt le 3 Déc - 18:48 (2009)
Tu doit multiplier les proportion de la map par 3, donc si t'as une map de 30x15, tu modifie pour multiplier par 3, donc sa ferra 90x45. Puis tu déplace ta map vers le centre totale ( tu compte les carreaux en haut à gauche, si ta map mesure 20 de longueur  et 15 de hauteur, tu va laisser 20 carreaux à gauche et 15 carreaux en haut). Puis tu complête cette espace soit avec des arbres, du noir pour l'intérieur, ou autres.

[edit] n'oublie pas de déplacer les évènement ! et les téléportations !

Posté par Sphinx le 3 Déc - 19:21 (2009)
Sphinx a écrit:
balises spoilers ?


En fait, je pensais à tes 5 scripts, dont le dernier dépasse les 1000 lignes =)

Posté par FinalArt le 3 Déc - 19:33 (2009)
Oh excuse, je vais les spoiler ^^

Posté par Ace Attorney Man le 3 Déc - 21:14 (2009)
Cette page a faillit me faire bugger mon ordi (que j'ai pas éteins depuis 2 semaines et donc qui bug comme un porc) à cause de tes scripts? ô_o...

Oui je sais je raconte ma vie...

Posté par Warp' le 3 Déc - 21:40 (2009)
Faut-il remplir des trucs la dedans? : [NM7][#XX][%XXX][L][A][H][RX][F]

Posté par Lén le 3 Déc - 21:58 (2009)
warpras a écrit:

Faut-il remplir des trucs la dedans? : [NM7][#XX][%XXX][L][A][H][RX][F]
Désolé mais bon faudrait pt être commencer à vous servir de votre tête les mecs ... srx ... y'a au moins 5 tutos sur ce script ne serait-ce que sur les sites de rmxp.

Posté par pascal_bouchard le 3 Déc - 22:23 (2009)
PokéAzur a écrit:

Tu doit multiplier les proportion de la map par 3, donc si t'as une map de 30x15, tu modifie pour multiplier par 3, donc sa ferra 90x45. Puis tu déplace ta map vers le centre totale ( tu compte les carreaux en haut à gauche, si ta map mesure 20 de longueur  et 15 de hauteur, tu va laisser 20 carreaux à gauche et 15 carreaux en haut). Puis tu complête cette espace soit avec des arbres, du noir pour l'intérieur, ou autres.

[edit] n'oublie pas de déplacer les évènement ! et les téléportations !

ca remplace le maplink cette méthode....

Posté par Junki le 6 Déc - 19:50 (2009)
GG Alex pour le tuto mais chez moi aussi sa bug( j'ai psp 0.7)

---------- Erreur de script : Script 4 ----------
----- Type
RuntimeError

----- Message
LoadLibrary: MGCmode7.dll


----- Position dans Script 4
Ligne 57

----- Backtrace
Script : Script 4 | Ligne : 57 | Méthode : in `initialize'
Script : Script 4 | Ligne : 57 | Méthode : in `new'
Script : Script 4 | Ligne : 57 | Méthode : in `neoM7'
Script : Script 5 | Ligne : 327 | Méthode : in `update'
Script : Script 3 | Ligne : 471 | Méthode : in `update'
Script : Script 3 | Ligne : 406 | Méthode : in `initialize'
Script : Scene_Map | Ligne : 13 | Méthode : in `new'
Script : Scene_Map | Ligne : 13 | Méthode : in `main'
Script : Main | Ligne : 57

Posté par Ace Attorney Man le 6 Déc - 19:53 (2009)
Place dans le dossier racine de ton jeu la dll et renomme-la "MGCmode7.dll"

Posté par Junki le 6 Déc - 19:58 (2009)
Merci Ace
EDIT:

Sa ne marche toujours pas

Posté par poussi le 3 Jan - 06:47 (2010)
antoinedu92 a écrit:
Regardez les beaux bugs que ça me fait:


Quelqu'un a-t'il  une solution :shock:
Merci
PS: j'ai suivis toutes les étapes du tuto et toutes les modifications sur les scripts.
c'est que toute tes arbre il etait avec le meme tag ou bien les tag sot tous connecter se qui forme un seul sprite verticale !

Posté par poussi le 3 Jan - 07:38 (2010)
Usk a écrit:

pourquoi sa me fais sa? 


{{{Spoiler}}}

enleve du nom le [L] [A] [H][%XXX] et remplace  le [RX] avec [R3]==> le jeu deviandera plu rapide !
et si tu veux un effait 3D remplace
[#XX] avec [#X20]

Posté par Van Pokamon le 3 Jan - 11:23 (2010)
poussi, c'est un double post Mollasse enragé

Posté par FinalArt le 4 Jan - 18:03 (2010)
Poussi, si tu remplace [RX] par [R3], les map seront du qualités au-delà du pitoyable...

Posté par Schtroumpf Anarchiste le 4 Jan - 21:37 (2010)
Hum ... J'aimerais bien savoir comment vous réglez la superposition. Car moi, quand je mets un tag 1 sur les éléments du tileset à superposer par rapport aux charas, ça me décale tout. Qui plus est, je suis obligé de mettre les évents 6 cases plus à gauche pour leur donner la position que je veux. J'ai lu 3 fois toutes les pages de ce topic, mais je n'vois pas où est la solution.
HS : PokéAzur, tu pourrais mettre ton code en balises spoilers à la page 8, c'est une horreur sinon, et ça bugue comme pas possible. Merci.

Posté par poussi le 5 Jan - 00:17 (2010)
pokeazure wé je sais ma sa rend le jeu super playable avec une vitesse normale !
 mais si je mais po le [Rx] je jeu se rend tres movais
" avec ma config de me*de
 
Spoiler
processeur pintume 4 2Ghz
ram 700 chi haja
64 mb carte graphique intel XD

 
mais demain nchallah je vais acheter un laptop avec 4GB ram processeur double coeur 2.16 Ghz se qui la rend a 4 .32 Ghz ^^ et une ram graphic up to ~2GB pixel shader 4 et plein de truc cool "
mais ma question c'est
quelle sont tes config pokéazure et est ce le jeu te tourne a une vitesse normele sans cut quand tu applique le neomod 7 sans etuliser les commande d'uptimisation !
est est ça va bien marcher avec les config de mon laptop ^^

Posté par FinalArt le 5 Jan - 18:03 (2010)
Rien ne plante niveau map, rien ne ralentit ( un mini mini les images, les musique non, ni le scripts ), sauf la vitesse du héros, mais j'ai la solution, en event parallèle sur la première map de ton jeu, tu modifie la vitesse du héros, tu met +1 quoi,

Et défait le [F] à la fin, le [RX], tu le laisse en [RX], moins de soucis,

Posté par Lén le 6 Jan - 00:25 (2010)
poussi a écrit:
pokeazure wé je sais ma sa rend le jeu super playable avec une vitesse normale !
 mais si je mais po le [Rx] je jeu se rend tres movais
" avec ma config de me*de
 {{{Spoiler}}}
 
mais demain nchallah je vais acheter un laptop avec 4GB ram processeur double coeur 2.16 Ghz se qui la rend a 4 .32 Ghz ^^ et une ram graphic up to ~2GB pixel shader 4 et plein de truc cool "
mais ma question c'est
quelle sont tes config pokéazure et est ce le jeu te tourne a une vitesse normele sans cut quand tu applique le neomod 7 sans etuliser les commande d'uptimisation !
est est ça va bien marcher avec les config de mon laptop ^^



N'importe quoi ! il y un an lorsque moi et MK voulions utiliser le mode7 sur GEMME (alors que personne n'y avait encore pensé) j'avais un processeur 300Mhz, 128Mo de Ram et un chip graphique de 4Mo alors bon ... il faut juste apprendre à lire et a faire ce qui est écrit dans le tuto .

Posté par Schtroumpf Anarchiste le 26 Jan - 20:38 (2010)
Bichour et désolé du mini-nécro mais voilà.

Spoiler
Mon problème, c'est que j'ai un autotile pour le chemin ; mais vu que je suis obligé de mettre des tags terrains sur les éléments du tileset utilisés pour pouvoir avoir la superposition et la praticabilité voulue, le chemin n'est donc pas taggé, sinon on ne verrait pas le chara sur celui-ci mais en dessous. Egalement, les éléments taggés sont décalés de 6 cases à droite mais respectent parfaitement la position comme dans CO/AA, contrairement aux non-taggés ( comme le chemin, donc ) qui lui reste comme on le voit sur la map ( et d'ailleurs, le chemin n'est pas comme celui de CO/AA, c'est-à-dire que la position est mal réglée ). Ce que je voudrais à tout prix savoir c'est ...


... comment réussir à mettre un tag terrain ( par ex : 6 ) sur les éléments sur lesquels on puisse marcher sans que le chara ne disparaisse, en dessous, au contact ? 

Posté par Pαlвσlѕку le 26 Jan - 21:49 (2010)
Il faut regarder quels sont les tags terrains utilisés par le NM7. Du devrait voir ça dans la première partie. Imbécile heureux

Posté par Schtroumpf Anarchiste le 26 Jan - 22:24 (2010)
Je sais, mais le plus embêtant c'est que ça décale les tiles taggés de 6 carreaux à droite. De plus, si j'applique un tag terrain sur l'autotile du chemin, mon héros passe en dessous de celui-ci ( donc on ne le voit plus ) ; ca me le fait sur toutes les couches. J'suis pas fort pour les explications, mais bon, à chaque fois ça me fait passer le chara du héros en dessous quand je marche sur le chemin. Donc c'est plus qu'embêtant.
En gros, j'veux juste savoir comment faire pour mettre un tiles en un tag concerné dans la ligne 65 du script 1 du NM7 sans que ça joue sur la superposition à chaque fois. Un grand merci à celui qui me dira la réponse, vraiment.

Posté par GT.Onizuka le 19 Fév - 18:36 (2010)
Désolé pour le retard :


Erreur dans:
????????? '1x1 Pixel-1' ? 245 ???? SyntaxError ???????
Lingne concernée
 
Code:
alias initialize_neoM7_game_player initialize 




Je n'y comprends rien  :shock:

Posté par Van Pokamon le 19 Fév - 18:38 (2010)
ça viens de neoM7

Posté par GT.Onizuka le 24 Fév - 23:03 (2010)
Aidez moi s'il vous plait
J'utilise là celui de Alex, et il me dit qu'il y a problème avec la ligne 65:




  
 
Code:
$terrain_tags_vertical_tiles = [1, 2] # You can modify these values 









J'ai vu ce qu'ils ont dit avant, mais rein...
Aidez moi s'il vous plait .

Posté par Solfay1 le 24 Fév - 23:06 (2010)
essaye d'enlever le 1 , et laisse que le 2

Posté par FinalArt le 25 Fév - 02:14 (2010)
       Soit tu as mis tout ton tileset en 1 ou en 2, ou tu as quadrillés 1-2, soit tu as mal placé les tags, les tiles tager ne forme donc plus que un tiles, se qui fait beuguer la portion des tags,

Posté par GT.Onizuka le 25 Fév - 11:13 (2010)
Ah, alors je dois faire quoi ? o.O

Posté par pokemon45 le 27 Fév - 00:59 (2010)
salut,

je suis nul en script et j'aimerais savoir comment le mettre en dessous de main, il y a aucun nom a mettre ? les script doive être séparer ?

je dit ça car le personnage quand j'en mes un a 1x1 pixel bah il est coupée en 2 0.o et quand je prend une map en 1x1 bah il est pas cadré

merci a celui qui m'aide

Posté par pokemon45 le 1 Mar - 13:02 (2010)
personne pour m'aider j'ai toujours le probléme =S

Posté par FinalArt le 20 Mar - 20:19 (2010)
T'es con c'est pas possible...

Il faut, dans la fenêtre de script, appuyer sur " inser " sur ton clavier pour créer de nouveaux emplacement. Tu ne peux pas créer de script en dessous de Main, mais que au dessus, donc tu laisse au dessus >o<"

Ensuite,  avec la manip' que j'ai expliqué, tu créer 5 emplacements, dans les les 5 emplacements tu colle les 5 script, que tu dois modifier avec les indications donner.

Puis, tu veux dire que quand tu le test sur une map, ton character est coupé en deux, refait ton charset,

Tu veux dire quoi par prendre une map ?

Tu veux dire quoi par pas cadré ?

Il faut un minimum de connaissance en RMXP pour pouvoir l'utiliser, je parle pas de savoir scripter, mais savoir comment s'en servir !

Posté par GALAXY le 19 Juin - 11:55 (2010)
bonjour les gens...
euuuuh, le mon hero ne bouge plus (il peut tourné comeme) je c'est pas pourquoi j'ai rien touché...
puis je compren rien a l'activation de l'effet 3d... comment on fait pour incliner pleaz ($scene.spriteset.tilemap.set_alpha(30) ?)

Posté par Sangana le 19 Juin - 12:12 (2010)
rien compris a ce que tu dis --'

Posté par Pαlвσlѕку le 19 Juin - 13:22 (2010)
Pour ton problème de mouvement, c'est sûrement dû à un problème de mapping. (cf. BDD)

Pour la 3D, il faut ajouter [#XX] ou XX est un nombre dans le nom de ta map. Ce nombre correspond aux degrès d'inclinaison.
Je crois que c'est cependant dit dans le tutoriel.

Et soigne ton orthographe s'il te plait.

Posté par GALAXY le 19 Juin - 16:41 (2010)
Ok, merci beaucoup
cependant pour le problème de mouvement je comprend pas, avec la demo pspds, quand suis sur une map de la démo sa marche et que je crée une copie de pspds et que je fais une map sa marche plus, mais la encore cela dépend, quand la map fait 20 par 15 (taille minimale) et que je map juste un sol sa marche... mais si je mais un truc comme une maison sa marche plus... sa m'ernerve HELP svp.
Se beug a commencé lorsque j'ai voulu metre un panorama en dessus d'un autotile translucide...
Si on comprend parceque je dit, dites le j'essayerait d'etre plus clair... merci d'avance

PS: le seule script que j'ai rajoutait c'est Dash et sa marchait bien avant même avec

Posté par GALAXY le 19 Juin - 19:46 (2010)
Alors personne peut m'aidait ?