Modding Tutorial (Reborn E19.0) (2024)

  • Author
  • Developers

Posted May 19, 2023

Adding an Ability

Next up, abilities.

Abilities, as you'd expect, are defined in PBS/abilities.txt. They're very straightforward on the PBS end of things, only requiring an ID, Internal Name, Display Name, and Description. On the other hand, the entire implementation is code based.

To fit in with Beatote's Pokedex entry of preying on Nincada, let's have its ability make its attack increase by 50% against Bug-type Pokemon.

To start, defining its ability in the PBS:

330,SCAVENGER,Scavenger,"Deal increased damage to Bug-type Pokémon."

Next, we'll give that ability to Beatote.

HiddenAbility=SCAVENGER

Now we can compile, and Beatote will now have the Scavenger ability!

Spoiler

Modding Tutorial (Reborn E19.0) (1)

And now, we need to implement it!

There's a lot to do here, so bear with me and try to follow along. We want to head to the file PokeBattle_Move.rb. This file is where all damage calculation takes place, and where the magic mainly happens.

You'll want to head down to around line 1448, which is after all the field effect code. You'll be looking for a line that says:

case attacker.abilitywhen PBAbilities::GUTS

In here, we'll want to add a few lines so we end up with:

case attacker.abilitywhen PBAbilities::SCAVENGERatkmult=(atkmult*1.5).round if opponent.hasType?(:BUG)when PBAbilities::GUTS

I'll explain what's going on here.

This is a method called pbCalcDamage. Inside of it, it takes three parameters in addition to an optional hitnum named parameter. While the parameters options and hitnum are inconsequential, attacker and opponent are what we really care about here. Both attacker and opponent will be PokeBattle_Battler objects, found inside PokeBattle_Battler.rb. Any method or attribute in there can be called and utilized for creating a damaging move.

The method hasType? takes a type and returns if the object has it or not.

pbCalcDamage is split into parts:

Spoiler

  1. Initialization, including exiting if base damage is 0, pulling base damage from PBS, etc.
  2. Calculate the base damage.
    1. Abilities, such as Sheer Force and Pixilate.
    2. Items, such as gems, plates, and legendary orbs (Griseous Orb, Soul Dew, etc)
    3. More effectsconditionally, being Charge, Helping Hand, Mud/Water Sport, Kalos Legend Abilities, Knock Off, and Lunala Z vs Minimize.
    4. Field effect changes.
  3. Calculate the attacker's attack stat comes next, being the Pokemonusingthe move.
    1. Determine if physical or special.
    2. Adjust for Unaware/Hustle/Power Spot.
    3. More field effects.
    4. Conditional attack modifier abilities (Starters, Swarm).
    5. Attack modifier abilities (Scavenger, Huge Power, Guts, Flash Fire, etc).
    6. Item modifiers, such as Light Ball, Thick Club, Choice items
    7. Thick Fat must be done LAST.
  4. Calculatethe corresponding defense stat.
    1. Same shtick applies here. Very repetitive.
  5. Calculate the effective, or actual, damage.
    1. Multihit moves
    2. Generic field boosts, such as type matching.
    3. Primal Abilities return 0 damage here if nullified by respective weather.
    4. Fieldtransformations, such as Crystal Cave > Dark Crystal Cave or Factory Field
    5. Sun/Rain
    6. Crit calculation
    7. Damage rolls
    8. STAB calculation
    9. Type effectiveness check
    10. Gem message + Burn/Water Bubble
    11. Effective damage mods, such as Screens, Multiscale, Friend Guard, Life Orb, Berries, etc.
  6. Calculate final damage using above methods.

Now your ability functions. But only for the player. The AI does not know what's actually going on with your ability, it simply sees nothing, We need to head to the file "PokeBattle_AI_2.rb".

This file is a wonder. It's incredibly complicated and I won't bore you trying to teach it. The gist is, you need to find similar functioning abilities and insert your new ability in. If you look at where we inserted Scavenger in the PokeBattle_Move.rb, we should look for spots where those abilities are and copy them, provided we ignore any field-specific effects for them. This will apply similar logic to before. I'll state which methods we'll be modifying. This part doesn'tneedto be done, but should if you plan on making the AI have a fair chance.

Certain abilities should be more weighted heavily in the first location, a method called getAbilityDisruptScore, which is the score the AI gets for whether or not it should "counter" the ability. We'll place this right near where the code for Huge Power is. The multiplier here is typically the same.

when PBAbilities::SCAVENGERabilityscore*=1.5 if opponent.hasType?(:BUG)

The next spot is where we calculate ability score for the AI to find the best switch for. It can be found by searching abilityscore in the file. It starts at around line 8035 on clean code.

Pretty much anywhere after the line case i.ability we will be adding the code:

when PBAbilities::SCAVENGERabilityscore+=30 if @opponent.hasType?(:BUG)

The amount to add here is pretty subjective. The general process is 10 for "hey this is better than no ability" or a much higher number for "hey this is a really freaking good idea do this."

However much you want to add for your own abilities is up to you.

The final spot where it's required is much further down labeled with a comment tag

############ ATTACKER ABILITY CHECKS ############

You can search for this to find it. We'll be adding this line into the code there. It can be anywhere after Technician but before Type Changing Abilities. Typically group like changes together.

#Scavengerelsif attacker.ability == PBAbilities::SCAVENGERif opponent.hasType?(:BUG)atk=(atk*1.5).roundend

