• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
Resource icon

Resource Badgecase 2022-11-12

LinKazamine

Champion
Member
Joined
May 24, 2023
Posts
674
If it still telling you about get_csv_record is because you haven't changed line 120 (where this code should appear) with the one I shared in my previous post and saved the changes.

This should be what you have from lines 119 to 122, with line 120 being the one with the selected text:
1696499037103.png
 

BubbleMage

Novice
Member
Joined
Dec 12, 2022
Posts
16
1696500242018.png

i did change it :(
If it still telling you about get_csv_record is because you haven't changed line 120 (where this code should appear) with the one I shared in my previous post and saved the changes.

This should be what you have from lines 119 to 122, with line 120 being the one with the selected text:
View attachment 21723
 

LinKazamine

Champion
Member
Joined
May 24, 2023
Posts
674
Well, I don't know why it isn't working for you. The only things that I can think of are that you are saving the changes on a copy of the plugin that isn't installed in your game or you aren't saving the changes.
Try opening the file in your game project again and search for get_csv_record to see if it appears elsewhere. If nothing of that works, maybe try recompiling the game.
 

BubbleMage

Novice
Member
Joined
Dec 12, 2022
Posts
16
Well, I don't know why it isn't working for you. The only things that I can think of are that you are saving the changes on a copy of the plugin that isn't installed in your game or you aren't saving the changes.
Try opening the file in your game project again and search for get_csv_record to see if it appears elsewhere. If nothing of that works, maybe try recompiling the game.
alright reinstalled the entire script again, did what you told me and now it works, but i get a different error hahahaha

1696502097419.png
 

LinKazamine

Champion
Member
Joined
May 24, 2023
Posts
674
I don't know about this error. I didn't get it at all.

Are you trying to start a new game or loading an old one? Maybe you need to start a new game and that's why I didn't get the error, since I don't have a save file.
 

wrigty12

Tester-Coder Hybrid
Member
Joined
Jul 24, 2022
Posts
547
I like the new badge info page, definitely fits more with the base essentials style of things. The more Black/White looking info page looked good too, though. Have you thought about offering both, but letting the developer decide which style to use?
 

Hipi

Rookie
Member
Joined
Jun 29, 2023
Posts
4
Hi, thanks for your work. I have a problem, I don't know why but the icon sprites of the ace Pokémon of the gym leaders appears in their shiny form (i'm in v20.1):
1697053363365.png
 

blooeysnake

Novice
Member
Joined
Jan 22, 2023
Posts
28
That is why I said I had to change a line for it to work in 20.1 since this plugin is now for 21.1.

If you want this to work on 20.1, you have to change line 120 in Badgecase_PBS back to value = Compiler.pbGetCsvRecord(contents[key], key, schema[key]) (that is what was changed to get_csv_record in 21.1[/ICODE]).

