- Pokémon Essentials Version
- v21.1 ✅
Remember the Medal Rally from Black and White 2? It's back! In plugin form!
Being one of my favorite things from Black and White 2 (And still being salty I was never able to 100% it), I decided to re implement the medal system for anyone who wants to add this collectibles that work as achievements as well, for a bit of flavor to your game.
Installation:
Simply extract on your game's main folder and compile. Since it adds a few global variables a new game is required for it to properly define and load them... and if it's going to be your main achievement system, you might want to do that anyways.
Once installed, you can start creating your medals right away.
Defining a medal:
In order to define your medals you only need 2 things. The data on the PBS and a graphic for it.
There are a few medals already pre-defined for you, so feel free to use them or edit them or straight up delete them as needed.
Examples:
Here's what each part of a medal's PBS does.
As a base the plugin includes some graphics, some official, some edited/custom made by me. Feel free to use them to suit your needs.
If you need the rest of the official sprites you can find them on different places, like Spriter's Resource: Link here to the rip by redblueyellow.
With that, your medal is ready and has everything required.
Manipulating Medals.
The process of wich a player gains medals is mainly done with these 2 scripts:
Since this plugin was built with the Medal system of BW in mind, theres an important distinction of EARNING a medal (With pbEarnMedal) and RECEIVING a medal (pbReceiveMedal).
Earning a medal: The medal's ID is stored on the global variable
Receiving a medal: Received medals are stored on
Important: The "conditions" parameter of medals on their PBS only affects their detail text and their icon on the UIs, but DOES NOT PREVENT the player for earning or receiving the medal. It's literally just for hiding spoilers or info on it's description and thats it. Making the player earn or receive a medal even if it's defined conditions are not met will stop nothing. A received medal will be properly displayed even if it's still considered "locked"
Here are some other methods if you are interested:
And heres how you could put them to use.
Now let's talk a bit about the medal UI.
Medal states on the box UI:
Usage:
Accessing the UI
Depends on where you want to access it, you just need to do a simple call for the scene.
Here's an example for adding it to the menu.
With nothing else needed to add, I hope the medals are of your liking and you can give a good use to this system for the futures
Being one of my favorite things from Black and White 2 (And still being salty I was never able to 100% it), I decided to re implement the medal system for anyone who wants to add this collectibles that work as achievements as well, for a bit of flavor to your game.
Installation:
Simply extract on your game's main folder and compile. Since it adds a few global variables a new game is required for it to properly define and load them... and if it's going to be your main achievement system, you might want to do that anyways.
Once installed, you can start creating your medals right away.
Defining a medal:
In order to define your medals you only need 2 things. The data on the PBS and a graphic for it.
There are a few medals already pre-defined for you, so feel free to use them or edit them or straight up delete them as needed.
Examples:
Code:
#-----------------------------------
[ELEMENTALIST]
Name = Elementalist
Icon = ELEMENTALIST
Description = A Medal awarded for catching at least 1 Water, Grass and Fire type Pokemon. A balanced Trainer is a strong Trainer!
Tip = Catch 1 pokemon of the 3 starter types.
#-----------------------------------
[OHKRAB]
Name = Oh Krab!
Icon = OHKRAB
Rarity = Legendary
Description = A Medal awarded for catching a the legendary Krabby. Such power in such crustacean form!
Tip = Seek out and catch the all mighty Krabby.
Tiplocked = Caught the mighty crustacean... but where?
Condition = Caught,KRABBY,Caught,KINGLER
Conditionreq = Any
#-----------------------------------
[UNUNUNUN]
Name = Un Un Un Un
Icon = UNUNUNUN
Rarity = Legendary
Description = A medal given to those who unraveled the mistery of the misterius caves and awoken the Regis.
Tip = Find the cave... there... they lay...
Tiplocked = ...--Re-ica-t-...W-il--d...
Condition = Caught,RELICANTH,Caught,WAILORD
Conditionreq = All
#-----------------------------------
[GLORIOUSEVOLUTION]
Name = Glorious Evolution
Icon = NEWBUDDY
Description = A Medal awarded for evolving your first Pokemon. Witnessing growth is a rewarding experience.
Tip = Make one of your Pokemon advance to their next stage.
Here's what each part of a medal's PBS does.
-
- ID = Self explanatory. The internal name of the medal and how you are going to be using them on scripts.
- Name = The name the players will see while receiving it and on the Medal Box UI.
- Icon = The name of the PNG file located in Graphics/UI/Medal Box/Medals that corresponds to that Medal once it has been received. Since the original medal box ocationally uses the same graphic for 2 different medals, I made it this flexible so you can share the same medal graphic for multiple medals if you want.
- Rarity = (Optional) Allows you to define the rarity of a medal. As a base, only the "Legendary" rarity exist, that has a different behavior while seeing a medal's details, but feel free to add and use more as you need.
- Description = The flavor text of the medal that can be seen once it's received. Use it to say how the player got it or what did they do to gain it.
- Tip = The text that will be display instead of the description if the medal hasn't been received. You can use it to hint the player what they can do to receive the medal.
- Tiplocked = (Optional). The text that will be displayed instead of the regular tip if the medal has not been received yet and it's currently locked. You can use to say that the medal will be available later or to be mysterious about it. It exist basically if your regular tip would spoil something for your story or a secret or anything. If the medal is locked but no Tiplocked was defined, it will simply default to say "Secret."
- Condition = (Optional), a set of paratemers that must be completed (Either all of them or any of them) to unlock the medal and be able to see the regular tip.
The possible parameters for this are:- Item - If the player has the given item on it's bag.
- Switch - If the game_switch given is currently on.
- Medal - If the player has properly received the given medal
- Caught - If the player has the given species registered on it's dex as "Caught"
- Seen - If the player has the given species registered on it's dex as "Seen" or "Caught"
- Conditionreq= (Optional). Usable only if you have more than 1 condition defined to unlock a medal. It can be one of the following:
- Any = The medal is unlocked if any of the conditions is met.
- All = The medal will be unlocked only if all conditions are met.
As a base the plugin includes some graphics, some official, some edited/custom made by me. Feel free to use them to suit your needs.
If you need the rest of the official sprites you can find them on different places, like Spriter's Resource: Link here to the rip by redblueyellow.
With that, your medal is ready and has everything required.
Manipulating Medals.
The process of wich a player gains medals is mainly done with these 2 scripts:
Ruby:
def pbEarnMedal(medal_id)
MedalSystem.earn(medal_id)
end
def pbReceiveMedal(medal_id)
MedalSystem.receive(medal_id)
end
Earning a medal: The medal's ID is stored on the global variable
$PokemonGlobal.earned_medals . For all intents and purposes, the player does not have them yet. They do not appear with their icon on the box, don't count towards the amount of medals gained and do not return true toMedalSystem.received?(medal_id) , but they do toMedalSystem.has_medal?(medal_id). The purpose of this code is to mimic the way they are earned on BW2, and have an NPC be the one that checks what medals you have earned for them properly giving them to you. You can use that method to silently gain medals while doing something, and then have an NPC or some other place give you all your hard-earned medals.Receiving a medal: Received medals are stored on
$PokemonGlobal.received_medals and they behave like you would expect. They appear with their icon, count towards total, return true to received? and everything else. That method is the one that oficially gives you the medal. You can use it for all instances where the player gains the medal straight ahead. Keep in mind, the pbReceiveMedal method itself is completely silent, so you'll need to modify it or make another method that announces what medal was gained and all flavor text. The script comes with a couple of methods for that located on the bottom of the file 002_Medal handling if you want to use them.Important: The "conditions" parameter of medals on their PBS only affects their detail text and their icon on the UIs, but DOES NOT PREVENT the player for earning or receiving the medal. It's literally just for hiding spoilers or info on it's description and thats it. Making the player earn or receive a medal even if it's defined conditions are not met will stop nothing. A received medal will be properly displayed even if it's still considered "locked"
Here are some other methods if you are interested:
Code:
MedalSystem.earned?(:MEDAL_ID) # Returns true if the player has earned but not yet received the medal
MedalSystem.received?(:MEDAL_ID) # Returns true if the player has prolerly received the given medal
MedalSystem.has_medal?(:MEDAL_ID) # Returns true if the player has either received or earned the medal
MedalSystem.count # Returns a numerical value of all RECEIVED medals.
MedalSystem.earned_count # Returns a numerival value of all medals earned but not yet received.
def pbReceiveAllMedals
return MedalSystem.receive_all
end
# Silently makes the player have all their currently earned medals be received, the empties the earned variable
def pbReceiveAllMedalsDEBUG
return if !$DEBUG
return MedalSystem.receive_all_medals_debug
end
# Gives the player ALL medals as received. For debug purposes.
And heres how you could put them to use.
Code:
#-------------------------------------------------------------------------------
# Methods to gain medals in game
#-------------------------------------------------------------------------------
# NPC method to receive all earned medals
def receive_all_NPC
pbMessage("Well! Let's see how you've made so far...")
#---------------------------------------------------------
# No medals earned
#---------------------------------------------------------
if MedalSystem.earned_count == 0
pbMessage("Hmm... it seems you haven't earned any new medals yet.")
pbMessage("Keep going! I'm sure your efforts will pay off.")
return
else
pbMessage("Ah, I see you've earned some medals!")
pbMessage("Let me hand them over to you right away.")
end
#---------------------------------------------------------
# Receive medals one by one
#---------------------------------------------------------
gained = []
$PokemonGlobal.earned_medals.dup.each do |medal_id|
next if !MedalSystem.receive(medal_id)
medal = GameData::Medal.get(medal_id)
pbMessage(_INTL(
"You received the \\c[2]{1}\\c[0] medal!",
medal.name
))
gained << medal_id
end
#---------------------------------------------------------
# Post-gain flavor
#---------------------------------------------------------
pbMessage(_INTL(
"Wonderful! You earned {1} medal(s) this time.",
gained.length
))
pbMessage("Wear them with pride, and keep forging your legend!")
end
Now let's talk a bit about the medal UI.
Medal states on the box UI:
The medal box is were you mainly see what medals you have earned. There's not much to say of it so I'll just go quickly over some things.
The order in which medals are displayed is Top to Bottom, Left to Right. Pressing Right on the right-most one will advance to the next page if more medals exist. Up to 15 medals can be displayed by page.
They are ordered and numbered automatically based on their direct order in the PBS, meaning the very first medal you have will always be 001 and on the first position of the first page. Keep it in mind if you want X medal to be represented by X number.
Medals themselves have 3 different states they appear on the box UI.
From left to right: A medal you have properly received, a medal you have not received but it's unlocked, and a locked, undeceived medal.
Received medals are just that. They will use their defined "icon" graphic and every now and then a small sparkles will appear on top of them. Additionally, their "number" will be displayed as yellow instead of green and their name will appear at the bottom of the UI. Rarity does not change the behavior of medals in this UI.
Unreceived medals that are NOTlocked will appear as "hint" medals, using the graphic named "HINTMEDAL" on the Medals folder. They don't sparkle, their number is displayed as green and their name at the bottom of the UI is displayed as "???" instead.
Unreceived medals that are locked will use the graphic "LOCKEDMEDAL" on the Medals folder, wich as a base is made to represent an empty spot on the case. They behave exactly like Unreceived/Hint medals, just with a different graphic.
All of this pretty much applies to the Details scene.
Pretty much the only difference is that received medals will show their name, description and the date at wich they were received, unreceived ones will display just their tip and the hint medal graphic, and locked medals the lockedtip and no graphic.
Aditionally, received medals with the "Legendary" rarity will have a sparkling animation displayed on top, the "Shiny sparkle" sound effect will be heard and their name will appear on yellow.
The order in which medals are displayed is Top to Bottom, Left to Right. Pressing Right on the right-most one will advance to the next page if more medals exist. Up to 15 medals can be displayed by page.
They are ordered and numbered automatically based on their direct order in the PBS, meaning the very first medal you have will always be 001 and on the first position of the first page. Keep it in mind if you want X medal to be represented by X number.
Medals themselves have 3 different states they appear on the box UI.
From left to right: A medal you have properly received, a medal you have not received but it's unlocked, and a locked, undeceived medal.
Received medals are just that. They will use their defined "icon" graphic and every now and then a small sparkles will appear on top of them. Additionally, their "number" will be displayed as yellow instead of green and their name will appear at the bottom of the UI. Rarity does not change the behavior of medals in this UI.
Unreceived medals that are NOTlocked will appear as "hint" medals, using the graphic named "HINTMEDAL" on the Medals folder. They don't sparkle, their number is displayed as green and their name at the bottom of the UI is displayed as "???" instead.
Unreceived medals that are locked will use the graphic "LOCKEDMEDAL" on the Medals folder, wich as a base is made to represent an empty spot on the case. They behave exactly like Unreceived/Hint medals, just with a different graphic.
All of this pretty much applies to the Details scene.
Pretty much the only difference is that received medals will show their name, description and the date at wich they were received, unreceived ones will display just their tip and the hint medal graphic, and locked medals the lockedtip and no graphic.
Aditionally, received medals with the "Legendary" rarity will have a sparkling animation displayed on top, the "Shiny sparkle" sound effect will be heard and their name will appear on yellow.
Usage:
Due to the very creative nature of the plugin, I would love to include some pre-made checks to automatically assing medals for you upon completing something, but I cant.
Why? Simple. I have no idea what medals you are going to make lol.
Some of you might make a medal for walking, other for having an specific pokemon in the dex, and other for having used "Spalsh" 100 times in battle. I'm afraid that in oder to automate your process you'll need to hook the check yourself.
Luckily, since the main earning and receiving methods just alter a global variable,
Perhaps if I need to update the plugin I'll try to come up with aditional moves as well.
Why? Simple. I have no idea what medals you are going to make lol.
Some of you might make a medal for walking, other for having an specific pokemon in the dex, and other for having used "Spalsh" 100 times in battle. I'm afraid that in oder to automate your process you'll need to hook the check yourself.
Luckily, since the main earning and receiving methods just alter a global variable,
pbEarnMedal,pbReceiveMedal and pbReceiveAllMedals work just enough and are silent on themselves, so you can hook checks to whatever you think it could enable a medal gain.Perhaps if I need to update the plugin I'll try to come up with aditional moves as well.
Accessing the UI
Depends on where you want to access it, you just need to do a simple call for the scene.
Here's an example for adding it to the menu.
Ruby:
MenuHandlers.add(:pause_menu, :medals, {
"name" => _INTL("Medals"),
"order" => 22,
"condition" => proc { next $bag.has?(:MEDALBOX) },
"effect" => proc { |menu|
pbPlayDecisionSE
pbFadeOutIn do
scene = PokemonMedalBox_Scene.new
scene.pbStartScene
scene.pbMain
scene.pbEndScene
menu.pbRefresh
end
next false
}
})
With nothing else needed to add, I hope the medals are of your liking and you can give a good use to this system for the futures
- Credits
- Me, but are not required. Still gratefull for them tho.
redblueyellow - Some medal graphics

