Sujet n°11712
Posté par gaalee89 le 11 Juil - 18:27 (2012)
Titre : Item dans une pokeball sur le sol
Bonjour, j'aimerais créer une pokeball posée sur le sol, qui donne un objet. C'est ce que j'ai fait avec la commande "ajouter/retirer" objet mais quand je regarde dans mon sac je n'est rien. Pourtant le message que j'ai mis quand j'utilise la touche action devant l'event marche !

Quelqu'un connait le problème, si vous avez des précisions à me demander je peux vous les donner, si vous voulez j'ai des screenshots aussi.

Posté par Seusyn le 11 Juil - 19:31 (2012)
Tu l'as mal codé c'est tout c'est les bases du making ca et en plus c'est dans le manuel donc tu sais où aller...

Posté par Elric le 11 Juil - 19:43 (2012)
Moi je fais ça:

- Nouvel événement avec une apparence de Pokéball
- Page 1: Ajouter Objet (Potion par exemple) puis j'active l'interrupteur [Objet 1 reçu] (par exemple)
- Page 2: Evenement SANS apparence avec condition de déclenchement : Interrupteur [Objet 1 reçu] activé !

Voilà ! J'espère t'avoir aidé !

Posté par Seusyn le 11 Juil - 19:50 (2012)
Tu pourrais même utiliser un interrupteur local si tu n'en use pas trop.

Posté par Elric le 11 Juil - 20:23 (2012)
En effet ! Mais je n'ai jamais compris leur utilité (surtout lors des combats contre les dresseurs... Je trouve l'event très compliqué !).

Posté par Seusyn le 11 Juil - 20:24 (2012)
Le principe d'un interrupteur local c'est qu'y en a 4 de dispo pour chaque map ^^

Posté par Qwerty le 11 Juil - 20:44 (2012)
C'est pas plutôt 4 par Event ? Ou alors je confond...

Posté par Elric le 11 Juil - 20:49 (2012)
Je partage l'avis de Qwerty car chaque event de combat contre un dresseur nécessite 3 ou 4 Interrupteurs locaux. Et il y a forcément plus d'un combat par map !

Posté par Seusyn le 11 Juil - 21:19 (2012)
Nan les interrupteur locaux normalement c'est pour tout une map.. sauf si il y'a un script qui modifie tout ceci.

Posté par Masamune le 11 Juil - 22:51 (2012)
On ne doit pas avoir le même soft car c'est 4 interrupteurs locaux au max par event. La map n'a rien à voir.

Posté par gaalee89 le 11 Juil - 23:29 (2012)
Bonjour,
@Seusyn j'ai cherché dans le manuel mais j'ai rien trouvé.
@Elric c'est exactement ce que j'ai fais mais avec l'interrupteur local "A"

Et pour ce qui est des interrupteurs locaux je pense que Masamune à raison. Bon vous voulez des screens de mon code (même si j'ai fait comme l'à dit Elric ?)

Posté par Elric le 12 Juil - 00:17 (2012)
Est-ce que tu as vérifié TOUTES les poches de ton sac ? C'est vraiment étrange comme bug !

Posté par gaalee89 le 12 Juil - 00:24 (2012)
Oui oui toute ! J'en est parlé à des membres de l'équipe et personne sait d'ou ça vient....

Posté par Elric le 12 Juil - 00:34 (2012)
Là... Tu poses un bloc en béton armé !! Tu pourrais me montrer ton Event ?

Posté par gaalee89 le 12 Juil - 00:50 (2012)


Tiens, bien sur clique sur l'image pour mieux voir Imbécile heureux

Posté par Elric le 12 Juil - 01:05 (2012)
C'est plus du béton armé mais du diamant pur ton bloc ! Est-ce que tu as ce code dans tes lignes 361~363 de ton script Pokemon_item_bag ?

Code:

def refresh_list
@item_list.refresh_list
end

Posté par gaalee89 le 12 Juil - 01:48 (2012)
Pour les lignes que tu m'as dit, j'ai sa :
@text_window_text.contents.clear
@text_window_text.visible = true
@dummy.visible = true

Pour ce que tu cherches j'ai trouvé ça dans les lignes 389-391

Posté par Seusyn le 12 Juil - 06:26 (2012)
Essaie avec un autre objet pour voir.

Posté par Elric le 12 Juil - 08:58 (2012)
Oups ! Je voulais dire 351~353 !!

Posté par Seusyn le 12 Juil - 08:59 (2012)
Moi je pense soudainement à la BDD des objets dont la classe de l'objet aurait été mal faite...

Posté par Florent le 12 Juil - 09:52 (2012)
gaalee89 a écrit:



Tiens, bien sur clique sur l'image pour mieux voir Imbécile heureux


Je précise juste que moi et un autre membre de l'équipe avons également eu le même problème sur ce projet, alors que l'on ne l'avait jamais rencontré avant.
Cela le fait d'ailleurs pour tout les objets, qu'il s'agisse des pokeballs, des potions, etc...
Nous n'avons pourtant pas modifié la BDD des objets ni les scripts des objets jusqu'ici.
On sèche vraiment pour en trouver la cause.

Posté par Seusyn le 12 Juil - 09:55 (2012)
Pourrais-t-on avoir votre version de PSP le script complet de Item_Bag ainsi que le fichier data.txt des objets ?

Posté par Pαlвσlѕку le 12 Juil - 10:31 (2012)
J'ai une solution qui devrait fonctionner, mais je ne l'aime pas trop car elle va créer une nouvelle faille de sécurité dans PSP (il y en a déjà plein, une de plus ou une de moins...)

A la place d'utiliser la commande d'événement pour ajouter un objet, tu peux ajouter un objet par un insérer de script :
Code:
$pokemon_party.add_item(id, amount)

Où "id" est l'id de l'objet (que tu trouves dans la BDD), et amount est la quantité de l'objet que tu veux.
Si tu veux retirer un objet, la quantité doit être négative.

Exemple :

Pour ajouter 5 potions :

Code:
$pokemon_party.add_item(13, 5)

Pour retirer 1 potion :

Code:
$pokemon_party.add_item(13, -1)

Posté par gaalee89 le 12 Juil - 10:54 (2012)
Voici les deux fichiers.

http://www.sendspace.com/file/9jcbgj
http://www.sendspace.com/file/oq8tvp

Pour ce qui est de ton code Pαlвσlѕку j'ai essayé et j'obtient le même résultat ! :s

Posté par Seusyn le 12 Juil - 11:05 (2012)
Ca serait mieux de copier-coller dans des balises codes...

Posté par gaalee89 le 12 Juil - 11:14 (2012)
Ba ça me fait bugg quand je fais ça vu la longueur des codes... Désolé

Posté par Seusyn le 12 Juil - 11:17 (2012)
J'avais dit le data.txt pas celui qui est rxdata.

Posté par Florent le 12 Juil - 11:20 (2012)
J'avais bien pensé à utiliser un script pour donner l'objet, mais sans résultat non plus.
Pour ce qui est du script que vous avez demandé, voici un copier-coller des lignes 350 à 359 puisque, d'après la demande d'Elric, il se pourrait que le problème se situe par là.


        text_window_draw(string)
       
        refresh_command_list
      end
     
      def draw_text(string = "", string2 = "")      
      if string == ""
        @text_window_text.contents.clear
        @dummy.visible = false
        @text_window_text.visible = false



Ce n'est donc pas exactement ce qu'a dit Elric, le problème viendrait de là ?


EDIT : Et on utilise PSP DS, désolé d'avoir oublié de le préciser ^^'.

Posté par Seusyn le 12 Juil - 11:23 (2012)
Remplace ton Item_Bag par celui-ci :

Spoiler
Code:
#==============================================================================
# ■ Pokemon_Item_Bag
# Pokemon Script Project - Krosk
# 23/08/07
#-----------------------------------------------------------------------------
# Scène à ne pas modifier de préférence
#-----------------------------------------------------------------------------
# Interface du Sac
#-----------------------------------------------------------------------------
  #-------------------------------------------------------------
  # $data_item
  #   [Nom, Icone, Type, Description, Prix, Profil]
  #   Profil:  "BALL": usable en combat uniquement, tenable, jetable, limité
  #            "BATTLE" : usable en combat uniquement sur les Pokémons, tenable, jetable, limité (boosts stats en combat)
  #            "ITEM": usable en combat sur les Pokémons, en map, tenable, jetable, limité (Consommables tels Potions, etc)
  #            "HOLD": non usable, tenable, jetable, illimité (objets boostants les types)
  #            "PKMN": usable hors combat uniquement, sur les Pokémons, tenable, jetable, limité (super bonbon, boosts stats)
  #            "KEYITEM": non usable en combat, usable en map en interaction, non tenable, non jetable, usage illimité (Objets rares)
  #            "MAP" : usage en interaction, tenable, jetable, limité (repousse, flute repousse)
  #            "CS" / "HM" : non usable en combat, usable en map sur les Pokémons, non tenable, non jetable, usage illimité
  #-------------------------------------------------------------
  #------------------------------------------------------------ 
  #  @bag = [ paramètre, [], [], [], [], [] ]
  #  id: id objet, nombre: -1 pour objet utilisable à l'infini.
  #  paramètre : optionnel
  #  @bag[1] : Items, objets simples, sous la forme [id, nombre]
  #  @bag[2] : Balles sous la forme [id, nombre]
  #  @bag[3] : CT/CS sous la forme [id, nombre]
  #  @bag[4] : Baies [id, nombre]
  #  @bag[5] : Objets clés
  #------------------------------------------------------------

