Sujet n°4783
Posté par Disccat le 8 Aoû - 22:15 (2009)
Titre : Le jeu crypté demande un data [Résolu]
Bonjour, bonsoir !

J'ai un soucis assez grave concernant la création d'une démo de mon projet, le data_zone semble avoir disparu au moment du cryptage.

Voir le screen

Il demande le document Data pour trouver data_zone qui est crypté, mais si je l'ajoute, tout le monde verra le nom des lieux de mon jeu.

Posté par Sphinx le 8 Aoû - 22:16 (2009)
>> tu as pensé à compiler avant de crypter ? Imbécile heureux

Posté par Disccat le 8 Aoû - 22:52 (2009)
EDIT: Apparement la compilation ne fonctionne pas, parce-que lorsue j'appuie dessus, il ne se passe rien d'autre qu'un petit son. J'ai beau avoir fais une mise à jour BDD pour réessayer, rien à faire :sc: ...

Posté par Krosk le 8 Aoû - 23:42 (2009)
compiler, fermer le projet, fermer rmxp, et essayer de recrypter ensuite.

Posté par Disccat le 9 Aoû - 00:23 (2009)
Toujours même erreur malheureusement, cela devient aggassant...

Mais est-ce normal si je séléctionne compiler que je n'entends qu'un petit son de sélection ?

Posté par Angi-MK le 9 Aoû - 00:51 (2009)
J'avais remarqué ce problème, c'Est les fichiers Data_zone etc...
Qui manque.

Posté par Disccat le 9 Aoû - 01:50 (2009)
C'est uniquement le data_zone dans Data qui pose problème... Je trouve cela Bizarre...

Posté par Nuri Yuri le 9 Aoû - 11:46 (2009)
Ba pour ce problème il faudrait qui y ai soit un système qui code le fichier data_zone rxpdata ou le mettre dans un script pour qu'il soit crypter avec le reste.

Posté par Disccat le 11 Aoû - 19:40 (2009)
Ce serait bien de m'aider à résoudre ce bug, sinon j'aurai travaillé pour rien si en donnant mon jeu on puisse accéder à ma BDD...

Tant que ce problème persiste, je ne donnerai pas de démo.

EDIT-UP: Allez petite info gratis, cliquez ici.

Posté par Sphinx le 11 Aoû - 21:58 (2009)
Mollasse enragé Pour ma part, je n'arrive pas à reproduire ce bug... Je vais tenter de le générer sous PSP0.7 (jusqu'à présent je n'ai essayé qu'avec PSP4G+, mais comme c'est le même système de maj bdd / compilation / mappanel, à priori la version utilisée ne change rien pour cette fonction)...

Posté par Solfay1 le 18 Aoû - 10:30 (2009)
Déso du up mais je viens d'avoir le même bug après avoir mis la mise a jour pour que les noms des villes s'affiche sur l'objet carte quand on crypte le jeu .
Après sa j'ai eu le même problème , il y aurais un moyen de régler ceci ?

Posté par Disccat le 18 Aoû - 12:31 (2009)
Et un bur à ajouter en + . Apparement, les annimations des attaques comme Lance Flamme ont cessé d'exister... Toujours après compilation...

Voir le screen


Donc voilà un second problème à résoudre, c'est dur...

Posté par Pαlвσlѕку le 18 Aoû - 14:52 (2009)
Ce bug d'animation se produit parfois. Je ne sais plus si il a été corrigé.

Posté par Sphinx le 18 Aoû - 15:15 (2009)
je sais que je l'avais déjà corrigé mais je croyais avoir posté la correction Mollasse enragé


