- Joined
- Jun 24, 2021
- Posts
- 26
- Pronouns
- she/her
ok
				
			 
				
			
			1-Yes. In fact, the next update will feature examples of how to use the factory for WildBattles and, especially, TrainerBattles.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"
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[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'Indeed. Those are the types of errors my script can produce when entering data that the save isn't designed for.Here's what it says:
Ruby:[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.
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_overrideRegarding Suicune, can you also send me the creation method and see the possible error?Or maybe it only work inside of the ZBox.
By using "ZBox::" in this line, there's no need for it to be inside the module:How can I? I just added "ZBox::PokemonFactory.create(new_impostor)" in there. Maybe it only works inside of the ZBox?
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.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. I'm currently working on giving Pokémon its own type chart.Have you worked on HTML PKMN creator or a type chart yet?
That is one blessed reply you wrote there. :D1- 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.
