• 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

Zik

Novice
Member
Joined
Aug 16, 2024
Posts
12
Zik submitted a new resource:

Pokémon Factory - It allows you to create custom Pokémon and Eggs using a hash format.

This script was originally part of a utility library I'm creating, but since it has no dependencies, I decided to release it as a standalone script. It allows you to create custom Pokémon and Eggs using a hash format.

It changes the creation process from this:
Ruby:
Expand Collapse Copy
pkmn = Pokemon.new(:EEVEE, 10)

pkmn.name = "Hope"
pkmn.shiny = true
pkmn.poke_ball = :PREMIERBALL
pkmn.nature = :TIMID
pkmn.item = :SOOTHEBELL
pkmn.iv[:HP]              = 31
pkmn.iv[:ATTACK]          = 31
pkmn.iv[:DEFENSE]...

Read more about this resource...
 
AMAZING! Please do the next update including custom sprites or HTMLs because I want my dream to come true with Pokémon Making!
 
Zik updated Pokémon Factory with a new update entry:

Added "variant:" functionality.

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...

Read the rest of this update entry...
 
How do I assign type mods (like assigning types like Fire or Water) onto Pokemon?
 
How do I assign type mods (like assigning types like Fire or Water) onto Pokemon?
Using "types:".

Example:
Ruby:
Expand Collapse Copy
def self.give_eevee
      eevee_data = {
        species: :EEVEE,
        level: 10,
        nickname: "Hope",
        shiny: true,
        nature: :TIMID,
        item: :SOOTHEBELL,
        poke_ball: :PREMIERBALL,
        ivs: { hp: 31, attack: 31, defense: 31, spatk: 31, spdef: 31, speed: 31 },
        moves: [:SWIFT, :CHARM, :BITE],
        types: [:WATER, :FIRE] # HERE
      }

      pkmn = PokemonFactory.create(eevee_data)
      pbAddPokemonWithNickname(pkmn)
    end

Example with "variant:"
Ruby:
Expand Collapse Copy
def self.give_eevee
      eevee_data = {
        species: :EEVEE,
        level: 10,
        nickname: "Hope",
        shiny: true,
        nature: :TIMID,
        item: :SOOTHEBELL,
        poke_ball: :PREMIERBALL,
        ivs: { hp: 31, attack: 31, defense: 31, spatk: 31, spdef: 31, speed: 31 },
        moves: [:SWIFT, :CHARM, :BITE],

        variants: [
          { weight: 50,
            config: {
              types: [:WATER]
            }
          },
          
          { weight: 50,
            config: {
              types: [:FIRE]
            }
          } 
        ]
      }

      pkmn = PokemonFactory.create(eevee_data)
      pbAddPokemonWithNickname(pkmn)
    end
 
Last edited:
Also please translate into English on the next update.
 
Zik updated Pokémon Factory with a new update entry:

Added custom_moves:

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...

Read the rest of this update entry...
 
Zik updated Pokémon Factory with a new update entry:

Added sprite_override: and hue_change:

This update brings two new features.
hue_change:
An option that allows you to change the sprite's hue to a value ranging from -360 to 360.

sprite_override:
An option that allows you to change the sprites your Pokémon loads. This doesn't require creating a variant in the PBS, and it still maintains the original species. Just make sure to add the corresponding sprites to the subfolders of your Pokémon folder.

Both options can be used together.


Ruby:
Expand Collapse Copy
def self.give_eevee_override...

Read the rest of this update entry...
 
You should try with breeding/egg groups for one thing.
 
  • Like
Reactions: Zik
Ruby:
Expand Collapse Copy
#==============================================================================
    def self.fight_eevee # Se puede llamar mediante un evento con: ZBox.fight_eevee / # Can be called from an event with: ZBox.fight_eevee
      eevee_impostor = {
        species: :EEVEE,
        level: 10,
        nickname: "Impostor",
        shiny: true,
        nature: :TIMID,
        poke_ball: :PREMIERBALL,
        ivs: { hp: 31, attack: 31, defense: 31, spatk: 31, spdef: 31, speed: 31 },
        moves: [:SWIFT, :CHARM, :BITE],
        hue_change: 340, # El valor para cambiar el tono puede ser cualquier número entre -360 y 360. / The value to shift the tone can be any number between -360 and 360.
        sprite_override: "PIKACHU" # Se encarga de buscar los sprites con este nombre. / It is responsible for searching for sprites with this name.
      }

      pkmn = PokemonFactory.create(eevee_impostor)
      WildBattle.start(pkmn)
    end