Tiens, mets ce script dans ton PSP :
Spoiler
Code:
module RPG
  class Sprite < ::Sprite
    @@_animations = []
    @@_reference_count = {}
    def initialize(viewport = nil)
      super(viewport)
      @_whiten_duration = 0
      @_appear_duration = 0
      @_escape_duration = 0
      @_collapse_duration = 0
      @_damage_duration = 0
      @_animation_duration = 0
      @_blink = false
      @_reverse = false
      @_option = 0
      @_registered_x = 0
      @_registered_y = 0
      @_registered_ox = 0
      @_registered_oy = 0
    end
   
    def dispose
      dispose_damage
      dispose_animation
      dispose_loop_animation
      super
    end
   
    def whiten
      self.blend_type = 0
      self.color.set(255, 255, 255, 128)
      self.opacity = 255
      @_whiten_duration = 16
      @_appear_duration = 0
      @_escape_duration = 0
      @_collapse_duration = 0
    end
   
    def appear
      self.blend_type = 0
      self.color.set(0, 0, 0, 0)
      self.opacity = 0
      @_appear_duration = 16
      @_whiten_duration = 0
      @_escape_duration = 0
      @_collapse_duration = 0
    end
   
    def escape
      self.blend_type = 0
      self.color.set(0, 0, 0, 0)
      self.opacity = 255
      @_escape_duration = 32
      @_whiten_duration = 0
      @_appear_duration = 0
      @_collapse_duration = 0
    end
   
    def collapse
      self.blend_type = 1
      self.color.set(255, 64, 64, 255)
      self.opacity = 255
      @_collapse_duration = 48
      @_whiten_duration = 0
      @_appear_duration = 0
      @_escape_duration = 0
    end
   
    def damage(value, critical)
      dispose_damage
      if value.is_a?(Numeric)
        damage_string = value.abs.to_s
      else
        damage_string = value.to_s
      end
      bitmap = Bitmap.new(160, 48)
      bitmap.font.name = "Arial Black"
      bitmap.font.size = 32
      bitmap.font.color.set(0, 0, 0)
      bitmap.draw_text(-1, 12-1, 160, 36, damage_string, 1)
      bitmap.draw_text(+1, 12-1, 160, 36, damage_string, 1)
      bitmap.draw_text(-1, 12+1, 160, 36, damage_string, 1)
      bitmap.draw_text(+1, 12+1, 160, 36, damage_string, 1)
      if value.is_a?(Numeric) and value < 0
        bitmap.font.color.set(176, 255, 144)
      else
        bitmap.font.color.set(255, 255, 255)
      end
      bitmap.draw_text(0, 12, 160, 36, damage_string, 1)
      if critical
        bitmap.font.size = 20
        bitmap.font.color.set(0, 0, 0)
        bitmap.draw_text(-1, -1, 160, 20, "CRITICAL", 1)
        bitmap.draw_text(+1, -1, 160, 20, "CRITICAL", 1)
        bitmap.draw_text(-1, +1, 160, 20, "CRITICAL", 1)
        bitmap.draw_text(+1, +1, 160, 20, "CRITICAL", 1)
        bitmap.font.color.set(255, 255, 255)
        bitmap.draw_text(0, 0, 160, 20, "CRITICAL", 1)
      end
      @_damage_sprite = ::Sprite.new(self.viewport)
      @_damage_sprite.bitmap = bitmap
      @_damage_sprite.ox = 80
      @_damage_sprite.oy = 20
      @_damage_sprite.x = self.x
      @_damage_sprite.y = self.y - self.oy / 2
      @_damage_sprite.z = 3000
      @_damage_duration = 40
    end
   
    def register_position
      @_registered_x = self.x
      @_registered_ox = self.ox
      @_registered_y = self.y
      @_registered_oy = self.oy
    end
   
    def reset_position
      self.x = @_registered_x
      self.ox = @_registered_ox
      self.y = @_registered_y
      self.oy = @_registered_oy
    end
   
    def animation(animation, hit, reverse = false)
      dispose_animation
      @_animation = animation
      return if @_animation == nil
      @_animation_hit = hit
      @_animation_duration = @_animation.frame_max
      animation_name = @_animation.animation_name
      animation_hue = @_animation.animation_hue
      bitmap = RPG::Cache.animation(animation_name, animation_hue)
      if @@_reference_count.include?(bitmap)
        @@_reference_count[bitmap] += 1
      else
        @@_reference_count[bitmap] = 1
      end
      @_animation_sprites = []
      if @_animation.position != 3 or not @@_animations.include?(animation)
        for i in 0..15
          sprite = ::Sprite.new(self.viewport)
          sprite.bitmap = bitmap
          sprite.visible = false
          @_animation_sprites.push(sprite)
        end
        unless @@_animations.include?(animation)
          @@_animations.push(animation)
        end
      end
      @_reverse = reverse
      if animation.name.include?('/')
        split_list = animation.name.split('/')
        if split_list.length == 2
          if split_list[0].include?("R")
            @_option = 1
          end
          if split_list[0].include?("N")
            @_reverse = false
          end
          if split_list[0].include?("M")
            @_option = 2
          end
        end
      end
      update_animation
    end
   
    def loop_animation(animation)
      return if animation == @_loop_animation
      dispose_loop_animation
      @_loop_animation = animation
      return if @_loop_animation == nil
      @_loop_animation_index = 0
      animation_name = @_loop_animation.animation_name
      animation_hue = @_loop_animation.animation_hue
      bitmap = RPG::Cache.animation(animation_name, animation_hue)
      if @@_reference_count.include?(bitmap)
        @@_reference_count[bitmap] += 1
      else
        @@_reference_count[bitmap] = 1
      end
      @_loop_animation_sprites = []
      for i in 0..15
        sprite = ::Sprite.new(self.viewport)
        sprite.bitmap = bitmap
        sprite.visible = false
        @_loop_animation_sprites.push(sprite)
      end
      update_loop_animation
    end
   
    def dispose_damage
      if @_damage_sprite != nil
        @_damage_sprite.bitmap.dispose
        @_damage_sprite.dispose
        @_damage_sprite = nil
        @_damage_duration = 0
      end
    end
   
    def dispose_animation
      if @_animation_sprites != nil
        sprite = @_animation_sprites[0]
        if sprite != nil
          @@_reference_count[sprite.bitmap] -= 1
          if @@_reference_count[sprite.bitmap] == 0
            sprite.bitmap.dispose
          end
        end
        for sprite in @_animation_sprites
          sprite.dispose
        end
        @_animation_sprites = nil
        @_animation = nil
      end
    end
   
    def dispose_loop_animation
      if @_loop_animation_sprites != nil
        sprite = @_loop_animation_sprites[0]
        if sprite != nil
          @@_reference_count[sprite.bitmap] -= 1
          if @@_reference_count[sprite.bitmap] == 0
            sprite.bitmap.dispose
          end
        end
        for sprite in @_loop_animation_sprites
          sprite.dispose
        end
        @_loop_animation_sprites = nil
        @_loop_animation = nil
      end
    end
   
    def blink_on
      unless @_blink
        @_blink = true
        @_blink_count = 0
      end
    end
   
    def blink_off
      if @_blink
        @_blink = false
        self.color.set(0, 0, 0, 0)
      end
    end
   
    def blink?
      @_blink
    end
   
    def effect?
      @_whiten_duration > 0 or
      @_appear_duration > 0 or
      @_escape_duration > 0 or
      @_collapse_duration > 0 or
      @_damage_duration > 0 or
      @_animation_duration > 0
    end
   
    def update
      super
      if @_whiten_duration > 0
        @_whiten_duration -= 1
        self.color.alpha = 128 - (16 - @_whiten_duration) * 10
      end
      if @_appear_duration > 0
        @_appear_duration -= 1
        self.opacity = (16 - @_appear_duration) * 16
      end
      if @_escape_duration > 0
        @_escape_duration -= 1
        self.opacity = 256 - (32 - @_escape_duration) * 10
      end
      if @_collapse_duration > 0
        @_collapse_duration -= 1
        self.opacity = 256 - (48 - @_collapse_duration) * 6
      end
      if @_damage_duration > 0
        @_damage_duration -= 1
        case @_damage_duration
        when 38..39
          @_damage_sprite.y -= 4
        when 36..37
          @_damage_sprite.y -= 2
        when 34..35
          @_damage_sprite.y += 2
        when 28..33
          @_damage_sprite.y += 4
        end
        @_damage_sprite.opacity = 256 - (12 - @_damage_duration) * 32
        if @_damage_duration == 0
          dispose_damage
        end
      end
      if @_animation != nil and (Graphics.frame_count % 2 == 0)
        @_animation_duration -= 1
        update_animation
      end
      if @_loop_animation != nil and (Graphics.frame_count % 2 == 0)
        update_loop_animation
        @_loop_animation_index += 1
        @_loop_animation_index %= @_loop_animation.frame_max
      end
      if @_blink
        @_blink_count = (@_blink_count + 1) % 32
        if @_blink_count < 16
          alpha = (16 - @_blink_count) * 6
        else
          alpha = (@_blink_count - 16) * 6
        end
        self.color.set(255, 255, 255, alpha)
      end
      @@_animations.clear
      self.viewport.update if self.viewport != nil
    end
   
    def update_animation
      if @_animation_duration > 0
        frame_index = @_animation.frame_max - @_animation_duration
        cell_data = @_animation.frames[frame_index].cell_data
        position = @_animation.position
        animation_set_sprites(@_animation_sprites, cell_data, position)
        for timing in @_animation.timings
          if timing.frame == frame_index
            animation_process_timing(timing, @_animation_hit)
          end
        end
      else
        dispose_animation
      end
    end
   
    def update_loop_animation
      frame_index = @_loop_animation_index
      cell_data = @_loop_animation.frames[frame_index].cell_data
      position = @_loop_animation.position
      animation_set_sprites(@_loop_animation_sprites, cell_data, position)
      for timing in @_loop_animation.timings
        if timing.frame == frame_index
          animation_process_timing(timing, true)
        end
      end
    end
   
    def animation_set_sprites(sprites, cell_data, position)
      # Cas Spécial : le sprite de mouvement du Pokémon
      sprite = sprites[15]
      pattern = cell_data[15, 0]
      jump = false
      if sprite == nil or pattern == nil or pattern == -1
        sprite.visible = false if sprite != nil
        jump = true
      end
     
      x_compensate = 0
      y_compensate = 0
     
      if not jump
        if position == 3
          if self.viewport != nil
            self.x = self.viewport.rect.width / 2
            self.y = self.viewport.rect.height - 160
          else
            self.x = 320
            self.y = 240
          end
        else
          self.x = @_registered_x
          self.y = @_registered_y
        end
       
        if @_reverse and position == 3
          self.x = 620 - self.x
          self.y = 440 - self.y #328 - self.y
          #self.ox = self.src_rect.width / 2
          #self.oy = self.src_rect.height / 2
        end
   
        if not @_reverse
          self.x += cell_data[15, 1]
          self.y += cell_data[15, 2]
          x_compensate -= cell_data[15, 1] if position != 3
          y_compensate -= cell_data[15, 2] if position != 3
        else
          self.x -= cell_data[15, 1]
          self.y -= cell_data[15, 2]
          x_compensate += cell_data[15, 1] if position != 3
          y_compensate += cell_data[15, 2] if position != 3
        end
       
      end
       
      for i in 0..14
        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
       
        if @_reverse and position == 3
          sprite.x = 620 - sprite.x
          sprite.y = 328 - sprite.y
        end
       
        if not @_reverse
          sprite.x += cell_data[i, 1] + x_compensate
          sprite.y += cell_data[i, 2] + y_compensate
        else
          sprite.x -= cell_data[i, 1] - x_compensate
          sprite.y -= cell_data[i, 2] - y_compensate
        end
       
        sprite.z = 2000
        sprite.ox = 96
        sprite.oy = 96
        sprite.zoom_x = cell_data[i, 3] / 100.0
        sprite.zoom_y = cell_data[i, 3] / 100.0
        sprite.angle = cell_data[i, 4]
        if @_option == 1 and @_reverse
          sprite.angle += 180
        end
        sprite.mirror = (cell_data[i, 5] == 1)
        if @_option == 2 and @_reverse
          sprite.mirror = (sprite.mirror == false)
        end
        sprite.opacity = cell_data[i, 6] * self.opacity / 255.0
        sprite.blend_type = cell_data[i, 7]
      end
    end
   
    def animation_process_timing(timing, hit)
      if (timing.condition == 0) or
         (timing.condition == 1 and hit == true) or
         (timing.condition == 2 and hit == false)
        if timing.se.name != ""
          se = timing.se
          Audio.se_play("Audio/SE/" + se.name, se.volume, se.pitch)
        end
        case timing.flash_scope
        when 1
          self.flash(timing.flash_color, timing.flash_duration * 2)
        when 2
          if self.viewport != nil
            self.viewport.flash(timing.flash_color, timing.flash_duration * 2)
          end
        when 3
          self.flash(nil, timing.flash_duration * 2)
        end
      end
    end
   
    def x=(x)
      sx = x - self.x
      if sx != 0
        if @_animation_sprites != nil
          for i in 0..15
            @_animation_sprites[i].x += sx
          end
        end
        if @_loop_animation_sprites != nil
          for i in 0..15
            @_loop_animation_sprites[i].x += sx
          end
        end
      end
      super
    end
   
    def y=(y)
      sy = y - self.y
      if sy != 0
        if @_animation_sprites != nil
          for i in 0..15
            @_animation_sprites[i].y += sy
          end
        end
        if @_loop_animation_sprites != nil
          for i in 0..15
            @_loop_animation_sprites[i].y += sy
          end
        end
      end
      super
    end
  end
 
