• 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

ChampChar110

Trainer
Member
Joined
Oct 2, 2022
Posts
85
roei110 submitted a new resource:

Badgecase - Badgecase UI

Are you tired of the old fashion badge case inside your trainer card? This plugin is for you!

Features:
  • New and better-looking UI for badges: Leader name and sprite, location, main type, ace Pokemon.
  • New method for getting a badge that uses the UI to show the badge after receiving it (same as catching a new Pokemon)
Installation:
  • Download the zip file from the link above...

Read more about this resource...
 

Richard PT

Cooltrainer
Member
Joined
Oct 26, 2018
Posts
127
How to i set this via events, call script? I want to test this but i'm getting a hard time, because i don't know how to trigger the UI when i receive a badge.
 

wrigty12

Tester-Coder Hybrid
Member
Joined
Jul 24, 2022
Posts
547
How do I set this up for Voltseon's Pause Menu?
In 005_VoltseonMenu_Entries, add this somewhere:
Ruby:
Expand Collapse Copy
#-------------------------------------------------------------------------------
# Entry for Badge Case
#-------------------------------------------------------------------------------
class MenuEntryBadgeCase < MenuEntry
  def initialize
    @icon = "menuBadgeCase"
    @name = "Badge Case"
  end

  def selected(menu)
    pbFadeOutIn(99999) {
      scene = BadgeCase_Scene.new
      screen = BadgeCaseScreen.new(scene)
      screen.pbStartScreen
      menu.pbRefresh
    }
  end

  def selectable?; return true; end
end

In 001_VoltseonMenu_Config, in MENU_ENTRIES array, add "MenuEntryBadgeCase" to the list, where you want it.

How to i set this via events, call script? I want to test this but i'm getting a hard time, because i don't know how to trigger the UI when i receive a badge.
I think you're looking for the script call:
Ruby:
Expand Collapse Copy
pbGetBadge(badgeindex)
 

llk

Novice
Member
Joined
Oct 4, 2022
Posts
14
I'm sorry to bother you,but when I use this in Voltseon's Pause Menu,I got an error.
[Pokémon Essentials version 20.1]
[v20.1 Hotfixes 1.0.4]

Exception: NameError
Message: uninitialized constant BadgeCase_Scene::ScrollingSprite

