It already works like that, and your code makes the quantity never appear.
pbIsImportantItem? returns TRUE if the item in question is a Key Item, a HM, or an infinite TM. These are all items that the player should only have 1 of, and so they won't have a quantity. If it's not an important item, then it should.
Your code effectively says "if the item isn't a Key Item and also is a Key Item, then blah blah", which is a logical impossibility.
You might not have defined your Key Items as Key Items, which is why the quantity is showing up for you. This property no longer depends on which pocket the item is in (as of the latest version), and instead is defined in the "Special items" field in items.txt. Berries are also defined this way now as well.
The reason for this change is to make nothing depend on the pocket an item is in, which then allows people to easily edit the pockets. This is now as simple as changing two arrays in the script section Settings.[/QUOTE]
I know it makes it so it will now display the quantity, but the key item quantity was being displayed. I have not checked pbIsImportantItem?, because I just looked through the Pokemonbag and seen why it was being displayed, and the reason why the quantity of the keyitems was being displayed is because of:
So I changed it:
pbIsImportantItem? returns TRUE if the item in question is a Key Item, a HM, or an infinite TM. These are all items that the player should only have 1 of, and so they won't have a quantity. If it's not an important item, then it should.
Your code effectively says "if the item isn't a Key Item and also is a Key Item, then blah blah", which is a logical impossibility.
You might not have defined your Key Items as Key Items, which is why the quantity is showing up for you. This property no longer depends on which pocket the item is in (as of the latest version), and instead is defined in the "Special items" field in items.txt. Berries are also defined this way now as well.
The reason for this change is to make nothing depend on the pocket an item is in, which then allows people to easily edit the pockets. This is now as simple as changing two arrays in the script section Settings.[/QUOTE]
I know it makes it so it will now display the quantity, but the key item quantity was being displayed. I have not checked pbIsImportantItem?, because I just looked through the Pokemonbag and seen why it was being displayed, and the reason why the quantity of the keyitems was being displayed is because of:
Code:
def pbIsImportantItem?(item)
return $ItemData[item] && (pbIsKeyItem?(item) || pbIsHiddenMachine?(item) ||
(INFINITETMS && pbIsTechnicalMachine?(item))
)
end
So I changed it:
Code:
def pbIsImportantItem?(item)
return $ItemData[item] && (pbIsKeyItem?(item) || pbIsHiddenMachine?(item) ||
(INFINITETMS && pbIsTechnicalMachine?(item)) ||
(INFINITETMS && pbIsKeyItem?(item))
)
end