Additionally, you will have to search for all the :left, :right and :center in the plugins (I think it's only on Badgecase_UI) and change them to 0, 1 and 2 respectively (or you could add left = 0, right = 1 and center = 2 and simply delete the ":" on the text position. If you don't, the text position on the badge page (the one with info of the badge) will be off.

Something like that (it doesn't show all the cases where you will have to change it):
View attachment 21719
Hey sorry, I am a bit confused on what you meant by replacing all of the lefts rights and centers with 0 1 and 2, what part am I meant to replace, like the words with the number or something else?
 

LinKazamine

Champion
Member
Joined
May 24, 2023
Posts
674
This is only if you want to use the update on v20.1 of Pokemon Essentials. The thing is, the text that appears on the badge info uses the codes ":left", ":right" and ":center" to place the text on the screen, as you can see here:
1698157946043.png

Those codes don't exist in v20.1 (in the sense that the game will not know how to translate them to a position and will default them all to the left).
So you have to search for those codes in the plugin and change them for 0, 1 and 2 respectively or delete the : in front of the codes and create the three variables right above so the game can place the text where it should.

A second solution can be replacing the def pbDrawTextPositions(bitmap, textpos) in DrawText with this:
Ruby:
Expand Collapse Copy
def pbDrawTextPositions(bitmap, textpos)
  textpos.each do |i|
    textsize = bitmap.text_size(i[0])
    x = i[1]
    y = i[2]
    case i[3]
    when :right, true, 1   # right align
      x -= textsize.width
    when :center, 2 # centered
      x -= (textsize.width / 2)
    end
    i[6] = :none if !i[5]   # No shadow color given, draw plain text
    case i[6]
    when :outline, true, 1   # outline text
      pbDrawOutlineText(bitmap, x, y, textsize.width, textsize.height, i[0], i[4], i[5])
    when :none
      pbDrawPlainText(bitmap, x, y, textsize.width, textsize.height, i[0], i[4])
    else
      pbDrawShadowText(bitmap, x, y, textsize.width, textsize.height, i[0], i[4], i[5])
    end
  end
end
This way, the program will know what to do when they find a ":right", or ":center".
 

blooeysnake

Novice
Member
Joined
Jan 22, 2023
Posts
28
This is only if you want to use the update on v20.1 of Pokemon Essentials. The thing is, the text that appears on the badge info uses the codes ":left", ":right" and ":center" to place the text on the screen, as you can see here:
View attachment 22210
Those codes don't exist in v20.1 (in the sense that the game will not know how to translate them to a position and will default them all to the left).
So you have to search for those codes in the plugin and change them for 0, 1 and 2 respectively or delete the : in front of the codes and create the three variables right above so the game can place the text where it should.

A second solution can be replacing the def pbDrawTextPositions(bitmap, textpos) in DrawText with this:
Ruby:
Expand Collapse Copy
def pbDrawTextPositions(bitmap, textpos)
  textpos.each do |i|
    textsize = bitmap.text_size(i[0])
    x = i[1]
    y = i[2]
    case i[3]
    when :right, true, 1   # right align
      x -= textsize.width
    when :center, 2 # centered
      x -= (textsize.width / 2)
    end
    i[6] = :none if !i[5]   # No shadow color given, draw plain text
    case i[6]
    when :outline, true, 1   # outline text
      pbDrawOutlineText(bitmap, x, y, textsize.width, textsize.height, i[0], i[4], i[5])
    when :none
      pbDrawPlainText(bitmap, x, y, textsize.width, textsize.height, i[0], i[4])
    else
      pbDrawShadowText(bitmap, x, y, textsize.width, textsize.height, i[0], i[4], i[5])
    end
  end
end
This way, the program will know what to do when they find a ":right", or ":center".
Alright thank you! (I am using 20.1)
 

LinKazamine

Champion
Member
Joined
May 24, 2023
Posts
674
Hi. ¿Annyone knows how to add the entry for the Badge Case in 20.1 Voltseon's Pause Menu? Since it has removed the 005 Menu Entries, you have to modify the UI_PauseMenu, but I'm getting a little bit struggled.

(Using 20.1)
Voltseon's Pause Menu uses the default menu handler.
 

fncjinta

Novice
Member
Joined
Sep 30, 2023
Posts
24
1701637949912.png
Hello, I am having this problem (v20), the default medals appear and not the ones I insert in "badged.txt" I get this error when I enter debug mode "update pbs from module"
 

komeiji514

Elite Trainer
Member
Joined
Oct 28, 2023
Posts
272
How can I change the fonts of texts in the badge screen and make the Pokémon name displayed as its translated name, for I am using this plugin in other languages?
 

ChampChar110

Trainer
Member
Joined
Oct 2, 2022
Posts
85
Hello, I am having this problem (v20), the default medals appear and not the ones I insert in "badged.txt" I get this error when I enter debug mode "update pbs from module"
Have you compiled the new badges.txt file? You can do it by starting a new save.
Also, if you don't have the Ruby file with the badges, you shouldn't use this function (it was made so it would be easier for you to create the badges.txt file when moving from version 1 to version 2, when I changed the badges file to text instead of Ruby).

How can I change the fonts of texts in the badge screen and make the Pokémon name displayed as its translated name, for I am using this plugin in other languages?
Honestly, I'm not sure. It should be the same way that you changed every other script, add your changes to Badgecase_UI.rb

I getting this error when i try to open the badge menu.
It says that you don't have BadgeCase_Scene class, which is the most important class for the UI.
Have you touched the code? You might accidentally delete a letter and that might be a problem.
Do you have the plugin installed? It looks like you don't have Badgecase_UI.rb.
 

komeiji514

Elite Trainer
Member
Joined
Oct 28, 2023
Posts
272
Have you compiled the new badges.txt file? You can do it by starting a new save.
Also, if you don't have the Ruby file with the badges, you shouldn't use this function (it was made so it would be easier for you to create the badges.txt file when moving from version 1 to version 2, when I changed the badges file to text instead of Ruby).


Honestly, I'm not sure. It should be the same way that you changed every other script, add your changes to Badgecase_UI.rb


It says that you don't have BadgeCase_Scene class, which is the most important class for the UI.
Have you touched the code? You might accidentally delete a letter and that might be a problem.
Do you have the plugin installed? It looks like you don't have Badgecase_UI.rb.
The fonts of your badge case are different from the base game and other plugins. (The latter picture is also a plugin)
I don't know how you achieved it as other plugins simply follow the same font as the base game.
 

Attachments

  • 屏幕截图 2023-12-24 100511.png
    屏幕截图 2023-12-24 100511.png
    37.2 KB · Views: 36
  • 屏幕截图 2023-12-24 100544.png
    屏幕截图 2023-12-24 100544.png
    25.3 KB · Views: 33
Back
Top