module POKEMON_S
    class Pokemon_Item_Bag
      # -------------------------------------------
      # Initialisation
      #    socket: cf rubrique @bag, indique la poche
      #    item_index: index du curseur
      #    mode =
      # -------------------------------------------
      def initialize(socket_index = $pokemon_party.bag_index, z_level = 100, mode = 0)
        @bag_index = socket_index[0]
        @item_index = socket_index[1]
        @z_level = z_level
        @mode = mode
      end
     
      def main
        string_dp = $game_variables[5000]["menu_dp"] ? "_DP" : ""
        Graphics.freeze
        @background = Sprite.new
        @background.bitmap = RPG::Cache.picture("bagfond"+string_dp+".png")
        @background.z = @z_level
       
        @bag_sprite = Sprite.new
        @bag_sprite.bitmap = RPG::Cache.picture("bag"+@bag_index.to_s+string_dp+".png")
        @bag_sprite.z = @z_level + 1
        @bag_sprite.x = 102
        @bag_sprite.y = 96
       
        @socket_name = Window_Base.new(51-16, 27-16, 228+32, 45+32)
        @socket_name.contents = Bitmap.new(228, 45)
        @socket_name.opacity = 0
        @socket_name.z = @z_level + 1
        @socket_name.contents.font.name = $fontface
        @socket_name.contents.font.size = $fontsizebig
        @socket_name.contents.font.color = @socket_name.normal_color
       
        @item_list = POKEMON_S::Pokemon_Item_List.new(@bag_index, @item_index)
        @item_list.opacity = 0
        @item_list.z = @z_level + 1
        @item_list.active = true
        @item_list.visible = true
       
        @text_window = Window_Base.new(6, 286, 273, 193)
        @text_window.opacity = 0
        @text_window.contents = Bitmap.new(241, 161)
        @text_window.contents.font.name = $fontface
        @text_window.contents.font.size = $fontsizebig
        @text_window.contents.font.color = @text_window.normal_color
        @text_window.z = @z_level + 1
       
        @item_icon = Sprite.new
        @item_icon.z = @z_level + 2
        @item_icon.x = 12
        @item_icon.y = 213
        @item_icon.zoom_x = 3
        @item_icon.zoom_y = 3
        @item_icon.bitmap = RPG::Cache.icon(item_icon)
       
        @drop_counter = Window_Base.new(0, 0, 120, 64)
        @drop_counter.contents = Bitmap.new(150-32, 32)
        @drop_counter.x = 640 - 120 - 3
        @drop_counter.y = 480 - 64 - 3
        @drop_counter.z = @z_level + 4
        @drop_counter.contents.font.name = $fontface
        @drop_counter.contents.font.size = $fontsize
        @drop_counter.contents.font.color = @drop_counter.normal_color
        @drop_counter.visible = false
        @drop_counter_number = 1
       
        list = ["UTILISER", "DONNER", "JETER", "ORDRE", "RETOUR"]
        if $battle_var.in_battle
          list = ["UTILISER", "RETOUR"]
        end
        @command_window = Window_Command.new(260, list)
        @command_window.active = false
        @command_window.visible = false
        @command_window.x = 640 - 260 - 3
        @command_window.y = 480 - @command_window.height - 3
        @command_window.z = @z_level + 10
       
        refresh_all
       
        Graphics.transition
        loop do
          Graphics.update
          if @done == true
            break
          end
          Input.update
          if @drop_counter.visible == true
            update_drop
            next
          end
          if @command_window.active == true
            update_command
            next
          end
          if @command_window.active == false
            @item_list.update
            update
            next
          end
        end
       
        $pokemon_party.bag_index[0] = @bag_index
        $pokemon_party.bag_index[1] = @item_list.index
       
        Graphics.freeze
        @item_list.dispose
        @text_window.dispose
        @item_icon.dispose
        @background.dispose
        @socket_name.dispose
        @drop_counter.dispose
        @bag_sprite.dispose
      end
     
      def update
        if Input.repeat?(Input::DOWN) or Input.repeat?(Input::UP)
          refresh
          return
        end
       
        if Input.repeat?(Input::RIGHT) and @item_list.on_switch == -1 and @mode != "planter"
          $game_system.se_play($data_system.cursor_se)
          @bag_index += @bag_index == 5 ? -4 : 1
          @item_list.refresh(@bag_index)
          refresh_all
          return
        end
       
        if Input.repeat?(Input::LEFT) and @item_list.on_switch == -1 and @mode != "planter"
          $game_system.se_play($data_system.cursor_se)
          @bag_index += @bag_index == 1 ? 4 : -1
          @item_list.refresh(@bag_index)
          refresh_all
          return
        end
       
        if Input.trigger?(Input::C)
          if @mode == "sell"
            if @item_list.index == @item_list.size
              @done = true
              return
            end
            # item invendable
            if not(Item.soldable?(item_id))
              $game_system.se_play($data_system.buzzer_se)
              return
            end
            # $scene = Pokemon_Item_Shop.new
            $scene.call_item_amount([item_id, item_amount], "sell", @z_level + 100)
            refresh_all
            return
          end
         
          # Echange d'objet
          if @item_list.on_switch != -1
            if @item_list.index != @item_list.size
              $game_system.se_play($data_system.decision_se)
              $pokemon_party.item_switch(@bag_index, @item_list.index, @item_list.on_switch)
              @item_list.on_switch = -1
              refresh_all
            else
              $game_system.se_play($data_system.cancel_se)
              @item_list.on_switch = -1
              refresh_all
            end
            return
          end
         
          # Mode sélection objet à donner
          if @mode == "hold"
            # Fermer le sac
            if @item_list.index == @item_list.size
              $game_system.se_play($data_system.decision_se)
              @done = true
              @return_data = [0, false]
            # Fermer le sac
            elsif Item.holdable?(item_id)
              $game_system.se_play($data_system.decision_se)
              @done = true
              @return_data = [item_id, true]
            else
              $game_system.se_play($data_system.buzzer_se)
            end
            return 
          end
         
          # Mode sélection baie à planter
          if @mode == "planter"
            # Fermer le sac
            if @item_list.index == @item_list.size
              $game_system.se_play($data_system.decision_se)
              @done = true
              @return_data = 0
            # Fermer le sac
            elsif Item.socket(item_id) == 4
              $game_system.se_play($data_system.decision_se)
              @done = true
              @return_data = item_id
            else
              $game_system.se_play($data_system.buzzer_se)
            end
            return 
          end
         
          # Retour
          if @item_list.index == @item_list.size
            @done = true
            # Retour au combat
            if $battle_var.in_battle
              return
            end
            $scene = POKEMON_S::Pokemon_Menu.new(2)
            return
          # Sélection item
          else
            @command_window.active = true
            refresh
            @command_window.visible = true
            return
          end
        end
       
        if Input.trigger?(Input::B)
          $game_system.se_play($data_system.cancel_se)
          if @mode == "hold"
            @done = true
            @return_data = [0, false]
            return
          end
         
          if @mode == "sell"
            @done = true
            return
          end
         
          if @mode == "planter"
            @done = true
            @return_data = 0
            return
          end
         
          if @item_list.on_switch != -1
            @item_list.on_switch = -1
            refresh_all
            return
          end
         
          if $battle_var.in_battle
            $game_system.se_play($data_system.cancel_se)
            @return_data = 0
            @done = true
            return
          end
         
          $game_system.se_play($data_system.cancel_se)
          $scene = POKEMON_S::Pokemon_Menu.new(2)
          @done = true
          return
        end
      end
     
      def return_data
        return @return_data
      end
     
      # ----------------------------------
      # Appel en cas de changement d'item
      # ----------------------------------
      def refresh
        string_dp = $game_variables[5000]["menu_dp"] ? "_DP" : ""
        # Sprite sac
        @bag_sprite.bitmap = RPG::Cache.picture("bag"+@bag_index.to_s+string_dp+".png")
       
        # Nom de la poche
        @socket_name.contents.clear
        @socket_name.contents.draw_text(0,0, 228, 48, socket_name, 1)
       
        # Tracage de l'icone objet
        @item_icon.bitmap = RPG::Cache.icon(item_icon)
       
        # Texte de description
        if @command_window.active
          string = []
          string[0] = Item.name(item_id)
          string[1] = "est sélectionné."
        elsif @drop_counter.visible == true
          string = []
          string[0] = "En jeter"
          string[1] = "combien?"
        elsif @item_list.on_switch != -1
          string = []
          string[0] = "Echanger avec"
          string[1] = "lequel?"
        else
          string = string_builder(item_descr, 15)
        end
       
        text_window_draw(string)
       
        refresh_command_list
      end
     
     
     
      # ------------------------------------
      # Appel en cas de changement de poche
      # ------------------------------------
      def refresh_all
        refresh_list
        refresh
      end
     
      # ------------------------------------
      # Rafraichissement de liste (même poche)
      # ------------------------------------
      def refresh_list
        @item_list.refresh_list
      end
     
      # ----------------------------------
      # Liste d'actions associé à l'item
      # ----------------------------------
      def update_command
        @command_window.update
       
        if Input.trigger?(Input::B)
          $game_system.se_play($data_system.cancel_se)
          @command_window.active = false
          @command_window.visible = false
          refresh
          return
        end
       
        if Input.trigger?(Input::C)
          case @command_window.index
          # Utiliser
          when 0
            if $battle_var.in_battle and not(Item.battle_usable?(item_id))
              $game_system.se_play($data_system.buzzer_se)
              return
            end
            if not($battle_var.in_battle) and not(Item.map_usable?(item_id))
              $game_system.se_play($data_system.buzzer_se)
              return
            end
            $game_system.se_play($data_system.decision_se)
            @command_window.active = false
            @command_window.visible = false
            if Item.use_on_pokemon?(item_id)
              item_mode = "item_use"
              if Item.item_able_mode?(item_id)
                item_mode = "item_able"
              end
              scene = POKEMON_S::Pokemon_Party_Menu.new(0, @z_level + 100, item_mode, item_id)
              scene.main
              # return_data = [id item_utilisé, item utilisé oui/non, ]
              data = scene.return_data
              used = data[1]
              item_used = 0
            else
              # Utilisé
              data = Item.effect(item_id)
              used = data[0]
              item_used = item_id
              string = data[1]
              return_map = data[2]
              if string.type == String and string != ""
                window = Pokemon_Window_Help.new
                window.draw_text(string)
                Input.update
                until Input.trigger?(Input::C)
                  Graphics.update
                  Input.update
                end
                window.dispose
              end
            end
            if used
              $pokemon_party.use_item(item_id)
            end
            # En combat, retour à l'écran après utilisation de l'objet
            if $battle_var.in_battle and used
              $battle_var.action_id = 1
              @done = true
              @return_data = item_used
              return
            end
            if used and return_map
              @done = true
              return
            end
            refresh_all
            @item_list.refresh
            Graphics.transition
            return
          # Retour (dernière option)
          when @command_window.item_max-1
            $game_system.se_play($data_system.cancel_se)
            @command_window.active = false
            @command_window.visible = false
            refresh
            return
          # Donner
          when 1
            if not(Item.holdable?(item_id))
              $game_system.se_play($data_system.buzzer_se)
              return
            end
            $game_system.se_play($data_system.decision_se)
            @command_window.active = false
            @command_window.visible = false
            scene = POKEMON_S::Pokemon_Party_Menu.new(0, @z_level + 100, "hold", item_id)
            scene.main
            return_data = scene.return_data
            # return_data = [item tenu true/false, id item_tenu, item remplacé true/false, id item remplacé]
            item_id2 = return_data[2]
            replaced = return_data[3]
            if replaced
              $pokemon_party.add_item(item_id2)
            end
            item_id1 = return_data[0]
            hold = return_data[1]
            if hold
              $pokemon_party.drop_item(item_id1)
            end
            refresh_all
            Graphics.transition
            return
          # Jeter
          when 2
            if not(Item.holdable?(item_id))
              $game_system.se_play($data_system.buzzer_se)
              return
            end
            $game_system.se_play($data_system.decision_se)
            @command_window.active = false
            @command_window.visible = false
            @drop_counter.visible = true
            refresh
            refresh_drop_counter
            return
          # Ordre
          when 3
            @item_list.on_switch = @item_list.index
            @command_window.active = false
            @command_window.visible = false
            refresh_all
            return
          end
        end
       
      end
     
      def refresh_command_list
        # Fermer le sac
        if @item_list.index == @item_list.size
          return
        end 
        # En combat
        if $battle_var.in_battle
          if Item.battle_usable?(item_id)
            @command_window.enable_item(0)
          else
            @command_window.disable_item(0)
          end
        # En map
        else
          if Item.map_usable?(item_id)
            @command_window.enable_item(0)
          else
            @command_window.disable_item(0)
          end
          if Item.holdable?(item_id)
            @command_window.enable_item(1)
            @command_window.enable_item(2)
          else
            @command_window.disable_item(1)
            @command_window.disable_item(2)
          end
        end
      end
     
      def update_drop
        if Input.repeat?(Input::UP)
          if @drop_counter_number < item_amount
            @drop_counter_number += 1
            refresh_drop_counter
          end
          return
        end
       
        if Input.repeat?(Input::DOWN)
          if @drop_counter_number > 1
            @drop_counter_number -= 1
            refresh_drop_counter
          end
          return
        end
       
        if Input.repeat?(Input::LEFT)
          if @drop_counter_number > 1
            @drop_counter_number -= 10
            if @drop_counter_number < 1
              @drop_counter_number = 1
            end
            refresh_drop_counter
          end
          return
        end
       
        if Input.repeat?(Input::RIGHT)
          if @drop_counter_number < item_amount
            @drop_counter_number += 10
            if @drop_counter_number > item_amount
              @drop_counter_number = item_amount
            end
            refresh_drop_counter
          end
          return
        end
       
        if Input.repeat?(Input::B)
          $game_system.se_play($data_system.cancel_se)
          @drop_counter_number = 1
          @drop_counter.visible = false
          @command_window.active = true
          @command_window.visible= true
          refresh
          return
        end
       
        if Input.repeat?(Input::C)
          $game_system.se_play($data_system.decision_se)
          if decision
            $game_system.se_play($data_system.decision_se)
            id_ = item_id
            $pokemon_party.drop_item(id_, @drop_counter_number)
            @drop_counter.visible = false
            refresh_list
            text_window_draw(["Jeté " + @drop_counter_number.to_s, Item.name(id_) + "."])
            @drop_counter_number = 1
            @command_window.active = false
            @command_window.visible = false
            Input.update
            until Input.trigger?(Input::C)
              Graphics.update
              Input.update
            end
            refresh_all
            return
          else
            $game_system.se_play($data_system.cancel_se)
            @drop_counter_number = 1
            @drop_counter.visible = false
            @command_window.active = false
            @command_window.visible = false
            refresh
            return
          end
        end
      end
     
      def refresh_drop_counter
        @drop_counter.contents.clear
        @drop_counter.contents.draw_text(0,0,88,32, "x " + @drop_counter_number.to_s, 2)
      end
     
      # ----------------------------------
      # Identification de l'item !!!!!!! Utilise l'index de la poche
      # ----------------------------------
      def item_id
        return $pokemon_party.bag[@bag_index][@item_list.index][0]
      end
     
      def item_icon
        if @item_list.index == @item_list.size
          return "return.png"
        else
          return Item.icon(item_id)
        end
      end
     
      def item_descr
        if @item_list.index == @item_list.size
          if $battle_var.in_battle
            return "Retourner au combat."
          end
          if @mode == "sell"
            return "Retourner au magasin."
          end
          return "Retourner au jeu."
        else
          return Item.descr(item_id)
        end
      end
     
      def item_amount
        return $pokemon_party.bag[@bag_index][@item_list.index][1]
      end
     
      # ----------------------------------
      # Decision
      # ----------------------------------
      def decision
        @command = Window_Command.new(120, ["OUI", "NON"], $fontsize)
        @command.x = 517
        @command.y = 480 - 6 - @drop_counter.height - @command.height
        @command.z = @z_level + 15
        loop do
          Graphics.update
          Input.update
          @command.update
          if Input.trigger?(Input::C) and @command.index == 0
            @command.dispose
            @command = nil
            return true
          end
          if (Input.trigger?(Input::C) and @command.index == 1) or Input.trigger?(Input::B)
            @command.dispose
            @command = nil
            return false
          end
        end
      end
     
      # ----------------------------------
      # Texte
      # ----------------------------------
      def socket_name
        case @bag_index
        when 1
          return "OBJETS"
        when 2
          return "POKéBALL"
        when 3
          return "CT & CS"
        when 4
          return "BAIES"
        when 5
          return "OBJ.RARES"
        end
      end
     
      def text_window_draw(list)
        @text_window.contents.clear
        for i in 0..list.length-1
          @text_window.contents.draw_text(0, 38*i, 241, $fhb, list[i])
        end
      end
     
      def dialog_window_draw(string)
      end
     
      def string_builder(text, limit)
        length = text.length
        full1 = false
        full2 = false
        full3 = false
        full4 = false
        string1 = ""
        string2 = ""
        string3 = ""
        string4 = ""
        word = ""
        for i in 0..length
          letter = text[i..i]
          if letter != " " and i != length
            word += letter.to_s
          else
            word = word + " "
            if (string1 + word).length < limit and not(full1)
              string1 += word
              word = ""
            else
              full1 = true
            end
           
            if (string2 + word).length < limit and not(full2)
              string2 += word
              word = ""
            else
              full2 = true
            end
           
            if (string3 + word).length < limit and not(full3)
              string3 += word
              word = ""
            else
              full3 = true
            end
           
            #if (string4 + word).length < limit and not(full4)
              string4 += word
              word = ""
            #else
            #  full4 = true
            #end
          end
        end
        if string4.length > 1
          string4 = string4[0..string4.length-2]
        end
        return [string1, string2, string3, string4]
      end
    end
   
   
   
   
    # ----------------------------------
    # class liste des objets dans une poche (socket)
    # ----------------------------------
    class Pokemon_Item_List < Window_Selectable
      attr_accessor :on_switch
     
      def initialize(socket = 1, index = 1)
        super(287, 32, 356, 416, $fn)
        self.contents = Bitmap.new(324, 384)
        self.contents.font.name = $fontnarrow
        self.contents.font.size = $fontnarrowsize
        self.contents.font.color = normal_color
        @bag_index = socket
        @item_max = size + 1
        @on_switch = -1
        self.index = index
      end
     
      def refresh(socket = @bag_index)
        self.index = 0
        @bag_index = socket
        @item_max = size + 1
        refresh_list
      end
     
      def refresh_list
        self.contents.clear
        self.contents = Bitmap.new(356, $fhb*(size+1))
        self.contents.font.name = $fontnarrow
        self.contents.font.size = $fontnarrowsize
        self.contents.font.color = normal_color
        hl = $fn
        i = 0
        for item in $pokemon_party.bag[@bag_index]
          id = item[0]
          amount = item[1]
          if @on_switch == i
            self.contents.font.color = text_color(2) # Rouge
          end
          self.contents.draw_text(14, hl*i, 304, hl, Item.name(id))
          if Item.holdable?(id)
            self.contents.draw_text(14, hl*i, 304, hl, "x   ", 2)
            self.contents.draw_text(14, hl*i, 304, hl, amount.to_s, 2)
          end
          if @on_switch == i
            self.contents.font.color = normal_color
          end
          i += 1
        end
        self.contents.draw_text(14, hl*i, 310, hl, "FERMER LE SAC")
      end
     
      def item_id(index = @bag_index)
        return $pokemon_party.bag[index][self.index]
      end
     
      def size
        return $pokemon_party.bag_list(@bag_index).length
      end
    end
