Modding Tutorial (Rejuv V13.5/Deso EP6) (2024)

  • Author
  • Developers

Posted November 6, 2023

Adding a Pokemon

Probably the most drastic change from previous versions, Pokemon are now easier than ever to implement.

Pokemon speciesandforms are now located inside the filemontext.rb, a much more graceful solution than two separate files or one file and not easily modifiable at all.

Creating a New Pokemon

To start, open upmontext.rbinside your workspace, located in your specific game's subfolder.

We'll discuss the structure for a Pokemon first. Each field is broken down in the code block below, with further explanation where needed afterwards.

Spoiler

:VENUSAUR => {# Species name. Identifier when calling information."Normal Form" => {# Form name. :name => "Venusaur",# Display name:dexnum => 3,# Pokedex number:Type1 => :GRASS,:Type2 => :POISON,:BaseStats => [80, 82, 83, 100, 100, 80],# Base stats, sorted HP/Attack/Defense/Special Attack/Special Defense/Soeed:EVs => [0, 0, 0, 2, 1, 0],# EV yield:Abilities => [:OVERGROW, :CHLOROPHYLL],# See after for hidden abilities:GrowthRate => :MediumSlow,# EXP Curve. See after for all values.:GenderRatio => :FemEighth,# Male/Female ratios. See after for all values.:BaseEXP => 236,:CatchRate => 45,:Happiness => 70,# Base happiness when caught:EggSteps => 5355,# Steps required to hatch:preevo => {# Values to store pre-evolution. Added to make it easy to get pre-evolution data.:species => :IVYSAUR,:form => 0},:Moveset => [# Learnset. Stored as [level, move symbol]. 0 is learned on evolution.[0,:PETALDANCE],[1,:TACKLE],[1,:GROWL],[1,:LEECHSEED],[1,:VINEWHIP],[3,:GROWL],[7,:LEECHSEED],[9,:VINEWHIP],[13,:POISONPOWDER],[13,:SLEEPPOWDER],[15,:TAKEDOWN],[20,:RAZORLEAF],[23,:SWEETSCENT],[28,:GROWTH],[31,:DOUBLEEDGE],[39,:WORRYSEED],[45,:SYNTHESIS],[50,:PETALBLIZZARD],# Below is every move that can be learned by the species from TM or tutor. [53,:SOLARBEAM]],# Egg moves are stored specifically within the first stage of the Pokemon.:compatiblemoves => [:AMNESIA,:BIDE,:BIND,:BLOCK,:BODYSLAM,:BULLDOZE,:BULLETSEED,:CELEBRATE,:CHARM,:CURSE,:CUT,:DEFENSECURL,:DOUBLEEDGE,:EARTHPOWER,:EARTHQUAKE,:ECHOEDVOICE,:ENERGYBALL,:FALSESWIPE,:FLASH,:FRENZYPLANT,:FURYCUTTER,:GIGADRAIN,:GIGAIMPACT,:GRASSKNOT,:GRASSPLEDGE,:GRASSYGLIDE,:GRASSYTERRAIN,:HEADBUTT,:HELPINGHAND,:HYPERBEAM,:KNOCKOFF,:LEAFSTORM,:LIGHTSCREEN,:MAGICALLEAF,:MEGADRAIN,:MIMIC,:MUDSLAP,:NATUREPOWER,:OUTRAGE,:POWERWHIP,:RAGE,:RAZORWIND,:REFLECT,:ROAR,:ROCKCLIMB,:ROCKSMASH,:SAFEGUARD,:SEEDBOMB,:SKULLBASH,:SLUDGEBOMB,:SOLARBEAM,:STOMPINGTANTRUM,:STRENGTH,:STRINGSHOT,:SUNNYDAY,:SWEETSCENT,:SWORDSDANCE,:SYNTHESIS,:TAKEDOWN,:TERRAINPULSE,:VENOSHOCK,:WEATHERBALL,:WORKUP,:WORRYSEED,]:moveexceptions => [],# There is an array called PBStuff::UNIVERSALTMS that almost any Pokemon learns. Add those moves here if you want to exclude them from a Pokemon.:Color => "Green",# Flags for color and habitat sorting in Pokedex, which I'm not actually sure are used:Habitat => "Grassland",:EggGroups => [:Monster, :Grass],# Egg Groups:Height => 20,# Height and weight are metric based times 10. Venusaur is 2 meters 100 kilo:Weight => 1000,:kind => "Seed",# Pokedex descriptor and dex entry:dexentry => "Venusaur's flower is said to take on vivid colors if it gets plenty of nutrition and sunlight. The flower's aroma soothes the emotions of people.",:BattlerPlayerY => 16,# Positioning values:BattlerEnemyY => 15,:BattlerAltitude => 0,},"Mega Form" => {# Another form name:BaseStats => [80, 100, 123, 122, 120, 80],# EVERY single flag used can be changed for forms, except for dex number.:Abilities => [:THICKFAT],:BaseEXP => 281,:Height => 24,:Weight => 1555,},"Giga Form" => {:BaseStats => [80, 107, 108, 125, 125, 80],:Abilities => [:CHLOROPHYLL],:Height => 240,:Weight => 2216,},:OnCreation => {},# The proc for changing forms/stats/anything when creating the Pokemon in game. See after for info.:DefaultForm => 0,# Stores the default forms (can be array, see Toxtricity/Urshifu) for checking if the mon can mega/primal/rift/pulse evo.:MegaForm => {# Stores the resulting form for mega/primal/rift/pulse evo based on held item.:VENUSAURITE => 1,:VENUSAURITEG => 2,},},

Hidden Abilities are not actually implemented in Rebornverse games, however the ability to add them does exist if you wanted to override our hidden ability override. You'll see some Pokemon use the :HiddenAbility flag. Abilities in this flag are automatically added to the ability list and do not count as real hidden abilities.

Growth Rates can be the following values::Erratic, :Fluctuating, :MediumSlow, :Fast, :MediumFast, :Slow. Further info about these can be gained from sites like Bulbapedia.

Gender Ratios can be the following values::Genderless, :MaleZero, :FemZero, :FemEighth, :FemQuarter, :FemHalf, :MaleQuarter. These values are, in order: Genderless, Always Female, Always Male, 1/8th Female, 1/4th Female, 50/50, 1/4th Male.

The creation changing is really useful! It was mainly used to generalize generating regional forms. We use them only for returning form number, but they can be used for alotof neat things and I'm interested in seeing what you guys can come up with.

The general formatting is such:

:OnCreation => proc{ next $game_map && Rattata.include?($game_map.map_id) ? 1 : 0},

We check to make sure $game_map is defined and then check if the current map id matches those included in each regional form array defined in the fileSystemConstants.rbfound in the game-specific subfolder.

We'll add a new Pokemon called Beatote, created by the spriter Samson on PokeCommunity, which is free to use. You likely will be unable to find these sprites without ripping them out of GBA games that already have them. Again, the provided images are located at the start of the thread.

These must be named with their dex number, with their respective Battler, Icon, and SE files.

Next, you'll need to fill out the Pokemon data. I'll provide the fully written out one here.

Spoiler

:BEATOTE => {"Normal Form" => {:name => "Beatote",:dexnum => 906,:Type1 => :BUG,:Type2 => :LIGHT,:BaseStats => [75, 85, 110, 50, 95, 80],:EVs => [0, 0, 2, 0, 0, 0],:Abilities => [:ILLUMINATE, :SWARM],:HiddenAbilities => :FLUORESCENT,:GrowthRate => :Erratic,:GenderRatio => :FemZero,:BaseEXP => 184,:CatchRate => 45,:Happiness => 70,:EggSteps => 4080,:preevo => {:species => :VOLBEAT,:form => 0},:Moveset => [[0,:PHOTONSLASH][1,:FLASH],[1,:TACKLE],[5,:DOUBLETEAM],[8,:CONFUSERAY],[12,:QUICKATTACK],[15,:STRUGGLEBUG],[19,:MOONLIGHT],[22,:TAILGLOW],[26,:SIGNALBEAM],[29,:PROTECT],[33,:ZENHEADBUTT],[36,:HELPINGHAND],[40,:BUGBUZZ],[43,:PLAYROUGH],[47,:DOUBLEEDGE],[50,:INFESTATION]],:compatiblemoves => [:PHOTONSLASH,:AIRSLASH,:DRAININGKISS,:FAKETEARS,:MAGICALLEAF,:POLLENPUFF,:POWERGEM,:SKITTERSMACK,:BATONPASS,:DOUBLEEDGE,:MIMIC,:ACROBATICS,:AERIALACE,:AIRCUTTER,:BODYSLAM,:BRICKBREAK,:BUGBITE,:BUGBUZZ,:CHARGEBEAM,:COUNTER,:DAZZLINGGLEAM,:DEFOG,:DYNAMICPUNCH,:ENCORE,:FLASH,:FLING,:FOCUSPUNCH,:GIGADRAIN,:HELPINGHAND,:ICEPUNCH,:INFESTATION,:LIGHTSCREEN,:MEGAKICK,:MEGAPUNCH,:METRONOME,:MUDSLAP,:OMINOUSWIND,:PLAYROUGH,:POWERUPPUNCH,:PSYCHUP,:RAINDANCE,:ROOST,:SEISMICTOSS,:SHADOWBALL,:SHOCKWAVE,:SIGNALBEAM,:SILVERWIND,:SOLARBEAM,:STRINGSHOT,:STRUGGLEBUG,:SUNNYDAY,:SWIFT,:TAILWIND,:THIEF,:THUNDER,:THUNDERBOLT,:THUNDERPUNCH,:THUNDERWAVE,:TRICK,:UTURN,:WATERPULSE,:ZENHEADBUTT,#Rejuv only moves:IRRITATION,:STACKINGSHOT],:moveexceptions => [],:Color => "Gray",:Habitat => "Forest",:EggGroups => [:Bug, :HumanLike],:Height => 14,:Weight => 423,:WildItemUncommon => :BRIGHTPOWDER,:kind => "Ground Fly",:dexentry => "Beatote live underground, taking over the colonies of the Nincada that live in the area by blinding them.",:BattlerPlayerY => 23,:BattlerEnemyY => 19,:BattlerAltitude => 0,},:OnCreation => {},},

After that you can compile via compileMons and give yourself a new Beatote! The Pokedex will getautomaticallyupdated if it detects there are more species in the DOH than in the Pokedex itself. For custom forms, you'll need to manually refresh the Pokedex.

Spoiler

Modding Tutorial (Rejuv V13.5/Deso EP6) (1)Modding Tutorial (Rejuv V13.5/Deso EP6) (2)

Adding a Form

We've successfully added a new Pokemon with a new type. But how can you add a new type without having Arceus's approval? Let's help them out.

We're going to do a little cheating and instead of having the plate/Z-Crystal change Arceus's type, we'll change the form based on if you have a Light-type Pokemon or move in your party when encountering it.

Unfortunately, though, Arceus (and Silvally) signature moves are tied to their items at the moment. So, we're going to need to override that. Back in Battle_MoveEffects.rb, we need to find PokeBattle_Move_09F. We'll need to throw in a check for our new Arceus form in the pbType method like such:

if attacker.species == :ARCEUS && $cache.pkmn[:ARCEUS].forms[attacker.form] == "Light" return super(attacker,:LIGHT)end

This should go before any check to avoid needless chance to write over things we aren't accounting for.

After that we can go back to montext.rb and define the new form:

Spoiler

"Light" => { :Abilities => [:FLUORESCENT], :Type1 => :LIGHT,},:OnCreation => proc{ next 0 if !$Trainer foundLight = false for mon in $Trainer.party if mon.type1 == :LIGHT || mon.type2 == :LIGHT foundLight = true break end for move in mon.moves if move.type == :LIGHT foundLight = true break end end break if foundLight end next $cache.pkmn[:ARCEUS].forms.invert["Light"] if foundLight next 0},

You should be removing the current :OnCreation attribute already there with this one. This proc will check your party for the above defined conditions and return the form that Light is assigned to.

You'll want to compile one more time and then your beautiful Light-type Arceus works!

Spoiler

Modding Tutorial (Rejuv V13.5/Deso EP6) (3)Modding Tutorial (Rejuv V13.5/Deso EP6) (4)

You can do alotof fun stuff with procs. If you are so inclined, you can even add a new proc to them (make sure you follow my handling of :OnCreation procs!!!!!) and pass in the Pokemon object itself and make direct edits to it if you so desired. Very similar to how EncounterModifier works, actually. I wouldn't recommend this though as handling the dat files of the games is very finnicky if you don't know what you're doing.

Were you not loaded into a save when you compiled? No worries! You can just run the command:

$Trainer.pokedex.refreshDex

to refresheverydex entry, or:

$Trainer.pokedex.updateGenderFormEntries

to update specifically forms/genders of existing dex entries.

With that, we've covered the basics of modding for the Rebornverse games. Next we will get into bosses, trainers, and extra coding tips!

  • Modding Tutorial (Rejuv V13.5/Deso EP6) (5)1
Modding Tutorial (Rejuv V13.5/Deso EP6) (2024)
Top Articles
Latest Posts
Article information

Author: Edmund Hettinger DC

Last Updated:

Views: 5926

Rating: 4.8 / 5 (78 voted)

Reviews: 85% of readers found this page helpful

Author information

Name: Edmund Hettinger DC

Birthday: 1994-08-17

Address: 2033 Gerhold Pine, Port Jocelyn, VA 12101-5654

Phone: +8524399971620

Job: Central Manufacturing Supervisor

Hobby: Jogging, Metalworking, Tai chi, Shopping, Puzzles, Rock climbing, Crocheting

Introduction: My name is Edmund Hettinger DC, I am a adventurous, colorful, gifted, determined, precious, open, colorful person who loves writing and wants to share my knowledge and understanding with you.