Pokémon Essentials All questions and discussion about Pokémon Essentials, the Pokémon game kit for RPG Maker XP, go in here. Also contains links to the latest downloads and the Essentials Wiki.

Reply
 
Thread Tools
  #1    
Old August 5th, 2013 (1:05 AM).
Kaito123 Kaito123 is offline
     
    Join Date: Jul 2012
    Gender: Male
    Posts: 61
    Hello, I want to modifed the Pokemon Bag, an I have some questions:

    How I can put in the two red circles in my picture the Item Name and the quantity?
    Attached Thumbnails
    Bildschirmfoto 2013-08-05 um 10.25.04.png‎  
    Reply With Quote

    Relevant Advertising!

      #2    
    Old August 5th, 2013 (11:41 PM). Edited August 5th, 2013 by dexter1o6.
    dexter1o6 dexter1o6 is offline
       
      Join Date: Jul 2013
      Age: 29
      Gender: Male
      Posts: 64
      To place square like that, I would suggest looking at how other squares are placed. For example, in the folder 'graphics' under 'pictures' you find 'bagSel.png'. This is the kind of square you're looking for, right? See how it is used, and try to copy that.

      Ps. I have no experience with this thing at all (so I'm like a Ralts without Confusion, just growling about...)

      EDIT: Oh wait, I think I misunderstood your question. You want information in those circle-thingies. Uhm. I can see that there is information displayed. Maybe try to find out how that is displayed, then copy the code for that, and display the name and quantity instead. The name is (I think) already a string (text-variable), so you can just display it. As for the quantity, that will probably be an integer (number-variable). You may have to cast it (but I don't know how that works in Ruby).
      Reply With Quote
        #3    
      Old August 6th, 2013 (2:42 AM).
      Maruno's Avatar
      Maruno Maruno is offline
      Lead Dev of Pokémon Essentials
         
        Join Date: Jan 2008
        Location: England
        Posts: 5,171
        dexter's advice is basically correct. You want to add some text to your screen. Is there an existing example of text being on the screen? The item description, you say? How does that work? Can you copy it?
        __________________
        Go to the Pokémon Essentials Wiki

        | Downloads | Tutorials | Fangames |
        | All Animations Project |

        Follow me on Twitter: @maruno42


        Reply With Quote
          #4    
        Old August 6th, 2013 (3:23 AM).
        Kaito123 Kaito123 is offline
           
          Join Date: Jul 2012
          Gender: Male
          Posts: 61
          it must be that:

          Code:
          @sprites["itemtextwindow"].text=(itemwindow.item==0) ? _INTL("Close bag.") : 
                 pbGetMessage(MessageTypes::ItemDescriptions,itemwindow.item)

          or is that not the right?
          Reply With Quote
            #5    
          Old August 6th, 2013 (4:58 AM).
          Maruno's Avatar
          Maruno Maruno is offline
          Lead Dev of Pokémon Essentials
             
            Join Date: Jan 2008
            Location: England
            Posts: 5,171
            That's the part that updates the description text when you change which item you're looking at. However, that's just half of it. The other half is creating the window to put the text in (the window is called @sprites["itemtextwindow"]). You'll need to create two more windows, one for the item's name and one for the quantity.

            Here's how the item description's window is created:

            Code:
                @sprites["itemtextwindow"]=Window_UnformattedTextPokemon.new("")
                @sprites["itemtextwindow"].x=72
                @sprites["itemtextwindow"].y=270
                @sprites["itemtextwindow"].width=Graphics.width-72
                @sprites["itemtextwindow"].height=128
                @sprites["itemtextwindow"].baseColor=ITEMTEXTBASECOLOR
                @sprites["itemtextwindow"].shadowColor=ITEMTEXTSHADOWCOLOR
                @sprites["itemtextwindow"].visible=true
                @sprites["itemtextwindow"].[email protected]
                @sprites["itemtextwindow"].windowskin=nil
            Just copy-paste, really (both the code above and the update part).
            __________________
            Go to the Pokémon Essentials Wiki

            | Downloads | Tutorials | Fangames |
            | All Animations Project |

            Follow me on Twitter: @maruno42


            Reply With Quote
              #6    
            Old August 6th, 2013 (5:15 AM).
            Kaito123 Kaito123 is offline
               
              Join Date: Jul 2012
              Gender: Male
              Posts: 61
              thanks :D
              but how I call the quantity and the name with the script ?
              Reply With Quote
                #7    
              Old August 6th, 2013 (5:17 AM).
              Maruno's Avatar
              Maruno Maruno is offline
              Lead Dev of Pokémon Essentials
                 
                Join Date: Jan 2008
                Location: England
                Posts: 5,171
                The name and the quantity both (used to) appear in the list of items. Both these properties are also used in many other scripts. Is it so difficult for you to do some research of your own?
                __________________
                Go to the Pokémon Essentials Wiki

                | Downloads | Tutorials | Fangames |
                | All Animations Project |

                Follow me on Twitter: @maruno42


                Reply With Quote
                  #8    
                Old August 12th, 2013 (12:41 AM).
                Kaito123 Kaito123 is offline
                   
                  Join Date: Jul 2012
                  Gender: Male
                  Posts: 61
                  sry, but I don't know how I to do this

                  i have try this:

                  Code:
                  @sprites["itemnamewindow"].text=(itemwindow.item==0) ? _INTL("Close bag.") : 
                                pbGetMessage(MessageTypes::Itemname,itemwindow.item)

                  and how I do this with the quantity?


                  Edit: I really don't know, how I can do it at this Way...... Because what i should write instead of "ItemDescriptions".......
                  Reply With Quote
                  Reply
                  Quick Reply

                  Sponsored Links
                  Thread Tools

                  Posting Rules
                  You may not post new threads
                  You may not post replies
                  You may not post attachments
                  You may not edit your posts

                  BB code is On
                  Smilies are On
                  [IMG] code is On
                  HTML code is Off

                  Forum Jump


                  All times are GMT -8. The time now is 4:22 AM.