end



Car dans le vôtre il y a des lignes en plus apparemment, pas moins de 40....

Posté par Florent le 12 Juil - 11:32 (2012)
En effet, on avait une quarantaine de lignes en plus, j'ai l'impression que c'était dû au fait qu'on ai un sac pour garçon et un sac pour fille mais je n'en suis pas sûr.
En tout cas on se retrouve maintenant avec des soucis graphiques, probablement dû au positionnement des images.
Je vais donc laisser Gaalee s'occuper de ça (Les graphismes, c'est vraiment pas mon domaine ^^'.), puis on vous redonne des nouvelles lorsque c'est fait.

Quel que soit le résultat, merci pour votre aide et pour votre rapidité de réponse.

Posté par Seusyn le 12 Juil - 11:33 (2012)
Après ce qui est graphisme c'est modifiable mais normalement avec ce code si vous rajouter pas de conditions etc le bug ne devrait pas y être.

Posté par gaalee89 le 12 Juil - 13:51 (2012)
Moi si j'essai ton code, je me retrouve avec des soucis de "syntaxError" à la ligne 119. (juste pour voir je sais c'est pas bien, j'ai supprimé la ligne 119 et là ça était au tour d'une autre ligne de me poser le même problème...)

Posté par Elric le 12 Juil - 14:01 (2012)
Tu sais que quand il y a un problème sur une ligne, la suprimer n'est pas la solution, donc essaie plutôt de comprendre pourquoi ! Là en l'occurence tout à l'air bien fait... Surtout que le "break" a tout-à-fait sa place ici !

