• 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

Resource Pokémon Factory 1.3.0

ok
 
Very useful script, this will certainly allow for some interesting giftmons without the need to define extra forms or bloating the Pokedex.
Just a couple of questions:
1) Can the generated Pokemon be used by opposing trainers? It would make for great bosses.
2) Can the generated Pokemon be forbidden from changing forms? (Including Megas/Gmax/Tera)
3) Could you add support for "Custom Innates"
 
Very useful script, this will certainly allow for some interesting giftmons without the need to define extra forms or bloating the Pokedex.
Just a couple of questions:
1) Can the generated Pokemon be used by opposing trainers? It would make for great bosses.
2) Can the generated Pokemon be forbidden from changing forms? (Including Megas/Gmax/Tera)
3) Could you add support for "Custom Innates"
1-Yes. In fact, the next update will feature examples of how to use the factory for WildBattles and, especially, TrainerBattles.

Example:
Ruby:
Expand Collapse Copy
def self.brock_figth
      trainer_party = []

      brock_onix_data = {
        species: :ONIX,
        level: 14,
        nickname: "Goliath",
        item: :BERRYJUICE,
        moves: [:ROCKTOMB, :BIND, :ROCKTHROW, :HARDEN],
        types: [:STEEL, :GHOST],
        base_stats: { defense: 200, attack: 60 }
      }

    # geodude_data= {}
   
      # The Onix is created and added to the team.
      trainer_party.push(ZBox::PokemonFactory.create(brock_onix_data))

      # More Pokémon can be added if needed.
      # trainer_party.push(ZBox::PokemonFactory.create(geodude_data))
   
      trainer = pbLoadTrainer(:LEADER_Brock, "Brock")

      # The team we just created is assigned.
      trainer.party = trainer_party

      # The battle is started using the Trainer object we have prepared.
      TrainerBattle.start(trainer)
    end

I'll probably create a method for inserting Pokémon into already defined teams, because this way the trainer's entire team is eliminated.

2-Not yet at the moment.

3-I don't have plans to add support for other scripts of this style yet. But rest assured, it will be implemented in the future.
 
Last edited:
Here's what it says:
Ruby:
Expand Collapse Copy
[2025-10-28 23:06:10 -0400]
[Pokémon Essentials version 21.1]
[v21.1 Hotfixes 1.0.9]

Exception: TypeError
Message: singleton can't be dumped

Backtrace:
SaveData:60:in `dump'
SaveData:60:in `block in save_to_file'
SaveData:60:in `open'
SaveData:60:in `save_to_file'
StartGame:118:in `save'
UI_Save:116:in `pbSaveScreen'
UI_PauseMenu:264:in `block in <main>'
UI_PauseMenu:124:in `block in pbStartPokemonMenu'
UI_PauseMenu:117:in `loop'
UI_PauseMenu:117:in `pbStartPokemonMenu'

It show up every time I saved.
 
Here's what it says:
Ruby:
Expand Collapse Copy
[2025-10-28 23:06:10 -0400]
[Pokémon Essentials version 21.1]
[v21.1 Hotfixes 1.0.9]

Exception: TypeError
Message: singleton can't be dumped

Backtrace:
SaveData:60:in `dump'
SaveData:60:in `block in save_to_file'
SaveData:60:in `open'
SaveData:60:in `save_to_file'
StartGame:118:in `save'
UI_Save:116:in `pbSaveScreen'
UI_PauseMenu:264:in `block in <main>'
UI_PauseMenu:124:in `block in pbStartPokemonMenu'
UI_PauseMenu:117:in `loop'
UI_PauseMenu:117:in `pbStartPokemonMenu'

It show up every time I saved.
Indeed. Those are the types of errors my script can produce when entering data that the save isn't designed for.

Although I made sure to mitigate these errors, they seem to have returned when I corrected some things.

You could also pass me the Pokémon you created so I can pinpoint which option might be the culprit.
 
Here:
Ruby:
Expand Collapse Copy
def self.give_pkmn_override #ZBox.give_pkmn_override
      new_impostor = {
        species: :UNOWN,
        level: 20,
        nickname: "Snickers",
        shiny: true,
        nature: :TIMID,
        poke_ball: :PREMIERBALL,
        ivs: { hp: 31, attack: 31, defense: 31, spatk: 31, spdef: 31, speed: 31 },
        moves: [:TRANSFORM, :HIDDENPOWER, :NIHILLIGHT, :HAPPYHOUR],
        first_moves: [:TRANSFORM, :HIDDENPOWER, :NIHILLIGHT, :HAPPYHOUR, :DRAGONPULSE, :DARKPULSE, :DRAGONRAGE, :HURRICANE, :TORMENT, :TAUNT, :CELEBRATE, :PRESENT, :SPLASH],
        base_stats: { atk: 130, spa: 230, spe: 140},
        obtain_text: "Top Secret",
        types: [:DARK, :FLYING],
        cry: "Cries/GIRATINA",
        hue_change: 330, # The value to shift the tone can be any number between -360 and 360.
        sprite_override: "ABSOL", # It is responsible for searching for sprites with this name.

        # --- Custom move ---
        custom_moves: [
          {
            move: :NIHILLIGHT,
            name: "Gaia WindWave",
            description: "A mystifying wave-like beam hits the foes easily. Cannot be stopped by the foe's ability.",
            category: :SPECIAL,
            type: :FLYING,
            power: 170,
            priority: 1,
            accuracy: 0,
            total_pp: 5
          }
        ]

      }

      pkmn = ZBox::PokemonFactory.create(new_impostor)
      pbAddPokemonWithNickname(pkmn)
    end
   
    give_pkmn_override

