• 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.
  • Reminder: AI-generated content is not allowed on the forums per the Rules and Regulations. Please contact us if you have any questions!
Pokémon Factory

v21.1 Pokémon Factory 1.2.0

This resource pertains to version 21.1 of Pokémon Essentials.
Pokémon Factory has been updated to 1.2.0.
This update brings "custom_moves:", which allows you to customize Pokémon moves without having to add a new one to the PBS. You can modify:
-Name
-Description
-Power
-Accuracy
-PP
-Priority
-Type

The effect and animation will not be added for modification, as the purpose of this is to create "stronger" or "special" move variants without the need for a new one.

Here's an example:
Ruby:
Expand Collapse Copy
pikachu_data = {
        species: :PIKACHU,
        level: 88,
        item: :LIGHTBALL,
        poke_ball: :POKEBALL,
        ivs: :perfect,
        evs: :sweeper_special,
        happiness: 255,
        owner_name: "Ash",
        
        # The moveset is defined without the custom move.
        moves: [:QUICKATTACK, :IRONTAIL, :ELECTROWEB],
        
        # --- Custom Move ---
        custom_moves: [
          {
            move: :THUNDERSHOCK, # The base move being modified.
            name: "Gigathunder",
            description: "The most powerful Thundershock in the world.",
            power: 110,
            accuracy: 0,        # 0 means it never misses.
            total_pp: 15,
         # priority: -1,     # Would make the move attack almost last.
         # type: :FIRE,      # Would turn the move into a Fire-type.
          }
        ]
      }

A new file (003_PluginsPatchs) has also been added to add support for Enhanced Battle UI, as without it, custom moves don't display correctly in Move Info. If the changes aren't displayed with this plugin installed, change the "Optional" in the meta.txt to "Requires".

As always, you can find the examples with explanations in 002_Events so you can try them out.
This update adds a new feature: variants:.
Its purpose is to provide an easy way to create variations when generating Pokémon, giving each its own weight to be delivered randomly. It can also accept switches and variables as activation conditions. As long as these conditions are not met, the variant will not be considered during creation.

Giving Various Pokémon:
Ruby:
Expand Collapse Copy
bird_data = {
  level: 15,
  variants: [
    {
      weight: 40,
      config: { species: :PIDGEY, nature: :JOLLY }
    },
    {
      weight: 50,          
      condition: proc { $game_variables[40] >= 1 },
      config: {
        species: :TAILLOW,
        ability_index: 1,
        moves: [:WINGATTACK, :QUICKATTACK, :FOCUSENERGY, :AERIALACE]
      }
    },
    {
      weight: 50,
      condition: proc { $game_variables[40] == 2 },
      config: {
        species: :STARLY,
        ability_index: 1,
        moves: [:WINGATTACK, :QUICKATTACK, :ENDEAVOR, :AERIALACE]
      }
    },
    {
      weight: 20,
      condition: proc { $game_switches[12] },
      config: {
        species: :FLETCHLING,
        shiny: true,
        ability_index: 1,
        moves: [:PECK, :QUICKATTACK, :FLAIL, :ACROBATICS]
      }
    }
  ]
}
   
pkmn = PokemonFactory.create(bird_data)
pbAddPokemon(pkmn)

Giving the Same Pokémon with Different Sets:
Ruby:
Expand Collapse Copy
arcanine_data = {
  species: :ARCANINE,
  level: 50,
  shiny: true,
  poke_ball: :FASTBALL,
  ivs: :perfect,
     
  variants: [
    {
      weight: 40,
      config: {
        nickname: "Blaze",
        nature: :ADAMANT,
        ability: :INTIMIDATE,
        item: :LIFEORB,
        evs: :sweeper_physical,
        moves: [:FLAREBLITZ, :EXTREMESPEED, :WILDCHARGE, :CLOSECOMBAT]
      }
    },
    {
      weight: 40,
      config: {
        nickname: "Inferno",
        nature: :TIMID,
        ability: :FLASHFIRE,
        item: :CHOICESPECS,
        evs: :sweeper_special,
        moves: [:FLAMETHROWER, :DRAGONPULSE, :SCORCHINGSANDS, :EXTREMESPEED]
      }
    },
    {
      weight: 20,
      config: {
        nickname: "Guardian",
        nature: :IMPISH,
        ability: :INTIMIDATE,
        item: :HEAVYDUTYBOOTS,
        evs: :tank_physical,
        moves: [:FLAREBLITZ, :WILLOWISP, :MORNINGSUN, :TELEPORT]
      }
    }
  ]
}
   
pkmn = PokemonFactory.create(arcanine_data)
pbAddPokemonWithNickname(pkmn)

It is not necessary for the weight: values to sum up to 100. The script is responsible for assigning the probability based on the total sum of all weights.

It is worth mentioning that this also works for generating eggs, although due to this addition, the way they are created changes slightly:

Ruby:
Expand Collapse Copy
eevee_egg_config = {
  species: :EEVEE, # Now you must add the species:
  steps_to_hatch: 1,
  shiny: true,
  nature: :TIMID,
  ability_index: 2,
  ivs: :perfect,
  obtain_text: "Day-Care Couple"
}
   
# if EggFactory.create(:EEVEE, eevee_egg_config) # Before
if EggFactory.create(eevee_egg_config) # Now
  pbMessage(_INTL("Take good care of it!"))
else
  pbMessage(_INTL("Oh, you don't have any room in your party!"))
end

You can also find the examples with explanations in the 002_Events file.
Back
Top