Posté par Seusyn le 12 Juil - 16:08 (2012)
Vous avez trafiquer un objet y a que ca....

Posté par Masteryo94 le 12 Juil - 16:35 (2012)
Seusyn a écrit:
Remplace ton Item_Bag par celui-ci :

{{{Vous devez répondre à ce sujet pour voir la partie cachée}}}


Car dans le vôtre il y a des lignes en plus apparemment, pas moins de 40....


Dans le script que tu donne, il faut des images nommés Bag1 à Bag8.
Mais dans notre projet, elles n'y sont pas vraiment.
Si tu les as, pourrais tu nous les passer ?

Et est-ce que ton script est bien pour PSPDS ?

Posté par Seusyn le 12 Juil - 16:46 (2012)
Arf non c'est PSP 4G +

Voici le code d'origine de DS sans modif essaie pour voir :

Spoiler
Code:
#==============================================================================
# ■ Pokemon_Item_Bag
# Pokemon Script Project - Krosk
# 23/08/07
# 25/02/10 - Palbolsky
#-----------------------------------------------------------------------------
# Scène à ne pas modifier de préférence
#-----------------------------------------------------------------------------
# Interface du Sac
#-----------------------------------------------------------------------------
  #-------------------------------------------------------------
  # $data_item
  #   [Nom, Icone, Type, Description, Prix, Profil]
  #   Profil:  "BALL": usable en combat uniquement, tenable, jetable, limité
  #            "BATTLE" : usable en combat uniquement sur les Pokémons, tenable, jetable, limité (boosts stats en combat)
  #            "ITEM": usable en combat sur les Pokémons, en map, tenable, jetable, limité (Consommables tels Potions, etc)
  #            "HOLD": non usable, tenable, jetable, illimité (objets boostants les types)
  #            "PKMN": usable hors combat uniquement, sur les Pokémons, tenable, jetable, limité (super bonbon, boosts stats)
  #            "KEYITEM": non usable en combat, usable en map en interaction, non tenable, non jetable, usage illimité (Objets rares)
  #            "MAP" : usage en interaction, tenable, jetable, limité (repousse, flute repousse)
  #            "CS" / "HM" : non usable en combat, usable en map sur les Pokémons, non tenable, non jetable, usage illimité
  #-------------------------------------------------------------
  #------------------------------------------------------------ 
  #  @bag = [ paramètre, [], [], [], [], [], [], [], [] ]
  #  id: id objet, nombre: -1 pour objet utilisable à l'infini.
  #  paramètre : optionnel
  #  @bag[1] : Items, objets simples, sous la forme [id, nombre]
  #  @bag[2] : Médicaments, objets de soin, sous la forme [id, nombre]
  #  @bag[3] : Balles sous la forme [id, nombre]
  #  @bag[4] : CT/CS sous la forme [id, nombre]
  #  @bag[5] : Baies [id, nombre]
  #  @bag[6] : Lettes [id, nombre]
  #  @bag[7] : Objets combats [id, nombre]
  #  @bag[8] : Objets clés
  #------------------------------------------------------------