EDIT: Nihil Light is a move from Pokemon Legends Z-A and I'm sure the sprite itself might be a culprit.
 
I also applied to Suicune too. Maybe that you need to translate it to English.
 
Or maybe it only work inside of the ZBox.
 
How can I? I just added "ZBox::PokemonFactory.create(new_impostor)" in there. Maybe it only works inside of the ZBox?
 
How can I? I just added "ZBox::PokemonFactory.create(new_impostor)" in there. Maybe it only works inside of the ZBox?
By using "ZBox::" in this line, there's no need for it to be inside the module:
ZBox::PokemonFactory.create(new_impostor)

You just need to remove the "self." from the creation method:
def self.give_pkmn_override → def give_pkmn_override

And indeed, the NIHILLIGHT movement seems to be the culprit, because I copied it exactly and it allowed me to save without any problems. Now, if it still occurs even after removing the movement, it seems the problem is caused by some plugin incompatibility.
 
OK
 
Have you worked on HTML PKMN creator or a type chart yet?
 
I wonder if it would be possible to apply this script in a way that alters the base stats of any wild pokemon, no matter the species, by whatever value I desire, just like how the factory works for any custom pokemon created through it. I would ultimately want this to happen at random with some wild pokemon being the 'geniuses' of their habitat and species, so to speak. Maybe +10 to all their base stats, max IVs and some EVs to show how experienced they are or something.

I could do this with forms and adding them as possible encounters, then adding IVs and EVs to all mons with the 'genius' flag, but if it is possible through a script like this, it would remove a lot of bloat, especially if I want to go down the route of there being multiple talent levels.

I also thought about making a new hidden stat like IVs that just adds however much the randomly generated value is to the pokemon's stats (might still do this since the form-thing sounds too tedious beyond maybe one or two levels of talent), but I really love the idea of a genius having a higher base stat rather than just having a higher hidden stat modifier.

[Also, thank you for making this. Using this for partner pokemon and unique forms sounds very appealing.]
 
I wonder if it would be possible to apply this script in a way that alters the base stats of any wild pokemon, no matter the species, by whatever value I desire, just like how the factory works for any custom pokemon created through it. I would ultimately want this to happen at random with some wild pokemon being the 'geniuses' of their habitat and species, so to speak. Maybe +10 to all their base stats, max IVs and some EVs to show how experienced they are or something.

I could do this with forms and adding them as possible encounters, then adding IVs and EVs to all mons with the 'genius' flag, but if it is possible through a script like this, it would remove a lot of bloat, especially if I want to go down the route of there being multiple talent levels.

I also thought about making a new hidden stat like IVs that just adds however much the randomly generated value is to the pokemon's stats (might still do this since the form-thing sounds too tedious beyond maybe one or two levels of talent), but I really love the idea of a genius having a higher base stat rather than just having a higher hidden stat modifier.

[Also, thank you for making this. Using this for partner pokemon and unique forms sounds very appealing.]
1- Yes, it's possible. I think the next update will be version 2.0.0. This is because I've added several new features and rewritten some things.

Among these features is that WildPokémon will have variations in their base stats (both positive and negative) and a change in their HUE. Also, moves will now be much more configurable, allowing, for example, a Fireblast that can freeze.

2- The idea of genius Pokémon isn't bad; I'll probably add something similar in the future.

3- And no. I don't plan to add those kinds of systems, as the idea behind my script is to focus on the Pokémon's core mechanics. However, I do plan to add compatibility with those types of scripts in the future.
 
1- Yes, it's possible. I think the next update will be version 2.0.0. This is because I've added several new features and rewritten some things.

Among these features is that WildPokémon will have variations in their base stats (both positive and negative) and a change in their HUE. Also, moves will now be much more configurable, allowing, for example, a Fireblast that can freeze.

2- The idea of genius Pokémon isn't bad; I'll probably add something similar in the future.

3- And no. I don't plan to add those kinds of systems, as the idea behind my script is to focus on the Pokémon's core mechanics. However, I do plan to add compatibility with those types of scripts in the future.
That is one blessed reply you wrote there. :D
I already got DVs and AVs in my game (in addition to IVs and EVs), so I can do those hidden stats myself if I ever need them... though they become kinda redundant since you blessed my soul with those first two things. You are awesome!
 
Back
Top