end

Posté par Solfay1 le 18 Aoû - 16:29 (2009)
Et pour les datas ?

Posté par Sphinx le 18 Aoû - 16:58 (2009)
pour les datas, jsais pas du tout, chez moi (sur 4G+) ca bugge pas Mollasse enragé Je ne comprends pas Mollasse enragé

Posté par Solfay1 le 18 Aoû - 17:00 (2009)
Ben en tout qu'a c'est a cause d'une correction que j'ai faite , je t'explique :
Je met la démo de mon jeu
ensuite on me dit que les noms des villes s'affiche pas sur l'objet carte
je vais dans les corrections et je met la correction pour les noms
je refait une démo et pam bug Mollasse enragé

Posté par Disccat le 18 Aoû - 18:51 (2009)
Merci Sphinx pour le problème n°2, mais le 1er est toujours là.

En attendant, j'ai préparé une démo crypté, sauf que je l'ai décompressé après pour replacer en non-décrypté le Data=>data_zone (apparement plus de bug après).

Donc recompressé en rar machin, ma démo serait un peu prête à être mis en téléchargement, sauf qu'il sera possible de voyager dans mon data_zone.

Si pour l'instant aucune solution n'est possible, alors j'uploadrai mon projet comme ça (je vais attendre encore un peu).

Posté par Solfay1 le 19 Aoû - 17:48 (2009)
Disccat remplace ton script scene_debug ( celui fait pas Krosk ) par celui la :

Spoiler
Code:
#==============================================================================
# ● Menu Debug - Pokémon
# Pokemon Script Project - Krosk
# 18/07/07
#==============================================================================
# Contributions :
#   Drakhaine - Fonction Modifier
#==============================================================================