module POKEMON_S
    class Pokemon_Item_Bag
      # -------------------------------------------
      # Initialisation
      #    socket: cf rubrique @bag, indique la poche
      #    item_index: index du curseur
      #    mode =
      # -------------------------------------------
      def initialize(socket_index = $pokemon_party.bag_index, z_level = 100, mode = 0)
        @bag_index = socket_index[0]
        @item_index = socket_index[1]
        @z_level = z_level
        @mode = mode
      end
     
      def main       
        Graphics.freeze
        @background = Sprite.new 
        @background.bitmap = RPG::Cache.picture("bagfond_inf"+@bag_index.to_s+".png")
        @background.z = @z_level
        @background.x = 13
        @background.y = 227
       
        @fond = Sprite.new 
        @fond.bitmap = RPG::Cache.picture("bagfond.png")
        @fond.x = 13
        @fond.y = 227
        @fond.z = @z_level + 1
       
        @bag_sprite = Sprite.new
        @bag_sprite.z = @z_level + 1
        @bag_sprite.x = 13
        @bag_sprite.y = 13         
       
        if $game_variables[11] == 1       
        @bag_sprite.bitmap = RPG::Cache.picture("bag_garçon"+@bag_index.to_s+".png")     
        elsif $game_variables[11] == 2     
        @bag_sprite.bitmap = RPG::Cache.picture("bag_fille"+@bag_index.to_s+".png")       
        else       
        @bag_sprite.bitmap = RPG::Cache.picture("bag_garçon"+@bag_index.to_s+".png")         
        end               
       
        @socket_name = Window_Base.new(51-16, 27-16, 228+32, 45+32)
        @socket_name.contents = Bitmap.new(228, 45)
        @socket_name.opacity = 0
        @socket_name.z = @z_level + 1
        @socket_name.contents.font.name = $fontface
        @socket_name.contents.font.size = $fontsizebig
        @socket_name.contents.font.color = @socket_name.normal_color
       
        @item_list = POKEMON_S::Pokemon_Item_List.new(@bag_index, @item_index)
        @item_list.opacity = 0
        @item_list.z = @z_level + 1
        @item_list.active = true
        @item_list.visible = true     
       

        @text_window = Window_Base.new(88-123, 103-20+214+1, 645, 220) #273 #220
        @text_window.opacity = 0
        @text_window.contents = Bitmap.new(645, 200)
        @text_window.contents.font.name = $fontface
        @text_window.contents.font.size = $fontsizebig
        @text_window.contents.font.color = Color.new(255,255,255,255)
        @text_window.z = @z_level + 1

     
        @item_icon = Sprite.new
        @item_icon.z = @z_level + 2
        @item_icon.x = 18
        @item_icon.y = 382   
        @item_icon.bitmap = RPG::Cache.icon(item_icon)
       
        @drop_counter = Window_Base.new(0, 0, 60, 44)
        @drop_counter.contents = Bitmap.new(60, 40)
        @drop_counter.x = 207
        @drop_counter.y = 373
        @drop_counter.z = @z_level + 4
        @drop_counter.contents.font.name = $fontface
        @drop_counter.contents.font.size = $fontsize
        @drop_counter.contents.font.color = @drop_counter.normal_color
        @drop_counter.visible = false
        @drop_counter_number = 1
       
        list = ["UTILISER", "DONNER", "JETER", "ORDRE", "ANNULER"]
        if $battle_var.in_battle
          list = ["UTILISER", "ANNULER"]
        end
        @command_window = Window_Command.new(80, list)
        @command_window.active = false
        @command_window.visible = false
        @command_window.x = 187
        @command_window.y = 417 - @command_window.height
        @command_window.z = @z_level + 10             
       
        refresh_all
       
        Graphics.transition
        loop do
          Graphics.update
          if @done == true
            break
          end
          Input.update
          if @drop_counter.visible == true
            update_drop
            next
          end
          if @command_window.active == true
            update_command
            next
          end
          if @command_window.active == false
            @item_list.update
            update
            next
          end
        end
       
        $pokemon_party.bag_index[0] = @bag_index
        $pokemon_party.bag_index[1] = @item_list.index
       
        Graphics.freeze
        @item_list.dispose
        @text_window.dispose
        @item_icon.dispose
        @background.dispose
        @socket_name.dispose
        @drop_counter.dispose
        @bag_sprite.dispose
        @fond.dispose
      end
     
      def update
        if Input.repeat?(Input::DOWN) or Input.repeat?(Input::UP)
          refresh
          return
        end
       
        if Input.repeat?(Input::RIGHT) and @item_list.on_switch == -1 and @mode != "planter"
          $game_system.se_play($data_system.cursor_se)
          @bag_index += @bag_index == 8 ? -7 : 1
          @item_list.refresh(@bag_index)
          refresh_all
          return
        end
       
        if Input.repeat?(Input::LEFT) and @item_list.on_switch == -1 and @mode != "planter"
          $game_system.se_play($data_system.cursor_se)
          @bag_index += @bag_index == 1 ? 7 : -1
          @item_list.refresh(@bag_index)
          refresh_all
          return
        end
       
        if Input.trigger?(Input::C)
          if @mode == "sell"
            if @item_list.index == @item_list.size
              @done = true
              return
            end
            # item invendable
            if not(Item.soldable?(item_id))
              $game_system.se_play($data_system.buzzer_se)
              return
            end
            # $scene = Pokemon_Item_Shop.new
            $scene.call_item_amount([item_id, item_amount], "sell", @z_level + 100)
            refresh_all
            return
          end
         
          # Echange d'objet
          if @item_list.on_switch != -1
            if @item_list.index != @item_list.size
              $game_system.se_play($data_system.decision_se)
              $pokemon_party.item_switch(@bag_index, @item_list.index, @item_list.on_switch)
              @item_list.on_switch = -1
              refresh_all
            else
              $game_system.se_play($data_system.cancel_se)
              @item_list.on_switch = -1
              refresh_all
            end
            return
          end
         
          # Mode sélection objet à donner
          if @mode == "hold"
            # Fermer le sac
            if @item_list.index == @item_list.size
              $game_system.se_play($data_system.decision_se)
              @done = true
              @return_data = [0, false]
            # Fermer le sac
            elsif Item.holdable?(item_id)
              $game_system.se_play($data_system.decision_se)
              @done = true
              @return_data = [item_id, true]
            else
              $game_system.se_play($data_system.buzzer_se)
            end
            return 
          end
         
          # Mode sélection baie à planter
          if @mode == "planter"
            # Fermer le sac
            if @item_list.index == @item_list.size
              $game_system.se_play($data_system.decision_se)
              @done = true
              @return_data = 0
            # Fermer le sac
            elsif Item.socket(item_id) == 5
              $game_system.se_play($data_system.decision_se)
              @done = true
              @return_data = item_id
            else
              $game_system.se_play($data_system.buzzer_se)
            end
            return 
          end
         
          # Retour
          if @item_list.index == @item_list.size
            @done = true
            # Retour au combat
            if $battle_var.in_battle
              return
            end
            $scene = POKEMON_S::Pokemon_Menu.new(4)
            return
          # Sélection item
          else
            @command_window.active = true
            refresh
            @command_window.visible = true
            return
          end
        end
       
        if Input.trigger?(Input::B)
          $game_system.se_play($data_system.cancel_se)
          if @mode == "hold"
            @done = true
            @return_data = [0, false]
            return
          end
         
          if @mode == "sell"
            @done = true
            return
          end         
         
          if @item_list.on_switch != -1
            @item_list.on_switch = -1
            refresh_all
            return
          end
         
          if $battle_var.in_battle
            $game_system.se_play($data_system.cancel_se)
            @return_data = 0
            @done = true
            return
          end
         
          $game_system.se_play($data_system.cancel_se)
          $scene = POKEMON_S::Pokemon_Menu.new(4)
          @done = true
          return
        end
      end
     
      def return_data
        return @return_data
      end
     
      # ----------------------------------
      # Appel en cas de changement d'item
      # ----------------------------------
      def refresh 
       
        @background.bitmap = RPG::Cache.picture("bagfond_inf"+@bag_index.to_s+".png")
       
        # Sprite sac
        if $game_variables[11] == 1       
        @bag_sprite.bitmap = RPG::Cache.picture("bag_garçon"+@bag_index.to_s+".png")     
        elsif $game_variables[11] == 2     
        @bag_sprite.bitmap = RPG::Cache.picture("bag_fille"+@bag_index.to_s+".png")       
        else       
        @bag_sprite.bitmap = RPG::Cache.picture("bag_garçon"+@bag_index.to_s+".png")         
        end 
           
        # Tracage de l'icone objet
        @item_icon.bitmap = RPG::Cache.icon(item_icon)       
       
        # Texte de description
        if @command_window.active
          string = []
          string[0] = Item.name(item_id) + " est"
          string[1] = "sélectionné."         
        elsif @drop_counter.visible == true
          string = []
          string[0] = "En jeter combien ?"
          string[1] = ""
        elsif @item_list.on_switch != -1
          string = []
          string[0] = "Echanger avec lequel ?"
          string[1] = ""
        else
          string = string_builder(item_descr, 42)
        end
       
        text_window_draw(string)
       
        refresh_command_list
      end
     
      def draw_text(string = "", string2 = "")       
      if string == ""
        @text_window_text.contents.clear
        @dummy.visible = false
        @text_window_text.visible = false       
      else
        @text_window_text.contents.clear
        @text_window_text.visible = true
        @dummy.visible = true
        @text_window.contents.draw_text(0,0,597-32,32, string)
        @text_window.contents.draw_text(0,32,597-32,32, string2)
      end
    end
   
    def wait_hit
      Graphics.update
      Input.update
      until Input.trigger?(Input::C)
        Input.update
        Graphics.update
      end
    end
     
      # ------------------------------------
      # Appel en cas de changement de poche
      # ------------------------------------
      def refresh_all
        refresh_list
        refresh
      end
     
      # ------------------------------------
      # Rafraichissement de liste (même poche)
      # ------------------------------------
      def refresh_list
        @item_list.refresh_list
      end
     
      # ----------------------------------
      # Liste d'actions associé à l'item
      # ----------------------------------
      def update_command
        @command_window.update
       
        if Input.trigger?(Input::B)
          $game_system.se_play($data_system.cancel_se)
          @command_window.active = false
          @command_window.visible = false
          refresh
          return
        end
       
        if Input.trigger?(Input::C)
          case @command_window.index
          # Utiliser
          when 0
            if $pokemon_party.size > 0
            if $battle_var.in_battle and not(Item.battle_usable?(item_id))
              $game_system.se_play($data_system.buzzer_se)
              return
            end
            if not($battle_var.in_battle) and not(Item.map_usable?(item_id))
              $game_system.se_play($data_system.buzzer_se)
              return
            end
            $game_system.se_play($data_system.decision_se)
            @command_window.active = false
            @command_window.visible = false
            if Item.use_on_pokemon?(item_id)
              item_mode = "item_use"
              if Item.item_able_mode?(item_id)
                item_mode = "item_able"
              end
              scene = POKEMON_S::Pokemon_Party_Menu.new(0, @z_level + 100, item_mode, item_id)
              scene.main
              # return_data = [id item_utilisé, item utilisé oui/non, ]
              data = scene.return_data
              used = data[1]
              item_used = 0
            else
              # Utilisé
              data = Item.effect(item_id)
              used = data[0]
              item_used = item_id
              string = data[1]
              return_map = data[2]
              if string.type == String and string != ""
                window = Pokemon_Window_Help.new
                window.draw_text(string)
                Input.update
                until Input.trigger?(Input::C)
                  Graphics.update
                  Input.update
                end
                window.dispose
              end
            end           
            if used
              $pokemon_party.use_item(item_id)
            end
            # En combat, retour à l'écran après utilisation de l'objet
            if $battle_var.in_battle and used
              $battle_var.action_id = 1
              @done = true
              @return_data = item_used
              return
            end
            if used and return_map
              @done = true
              return
            end
            refresh_all
            @item_list.refresh
            Graphics.transition
            return
            else           
            $game_system.se_play($data_system.buzzer_se)           
            Graphics.transition
            return
          end                     
          # Retour (dernière option)
          when @command_window.item_max-1
            $game_system.se_play($data_system.cancel_se)
            @command_window.active = false
            @command_window.visible = false
            refresh
            return
          # Donner
          when 1
            if $pokemon_party.size > 0
            if not(Item.holdable?(item_id))
              $game_system.se_play($data_system.buzzer_se)
              return
            end
            $game_system.se_play($data_system.decision_se)
            @command_window.active = false
            @command_window.visible = false
            scene = POKEMON_S::Pokemon_Party_Menu.new(0, @z_level + 100, "hold", item_id)
            scene.main
            return_data = scene.return_data
            # return_data = [item tenu true/false, id item_tenu, item remplacé true/false, id item remplacé]
            item_id2 = return_data[2]
            replaced = return_data[3]
            if replaced
              $pokemon_party.add_item(item_id2)
            end
            item_id1 = return_data[0]
            hold = return_data[1]
            if hold
              $pokemon_party.drop_item(item_id1)
            end                       
            @item_list.refresh
            refresh_all
            Graphics.transition
            return
          else
            $game_system.se_play($data_system.buzzer_se)
            refresh_all
            Graphics.transition
          end
         
          # Jeter
          when 2
            if not(Item.holdable?(item_id))
              $game_system.se_play($data_system.buzzer_se)
              return
            end
            $game_system.se_play($data_system.decision_se)
            @command_window.active = false
            @command_window.visible = false
            @drop_counter.visible = true
            refresh
            refresh_drop_counter
            return
          # Ordre
          when 3
            @item_list.on_switch = @item_list.index
            @command_window.active = false
            @command_window.visible = false
            refresh_all
            return
          end
        end
       
      end
     
      def refresh_command_list
        # Fermer le sac
        if @item_list.index == @item_list.size
          return
        end 
        # En combat
        if $battle_var.in_battle
          if Item.battle_usable?(item_id)
            @command_window.enable_item(0)
          else
            @command_window.disable_item(0)
          end
        # En map
        else
          if Item.map_usable?(item_id)
            @command_window.enable_item(0)
          else
            @command_window.disable_item(0)
          end
          if Item.holdable?(item_id)
            @command_window.enable_item(1)
            @command_window.enable_item(2)
          else
            @command_window.disable_item(1)
            @command_window.disable_item(2)
          end
          if $pokemon_party.size > 0
            @command_window.enable_item(0)
            @command_window.enable_item(1)
          else
            @command_window.disable_item(0)
            @command_window.disable_item(1)
          end         
        end
      end
     
      def update_drop
        if Input.repeat?(Input::UP)
          if @drop_counter_number < item_amount
            @drop_counter_number += 1
            refresh_drop_counter
          end
          return
        end
       
        if Input.repeat?(Input::DOWN)
          if @drop_counter_number > 1
            @drop_counter_number -= 1
            refresh_drop_counter
          end
          return
        end
       
        if Input.repeat?(Input::LEFT)
          if @drop_counter_number > 1
            @drop_counter_number -= 10
            if @drop_counter_number < 1
              @drop_counter_number = 1
            end
            refresh_drop_counter
          end
          return
        end
       
        if Input.repeat?(Input::RIGHT)
          if @drop_counter_number < item_amount
            @drop_counter_number += 10
            if @drop_counter_number > item_amount
              @drop_counter_number = item_amount
            end
            refresh_drop_counter
          end
          return
        end
       
        if Input.repeat?(Input::B)
          $game_system.se_play($data_system.cancel_se)
          @drop_counter_number = 1
          @drop_counter.visible = false
          @command_window.active = true
          @command_window.visible= true
          refresh
          return
        end
       
        if Input.repeat?(Input::C)
          $game_system.se_play($data_system.decision_se)
          if decision
            $game_system.se_play($data_system.decision_se)
            id_ = item_id
            $pokemon_party.drop_item(id_, @drop_counter_number)
            @drop_counter.visible = false
            refresh_list
            text_window_draw(["Jeté " + @drop_counter_number.to_s, Item.name(id_) + "."])
            @drop_counter_number = 1
            @command_window.active = false
            @command_window.visible = false
            Input.update
            until Input.trigger?(Input::C)
              Graphics.update
              Input.update
            end
            refresh_all
            return
          else
            $game_system.se_play($data_system.cancel_se)
            @drop_counter_number = 1
            @drop_counter.visible = false
            @command_window.active = false
            @command_window.visible = false
            refresh
            return
          end
        end
      end
     
      def refresh_drop_counter
        @drop_counter.contents.clear
        @drop_counter.contents.draw_text(-35, -11, 62, 32, " x " + @drop_counter_number.to_s, 2)
      end
     
      # ----------------------------------
      # Identification de l'item !!!!!!! Utilise l'index de la poche
      # ----------------------------------
      def item_id
        return $pokemon_party.bag[@bag_index][@item_list.index][0]
      end
     
      def item_icon
        if @item_list.index == @item_list.size
          return "return.png"
        else
          return Item.icon(item_id)
        end
      end
     
      def item_descr
        if @item_list.index == @item_list.size
          if $battle_var.in_battle
            return "Fermer le Sac."
          end
          if @mode == "sell"
            return "Fermer le Sac."
          end
          return "Fermer le Sac."
        else
          return Item.descr(item_id)
        end
      end
     
      def item_amount
        return $pokemon_party.bag[@bag_index][@item_list.index][1]
      end
     
      # ----------------------------------
      # Decision
      # ----------------------------------
      def decision
        @command = Window_Command.new(120, ["OUI", "NON"], $fontsize)
        @command.x = 517
        @command.y = 480 - 6 - @drop_counter.height - @command.height + 207
        @command.z = @z_level + 15
        loop do
          Graphics.update
          Input.update
          @command.update
          if Input.trigger?(Input::C) and @command.index == 0
            @command.dispose
            @command = nil
            return true
          end
          if (Input.trigger?(Input::C) and @command.index == 1) or Input.trigger?(Input::B)
            @command.dispose
            @command = nil
            return false
          end
        end
      end
     
      def text_window_draw(list)
        @text_window.contents.clear
        for i in 0..list.length-1         
          @text_window.contents.font.color = Color.new(40,48,40,255)
          @text_window.contents.draw_text(72+1, 16*i+58, 241, $fhb, list[i])
          @text_window.contents.draw_text(72, 1+16*i+58, 241, $fhb, list[i])
          @text_window.contents.draw_text(72+1, 1+16*i+58, 241, $fhb, list[i])
          @text_window.contents.font.color = Color.new(248,248,248,255)
          @text_window.contents.draw_text(72, 16*i+58, 241, $fhb, list[i])
        end
      end
     
      def dialog_window_draw(string)
      end
     
      def string_builder(text, limit)
        length = text.length
        full1 = false
        full2 = false
        full3 = false       
        string1 = ""
        string2 = ""
        string3 = ""       
        word = ""
        for i in 0..length
          letter = text[i..i]
          if letter != " " and i != length
            word += letter.to_s
          else
            word = word + " "
            if (string1 + word).length < limit and not(full1)
              string1 += word
              word = ""
            else
              full1 = true
            end
           
            if (string2 + word).length < limit and not(full2)
              string2 += word
              word = ""
            else
              full2 = true
            end
           
            if (string3 + word).length < limit and not(full3)
              string3 += word
              word = ""
            else
              full3 = true
            end           
           
          end
        end
        if string3.length > 1
          string3 = string3[0..string3.length-2]
        end
        return [string1, string2, string3]
      end
    end
   
   
   
   
    # ----------------------------------
    # class liste des objets dans une poche (socket)
    # ----------------------------------
    class Pokemon_Item_List < Window_Selectable
      attr_accessor :on_switch
     
      def initialize(socket = 1, index = 1)
        super(272-155-52, 17+214+6, 356, 125, $fn)
        self.contents = Bitmap.new(324, 384)
        self.contents.font.name = $fontface
        self.contents.font.size = $fontsizebig
        self.contents.font.color = platine
        @bag_index = socket
        @item_max = size + 1
        @on_switch = -1
        self.index = index
      end
     
      def refresh(socket = @bag_index)
        self.index = 0
        @bag_index = socket
        @item_max = size + 1       
        refresh_list
      end
     
      def refresh_list
        color_sac = Color.new(16,24,32,255)
        ombre_sac = Color.new(168,184,184,255)
        self.contents.clear
        self.contents = Bitmap.new(356, $fhb*(size+1)+2)
        self.contents.font.name = $fontface
        self.contents.font.size = $fontsizebig     
        hl = $fn
        i = 0
        for item in $pokemon_party.bag[@bag_index]
          id = item[0]
          amount = item[1]
          if @on_switch == i
            self.contents.font.color = text_color(2) # Rouge
          end         
          self.contents.font.color = ombre_sac         
          self.contents.draw_text(6, 1+hl*i, 304, hl, Item.name(id))
          self.contents.draw_text(5, 1+hl*i, 304, hl, Item.name(id))
          self.contents.font.color = color_sac
          self.contents.draw_text(5, hl*i, 304, hl, Item.name(id))
          if Item.holdable?(id) 
            self.contents.font.color = ombre_sac
            self.contents.draw_text(-179, 1+hl*i, 304, hl, "x" + amount.to_s, 2)
            self.contents.draw_text(-180, 1+hl*i, 304, hl, "x" + amount.to_s, 2)
            self.contents.font.color = color_sac
            self.contents.draw_text(-180, hl*i, 304, hl, "x" + amount.to_s, 2)         
          end       
          if @on_switch == i
            self.contents.font.color = color_sac
          end
          i += 1               
        end
        self.contents.font.color = ombre_sac
        self.contents.draw_text(6, 1+hl*i, 310, hl, "FERMER")
        self.contents.draw_text(5, 1+hl*i, 310, hl, "FERMER")
        self.contents.font.color = color_sac
        self.contents.draw_text(5, hl*i, 310, hl, "FERMER")
      end
     
      def item_id(index = @bag_index)
        return $pokemon_party.bag[index][self.index]
      end
     
      def size
        return $pokemon_party.bag_list(@bag_index).length
      end     
    end
  end

