v21.1 Error Adjusting Pokémon Metrics

This thread pertains to v21.1 of Pokémon Essentials.

Noswad12

Rookie
Member
Joined
Oct 1, 2023
Posts
8
Age
20
If anyone could help me that would be amazing
I implemented gen 6-8 sprites into my game, and when I did all the sprites for every pokemon was adjusted and now all my pokemon sprites are floating in the sky. I have a pokemon metrics file of how they should be positioned, but whenever I try to auto set the sprites, this error pops up.

[Pokémon Essentials version 21.1]

Exception: TypeError
Message: 0 is not a symbol nor a string

Backtrace:
GameData:237:in `respond_to?'
GameData:237:in `get_property_for_PBS'
SpeciesMetrics:91:in `get_property_for_PBS'
Compiler_WritePBS:333:in `block (4 levels) in write_pokemon_metrics'
Compiler_WritePBS:331:in `each_key'
Compiler_WritePBS:331:in `block (3 levels) in write_pokemon_metrics'
GameData:125:in `block in each'
GameData:125:in `each_value'
GameData:125:in `each'
Compiler_WritePBS:310:in `block (2 levels) in write_pokemon_metrics'
 

Noswad12

Rookie
Member
Joined
Oct 1, 2023
Posts
8
Age
20
It would probably help if you shared the PBS, but why are you using the sprite positioner if you say you have the PBS for the metrics already? The point of the sprite positioner is to rewrite that PBS. (and it does so by putting every Pokemon on the ground, even Pokemon that are supposed to be flying)

(Also, you're missing the hotfixes)
The PBS file of pokemon metrics gets rewritten every time I try to auto-position the sprites and ends up just saying [BULBASAUR] and nothing else. Im not sure why the positions in the PBS file aren't showing up in the game even when I compile the PBS files with the correct positions.
Also, I just installed those hotfixes (I had hotfix 1.0.2, not 1.0.3) but the error still popped up.
 
Last edited:
The PBS file of pokemon metrics gets rewritten every time I try to auto-position the sprites
Right - like I said earlier, that's the whole point of the autopositioner.
and ends up just saying [BULBASAUR] and nothing else.
It seems like when the game is trying to get the name of a property in the PBS (like "Backsprite") but getting 0 for some reason instead. What changes have you made to the script so far?
Im not sure why the positions in the PBS file aren't showing up in the game even when I compile the PBS files with the correct positions.
You still haven't shown your PBS with the "correct positions", though, that's what I'm asking about.
Also, I just installed those hotfixes (I had hotfix 1.0.2, not 1.0.3) but the error still popped up.
I just mentioned it because your error message showed you didn't have them, not because I thought it'd be the solution. (There's no mention of this specific error in the changelog) Are you saying that you already had them when you got this error message, though? Because your error log should be showing the hotfixes version underneath [Pokémon Essentials version 21.1]. If it's not, it seems like you haven't installed it correctly.
 

Noswad12

Rookie
Member
Joined
Oct 1, 2023
Posts
8
Age
20
This is the PBS file I've been using, but even when it's compiled the sprites still are not in position. I hadn't made any changes to the PBS file before adding the new sprites, and then after the only "change" was moving this PBS file into the PBS file folder. I did have the hotfixes already when the error popped up, but it is very possible that I installed them incorrectly. I have installed the new hotfix file you sent correctly though, as it showed up in the plugins when I ran a playtest.
Also, I appreciate all the help and feedback you're giving, I'm very new to all of this and I appreciate the help
 

Attachments

  • pokemon_metrics.txt
    115.5 KB · Views: 42
Last edited:
This is the PBS file I've been using, but even when it's compiled the sprites still are not in position. I hadn't made any changes to the PBS file before adding the new sprites, and then after the only "change" was moving this PBS file into the PBS file folder. I did have the hotfixes already when the error popped up, but it is very possible that I installed them incorrectly. I have installed the new hotfix file you sent correctly though, as it showed up in the plugins when I ran a playtest.
Also, I appreciate all the help and feedback you're giving, I'm very new to all of this and I appreciate the help
Hm, it does look like that should be right. Are you sure you've compiled the PBS, and not just the plugins?

Since the old PBS data is written for when sprites are scaled up, and the Gen 8 pack uses a sprite scaler, the old PBS has its values effectively cut in half, which can make sprites look like they're in midair.
1697408686319.png
1697408729251.png

(Left is default Essentials' pokemon_metrics with the Gen 8 sprite wrapper, right is Gen 8 pack's pokemon_metrics)

If you didn't compile your PBS, then the game is looking at data files that were based on the old PBS files, even if the old PBS files have been replaced.
 

Noswad12

Rookie
Member
Joined
Oct 1, 2023
Posts
8
Age
20
Yeah I meant left, also sorry for the delayed responses I've been busy with school
Here's a screenshot of how I do a full compile of the files.
 

Attachments

  • Screenshot 2023-10-21 232159.png
    Screenshot 2023-10-21 232159.png
    58.9 KB · Views: 33
Ah, sorry, hadn’t realized this was marked read for me.

Your screencap shows that you’re compiling right, so if things still look like that screencap, then it seems like you must have the old PBS in the PBS folder. I know you sent the right PBS file earlier, can you send a screencap of what folder you’ve put it in?
 
Top