Congrats! You've taken your first real step into full content mods with this! There's still awholelot going on here behind the scenes, but I'm not going to explain it solely based on the fact it would take way too long to explain everything. I've explained the important stuff, much of it has labels, and much of it is very self-explanatory thanks to our wonderful developers (humblebrag). Let's hop into the next topic.

  • Modding Tutorial (Reborn E19.0) (2)3
Modding Tutorial (Reborn E19.0) (2024)

FAQs

How to apply mods to Pokemon Reborn? ›

Mod Installation and Uninstallation

These are the only places where you can be sure that what you download is the correct, up-to-date version of the mod. To install the mod after you've downloaded it, extract the contents of the “Sandbox_E19. zip” to the root of your Pokemon Reborn folder.

What is debug mode in Pokemon Reborn? ›

The Debug menu contains functions useful for debugging or configuring a Pokémon game. You can access it from the Continue/New Game screen, the Pause menu or by pressing F9 in the overworld.

How do you equip Mods? ›

To equip a mod: Open your Inventory and select the item you wish to mod. Select "Mod". Choose the mod slot you want to change.

How do you put Mods in? ›

Manual installation
  1. Find a mod to download.
  2. Download the ZIP file. Do not extract.
  3. Open your Userfolder.
  4. Create a folder named mods (if you don't have one already)
  5. Drag and drop the ZIP file into this folder.
  6. The mod should now appear in your Mod Manager (if it does not contain errors)
Aug 18, 2023

How to install rebirth Mods? ›

Manual installation

Mods that do not use the Steam Workshop can be installed by downloading them and manually extracting them to the mods folder of the main Binding of Isaac folder. Starting the game will feature the mod automatically enabled and won't be featured in the installation loading screen.

How do I activate my mod? ›

To activate and install a mod simply select the mod within the Mods tab and click the "Activate" button. To deactivate and uninstall a mod simply click the "Deactivate" button.

How do you equip Mods in Sims 4? ›

How To Enable Mods For The Sims 4
  1. Launch The Sims 4 and hit on “Options.”
  2. From the menu, click on “Game options.”
  3. Now, from the available options, select “Other” and tick the option “Enable Custom Content and Mods” and “Script Mods Allowed,” and don't forget to save changes by clicking on “Apply Changes.”
Jul 22, 2023

How do you activate Pokemon Mods in Minecraft? ›

Open Curseforge, and search for the Pixelmon Modpack. Click 'install'. Once the installation is complete, click 'play'. Your Minecraft Launcher will open, ready to load into the Pixelmon mod.

References

Top Articles
French Onion Soup Recipe
62 Easy Crock Pot Recipes Perfect For Busy Evenings, 2024 Edition
Jordanbush Only Fans
Blorg Body Pillow
Hotels
Explore Tarot: Your Ultimate Tarot Cheat Sheet for Beginners
Geodis Logistic Joliet/Topco
Co Parts Mn
Publix 147 Coral Way
William Spencer Funeral Home Portland Indiana
Lonadine
Dc Gas Login
Alexandria Van Starrenburg
Extra Virgin Coconut Oil Walmart
Adam4Adam Discount Codes
Loves Employee Pay Stub
Amazing deals for Abercrombie & Fitch Co. on Goodshop!
Toyota Camry Hybrid Long Term Review: A Big Luxury Sedan With Hatchback Efficiency
Scream Queens Parents Guide
Gran Turismo Showtimes Near Marcus Renaissance Cinema
If you have a Keurig, then try these hot cocoa options
Academy Sports Meridian Ms
6 Most Trusted Pheromone perfumes of 2024 for Winning Over Women
Suspiciouswetspot
2000 Ford F-150 for sale - Scottsdale, AZ - craigslist
FAQ's - KidCheck
Dr Seuss Star Bellied Sneetches Pdf
Harrison 911 Cad Log
Restored Republic
Uncovering the Enigmatic Trish Stratus: From Net Worth to Personal Life
Srjc.book Store
Ewg Eucerin
Sony Wf-1000Xm4 Controls
Miss America Voy Board
new haven free stuff - craigslist
Hattie Bartons Brownie Recipe
Ark Unlock All Skins Command
Shih Tzu dogs for sale in Ireland
Hellgirl000
Cygenoth
Express Employment Sign In
All Obituaries | Sneath Strilchuk Funeral Services | Funeral Home Roblin Dauphin Ste Rose McCreary MB
Amy Zais Obituary
Craigslist Sparta Nj
Diario Las Americas Rentas Hialeah
Michaelangelo's Monkey Junction
53 Atms Near Me
The Goshen News Obituary
Raley Scrubs - Midtown
David Turner Evangelist Net Worth
Tamilyogi Cc
Latest Posts
Article information

Author: Kerri Lueilwitz

Last Updated:

Views: 6294

Rating: 4.7 / 5 (67 voted)

Reviews: 90% of readers found this page helpful

Author information

Name: Kerri Lueilwitz

Birthday: 1992-10-31

Address: Suite 878 3699 Chantelle Roads, Colebury, NC 68599

Phone: +6111989609516

Job: Chief Farming Manager

Hobby: Mycology, Stone skipping, Dowsing, Whittling, Taxidermy, Sand art, Roller skating

Introduction: My name is Kerri Lueilwitz, I am a courageous, gentle, quaint, thankful, outstanding, brave, vast person who loves writing and wants to share my knowledge and understanding with you.