Posté par Florent le 12 Juil - 16:58 (2012)
Seusyn a écrit:
Arf non c'est PSP 4G +

Voici le code d'origine de DS sans modif essaie pour voir :

{{{Vous devez répondre à ce sujet pour voir la partie cachée}}}


Et bien non, ça ne marche toujours pas...

Puisqu'il me semble que Gaalee ne l'a finalement pas envoyé, voici une copie de notre fichier data_item.txt :

Spoiler
#-------------------------------------------------------------
# Fichier de données : objets
# Pokemon Script Project - Krosk
# 31/12/07
#-------------------------------------------------------------
# $data_item
#   [ {"id" => paramètres} ]
#-------------------------------------------------------------

    $data_item[ 1 ]=[ {"ball" => $data_ball[4] } ]
    $data_item[ 2 ]=[ {"ball" => $data_ball[3] } ]
    $data_item[ 3 ]=[ {"ball" => $data_ball[2] } ]
    $data_item[ 4 ]=[ {"ball" => $data_ball[1] } ]
    $data_item[ 5 ]=[ {"ball" => $data_ball[5] } ]
    $data_item[ 6 ]=[ {"ball" => $data_ball[6] } ]
    $data_item[ 9 ]=[ {"ball" => $data_ball[9] } ]
    $data_item[ 10 ]=[ {"ball" => $data_ball[10] } ]
    $data_item[ 11 ]=[ {"ball" => $data_ball[11] } ]
    $data_item[ 31 ]=[ {"loyalty" => 2 } ]
    $data_item[ 32 ]=[ {"loyalty" => 3 } ]
    $data_item[ 34 ]=[ {"loyalty" => -5 } ]
    $data_item[ 35 ]=[ {"loyalty" => -10 } ]
    $data_item[ 36 ]=[ {"loyalty" => -5 } ]
    $data_item[ 37 ]=[ {"loyalty" => -15 } ]
    $data_item[ 41 ]=[ {"level_up" => 1 } ]
    $data_item[ 42 ]=[ {"boost" => 0, "loyalty" => 5 } ]
    $data_item[ 43 ]=[ {"boost" => 1, "loyalty" => 5 } ]
    $data_item[ 44 ]=[ {"boost" => 2, "loyalty" => 5 } ]
    $data_item[ 45 ]=[ {"boost" => 3, "loyalty" => 5 } ]
    $data_item[ 46 ]=[ {"boost" => 4, "loyalty" => 5 } ]
    $data_item[ 47 ]=[ {"boost" => 5, "loyalty" => 5 } ]
    $data_item[ 50 ]=[ {"battle_boost" => 0 } ]
    $data_item[ 51 ]=[ {"battle_boost" => 1 } ]
    $data_item[ 52 ]=[ {"battle_boost" => 2 } ]
    $data_item[ 53 ]=[ {"battle_boost" => 3 } ]
    $data_item[ 54 ]=[ {"battle_boost" => 6 } ]
    $data_item[ 57 ]=[ {"flee" => true} ]
    $data_item[ 58 ]=[ {"flee" => true} ]
    $data_item[ 59 ]=[ {"stone" => true} ]
    $data_item[ 60 ]=[ {"stone" => true} ]
    $data_item[ 61 ]=[ {"stone" => true} ]
    $data_item[ 62 ]=[ {"stone" => true} ]
    $data_item[ 63 ]=[ {"stone" => true} ]
    $data_item[ 64 ]=[ {"stone" => true} ]
    $data_item[ 70 ]=[ {"repel" => 100 } ]
    $data_item[ 71 ]=[ {"repel" => 200 } ]
    $data_item[ 72 ]=[ {"repel" => 250 } ]
    $data_item[ 102 ]=[ {"leftovers" => true} ]
    $data_item[ 106 ]=[ {"expshare" => true} ]
    $data_item[ 107 ]=[ {"amuletcoin" => true} ]
    $data_item[ 118 ]=[ { "ct" => [1, Skill_Info.id("MITRA-POING")]} ]
    $data_item[ 119 ]=[ { "ct" => [2  , Skill_Info.id("DRACOGRIFFE")]} ]
    $data_item[ 120 ]=[ { "ct" => [3  , Skill_Info.id("VIBRAQUA")]} ]
    $data_item[ 121 ]=[ { "ct" => [4  , Skill_Info.id("PLENITUDE")]} ]
    $data_item[ 122 ]=[ { "ct" => [5  , Skill_Info.id("HURLEMENT")]} ]
    $data_item[ 123 ]=[ { "ct" => [6  , Skill_Info.id("TOXIK")]} ]
    $data_item[ 124 ]=[ { "ct" => [7  , Skill_Info.id("GRELE")]} ]
    $data_item[ 125 ]=[ { "ct" => [8  , Skill_Info.id("GONFLETTE")]} ]
    $data_item[ 126 ]=[ { "ct" => [9  , Skill_Info.id("BALLE GRAINE")]} ]
    $data_item[ 127 ]=[ { "ct" => [10  , Skill_Info.id("PUIS. CACHEE")]} ]
    $data_item[ 128 ]=[ { "ct" => [11  , Skill_Info.id("ZENITH")]} ]
    $data_item[ 129 ]=[ { "ct" => [12  , Skill_Info.id("PROVOC")]} ]
    $data_item[ 130 ]=[ { "ct" => [13  , Skill_Info.id("LASER GLACE")]} ]
    $data_item[ 131 ]=[ { "ct" => [14  , Skill_Info.id("BLIZZARD")]} ]
    $data_item[ 132 ]=[ { "ct" => [15  , Skill_Info.id("ULTRALASER")]} ]
    $data_item[ 133 ]=[ { "ct" => [16  , Skill_Info.id("MUR LUMIERE")]} ]
    $data_item[ 134 ]=[ { "ct" => [17  , Skill_Info.id("ABRI")]} ]
    $data_item[ 135 ]=[ { "ct" => [18  , Skill_Info.id("DANSE PLUIE")]} ]
    $data_item[ 136 ]=[ { "ct" => [19  , Skill_Info.id("GIGA-SANGSUE")]} ]
    $data_item[ 137 ]=[ { "ct" => [20  , Skill_Info.id("RUNE PROTECT")]} ]
    $data_item[ 138 ]=[ { "ct" => [21  , Skill_Info.id("FRUSTRATION")]} ]
    $data_item[ 139 ]=[ { "ct" => [22  , Skill_Info.id("LANCE-SOLEIL")]} ]
    $data_item[ 140 ]=[ { "ct" => [23  , Skill_Info.id("QUEUE DE FER")]} ]
    $data_item[ 141 ]=[ { "ct" => [24  , Skill_Info.id("TONNERRE")]} ]
    $data_item[ 142 ]=[ { "ct" => [25  , Skill_Info.id("FATAL-FOUDRE")]} ]
    $data_item[ 143 ]=[ { "ct" => [26  , Skill_Info.id("SEISME")]} ]
    $data_item[ 144 ]=[ { "ct" => [27  , Skill_Info.id("RETOUR")]} ]
    $data_item[ 145 ]=[ { "ct" => [28  , Skill_Info.id("TUNNEL")]} ]
    $data_item[ 146 ]=[ { "ct" => [29  , Skill_Info.id("PSYKO")]} ]
    $data_item[ 147 ]=[ { "ct" => [30  , Skill_Info.id("BALL'OMBRE")]} ]
    $data_item[ 148 ]=[ { "ct" => [31  , Skill_Info.id("CASSE-BRIQUE")]} ]
    $data_item[ 149 ]=[ { "ct" => [32  , Skill_Info.id("REFLET")]} ]
    $data_item[ 150 ]=[ { "ct" => [33  , Skill_Info.id("PROTECTION")]} ]
    $data_item[ 151 ]=[ { "ct" => [34  , Skill_Info.id("ONDE DE CHOC")]} ]
    $data_item[ 152 ]=[ { "ct" => [35  , Skill_Info.id("LANCE-FLAMME")]} ]
    $data_item[ 153 ]=[ { "ct" => [36  , Skill_Info.id("BOMB-BEURK")]} ]
    $data_item[ 154 ]=[ { "ct" => [37  , Skill_Info.id("TEMPETESABLE")]} ]
    $data_item[ 155 ]=[ { "ct" => [38  , Skill_Info.id("DEFLAGRATION")]} ]
    $data_item[ 156 ]=[ { "ct" => [39  , Skill_Info.id("TOMBEROCHE")]} ]
    $data_item[ 157 ]=[ { "ct" => [40  , Skill_Info.id("AEROPIQUE")]} ]
    $data_item[ 158 ]=[ { "ct" => [41  , Skill_Info.id("TOURMENTE")]} ]
    $data_item[ 159 ]=[ { "ct" => [42  , Skill_Info.id("FACADE")]} ]
    $data_item[ 160 ]=[ { "ct" => [43  , Skill_Info.id("FORCE CACHEE")]} ]
    $data_item[ 161 ]=[ { "ct" => [44  , Skill_Info.id("REPOS")]} ]
    $data_item[ 162 ]=[ { "ct" => [45  , Skill_Info.id("ATTRACTION")]} ]
    $data_item[ 163 ]=[ { "ct" => [46  , Skill_Info.id("LARCIN")]} ]
    $data_item[ 164 ]=[ { "ct" => [47  , Skill_Info.id("AILE D'ACIER")]} ]
    $data_item[ 165 ]=[ { "ct" => [48  , Skill_Info.id("ECHANGE")]} ]
    $data_item[ 166 ]=[ { "ct" => [49  , Skill_Info.id("SAISIE")]} ]
    $data_item[ 167 ]=[ { "ct" => [50  , Skill_Info.id("SURCHAUFFE")]} ]
    $data_item[ 168 ]=[ { "cs" => [1  , Skill_Info.id("COUPE")]} ]
    $data_item[ 169 ]=[ { "cs" => [2  , Skill_Info.id("VOL")]} ]
    $data_item[ 170 ]=[ { "cs" => [3  , Skill_Info.id("SURF")]} ]
    $data_item[ 171 ]=[ { "cs" => [4  , Skill_Info.id("FORCE")]} ]
    $data_item[ 172 ]=[ { "cs" => [5  , Skill_Info.id("FLASH")]} ]
    $data_item[ 173 ]=[ { "cs" => [6  , Skill_Info.id("ECLATE-ROC")]} ]
    $data_item[ 174 ]=[ { "cs" => [7  , Skill_Info.id("CASCADE")]} ]
    $data_item[ 175 ]=[ { "cs" => [8  , Skill_Info.id("PLONGEE")]} ]
    $data_item[ 283 ]=[ { "cs" => [9  , Skill_Info.id("PLONGEE")]} ]
    $data_item[ 284 ]=[ { "ct" => [51  , Skill_Info.id("SURCHAUFFE")]} ]
    $data_item[ 205 ]=[ { "berry" => [ ] } ]
    $data_item[ 206 ]=[ { "berry" => [ ] } ]
    $data_item[ 207 ]=[ { "berry" => [ ] } ]
    $data_item[ 208 ]=[ { "berry" => [ ] } ]
    $data_item[ 209 ]=[ { "berry" => [ ] } ]
    $data_item[ 210 ]=[ { "berry" => [ ] } ]
    $data_item[ 211 ]=[ { "berry" => [ ] } ]
    $data_item[ 212 ]=[ { "berry" => [ ] } ]
    $data_item[ 213 ]=[ { "berry" => [ ] } ]
    $data_item[ 214 ]=[ { "berry" => [ ] } ]
    $data_item[ 215 ]=[ { "berry" => [ ] } ]
    $data_item[ 216 ]=[ { "berry" => [ ] } ]
    $data_item[ 217 ]=[ { "berry" => [ ] } ]
    $data_item[ 218 ]=[ { "berry" => [ ] } ]
    $data_item[ 219 ]=[ { "berry" => [ ] } ]
    $data_item[ 220 ]=[ { "berry" => [ ] } ]
    $data_item[ 221 ]=[ { "berry" => [ ] } ]
    $data_item[ 222 ]=[ { "berry" => [ ] } ]
    $data_item[ 223 ]=[ { "berry" => [ ] } ]
    $data_item[ 224 ]=[ { "berry" => [ ] } ]
    $data_item[ 225 ]=[ { "berry" => [ ] } ]
    $data_item[ 226 ]=[ { "berry" => [ ] } ]
    $data_item[ 227 ]=[ { "berry" => [ ] } ]
    $data_item[ 228 ]=[ { "berry" => [ ] } ]
    $data_item[ 229 ]=[ { "berry" => [ ] } ]
    $data_item[ 230 ]=[ { "berry" => [ ] } ]
    $data_item[ 231 ]=[ { "berry" => [ ] } ]
    $data_item[ 232 ]=[ { "berry" => [ ] } ]
    $data_item[ 233 ]=[ { "berry" => [ ] } ]
    $data_item[ 234 ]=[ { "berry" => [ ] } ]
    $data_item[ 235 ]=[ { "berry" => [ ] } ]
    $data_item[ 236 ]=[ { "berry" => [ ] } ]
    $data_item[ 237 ]=[ { "berry" => [ ] } ]
    $data_item[ 238 ]=[ { "berry" => [ ] } ]
    $data_item[ 239 ]=[ { "berry" => [ ] } ]
    $data_item[ 240 ]=[ { "berry" => [ ] } ]
    $data_item[ 241 ]=[ { "berry" => [ ] } ]
    $data_item[ 242 ]=[ { "berry" => [ ] } ]
    $data_item[ 243 ]=[ { "berry" => [ ] } ]
    $data_item[ 244 ]=[ { "berry" => [ ] } ]
    $data_item[ 245 ]=[ { "berry" => [ ] } ]
    $data_item[ 246 ]=[ { "berry" => [ ] } ]
    $data_item[ 247 ]=[ { "berry" => [ ] } ]
    $data_item[283]=[ { "ct" => [51, Skill_Info.id("ATTERRISSAGE")]} ]
    $data_item[284]=[ { "ct" => [52, Skill_Info.id("EXPLOFORCE")]} ]
    $data_item[285]=[ { "ct" => [53, Skill_Info.id("ECO-SPHERE")]} ]
    $data_item[286]=[ { "ct" => [54, Skill_Info.id("FAUX-CHAGE")]} ]
    $data_item[287]=[ { "ct" => [55, Skill_Info.id("SAUMURE")]} ]
    $data_item[288]=[ { "ct" => [56, Skill_Info.id("DEGOMMAGE")]} ]
    $data_item[289]=[ { "ct" => [57, Skill_Info.id("RAYON CHARGE")]} ]
    $data_item[290]=[ { "ct" => [58, Skill_Info.id("TENACITE")]} ]
    $data_item[291]=[ { "ct" => [59, Skill_Info.id("DRACOCHOC")]} ]
    $data_item[292]=[ { "ct" => [60, Skill_Info.id("VAMPIPOING")]} ]
    $data_item[293]=[ { "ct" => [61, Skill_Info.id("FEU FOLLET")]} ]
    $data_item[294]=[ { "ct" => [62, Skill_Info.id("VENT ARGENTE")]} ]
    $data_item[295]=[ { "ct" => [63, Skill_Info.id("EMBARGO")]} ]
    $data_item[296]=[ { "ct" => [64, Skill_Info.id("EXPLOSION")]} ]
    $data_item[297]=[ { "ct" => [65, Skill_Info.id("GRIFFE OMBRE")]} ]
    $data_item[298]=[ { "ct" => [66, Skill_Info.id("REPRESAILLES")]} ]
    $data_item[299]=[ { "ct" => [67, Skill_Info.id("RECYCLAGE")]} ]
    $data_item[300]=[ { "ct" => [68, Skill_Info.id("GIGA IMPACT")]} ]
    $data_item[301]=[ { "ct" => [69, Skill_Info.id("POLIROCHE")]} ]
    $data_item[302]=[ { "ct" => [70, Skill_Info.id("FLASH")]} ]
    $data_item[303]=[ { "ct" => [71, Skill_Info.id("LAME DE ROC")]} ]
    $data_item[304]=[ { "ct" => [72, Skill_Info.id("AVALANCHE")]} ]
    $data_item[305]=[ { "ct" => [73, Skill_Info.id("CAGE-ECLAIR")]} ]
    $data_item[306]=[ { "ct" => [74, Skill_Info.id("GYROBALLE")]} ]
    $data_item[307]=[ { "ct" => [75, Skill_Info.id("DANSE-LAMES")]} ]
    $data_item[308]=[ { "ct" => [76, Skill_Info.id("PIEGE DE ROC")]} ]
    $data_item[309]=[ { "ct" => [77, Skill_Info.id("BOOST")]} ]
    $data_item[310]=[ { "ct" => [78, Skill_Info.id("SEDUCTION")]} ]
    $data_item[311]=[ { "ct" => [79, Skill_Info.id("VIBROBSCUR")]} ]
    $data_item[312]=[ { "ct" => [80, Skill_Info.id("EBOULEMENT")]} ]
    $data_item[313]=[ { "ct" => [81, Skill_Info.id("PLAIE-CROIX")]} ]
    $data_item[314]=[ { "ct" => [82, Skill_Info.id("BLABLA DODO")]} ]
    $data_item[315]=[ { "ct" => [83, Skill_Info.id("DON NATUREL")]} ]
    $data_item[316]=[ { "ct" => [84, Skill_Info.id("DIRECT TOXIK")]} ]
    $data_item[317]=[ { "ct" => [85, Skill_Info.id("DEVOREVE")]} ]
    $data_item[318]=[ { "ct" => [86, Skill_Info.id("NOEUD HERBE")]} ]
    $data_item[319]=[ { "ct" => [87, Skill_Info.id("VANTARDISE")]} ]
    $data_item[320]=[ { "ct" => [88, Skill_Info.id("PICORE")]} ]
    $data_item[321]=[ { "ct" => [89, Skill_Info.id("DEMI-TOUR")]} ]
    $data_item[322]=[ { "ct" => [90, Skill_Info.id("CLONAGE")]} ]
    $data_item[323]=[ { "ct" => [91, Skill_Info.id("LUMINOCANON")]} ]
    $data_item[324]=[ { "ct" => [92, Skill_Info.id("DISTORSION")]} ]