Can fighting this Factory-created Pokemon helped?
 
Ruby:
Expand Collapse Copy
#==============================================================================
    def self.fight_eevee # Se puede llamar mediante un evento con: ZBox.fight_eevee / # Can be called from an event with: ZBox.fight_eevee
      eevee_impostor = {
        species: :EEVEE,
        level: 10,
        nickname: "Impostor",
        shiny: true,
        nature: :TIMID,
        poke_ball: :PREMIERBALL,
        ivs: { hp: 31, attack: 31, defense: 31, spatk: 31, spdef: 31, speed: 31 },
        moves: [:SWIFT, :CHARM, :BITE],
        hue_change: 340, # El valor para cambiar el tono puede ser cualquier número entre -360 y 360. / The value to shift the tone can be any number between -360 and 360.
        sprite_override: "PIKACHU" # Se encarga de buscar los sprites con este nombre. / It is responsible for searching for sprites with this name.
      }

      pkmn = PokemonFactory.create(eevee_impostor)
      WildBattle.start(pkmn)
    end

Can fighting this Factory-created Pokemon helped?
If you do it inside the ZBox module in 002_Events:
Code:
Expand Collapse Copy
module Zbox
    #==============================================================================
    #                            Example events...
    #==============================================================================
   
   
    #==============================================================================
    #    ↓↓↓↓↓↓     ** Crea tus propios Pokémon apartir de aquí. **    ↓↓↓↓↓↓
    #       ↓↓↓↓↓↓     ** Create your own Pokémon from here. **     ↓↓↓↓↓↓
    #==============================================================================
   
   
   #==============================================================================
    def self.fight_eevee # Se puede llamar mediante un evento con: ZBox.fight_eevee / # Can be called from an event with: ZBox.fight_eevee
      eevee_impostor = {
        species: :EEVEE,
        level: 10,
        nickname: "Impostor",
        shiny: true,
        nature: :TIMID,
        poke_ball: :PREMIERBALL,
        ivs: { hp: 31, attack: 31, defense: 31, spatk: 31, spdef: 31, speed: 31 },
        moves: [:SWIFT, :CHARM, :BITE],
        hue_change: 340, # El valor para cambiar el tono puede ser cualquier número entre -360 y 360. / The value to shift the tone can be any number between -360 and 360.
        sprite_override: "PIKACHU" # Se encarga de buscar los sprites con este nombre. / It is responsible for searching for sprites with this name.
      }

      pkmn = PokemonFactory.create(eevee_impostor)
      WildBattle.start(pkmn)
    end
   




   
end
It will work as written


If you decide to do it outside of the module, two minor adjustments would be necessary:
Ruby:
Expand Collapse Copy
def fight_eevee # Can be called from an event with: fight_eevee
      eevee_impostor = {
        species: :EEVEE,
        level: 10,
        nickname: "Impostor",
        shiny: true,
        nature: :TIMID,
        poke_ball: :PREMIERBALL,
        ivs: { hp: 31, attack: 31, defense: 31, spatk: 31, spdef: 31, speed: 31 },
        moves: [:SWIFT, :CHARM, :BITE],
        hue_change: 340,
        sprite_override: "PIKACHU"
      }
      pkmn = ZBox::PokemonFactory.create(eevee_impostor) # We include the module in this section
      WildBattle.start(pkmn)
    end
 
OK. So yeah. I hope to translate to English because I don't understand Spanish.
 
I tried type mod on Pokemon, and it won't work. I tried Water and Ice Typing on Suicune and it retains its original Water type.
 
Maybe it has something to do with plugins. I have to remove them or tested the orignal.
 
I think I got a crash that says "singleton can't be dumped" when I save a file. Does it have to do with custom sprites?
 
I think I got a crash that says "singleton can't be dumped" when I save a file. Does it have to do with custom sprites?
I'd need to see the error log to see if my script had anything to do with it. It can also happen if you had a saved game, removed plugins, and tried saving again. I'm testing my script in three different environments (Vanilla 21.1, La Base de Sky, and a FanGame with a significant number of plugins). And I've made sure that no crashes occur in all three.
 
Back
Top