• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Pokemon Bag

68
Posts
11
Years
  • Seen Nov 12, 2023
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?
 
64
Posts
10
Years
  • Age 36
  • Seen May 29, 2020
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).
 
Last edited:

Maruno

Lead Dev of Pokémon Essentials
5,285
Posts
16
Years
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?
 
68
Posts
11
Years
  • Seen Nov 12, 2023
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?
 

Maruno

Lead Dev of Pokémon Essentials
5,285
Posts
16
Years
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"].viewport=@viewport
    @sprites["itemtextwindow"].windowskin=nil
Just copy-paste, really (both the code above and the update part).
 
68
Posts
11
Years
  • Seen Nov 12, 2023
thanks :D
but how I call the quantity and the name with the script ?
 

Maruno

Lead Dev of Pokémon Essentials
5,285
Posts
16
Years
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?
 
68
Posts
11
Years
  • Seen Nov 12, 2023
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".......
 
Back
Top