Y a-t-il des erreurs dedans ?
Et sinon, à part tenter des incantations vaudoux, que nous reste-t-il comme possibilité ?

Posté par Seusyn le 12 Juil - 17:03 (2012)
Dans votre script votre ligne 90 et 91 est bien en true ?

Posté par Florent le 12 Juil - 17:13 (2012)
Seusyn a écrit:
Dans votre script votre ligne 90 et 91 est bien en true ?

Oui, pour être sûr j'ai fait un copier-coller du script que tu as fourni, il s'agit donc exactement du même (J'ai vérifié le nombre de lignes également, pour être sûr que l'on oubliait rien.).

Posté par Seusyn le 12 Juil - 17:14 (2012)
alors là c'est un grand mystere, possiblité d'envoyer le item.rxdata ?

Posté par gaalee89 le 12 Juil - 17:22 (2012)
http://www.sendspace.com/file/y317w4 Le voici ! (Merci de nous aider !)

Posté par Seusyn le 12 Juil - 17:28 (2012)
Possibilité de m'archiver tout votre projet et de me l'envoyer en MP que je regarde tout ca avec précision ?

Car je détecte une chose bizarre dans les objets.

Posté par Florent le 12 Juil - 17:30 (2012)
Seusyn a écrit:
Possibilité de m'archiver tout votre projet et de me l'envoyer en MP que je regarde tout ca avec précision ?

