Rules: Battle Visuals
Section 2.B
Last updated
Section 2.B
Last updated
These are rules that edit or overwrite certain visuals during battle, such as text or animations.
Intro text is what is displayed at the start of a battle to introduce your opponent. For example, wild battles will typically begin with "A wild __ appeared!", while trainer battles will typically begin with "You are challenged by __!" With this rule, you can customize this text to display whatever custom messages that you want.
This is entered as setBattleRule("battleIntroText", String)
, where "String" is the message you want to be displayed.
You can use {1}
in this message text to display the opponent's name. If there are multiple opponents, you can use {2}
and {3}
to also display the second and third opponent's names, respectively.
Example:
setBattleRule("battleIntroText", "You were ambushed by a wild {1}!")
You can use this rule to customize lose messages for the opponent if they are defeated by the player in this battle. This will override their normal lose messages that they would normally display.
This is entered as setBattleRule("opponentLoseText", Message)
, where "Message" can either be a string or an array of strings where each string in the array corresponds to an opponent in this battle so that you can edit the lose text of multiple opposing trainers in double/triple battles. If this battle only has one opponent, then only one string is necessary.
Example: setBattleRule("opponentLoseText", "No fair! You must have cheated!")
You can use this rule to customize victory messages for the opponent if they defeat the player in this battle. This rule doesn't do anything unless the "towerBattle" rule is also enabled, because NPC trainers only display win speech in Battle Tower-style battles.
This is entered as setBattleRule("opponentWinText", Message)
, where "Message" can either be a string or an array of strings where each string in the array corresponds to an opponent in this battle. If this battle only has one opponent, then only one string is necessary.
Example: setBattleRule("opponentWinText", "Heh, I knew I'd win!")
You can use this rule to customize how the opponent's sprite slides on to screen at the start of a battle. You can use this to control the direction they slide in from, and/or whether or not any base appears below them. You can use this to emulate things such as how Giratina enters battle from above when you first encounter it in Pokemon Platinum, or come up with some other unique scenarios.
This is entered as setBattleRule("setSlideSprite", String)
, where "String" may be any one of the following strings:
"side" The opponent will slide in from the left side of the screen. This is the standard encounter method, and this will act as the default if no rule is set.
"top" The opponent will slide in from the top of the screen.
"bottom" The opponent will slide upwards, as if rising out of the ground.
"still" The opponent will remain still, and not slide on screen at all.
Note: For any of the above strings, you may add "_hideBase" to the string in order to hide the opponent's base and shadow sprites. This can be used to give the impression of the opponent floating in an abyss. For example, you may use "top_hideBase" to emulated how Giratina is encountered in Pokemon Platinum where it would slide on screen from above, without any base or shadow sprites. As seen in the gifs for each slide-in style, examples are shown of each style with a base, and one without.
You can use this rule to customize how battler's databoxes will look during battle. By default, this plugin includes two different visual styles that can be set, but it's possible to add more custom styles with a little work. These databoxes are primarily designed to be used for boss encounters, so certain elements that are normally displayed on the opponent's databoxes (such as gender or level) are absent here.
To set this rule, you may enter setBattleRule("databoxStyle", Style)
, where "Style" should be a symbol ID of the specific databox style you want to set. This plugin includes the following settable styles by default:
:Basic
This applies simple but modernized databoxes for all battlers. The HP bars for the foe's databoxes are longer than normal, and there's much more name space than the usual databoxes. These make them suitable to be used for special boss encounters.
These databoxes are much more compact than the normal ones Essentials uses, so they're ideal for double and triple battles since they take up less screen space. However, HP totals won't be displayed on the player's databoxes, so this may not be ideal in single battles. This databox style is used as the default style in situations where other styles aren't eligible for a particular battler.
:Long
This applies a long databox on the foe's side that runs across the top of the screen. This is specifically designed to be used for boss battles to give the opponent a more imposing presence.
This style of databox only applies to the opponent's side, so the player's databoxes will just default to the :Basic
style when this style is set. This style only applies if the opponent's side of the field contains just a single battler slot. If more than one battler slot is present on the opponent's side, the opponent's databoxes will default to the :Basic
style instead.
Displaying Opponent Titles
In Pokemon Scarlet & Violet, you could challenge wild Titan Pokemon that acted as boss encounters. These Titans would have unique titles displayed over their HP bars during battle. For example, "Klawf, the Stony Cliff Titan." You can replicate this mechanic through setting a databox style, however, this will only work for wild battles.
This can be accomplished by setting a databox style and entering an array that contains the symbol ID of the specific style you want to set, followed by a string that will function as the wild battler's display name on their databox. For example:
setBattleRule("databoxStyle", [:Long, "{1} the Long Name-Haver"])
WildBattle.start(:CRABOMINABLE, 50)
This begins a battle with a wild Crabominable with the :Long
style applied. However, the name that appears above the wild battler's HP bar will be the title set as part of the rule, rather than the battler's normal name. Note that {1}
can be used in this string to call the battler's actual name and include it as part of the title. However, you don't need to include its name in the title if you'd prefer to write in something entirely unique.
If you're setting up a wild double or triple battle and would like each wild Pokemon to have a unique title, you can accomplish this simply by adding additional strings to the array for each additional wild battler included. For example:
setBattleRule("databoxStyle", [:Basic,
"{1} the First Champion",
"{1} the Second Champion",
"{1} the Third Champion"
])
WildBattle.start(:COBALION, 40, :TERRAKION, 40, :VIRIZION, 40)
This begins a wild triple battle versus Cobalion, Terrakion, and Virizion with the :Basic
style applied. However, each wild battler will have a unique title assigned to them that will be displayed above their HP bars.
If for some reason you want to set a wild triple battle where only the first and third opponent have a title, but the second opponent doesn't, then you can accomplish this by setting the second opponent's title to just "{1}"
, so only their name will be displayed.
Memento Titles
In Pokemon Scarlet & Violet, wild Pokemon encountered in Tera Raids would sometimes display a title if they generated with a mark. For example, if the raid Pokemon has the Mightiest Mark, it will have the title of "the Unrivaled" displayed along with its name.
This feature is replicated in the same way here, but only if the Improved Mementos plugin is installed to implement marks and titles. If so, any wild Pokemon you encounter while a databox style is enabled will display their full title over their HP bars.
If a wild Pokemon is encountered with a memento title when you have already manually set a specific title through the battle rule, then the manually entered title will take priority and be displayed instead of the natural title conferred from the ribbon or mark.
Adding Custom Databox Styles
While this plugin only includes two different databox styles by default, it's set up so that you can add your own custom styles without much effort. To do so, you only need to implement the following:
Graphics
All of the graphics used for databox styles are stored in:
Graphics/Plugins/Deluxe Battle Kit/Databoxes
In here, you can add a new folder which will contain the graphics for your new databox style. This folder should be named according to what symbol ID you want to refer to this custom style by. For example, there are already two folders located here named Basic
and Long
, which correlate to the two styles that are included in this plugin by default.
Within these folders, they should contain graphics with the following file names:
databox
overlay_hp
overlay_exp
databox_foe
overlay_hp_foe
If databox graphics for the player or foe's side are missing from this folder, then the databoxes for that side will just default to whatever is used in the Basic
folder. For example, the Long
folder only contains graphics for the foe's databox, because only enemy battlers can use that databox style. This means that when the Long
style is enabled, the databoxes on the player's side will pull from the Basic
folder instead. So if you're designing a databox style that is only meant to be displayed on one side of the field, you do not need to include graphics for the opposing side's databoxes.
Game Data
Once the graphics have been set, the next thing that is required are setting the display properties for your custom databox style. This is done in the plugin file [001] Deluxe Utilities/[008] Databox Styles
.
At the top of the script, there is a class called DataboxStyle
, which is included in the GameData
module. This is where the display properties of all databox styles are stored. You can add a new handler for any new databox styles you wish to add here, among the ones that already exist for the :Basic
and :Long
styles.
I won't delve into much more detail in how this is done here, as you should be able to more or less figure it out from by looking at the existing examples and comments in the script itself. The basic idea is that you enter all of the coordinate values and other display properties in your handler, and it will automatically apply these to the battle scene when your databoxes are loaded.