- 17
- Posts
- 5
- Years
- Seen Mar 6, 2023
I am working on a project, and am wondering if it is possible to make it so Pokemon Eggs can be recieved from the mining game, and go to the player's party.
I am working on a project, and am wondering if it is possible to make it so Pokemon Eggs can be recieved from the mining game, and go to the player's party.
In theory it might be possible. I'd imagine you'd first create a Dummy item, make that dummy item obtainable in the game and once the mining game is complete you'd use a script command to immediately remove said dummy item and give the player the egg. then repeat this for each new pokemon you'd want the egg to have (or just make it a random chance to get any of the desired pokemon, depends on how you want it to work.)
I am currently working with a team to create a remake of a Roblox game called Pokemon Brick Bronze, but in that game, from the mining mini game, you could get fossilized eggs that would go to your team or box, I am wondering if it would be possible to add in a fossilized egg.
def pbAddEggWithStorage(pokemon,text="")
return false if !pokemon || !$Trainer
if pokemon.is_a?(String) || pokemon.is_a?(Symbol)
pokemon = getID(PBSpecies,pokemon)
end
if pokemon.is_a?(Integer)
pokemon = PokeBattle_Pokemon.new(pokemon,EGGINITIALLEVEL,$Trainer)
end
dexdata = pbOpenDexData
pbDexDataOffset(dexdata,pokemon.fSpecies,21)
eggsteps = dexdata.fgetw
dexdata.close
# Set egg's details
pokemon.name = _INTL("Egg")
pokemon.eggsteps = eggsteps
pokemon.obtainText = text
pokemon.calcStats
return pbAddPokemonSilent(pokemon)
end
pbAddEggWithStorage(:PIKACHU)
or perhaps pbAddEggWithStorage(:PIKACHU,_INTL("Mining"))
to make the summary screen say "A mysterious Pokémon Egg received from Mining."I merged your threads, since in the end it's still the same question
If you're following the first steps, you can just do the script method of transforming a pokemon into an egg, by setting some egg steps on it, and calling it an egg.
Here's a little method i made that creates an egg, given a species, and adds it to either the party or the box. You'd call it likeCode:def pbAddEggWithStorage(pokemon,text="") return false if !pokemon || !$Trainer if pokemon.is_a?(String) || pokemon.is_a?(Symbol) pokemon = getID(PBSpecies,pokemon) end if pokemon.is_a?(Integer) pokemon = PokeBattle_Pokemon.new(pokemon,EGGINITIALLEVEL,$Trainer) end dexdata = pbOpenDexData pbDexDataOffset(dexdata,pokemon.fSpecies,21) eggsteps = dexdata.fgetw dexdata.close # Set egg's details pokemon.name = _INTL("Egg") pokemon.eggsteps = eggsteps pokemon.obtainText = text pokemon.calcStats return pbAddPokemonSilent(pokemon) end
pbAddEggWithStorage(:PIKACHU)
or perhapspbAddEggWithStorage(:PIKACHU,_INTL("Mining"))
to make the summary screen say "A mysterious Pokémon Egg received from Mining."