class Scene_Debug
  include POKEMON_S
  def main
    @z_level = 200
   
    @left_window = Window_DebugLeft.new
    @right_window = Window_DebugRight.new
    @left_window.z = 0
    @right_window.z = 0
   
    c1 = "Régénérer l'équipe"
    c2 = "Invincible"
    c3 = "Argent"
    c4 = "Rencontres aléatoires"
    c5 = "Objets"
    c6 = "Armes"
    c7 = "Armures"
    c8 = "Téléporter"
    c9 = "Vitesse de marche"
    c10 = "Sauvegarder"
   
    c1 = "Ajouter"
    c2 = "Supprimer"
    c3 = "Modifier"
    c4 = "Soigner"
    c5 = "Objets"
    c55 = "Argent"
    c6 = "Pokédex"
    c7 = "Rencontres"
    c8 = "Invincibilité"
    c9 = "Vitesse"
    c10 = "Téléporter"
    c11 = "MAJ BDD"
    c12 = "Compiler"
   
    x1 = "Activé"
    x2 = "Désactivé"
   
    w1 = "La plus basse"
    w2 = "Très basse"
    w3 = "Basse"
    w4 = "Rapide"
    w5 = "Très rapide"
    w6 = "La plus rapide"
   
    d1 = "Point de Retour"
    d2 = "Enregistrer Pos"
   
    p1 = "Désactivé"
    p2 = "Activé"
    p3 = "Activé et vierge"
    p4 = "Activé et complété"
    p5 = "Mettre à jour"
   
   
    main_commands = [c1, c2, c3, c4, c5, c55, c6, c7, c8, c9, c10, c11, c12]
    speed_commands = [w1, w2, w3, w4, w5, w6]
    toggle_commands = [x1, x2]
    warp_commands = [d1, d2]
    pkdx_commands = [p1, p2, p3, p4, p5]
   
   
   
    @other_window = Window_Command.new(192, main_commands)
    @other_window.z = @z_level + 20
    @speed_window = Window_Command.new(200, speed_commands)
    @enc_window = Window_Command.new(150, toggle_commands)
    @god_window = Window_Command.new(150, toggle_commands)
    @warp_window = Window_Command.new(240, warp_commands)
    @target_window = Window_Target.new
    @skills_window = Skills_List.new
    @skills_window.z = @z_level + 40
    @slots_window = Window_Command.new(300, ["Slot 1", "Slot 2", "Slot 3", "Slot 4"])
    @slots_window.z = @z_level + 40
   
    @party_window = POKEMON_S::Debug_Party_Window.new
    @party_window.active = false
    @party_window.visible = false
    @party_window.z = @z_level + 10
   
    @menu_gene = Window_Command.new(150, ["ID", "Niveau", "Générer"], $fontsize)
    @menu_gene.x = 8
    @menu_gene.y = 8
    @menu_gene.z = @z_level + 30
    @menu_gene.visible = false
    @menu_gene.active = false

    @sprite_gene = Window_Base.new(285, 8, 192, 192 + 128)
    @sprite_gene.contents = Bitmap.new(160,160 + 128)
    @sprite_gene.z = @z_level + 40
    @sprite_gene.visible = false
    @sprite_gene.active = false
    @sprite_gene.contents.font.name = $fontface
    @sprite_gene.contents.font.size = $fontsize
    @sprite_gene.contents.font.color = @sprite_gene.normal_color
     
    @id_gene = Window_Base.new(8, 138, 150, 64)
    @id_gene.contents = Bitmap.new(150-32, 32)
    @id_gene.z = @z_level + 40
    @id_gene.contents.font.name = $fontface
    @id_gene.contents.font.size = $fontsize
    @id_gene.active = false
    @id_gene.visible = false
    @id_gene.contents.font.color = @id_gene.normal_color
    @id_gene_index = 0 # Index Digit: 0 unité, 1 dizaines, 2 centaines
     
    @level_gene = Window_Base.new(8, 138, 150, 64)
    @level_gene.contents = Bitmap.new(150-32, 32)
    @level_gene.z = @z_level + 40
    @level_gene.contents.font.name = $fontface
    @level_gene.contents.font.size = $fontsize
    @level_gene.active = false
    @level_gene.visible = false
    @level_gene.contents.font.color = @level_gene.normal_color
   
    @pkdx_window = Window_Command.new(240, pkdx_commands)
    @pkdx_window.active = false
    @pkdx_window.visible = false
   
    @level = 1
    @id = 1
    refresh_sprite
   
    @money_window = Window_Gold.new
    @number_window = Window_InputNumber.new(7)
    @var_window = Window_InputNumber.new(8)
    @help_window = Window_Base.new(192, 352, 448, 128)
    @help_window.contents = Bitmap.new(406, 96)
    #@help_window.contents.font.name = "Arial"
    @help_window.contents.font.size = 24
    @help_window.contents.font.color = @help_window.normal_color
    @left_window.top_row = $game_temp.debug_top_row
    @left_window.index = $game_temp.debug_index
    @right_window.mode = @left_window.mode
    @right_window.top_id = @left_window.top_id
    @other_window.visible = false
    @other_window.active = false
    @target_window.visible = false
    @target_window.active = false
    @enc_window.visible = false
    @enc_window.active = false
    @god_window.visible = false
    @god_window.active = false
    @speed_window.visible = false
    @speed_window.active = false
    @warp_window.visible = false
    @warp_window.active = false
    @skills_window.visible = false
    @skills_window.active = false
    @skills_window.refresh
    @slots_window.visible = false
    @slots_window.active = false
    @money_window.visible = false
    @money_window.active = false
    @number_window.visible = false
    @number_window.active = false
    @var_window.visible = false
    @var_window.active = false
    @itemset_window = Window_Dataset.new(1)
    @itemset_window.visible = false
    @itemset_window.active = false
    @weaponset_window = Window_Dataset.new(2)
    @weaponset_window.visible = false
    @weaponset_window.active = false
    @armorset_window = Window_Dataset.new(3)
    @armorset_window.visible = false
    @armorset_window.active = false
    @other_window.opacity = 255
    #@other_window.x = 100
    #@other_window.y = 48
    @target_window.x = 304
    @target_window.y = 0
    @target_window.z = @z_level + 100
    @target_window.opacity = 255
    @pkdx_window.x = 270
    @pkdx_window.y = 100
    @pkdx_window.z = @z_level + 100
    @enc_window.x = 225
    @enc_window.y = 180
    @enc_window.z = @z_level + 50
    @enc_window.opacity = 255
    @god_window.x = 225
    @god_window.y = 180
    @god_window.z = @z_level + 50
    @god_window.opacity = 255
    @speed_window.x = 270
    @speed_window.y = 100
    @speed_window.z = @z_level + 50
    @speed_window.opacity = 255
    @warp_window.x = 270
    @warp_window.y = 100
    @warp_window.z = @z_level + 50
    @warp_window.opacity = 255
    @skills_window.x = 0
    @skills_window.y = 0
    @skills_window.opacity = 255
    @slots_window.x = 170
    @slots_window.y = 100
    @slots_window.opacity = 255
    @itemset_window.x = 0
    @itemset_window.y = 0
    @itemset_window.z = @z_level + 100
    @itemset_window.opacity = 255
    @weaponset_window.x = 0
    @weaponset_window.y = 0
    @weaponset_window.z = 1000
    @weaponset_window.opacity = 255
    @armorset_window.x = 0
    @armorset_window.y = 0
    @armorset_window.z = 1000
    @armorset_window.opacity = 255
    @money_window.x = 270
    @money_window.y = 100
    @money_window.z = 700
    @money_window.opacity = 255
    @number_window.x = 270
    @number_window.y = 164
    @number_window.z = 710
    @number_window.opacity = 255
    @var_window.x = 270
    @var_window.y = 164
    @var_window.z = 710
    @var_window.opacity = 255
    @variable_edit = 0
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    $game_map.refresh
    Graphics.freeze
    @left_window.dispose
    @right_window.dispose
    @help_window.dispose
    @other_window.dispose
    @god_window.dispose
    @speed_window.dispose
    @enc_window.dispose
    @target_window.dispose
    @warp_window.dispose
    @skills_window.dispose
    @slots_window.dispose
    @itemset_window.dispose
    @weaponset_window.dispose
    @armorset_window.dispose
    @money_window.dispose
    @var_window.dispose
    @party_window.dispose
    @pkdx_window.dispose
    @menu_gene.dispose
    @id_gene.dispose
    @level_gene.dispose
    @sprite_gene.dispose
  end
  # ------------------------------
  def update
    @right_window.mode = @left_window.mode
    @right_window.top_id = @left_window.top_id
    @left_window.update
    @right_window.update
    @other_window.update
    @enc_window.update
    @itemset_window.update
    @weaponset_window.update
    @armorset_window.update
    @target_window.update
    @god_window.update
    @speed_window.update
    @warp_window.update
    @skills_window.update
    @slots_window.update
    @money_window.update
    @number_window.update
    @var_window.update
    $game_temp.debug_top_row = @left_window.top_row
    $game_temp.debug_index = @left_window.index
   
    @menu_gene.update
    @level_gene.update
    @id_gene.update
    @party_window.update
    @pkdx_window.update
   
    if @level_gene.active
      update_gen_level
      return
    end
    if @id_gene.active
      update_gen_id
      return
    end
    if @menu_gene.active
      update_gene
      return
    end
   
    if @party_window.active
      update_party
      return
    end
    if @pkdx_window.active
      update_pkdx
      return
    end
   
    if @left_window.active
      update_left
      return
    end
    if @right_window.active
      update_right
      return
    end
    if @other_window.active
      update_command
      return
    end
    if @target_window.active
      update_target
      return
    end
    if @enc_window.active
      update_enc
      return
    end
    if @itemset_window.active
      update_itemset
      return
    end
    if @weaponset_window.active
      update_weaponset
      return
    end
    if @armorset_window.active
      update_armorset
      return
    end
    if @god_window.active
      update_god
      return
    end
    if @speed_window.active
      update_speed
      return
    end
    if @warp_window.active
      update_warp
      return
    end
    if @skills_window.active
      update_skills
      return
    end
    if @slots_window.active
      update_slots
      return
    end
    if @number_window.active
      update_money
      return
    end
    if @var_window.active
      update_var
      return
    end
  end
 
 
 # ------------------------------
  def update_left
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Map.new
      return
    end
    if Input.trigger?(Input::C)
      $game_system.se_play($data_system.decision_se)
      if @left_window.mode == 0
        text1 = "Entrée ou C : Activé / Désactivé"
        @help_window.contents.draw_text(4, 0, 406, 32, text1)
      else
        text1 = "Gauche : -1   Droite : +1"
        text2 = "Q : -10     W : +10"
        text3 = "Entrée ou C : Entrer la valeur"
        text4 = "A: Debug avancé"
        text5 = ""
        @help_window.contents.draw_text(4, 0, 200, 32, text1)
        @help_window.contents.draw_text(4, 32, 200, 32, text2)
        @help_window.contents.draw_text(4, 64, 400, 32, text3)
        @help_window.contents.draw_text(240, 0, 180, 32, text4)
        @help_window.contents.draw_text(240, 32, 180, 32, text5)
      end
      @left_window.active = false
      @right_window.active = true
      @right_window.index = 0
      return
    end
    if Input.trigger?(Input::X)
      $game_system.se_play($data_system.decision_se)
      @other_window.visible = true
      @left_window.active = false
      @other_window.active = true
      @party_window.visible = true
    end
  end
 
 
  def update_gene
    # Fenetre level
    if Input.trigger?(Input::C) and @menu_gene.index == 1
      $game_system.se_play($data_system.decision_se)
      @menu_gene.active = false
      @level_gene.active = true
      @level_gene.visible = true
      refresh_gen_level
      return
    end
   
    # Fenetre ID
    if Input.trigger?(Input::C) and @menu_gene.index == 0
      $game_system.se_play($data_system.decision_se)
      @menu_gene.active = false
      @id_gene.visible = true
      @id_gene.active = true
      refresh_id
      return
    end
   
    # Générer
    if Input.trigger?(Input::C) and @menu_gene.index == 2
      @menu_gene.active = false
      @menu_gene.visible = false
      @sprite_gene.visible = false
      $game_system.se_play($data_system.decision_se)
      $pokemon_party.add(POKEMON_S::Pokemon.new(@id, @level))
      @party_window.refresh
      @other_window.active = true
      return
    end
     
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.buzzer_se)
      @menu_gene.active = false
      @menu_gene.visible = false
      @sprite_gene.visible = false
      @other_window.active = true
      return
    end
  end
 
  def update_gen_level
    if Input.repeat?(Input::UP)
      if @level >= MAX_LEVEL
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      @level += 1
      refresh_sprite
      refresh_gen_level
      return
    end
     
    if Input.repeat?(Input::DOWN)
      if @level <= 1
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      @level -= 1
      refresh_sprite
      refresh_gen_level
      return
    end
     
    if Input.repeat?(Input::RIGHT)
      if @level >= MAX_LEVEL
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      @level += 10
      if @level >= MAX_LEVEL
        @level = MAX_LEVEL
      end
      refresh_sprite
      refresh_gen_level
      return
    end
     
    if Input.repeat?(Input::LEFT)
      if @level <= 1
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      @level -= 10
      if @level <= 1
        @level = 1
      end
      refresh_sprite
      refresh_gen_level
      return
    end
     
    if Input.trigger?(Input::C) or Input.trigger?(Input::B)
      $game_system.se_play($data_system.decision_se)
      @level_gene.active = false
      @level_gene.visible = false
      @menu_gene.active = true
      refresh_sprite
      return
    end
  end
 
  def update_gen_id
    if Input.trigger?(Input::LEFT)
      if @id_gene_index == 2
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      @id_gene_index += 1
      refresh_id
    end
   
    if Input.trigger?(Input::RIGHT)
      if @id_gene_index == 0
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      @id_gene_index -= 1
      refresh_id
    end
   
    if Input.repeat?(Input::UP)
      if @id >= $data_pokemon.length-1
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      @id += 10 ** @id_gene_index
      if @id >= $data_pokemon.length-1
        @id = $data_pokemon.length-1
      end
      while Pokemon_Info.name(@id) == "-------"
        @id += 1
        if @id > $data_pokemon.length-1
          @id = 1
        end
      end
      refresh_sprite
      refresh_id
      return
    end
   
    if Input.repeat?(Input::DOWN)
      if @id <= 1
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      @id -= 10 ** @id_gene_index
      if @id <= 1
        @id = 1
      end
      while Pokemon_Info.name(@id) == "-------"
        @id -= 1
        if @id < 1
          @id = $data_pokemon.length-1
        end
      end
      refresh_sprite
      refresh_id
      return
    end
   
    if Input.trigger?(Input::C) or Input.trigger?(Input::B)
      $game_system.se_play($data_system.decision_se)
      @id_gene.active = false
      @id_gene.visible = false
      @menu_gene.active = true
      refresh_sprite
      return
    end
  end
 
  def refresh_sprite
    @sprite_gene.contents.clear
    src_rect = Rect.new(0, 0, 160, 160)
    ida = sprintf("%03d", @id)
    bitmap = RPG::Cache.battler("Front_Male/" + ida + ".png", 0)
    @sprite_gene.contents.blt(0, 0, bitmap, src_rect, 255)
    string = POKEMON_S::Pokemon_Info.name(@id)
    @sprite_gene.contents.draw_text(0, 160, 160, 32, string, 1)
    @sprite_gene.contents.draw_text(0, 192, 160, 32, "ID: "+ida.to_s, 1)
    @sprite_gene.contents.draw_text(0, 224, 160, 32, "Nv: "+@level.to_s, 1)
  end
 
  def refresh_id
    @id_gene.contents.clear
    @id_gene.contents.draw_text(0, 0, 118, 32, "ID")
    string = ("000" + @id.to_s)[-3..-1]
    for i in 0..2
      if $data_pokedex[@id] == nil
        $data_pokedex[@id] = [false, false]
      end
      if i == @id_gene_index
        @id_gene.contents.font.color = @id_gene.text_color(2)
      end
      @id_gene.contents.draw_text(0, 0, 118 - 22*i, 32, string[2-i..2-i], 2)
      @id_gene.contents.font.color = @id_gene.normal_color
    end
    @id_gene.contents.font.color = @id_gene.normal_color
  end
   
  def refresh_gen_level
    @level_gene.contents.clear
    @level_gene.contents.draw_text(0, 0, 150-32, 32, "Niveau")
    @level_gene.contents.draw_text(0, 0, 150-32, 32, @level.to_s, 2)
  end
 
  def update_pkdx
    if Input.trigger?(Input::C)
      $game_system.se_play($data_system.decision_se)
      case @pkdx_window.index
      when 0
        $data_pokedex[0] = false
      when 1
        $data_pokedex[0] = true
      when 2
        $data_pokedex[0] = true
        for i in 1..$data_pokedex.length-1
          $data_pokedex[i] = [false, false]
        end
      when 3
        $data_pokedex[0] = true
        for i in 1..$data_pokedex.length-1
          $data_pokedex[i] = [true, true]
        end
      when 4
        for i in 1..$data_pokemon.length-1
          if $data_pokedex[i] == nil
            $data_pokedex[i] = [false, false]
          end
        end
      end
      return
    end
   
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      @pkdx_window.visible = false
      @pkdx_window.active = false
      @other_window.active = true
      return
    end
  end
 
  def update_skills
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      @skills_window.active = false
      @party_window.active = true
      @skills_window.visible = false
      return
    end
    if Input.trigger?(Input::C)
      $game_system.se_play($data_system.decision_se)
      @skills_window.active = false
      @slots_window.active = true
      @skills_window.visible = false
      @slots_window.visible = true
    end
  end
 
  def update_slots
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      @slots_window.active = false
      @skills_window.active = true
      @slots_window.visible = false
      @skills_window.visible = true
      return
    end
    if Input.trigger?(Input::C)
      $game_system.se_play($data_system.decision_se)
      $pokemon_party.actors[@party_window.index].replace_skill_index(@slots_window.index,$data_skills_pokemon[@skills_window.index+1][0])
      @slots_window.active = false
      @skills_window.active = true
      @slots_window.visible = false
      @skills_window.visible = true
    end
  end
   
  def update_party
    if Input.trigger?(Input::C)
      $game_system.se_play($data_system.decision_se)
      case @other_window.index
      when 1 # Supprimer sélectionné
        $pokemon_party.remove_id(@party_window.index)
        @party_window.refresh
      when 2 # Modifier séléctionner
        @party_window.active = false
        @skills_window.active = true
        @skills_window.visible = true
      end
      return
    end
   
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      @party_window.active = false
      @party_window.index = -1
      @other_window.active = true
      return
    end
   
  end
   
  # ------------------------------
  def update_command
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      @other_window.active = false
      @left_window.active = true
      @other_window.visible = false
      @party_window.visible = false
      return
    end
    if Input.trigger?(Input::C)
      $game_system.se_play($data_system.decision_se)
      case @other_window.index
      when 0 #Ajouter
        @menu_gene.active = true
        @menu_gene.visible = true
        @sprite_gene.visible = true
        @other_window.active = false
      when 1 #Supprimer
        @other_window.active = false
        @party_window.active = true
        @party_window.index = 0
      when 2 #Modifier
        @other_window.active = false
        @party_window.active = true
        @party_window.index = 0
      when 3 #Soigner
        $pokemon_party.refill_party
        @party_window.refresh
      when 4 #Objets
        @itemset_window.index = 0
        @itemset_window.active = true
        @itemset_window.visible = true
        @other_window.active = false
      when 5 #Argent
        @number_window.number = 0
        @money_window.visible = true
        @number_window.active = true
        @number_window.visible = true
        @other_window.active = false
      when 6 #Pkdx
        @pkdx_window.active = true
        @pkdx_window.visible = true
        @other_window.active = false
      when 7 #Rencontres
        @enc_window.index = 0
        if $game_system.encounter_disabled
          @enc_window.index = 1
        end
        @enc_window.active = true
        @enc_window.visible = true
        @other_window.active = false
      when 8 #Invincible
        @god_window.index = 1
        if $game_temp.god_mode
          @god_window.index = 0
        end
        @god_window.active = true
        @god_window.visible = true
        @other_window.active = false
      when 10
        @warp_window.active = true
        @warp_window.visible = true
        @other_window.active = false
      when 9
        @speed_window.index = $game_player.move_speed - 1
        @speed_window.active = true
        @speed_window.visible = true
        @other_window.active = false
      when 11
        pokemon_conversion
      when 12
        update_datafile
      end
    end
  end
 
  # ------------------------------
  def update_money
   if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      @number_window.active = false
      @other_window.active = true
      @money_window.visible = false
      @number_window.visible = false
      return
    end
    if Input.trigger?(Input::C)
      $game_system.se_play($data_system.decision_se)
      $pokemon_party.lose_money(9999999)
      $pokemon_party.add_money(@number_window.number)
      @money_window.refresh
    end
    if Input.repeat?(Input::X)
      $game_system.se_play($data_system.cursor_se)
      $pokemon_party.add_money(9999999)
      @money_window.refresh
    end
     if Input.repeat?(Input::Y)
      $game_system.se_play($data_system.cursor_se)
      $pokemon_party.add_money(9999999)
      @money_window.refresh
    end
  end
   # ------------------------------
  def update_itemset
   if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      @itemset_window.active = false
      @other_window.active = true
      @itemset_window.visible = false
      return
    end
    if Input.repeat?(Input::RIGHT)
      $game_system.se_play($data_system.cursor_se)
      $pokemon_party.add_item(@itemset_window.index + 1, 1)
      @itemset_window.refresh
    end
    if Input.repeat?(Input::LEFT)
      $game_system.se_play($data_system.cursor_se)
      $pokemon_party.drop_item(@itemset_window.index + 1, 1)
      @itemset_window.refresh
    end
    if Input.repeat?(Input::X)
      $game_system.se_play($data_system.cursor_se)
      $pokemon_party.drop_item(@itemset_window.index + 1, 10)
      @itemset_window.refresh
    end
    if Input.repeat?(Input::Y)
      $game_system.se_play($data_system.cursor_se)
      $pokemon_party.add_item(@itemset_window.index + 1, 10)
      @itemset_window.refresh
    end
  end
   # ------------------------------
  def update_weaponset
   if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      @weaponset_window.active = false
      @other_window.active = true
      @weaponset_window.visible = false
      return
    end
    if Input.repeat?(Input::RIGHT)
      $game_system.se_play($data_system.cursor_se)
      $game_party.gain_weapon(@weaponset_window.index + 1, 1)
      @weaponset_window.refresh
    end
    if Input.repeat?(Input::LEFT)
      $game_system.se_play($data_system.cursor_se)
      $game_party.lose_weapon(@weaponset_window.index + 1, 1)
      @weaponset_window.refresh
    end
    if Input.repeat?(Input::X)
      $game_system.se_play($data_system.cursor_se)
      $game_party.lose_weapon(@weaponset_window.index + 1, 10)
      @weaponset_window.refresh
    end
    if Input.repeat?(Input::Y)
      $game_system.se_play($data_system.cursor_se)
      $game_party.gain_weapon(@weaponset_window.index + 1, 10)
      @weaponset_window.refresh
    end
  end
   # ------------------------------
  def update_armorset
   if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      @armorset_window.active = false
      @other_window.active = true
      @armorset_window.visible = false
      return
    end
    if Input.repeat?(Input::RIGHT)
      $game_system.se_play($data_system.cursor_se)
      $game_party.gain_armor(@armorset_window.index + 1, 1)
      @armorset_window.refresh
    end
    if Input.repeat?(Input::LEFT)
      $game_system.se_play($data_system.cursor_se)
      $game_party.lose_armor(@armorset_window.index + 1, 1)
      @armorset_window.refresh
    end
    if Input.repeat?(Input::X)
      $game_system.se_play($data_system.cursor_se)
      $game_party.lose_armor(@armorset_window.index + 1, 10)
      @armorset_window.refresh
    end
    if Input.repeat?(Input::Y)
      $game_system.se_play($data_system.cursor_se)
      $game_party.gain_armor(@armorset_window.index + 1, 10)
      @armorset_window.refresh
    end
  end
  # -------------------------------
   def update_enc
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      @enc_window.active = false
      @other_window.active = true
      @enc_window.visible = false
      return
    end
    if Input.trigger?(Input::C)
      case @enc_window.index
      when 0
        $game_system.se_play($data_system.decision_se)
        $game_system.encounter_disabled = false
        @enc_window.active = false
        @other_window.active = true
        @enc_window.visible = false
      when 1
        $game_system.se_play($data_system.decision_se)
        $game_system.encounter_disabled = true
        @enc_window.active = false
        @other_window.active = true
        @enc_window.visible = false
      end
    end
  end
   # -------------------------------
   def update_god
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      @god_window.active = false
      @other_window.active = true
      @god_window.visible = false
      return
    end
    if Input.trigger?(Input::C)
      case @god_window.index
      when 0
        $game_system.se_play($data_system.decision_se)
        $game_temp.god_mode = true
        @god_window.active = false
        @other_window.active = true
        @god_window.visible = false
      when 1
        $game_system.se_play($data_system.decision_se)
        $game_temp.god_mode = false
        @god_window.active = false
        @other_window.active = true
        @god_window.visible = false
      end
    end
  end
   # -------------------------------
  def update_speed
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      @speed_window.active = false
      @other_window.active = true
      @speed_window.visible = false
      return
    end
    if Input.trigger?(Input::C)
      $game_system.se_play($data_system.decision_se)
      $game_player.move_speed = @speed_window.index + 1
      @speed_window.active = false
      @other_window.active = true
      @speed_window.visible = false
    end
  end
   # -------------------------------
   def update_warp
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      @warp_window.active = false
      @other_window.active = true
      @warp_window.visible = false
      return
    end
    if Input.trigger?(Input::C)
      $game_system.se_play($data_system.decision_se)
      $game_temp.player_transferring = true
      case @warp_window.index
      when 0
        $game_temp.player_new_map_id = $game_variables[1]
        $game_temp.player_new_x = $game_variables[2]
        $game_temp.player_new_y = $game_variables[3]
        @warp_window.active = false
        @other_window.active = true
        @warp_window.visible = false
      when 1
        $game_temp.player_transferring = false
        $game_variables[1] = $game_map.map_id
        $game_variables[2] = $game_player.x
        $game_variables[3] = $game_player.y
      end
    end
  end
  # ------------------------------
  def update_target
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      @target_window.active = false
      @other_window.active = true
      @target_window.visible = false
      return
    end
    if Input.trigger?(Input::C)
      $game_system.se_play($data_system.save_se)
      for i in 1..$data_states.size
        $game_party.actors[@target_window.index].remove_state(i)
      end
      $game_party.actors[@target_window.index].hp += 9999
      $game_party.actors[@target_window.index].sp += 9999
      @target_window.refresh
    end
    if Input.trigger?(Input::X)
      $game_system.se_play($data_system.save_se)
      $game_party.actors[@target_window.index].hp += 9999
      @target_window.refresh
    end
    if Input.trigger?(Input::Y)
      $game_system.se_play($data_system.save_se)
      $game_party.actors[@target_window.index].sp += 9999
      @target_window.refresh
    end
    if Input.trigger?(Input::A)
      $game_system.se_play($data_system.save_se)
      for i in 1..$data_states.size
        $game_party.actors[@target_window.index].remove_state(i)
      end
      @target_window.refresh
    end
  end
  # ------------------------------
  def update_var
   if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      @var_window.active = false
      @var_window.visible = false
      @right_window.active = true
      return
    end
    if Input.trigger?(Input::C)
      $game_system.se_play($data_system.decision_se)
      $game_variables[@variable_edit] = @var_window.number
      @right_window.refresh
      @var_window.active = false
      @var_window.visible = false
      @right_window.active = true
    end
  end
 # ------------------------------
  def update_right
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      @left_window.active = true
      @right_window.active = false
      @right_window.index = -1
      @help_window.contents.clear
      return
    end
    current_id = @right_window.top_id + @right_window.index
    if @right_window.mode == 0
      if Input.trigger?(Input::C)
        $game_system.se_play($data_system.decision_se)
        $game_switches[current_id] = (not $game_switches[current_id])
        @right_window.refresh
        return
      end
    end
    if @right_window.mode == 1
      if Input.repeat?(Input::RIGHT)
        $game_system.se_play($data_system.cursor_se)
        if $game_variables[current_id].type != Fixnum
          return
        end
        $game_variables[current_id] += 1
        if $game_variables[current_id] > 99999999
          $game_variables[current_id] = 99999999
        end
        @right_window.refresh
        return
      end
      if Input.repeat?(Input::LEFT)
        $game_system.se_play($data_system.cursor_se)
        if $game_variables[current_id].type != Fixnum
          return
        end
        $game_variables[current_id] -= 1
        if $game_variables[current_id] < -99999999
          $game_variables[current_id] = -99999999
        end
        @right_window.refresh
        return
      end
      if Input.repeat?(Input::C)
        $game_system.se_play($data_system.decision_se)
        current_id = @right_window.top_id + @right_window.index
        @variable_edit = current_id
        if $game_variables[current_id].type != Fixnum
          return
        end
        @var_window.number = $game_variables[current_id].abs
        @var_window.visible = true
        @var_window.active = true
        @right_window.active = false
      end
       if Input.repeat?(Input::X)
        $game_system.se_play($data_system.decision_se)
        current_id = @right_window.top_id + @right_window.index
        if $game_variables[current_id].type != Fixnum
          return
        end
        $game_variables[current_id] *= -1
        @right_window.refresh
      end
      if Input.repeat?(Input::R)
        $game_system.se_play($data_system.cursor_se)
        if $game_variables[current_id].type != Fixnum
          return
        end
        $game_variables[current_id] += 10
        if $game_variables[current_id] > 99999999
          $game_variables[current_id] = 99999999
        end
        @right_window.refresh
        return
      end
      if Input.repeat?(Input::L)
        $game_system.se_play($data_system.cursor_se)
        if $game_variables[current_id].type != Fixnum
          return
        end
        $game_variables[current_id] -= 10
        if $game_variables[current_id] < -99999999
          $game_variables[current_id] = -99999999
        end
        @right_window.refresh
        return
      end
    end
  end
 
 
  def pokemon_conversion
    window = Window_Base.new(170, 208, 300, 64)
    window.contents = Bitmap.new(300-32, 64-32)
    window.contents.font.name = $fontface
    window.contents.font.size = $fontsize
    window.active = false
    window.visible = true
    window.z = 10000
    window.contents.font.color = window.normal_color
    window.contents.draw_text(0, 0, 300-32, 32, "Mise à jour en cours...", 1)
   
   
    # Reecriture Weapon / Armor
    # Inscription des CT/CS
    j = 0
    for i in 1..$data_items.length-1
      if $data_items[i] != nil and $data_items[i].name[0..1] == "CT" and
          $data_items[i].name[2..3].to_i != 0
        if $data_weapons[34+j] == nil
          $data_weapons[34+j] = RPG::Weapon.new
        end
        $data_weapons[34+j].name = Item.name(i)
        j += 1
      end
      if $data_items[i] != nil and $data_items[i].name[0..1] == "CS" and
          $data_items[i].name[2..3].to_i != 0
        if $data_weapons[34+j] == nil
          $data_weapons[34+j] = RPG::Weapon.new
        end
        $data_weapons[34+j].name = Item.name(i)
        j += 1
      end
    end
   
    # Inscription des capa spé
    for i in 1..$data_ability.length-1
      if $data_armors[i+33] == nil
        $data_armors[i+33] = RPG::Armor.new
      end
      $data_armors[i+33].name = $data_ability[i][0]
      $data_armors[i+33].description = $data_ability[i][1]
    end
   
   
   
    # Inscription des CT/CS
    ct_list = {}
    cs_list = {}
    for element in $data_weapons
      if element == nil
        next
      end
      if element.name[0..1] == "CT" and element.name[2..3].to_i != 0
        ct_list[element.name[2..3].to_i] = element.id
      end
      if element.name[0..1] == "CS" and element.name[2..3].to_i != 0
        cs_list[element.name[2..3].to_i] = element.id
      end
    end
   
    # Conversion
    for id in 1..$data_pokemon.length-1
      Graphics.update
     
     
      if $data_enemies[id] == nil
        $data_enemies[id] = RPG::Enemy.new
      end
     
      if $data_classes[id] == nil
        $data_classes[id] = RPG::Class.new
      end
     
      # Reset données
      $data_enemies[id].mdef = 0
      $data_enemies[id].pdef = 0
      $data_enemies[id].actions = []
     
      $data_classes[id].weapon_set = []
      $data_classes[id].armor_set = []
     
      # Nom
      $data_enemies[id].name = Pokemon_Info.name(id) # pokemon.name
      $data_enemies[id].battler_name = "Front_Male/"+sprintf("%03d",id)+".png"
     
      # ID secondaire
      $data_enemies[id].maxsp = Pokemon_Info.id_bis(id)
     
      # Base Stats
      $data_enemies[id].maxhp = Pokemon_Info.base_hp(id) # pokemon.base_hp
      $data_enemies[id].agi = Pokemon_Info.base_spd(id) # pokemon.base_spd
      $data_enemies[id].int = Pokemon_Info.base_ats(id) # pokemon.base_ats
      $data_enemies[id].str = Pokemon_Info.base_atk(id) # pokemon.base_atk
      $data_enemies[id].dex = Pokemon_Info.base_dfe(id) # pokemon.base_dfe
      $data_enemies[id].atk = Pokemon_Info.base_dfs(id) # pokemon.base_dfs
     
      # Apprentissage des skills
      $data_classes[id].learnings = []
      for skill in Pokemon_Info.skills_table(id)
        learning = RPG::Class::Learning.new
        learning.level = skill[1]
        learning.skill_id = skill[0]
        $data_classes[id].learnings.push(learning)
      end
     
      # CT/CS: support script
     
      # Exp Type
      $data_classes[id].weapon_set.push(Pokemon_Info.exp_type(id) + 15)
     
      # Evolution
      $data_classes[id].name = ""
     
      # Evolution unique
      if Pokemon_Info.evolve_table(id).length == 2
        # Evolution naturelle seulement
        if Pokemon_Info.evolve_table(id)[1].length == 2
          name = Pokemon_Info.evolve_table(id)[1][0]
          data = Pokemon_Info.evolve_table(id)[1][1]
          if data.type == Fixnum and name != ""
            $data_classes[id].name = name + "/" + data.to_s
            $data_classes[id].weapon_set.push(22)
          elsif data == "loyal"
            $data_classes[id].name = name#"L" + "/" + name
            $data_classes[id].weapon_set.push(24)
          elsif data == "trade"
            $data_classes[id].name = name#"T" + "/" + name
            $data_classes[id].weapon_set.push(25)
          elsif data.type == Array and data[0] == "stone"
            $data_classes[id].name = name#"S" + "/" + name
            $data_classes[id].weapon_set.push(23)
          elsif data != [] and data != nil and name != nil and name != ""
            $data_classes[id].weapon_set.push(26)
          end
        elsif Pokemon_Info.evolve_table(id)[1].length > 2
          name = Pokemon_Info.evolve_table(id)[1][0]
          $data_classes[id].name = name
          $data_classes[id].weapon_set.push(26)
        end
      else
        # Evolution spéciale/multiple
        $data_classes[id].weapon_set.push(26)
      end
     
      # Type
      if Pokemon_Info.type1(id) != 0
        $data_enemies[id].element_ranks[Pokemon_Info.type1(id)] = 1
        $data_classes[id].element_ranks[Pokemon_Info.type1(id)] = 3
      end
      if Pokemon_Info.type2(id) != 0
        $data_enemies[id].element_ranks[Pokemon_Info.type2(id)] = 2
        $data_classes[id].element_ranks[Pokemon_Info.type2(id)] = 3
      end
     
      # Rareté
      $data_enemies[id].gold = Pokemon_Info.rareness(id)
     
      # Genre
      $data_classes[id].armor_set = []
      case POKEMON_S::Pokemon_Info.female_rate(id) # Female rate
      when -1
        $data_classes[id].armor_set.push(2)
      when 0
        $data_classes[id].armor_set.push(3)
      when 12.5
        $data_classes[id].armor_set.push(4)
      when 25
        $data_classes[id].armor_set.push(5)
      when 50
        $data_classes[id].armor_set.push(6)
      when 75
        $data_classes[id].armor_set.push(7)
      when 87.5
        $data_classes[id].armor_set.push(8)
      when 100
        $data_classes[id].armor_set.push(9)
      else
        $data_classes[id].armor_set.push(6)
      end
     
      # Loyauté
      case Pokemon_Info.base_loyalty(id)
      when 0
        $data_classes[id].armor_set.push(11)
      when 35
        $data_classes[id].armor_set.push(12)
      when 70
        $data_classes[id].armor_set.push(13)
      when 90
        $data_classes[id].armor_set.push(14)
      when 100
        $data_classes[id].armor_set.push(15)
      when 140
        $data_classes[id].armor_set.push(16)
      else
        $data_classes[id].armor_set.push(13)
      end
     
      # EV et Base Exp
      i = 0
      for element in Pokemon_Info.battle_list(id)
        if i == Pokemon_Info.battle_list(id).length-1
          $data_enemies[id].exp = element
          next
        end
       
        case element
        when 1
          $data_classes[id].weapon_set.push(2+i)
        when 2
          $data_classes[id].weapon_set.push(8+i)
        when 3
          $data_classes[id].weapon_set.push(2+i)
          $data_classes[id].weapon_set.push(8+i)
        end
        i += 1
      end
     
      # Breed Groupe
      for group in Pokemon_Info.breed_group(id)
        $data_classes[id].armor_set.push(group + 17)
      end
     
      # Egg Hatch
      case Pokemon_Info.hatch_step(id)
      when 1280
        $data_classes[id].weapon_set.push(28)
      when 2560
        $data_classes[id].weapon_set.push(29)
      when 3840
        $data_classes[id].weapon_set.push(28)
        $data_classes[id].weapon_set.push(29)
      when 5120
        $data_classes[id].weapon_set.push(30)
      when 6400
        $data_classes[id].weapon_set.push(30)
        $data_classes[id].weapon_set.push(28)
      when 7680
        $data_classes[id].weapon_set.push(30)
        $data_classes[id].weapon_set.push(29)
      when 8960
        $data_classes[id].weapon_set.push(30)
        $data_classes[id].weapon_set.push(29)
        $data_classes[id].weapon_set.push(28)
      when 10240
        $data_classes[id].weapon_set.push(31)
      when 20480
        $data_classes[id].weapon_set.push(32)
      when 30720
        $data_classes[id].weapon_set.push(31)
        $data_classes[id].weapon_set.push(32)
      else
        $data_classes[id].weapon_set.push(30)
      end
     
      # Liste CT/CS
      for element in Pokemon_Info.skills_tech(id)
        if element.type == Fixnum # CT
          $data_classes[id].weapon_set.push(ct_list[element])
        end
        if element.type == Array
          $data_classes[id].weapon_set.push(cs_list[element[0]])
        end
      end
     
      # Capa Spé
      list = []
      for i in 1..$data_ability.length-1
        list.push($data_ability[i][0])
      end
      for ability in POKEMON_S::Pokemon_Info.ability_list(id)
        abid = list.index(ability) + 1
        $data_classes[id].armor_set.push(abid + 33)
      end
     
      # Attaque par accouplement
      r = 0
      for skill in Pokemon_Info.breed_move(id)
        if $data_enemies[id].actions[r] == nil
          $data_enemies[id].actions[r] = RPG::Enemy::Action.new
        end
        $data_enemies[id].actions[r].kind = 1
        $data_enemies[id].actions[r].skill_id = skill
        r += 1
      end
    end
   
    file = File.open("Data/Enemies.rxdata", "wb")
    Marshal.dump($data_enemies, file)
    file.close
    file = File.open("Data/Classes.rxdata", "wb")
    Marshal.dump($data_classes, file)
    file.close
    file = File.open("Data/Weapons.rxdata", "wb")
    Marshal.dump($data_weapons, file)
    file.close
    file = File.open("Data/Armors.rxdata", "wb")
    Marshal.dump($data_armors, file)
    file.close
   
    window.dispose
    window = Window_Base.new(80, 160, 480, 160)
    window.contents = Bitmap.new(480-32, 160-32)
    window.contents.font.name = $fontface
    window.contents.font.size = $fontsize
    window.active = false
    window.visible = true
    window.z = 10000
    window.contents.font.color = window.normal_color
    window.contents.draw_text(0, 0, 480-32, 32, "Mise à jour terminée.", 1)
    window.contents.draw_text(0, 32, 480-32, 32, "Dans RMXP, cliquez sur 'Fichier'", 1)
    window.contents.draw_text(0, 64, 480-32, 32, "puis sur 'Fermer le projet'.", 1)
    window.contents.draw_text(0, 96, 480-32, 32, "Et réouvrez votre projet.", 1)
    loop do
      Input.update
      Graphics.update
      if Input.trigger?(Input::C)
        break
      end
    end
    window.dispose
    exit
  end
 
 
  def self.update_library
    $picture_data = {}
    directory_list = ["Front_Male/", "Front_Female/", "Back_Male/", "Back_Female/",
      "Shiny_Front_Male/", "Shiny_Front_Female/", "Shiny_Back_Male/",
      "Shiny_Back_Female/", "Icon/", "Eggs/"]
    for name in directory_list   
      directory = explore("Graphics/Battlers/#{name}")
      for file in directory[0]
        $picture_data["Graphics/Battlers/#{name}#{file}"] = true
      end
    end
   
    library = File.open("Data/Library.rxdata", "wb")
    Marshal.dump($picture_data, library)
    library.close
  end
 
  def update_datafile
    file = File.open("Data/data_pokemon.rxdata", "wb")
    Marshal.dump($data_pokemon, file)
    file.close
   
    file = File.open("Data/data_item.rxdata", "wb")
    Marshal.dump($data_item, file)
    file.close
   
    file = File.open("Data/data_ball.rxdata", "wb")
    Marshal.dump($data_ball, file)
    file.close
   
    file = File.open("Data/data_mapzone.rxdata", "wb")
    Marshal.dump($data_mapzone, file)
    file.close
   
    file = File.open("Data/data_zone.rxdata", "wb")
    Marshal.dump($data_zone, file)
    file.close
  end
 
end



Chez moi sa marche , il y a pas de raison que chez toi sa marche pas Clin d'œil foireux

Posté par Sphinx le 19 Aoû - 17:51 (2009)
tu as modifié quoi, solfay ?

Posté par Solfay1 le 19 Aoû - 18:34 (2009)
Rien du tout , j'ai juste pris le scene_debug de la version C6 Yeux motorisés

Posté par Disccat le 20 Aoû - 17:22 (2009)
+15 Solfay

Merci beaucoup pour ta trouvaille ^^ .

Posté par Pαlвσlѕку le 20 Aoû - 21:42 (2009)
Il y a quoi qui change entre les deux versions ?

Si l'un fonctionne, mais pas l'autre, ça veut dire que l'un des deux scripts ne fonctionnent pas correctement.

Posté par Angi-MK le 21 Aoû - 18:06 (2009)
Cette solution est sans danger ??

Posté par Solfay1 le 21 Aoû - 19:23 (2009)
Ouais ^^