• 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.

[PBS Question] Items Problem

62
Posts
5
Years
HI
I've got a problem about items, when i try to use a potion I can't find any "use" option (only Give, Toss and Mistery Gift)
What do I do?
 
1,680
Posts
8
Years
  • Age 24
  • Seen yesterday
Well, it's hard to guess the problem without the pbs entry itself, but let's give it a shot.

so the default potion entry is this
Code:
217,POTION,Potion,Potions,2,300,"A spray-type medicine for wounds. It restores the HP of one Pokémon by just 20 points.",1,1,0,
See that 1,1,0 at the end. That's the Usability outside of battle, Usability in battle, Special items definitions.
So, 1,1,0 means that it can be used on a pokemon and is consumed, it can also be used in battle and consumed, and it's not a special type of item.

Finally, here's a link to the Wiki for defining Items.
 

Lord X-Giga-X

Sardonyx's Evil Dev
42
Posts
5
Years
  • Age 32
  • Seen Apr 4, 2022
The fact that you translated its internal name (the name in all caps) is actually the reason this is happening. By default, Essentials is scripted to link item effects with their internal names (English by default). By changing its internal name, not only does it not have any item to associate the effect to, but it also doesn't recognize the item as having an effect at all due to one not being defined within the script itself.

There are three ways I can think of to get around this: 1. translate the internal name of the item to match the translation in the PBS file in the script section PItem_ItemEffects; 2. use the item handler's copy call within the same section to copy Potion's effect to Pozione (multiple examples can be found within the section for reference); or 3. keep the internal names for Essentials' default items English. Unless you're willing to do a lot of work for 1 or 2, I would highly recommend 3 as that will ultimately not affect anything displayed within the game itself as the internal name does not actually appear ingame.
 
Last edited:

Lord X-Giga-X

Sardonyx's Evil Dev
42
Posts
5
Years
  • Age 32
  • Seen Apr 4, 2022
Well I'm glad that worked out, although you probably should have gone back to leaving the internal names as English. While I did offer that as a solution, I did hint to a lot of work for it. The thing about the internal names for items that I neglected to go into full on is that they're referenced within multiple sections of scripts and other PBS files, and a lot of the specific coding around them rely on something being defined for it... or else in certain instances, you'll end up crashing the game. Now you could just find ever instance of POTION in the script and PBS files and change them to POZIONE... but there's a lot of instance of it. And you will have to do the same for every internal name you end up translating.

I can understand if it's because English isn't your native language, and it'll be weird getting used to using the English internal names. But leaving them as such will save you a lot of time in the long run. Of course, if you still want to go the translating route, then I won't stop you. Just be prepared to use CTRL+F a lot.
 
Last edited:
Back
Top