Car je détecte une chose bizarre dans les objets.

Juste pour être sûr de ne pas faire de boulette :
Tu veux donc que l'on t'envoie l'ensemble complet des fichiers de notre projet par mp ?

Posté par Seusyn le 12 Juil - 17:32 (2012)
Ouais tu archive directement tout le dossier de ton projet avec winrar.

Posté par Florent le 12 Juil - 17:40 (2012)
Seusyn a écrit:
Ouais tu archive directement tout le dossier de ton projet avec winrar.
D'accords, je suis en train d'uploader les fichiers, je t'envoie ça dès que c'est fait.

Merci encore d'être aussi motivé pour nous aider ^^.

Posté par Seusyn le 12 Juil - 20:58 (2012)
Bon j'ai en quelque sort corriger le blem mais impossible de l'utiliser ou de le donner...

Posté par gaalee89 le 12 Juil - 22:09 (2012)
Et bien, j'aimerais dire enfin et bravo pour ta persévérance, on compte sur toi Clin d'œil foireux On peut savoir comment ta fais ?

Posté par Pαlвσlѕку le 13 Juil - 00:08 (2012)
gaalee89 a écrit:
http://www.sendspace.com/file/y317w4 Le voici ! (Merci de nous aider !)

Je viens de regarder et j'ai trouvé d'où vient le problème.

Je ne sais pas comment vous avez fait mais vous avez supprimé tout les attributs (cf. la BDD) de chaque objet.
Sans ces attributs, le jeu ne sait pas où placer les objets dans le sac, donc forcément lorsque vous chercher l'objet dans le sac, vous ne trouvez pas l'objet.
C'est aussi pour cette même raison que vos objets sont inutilisables, qu'ils ne peuvent pas être donner, etc. ceci est aussi géré dans ces attributs.

Pour régler votre problème, vous devez remettre tout les attributs.

Si vous n'avez pas modifié les objets ou ajouté d'objet dans votre projet, il vous suffira juste de copier/coller le fichier Items.rxdata correspondant à la version de PSP que vous utilisez pour votre projet dans votre projet.

Posté par Seusyn le 13 Juil - 07:41 (2012)
Pαlвσlѕку a écrit:
gaalee89 a écrit:
http://www.sendspace.com/file/y317w4 Le voici ! (Merci de nous aider !)

Je viens de regarder et j'ai trouvé d'où vient le problème.

Je ne sais pas comment vous avez fait mais vous avez supprimé tout les attributs (cf. la BDD) de chaque objet.
Sans ces attributs, le jeu ne sait pas où placer les objets dans le sac, donc forcément lorsque vous chercher l'objet dans le sac, vous ne trouvez pas l'objet.
C'est aussi pour cette même raison que vos objets sont inutilisables, qu'ils ne peuvent pas être donner, etc. ceci est aussi géré dans ces attributs.

Pour régler votre problème, vous devez remettre tout les attributs.

Si vous n'avez pas modifié les objets ou ajouté d'objet dans votre projet, il vous suffira juste de copier/coller le fichier Items.rxdata correspondant à la version de PSP que vous utilisez pour votre projet dans votre projet.


Faut aussi remplace le fichier system.rxdata puisque c'est là que sont les attributs.