Backtrace:
[BadgeCase] UI.rb:18:in `pbStartScene'
[BadgeCase] UI.rb:144:in `pbStartScreen'
[Voltseon's Pause Menu] 005_VoltseonMenu_Entries.rb:311:in `block in selected'
002_MessageConfig.rb:570:in `pbFadeOutIn'
[Voltseon's Pause Menu] 005_VoltseonMenu_Entries.rb:308:in `selected'
[Voltseon's Pause Menu] 003_VoltseonMenu_Menu.rb:58:in `update'
[Voltseon's Pause Menu] 002_VoltseonMenu_Main.rb:219:in `block in update'
[Voltseon's Pause Menu] 002_VoltseonMenu_Main.rb:215:in `loop'
[Voltseon's Pause Menu] 002_VoltseonMenu_Main.rb:215:in `update'
[Voltseon's Pause Menu] 002_VoltseonMenu_Main.rb:307:in `pbStartPokemonMenu'
 

ChampChar110

Trainer
Member
Joined
Oct 2, 2022
Posts
85
I'm sorry to bother you,but when I use this in Voltseon's Pause Menu,I got an error.
[Pokémon Essentials version 20.1]
[v20.1 Hotfixes 1.0.4]

Exception: NameError
Message: uninitialized constant BadgeCase_Scene::ScrollingSprite

Backtrace:
[BadgeCase] UI.rb:18:in `pbStartScene'
[BadgeCase] UI.rb:144:in `pbStartScreen'
[Voltseon's Pause Menu] 005_VoltseonMenu_Entries.rb:311:in `block in selected'
002_MessageConfig.rb:570:in `pbFadeOutIn'
[Voltseon's Pause Menu] 005_VoltseonMenu_Entries.rb:308:in `selected'
[Voltseon's Pause Menu] 003_VoltseonMenu_Menu.rb:58:in `update'
[Voltseon's Pause Menu] 002_VoltseonMenu_Main.rb:219:in `block in update'
[Voltseon's Pause Menu] 002_VoltseonMenu_Main.rb:215:in `loop'
[Voltseon's Pause Menu] 002_VoltseonMenu_Main.rb:215:in `update'
[Voltseon's Pause Menu] 002_VoltseonMenu_Main.rb:307:in `pbStartPokemonMenu'
ScrollingSprite is defined on Luka's Scripting Utilities, you can find all of his resources on this link (Including Luka's Scripting Utilities).
Forgot to add this as a dependency.
 

llk

Novice
Member
Joined
Oct 4, 2022
Posts
14
ScrollingSprite is defined on Luka's Scripting Utilities, you can find all of his resources on this link (Including Luka's Scripting Utilities).
Forgot to add this as a dependency.
Oh ,I solve it,thank you.
 

ardicoozer

Cooltrainer
Member
Joined
Sep 29, 2020
Posts
173
ScrollingSprite is defined on Luka's Scripting Utilities, you can find all of his resources on this link (Including Luka's Scripting Utilities).
Forgot to add this as a dependency.
so...I've to download Luka Utilities first before using these plugins?
 

wrigty12

Tester-Coder Hybrid
Member
Joined
Jul 24, 2022
Posts
547
Suggestion:
When you run drawPage, it makes the background stutter as it's resetting back to an x of 0. For a smoother transition, I added
Ruby:
Expand Collapse Copy
oldX = @sprites["background"].src_rect.x
to the beginning of drawPage, then at the end of drawPage, I added
Ruby:
Expand Collapse Copy
@sprites["background"].src_rect.x = oldX

It makes it look a lot better when going through the badges, in my opinion.
 

Richard PT

Cooltrainer
Member
Joined
Oct 26, 2018
Posts
127
The script works through the Voltseons pause menu, but i think that there's a bug or two:

1- If you don't have any badge, when you access the badge scene, in the "grey page" where the badges goes so we can select them, we can select and see its "contents".

2- After what i said in 1, All the text are in ??? but the location text not, but i think that it should also be ???.

By the way, can we repeat the badges names? And can a badge name have - , for ex: coral-eye badge.

Another thing, before this last update of yours, i can use a script call without problem, but now it gave me a name error, which i don't know if its related to the badges names, here the error.

error.png
 

VoxITH

Trainer
Member
Joined
Dec 22, 2021
Posts
92
[Pokémon Essentials version 20.1]
[v20.1 Hotfixes 1.0.4]

Exception: NoMethodError
Message: undefined method `menuLastChoice' for nil:NilClass

Backtrace:
[Modular Menu] Script.rb:117:in `pbStartScene'
[Modular Menu] Script.rb:341:in `pbStartPokemonMenu'
032:Scene_Map:103:in `call_menu'
032:Scene_Map:203:in `update'
386:Day clock:256:in `update'
[v20.1 Hotfixes] Overworld bug fixes.rb:28:in `block in main'
[v20.1 Hotfixes] Overworld bug fixes.rb:25:in `loop'
[v20.1 Hotfixes] Overworld bug fixes.rb:25:in `main'
388:Main:35:in `mainFunctionDebug'
388:Main:18:in `block in mainFunction'

How can i fix this?
 

ChampChar110

Trainer
Member
Joined
Oct 2, 2022
Posts
85
The script works through the Voltseons pause menu, but i think that there's a bug or two:

1- If you don't have any badge, when you access the badge scene, in the "grey page" where the badges goes so we can select them, we can select and see its "contents".

2- After what i said in 1, All the text are in ??? but the location text not, but i think that it should also be ???.

By the way, can we repeat the badges names? And can a badge name have - , for ex: coral-eye badge.

Another thing, before this last update of yours, i can use a script call without problem, but now it gave me a name error, which i don't know if its related to the badges names, here the error.

View attachment 13024
1 - That's right, for now. Maybe next update I'll change it.
2 - Changed (download again and check config code)
3 - I guess so. I haven't added any kind of duplicate-removal. The name is only a string, it can be anything.
4 - Fixed (download again)

[Pokémon Essentials version 20.1]
[v20.1 Hotfixes 1.0.4]

Exception: NoMethodError
Message: undefined method `menuLastChoice' for nil:NilClass

Backtrace:
[Modular Menu] Script.rb:117:in `pbStartScene'
[Modular Menu] Script.rb:341:in `pbStartPokemonMenu'
032:Scene_Map:103:in `call_menu'
032:Scene_Map:203:in `update'
386:Day clock:256:in `update'
[v20.1 Hotfixes] Overworld bug fixes.rb:28:in `block in main'
[v20.1 Hotfixes] Overworld bug fixes.rb:25:in `loop'
[v20.1 Hotfixes] Overworld bug fixes.rb:25:in `main'
388:Main:35:in `mainFunctionDebug'
388:Main:18:in `block in mainFunction'

How can i fix this?
First, the problem is with the modular menu script.
The solution is to change every "menuLastChoice" to "$game_temp.menu_last_choice" because they changed it on the last Pokemon essentials version.
 

VoxITH

Trainer
Member
Joined
Dec 22, 2021
Posts
92
1 - That's right, for now. Maybe next update I'll change it.
2 - Changed (download again and check config code)
3 - I guess so. I haven't added any kind of duplicate-removal. The name is only a string, it can be anything.
4 - Fixed (download again)


First, the problem is with the modular menu script.
The solution is to change every "menuLastChoice" to "$game_temp.menu_last_choice" because they changed it on the last Pokemon essentials version.
Ok solved thanks.

I have a question...
How can i make it compatible with 96x96 sprites?
 

Attachments

  • Immagine 2022-10-09 125208.png
    Immagine 2022-10-09 125208.png
    24 KB · Views: 141

ChampChar110

Trainer
Member
Joined
Oct 2, 2022
Posts
85
Ok solved thanks.

I have a question...
How can i make it compatible with 96x96 sprites?
Find on Plugins/Badge Case/UI this line (should be line 175):
@sprites["acepokemon"].setBitmap("Graphics/Pokemon/Front/#{$player.badges[@badgeindex]? Badgecase::BADGES[@badgeindex][4].upcase : "000"}")

Add the following lines right after:
Added Lines:
Expand Collapse Copy
@sprites["acepokemon"].zoom_x = 80 / @sprites["acepokemon"].src_rect.width.to_f
@sprites["acepokemon"].zoom_y = @sprites["acepokemon"].zoom_x
 

Richard PT

Cooltrainer
Member
Joined
Oct 26, 2018
Posts
127
Hello again. I still have some issues with the plugin, but let me post here the results of my test.

1- The first badge case, is the thing i've said in my earlier post, where we can select a "badge" to see its info, even if we don't have any. My suggestion is this, you can put a ? icon in each badge, before the player "unlocks" the info for it, the player will knows that it is supposed to "unlock" the ? for a badge info and at the same time he will knows that he can obtain a certain amount of badges in the game, or to make them unaccessible until the player receives a badge. I prefer my first suggestion, but the plugin is yours, so you will decide. I know that you intend to solve that part, like you've said but i put here my suggestions in case you need enlightment.

2- The location thing is now fixed if we turn that new option "location show always" false. But, if you look into the picture, show you do the same for the badge names? The red part in the pic.

3- If i use this in an event call: pbGetBadge(7), the game gave me an error and if i call: $player.badges[7], nothing happens.
So, should i use the first script call or the second in the future?
 

Attachments

  • pic.png
    pic.png
    28 KB · Views: 147
  • error.png
    error.png
    15 KB · Views: 147

ChampChar110

Trainer
Member
Joined
Oct 2, 2022
Posts
85
Hello again. I still have some issues with the plugin, but let me post here the results of my test.

1- The first badge case, is the thing i've said in my earlier post, where we can select a "badge" to see its info, even if we don't have any. My suggestion is this, you can put a ? icon in each badge, before the player "unlocks" the info for it, the player will knows that it is supposed to "unlock" the ? for a badge info and at the same time he will knows that he can obtain a certain amount of badges in the game, or to make them unaccessible until the player receives a badge. I prefer my first suggestion, but the plugin is yours, so you will decide. I know that you intend to solve that part, like you've said but i put here my suggestions in case you need enlightment.

2- The location thing is now fixed if we turn that new option "location show always" false. But, if you look into the picture, show you do the same for the badge names? The red part in the pic.

3- If i use this in an event call: pbGetBadge(7), the game gave me an error and if i call: $player.badges[7], nothing happens.
So, should i use the first script call or the second in the future?
Updated!
1 - Changed as you suggested
2 - Added BADGE_NAME_ALWAYS
3 - Fixed
 
Back
Top