• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Which Pokémon Masters protagonist do you like most? Let us know by casting a vote in our Masters favorite protagonist poll here!
  • Red, Hilda, Paxton, or Kellyn - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Scripting Question] this script was made for v18 to lower pokemon levels by losing battles??

this script was made for v18 to lower pokemon levels by losing battles. But as I am still waiting for EbsDx I did not upgrade, could someone modify it for v17?

Spoiler:
 
this script was made for v18 to lower pokemon levels by losing battles. But as I am still waiting for EbsDx I did not upgrade, could someone modify it for v17?

Spoiler:

While you could find a way to downgrade this to v17, I think it would be better to tell you not to wait for EBDX to upgrade. Why are you waiting? EBDX is a cosmetic enhancement, and is literally going to be a plug-and-play script. You do NOT need EBDX to be able to develop your game, only when it's time to release it. Just upgrade your project to v18, do literally everything else that your project needs that doesn't require EBDX (which is going to be a LOT), and when EBDX comes out, just throw it in your project and you're done. Seriously, you're doing yourself a huge disservice by waiting to upgrade your project. Just do it sooner rather than later and get the hassle over with.
 
While you could find a way to downgrade this to v17, I think it would be better to tell you not to wait for EBDX to upgrade. Why are you waiting? EBDX is a cosmetic enhancement, and is literally going to be a plug-and-play script. You do NOT need EBDX to be able to develop your game, only when it's time to release it. Just upgrade your project to v18, do literally everything else that your project needs that doesn't require EBDX (which is going to be a LOT), and when EBDX comes out, just throw it in your project and you're done. Seriously, you're doing yourself a huge disservice by waiting to upgrade your project. Just do it sooner rather than later and get the hassle over with.


I understand that updating is the best option, I'm eager to update soon. But, all versions of my game went with EliteBattle, my audience would hate to see that the battle system has regressed with an update. So I would like to adapt this and look forward to the launch of EBSDX. Can you help me with this script?
 
I understand that updating is the best option, I'm eager to update soon. But, all versions of my game went with EliteBattle, my audience would hate to see that the battle system has regressed with an update. So I would like to adapt this and look forward to the launch of EBSDX. Can you help me with this script?

I hate to disappoint, but since you plan on updating to the new version of Essentials when Elite Battle gets updated. It's going to be difficult to find someone to down grade a script for you when you plan on scraping it later...

NettoHikari put it best, you should just consider updating to v18.1. Your current version of your game might get a temporary visual downgrade, but developing your game will become much easier and you will find better support for the features your wanting to add.
 
I understand that updating is the best option, I'm eager to update soon. But, all versions of my game went with EliteBattle, my audience would hate to see that the battle system has regressed with an update. So I would like to adapt this and look forward to the launch of EBSDX. Can you help me with this script?

Your audience isn't making your game, you are. Only YOU decide what course of action to take. That said, I believe that it's foolish to work on an outdated and objectively inferior version of Essentials when you are already planning on upgrading it, hence why I am advising you to not wait for EBDX to upgrade. Both you and your audience can afford to be patient while EBDX is in development. And as GT-Baka said, I personally would hate to spend time downgrading a script that I KNOW would be outdated and would be scrapped very soon.
 
Your audience isn't making your game, you are. Only YOU decide what course of action to take. That said, I believe that it's foolish to work on an outdated and objectively inferior version of Essentials when you are already planning on upgrading it, hence why I am advising you to not wait for EBDX to upgrade. Both you and your audience can afford to be patient while EBDX is in development. And as GT-Baka said, I personally would hate to spend time downgrading a script that I KNOW would be outdated and would be scrapped very soon.


I would upgrade if I didn't have to export my multi-frame Bw-style sprites to a single frame of the essentials base battle system. Since several are Fakemons.
 
but in honor of the GT-Baka that helps me a lot, I will upgrade v18.

You can keep the multi-frame animation, you will have to wait for Elite Battle to be updated before you can use them. But Luka S.J. is working on it so hopefully you can re-add your animations soon.

Edit: I think Pokemon Essentials supports gif sprites, if you would like I can convert your multi-frame Pokemon sprites to an animation to make the transition to Essentials v18.1 easier for you.
 
Last edited:
You can keep the multi-frame animation, you will have to wait for Elite Battle to be updated before you can use them. But Luka S.J. is working on it so hopefully you can re-add your animations soon.

Edit: I think Pokemon Essentials supports gif sprites, if you would like I can convert your multi-frame Pokemon sprites to an animation to make the transition to Essentials v18.1 easier for you.


Gt-Baka, you're an amazing guy, I love you bro! But I will not ask you for this. This time I face and thank you infinitely for making yourself available, Merry Christmas and a prosperous new year friend. I hope you enjoy it in the best way, if you have a game, tell me I'm going to play, I'm Brazilian but I insist on that.
 
You can keep the multi-frame animation, you will have to wait for Elite Battle to be updated before you can use them. But Luka S.J. is working on it so hopefully you can re-add your animations soon.

Edit: I think Pokemon Essentials supports gif sprites, if you would like I can convert your multi-frame Pokemon sprites to an animation to make the transition to Essentials v18.1 easier for you.


Gt-Baka, can you help me with something that I think you would know, how do you configure all items used in breeding to go away?
 
In order to have the parent Pokemon lose their items after producing an egg you need 2 things. The first being an array of items you wish to discard (You don't want to accidentally lose your Amulet Coin or EXP Share)
and the second part that actually removes the items.
In PField_DayCare above def pbDayCareGenerateEgg add this:
Code:
BREEDINGITEM = [202,70]
The numbers listed here match the numbers of the items in PBS/items.txt with 202 being Everstone and 70 being Destiny Knot. You can add as many items to this list as you want. These will be the items that will be removed once an egg is generated.

Now find the this block of code:
Code:
  # Set all stats
  egg.happiness = 120
  egg.iv[0] = ivs[0]
  egg.iv[1] = ivs[1]
  egg.iv[2] = ivs[2]
  egg.iv[3] = ivs[3]
  egg.iv[4] = ivs[4]
  egg.iv[5] = ivs[5]
  egg.moves[0] = finalmoves[0]
  egg.moves[1] = finalmoves[1]
  egg.moves[2] = finalmoves[2]
  egg.moves[3] = finalmoves[3]
  egg.calcStats
  egg.obtainText = _INTL("Day-Care Couple")
  egg.name = _INTL("Egg")
  eggSteps = pbGetSpeciesData(babyspecies,egg.form,SpeciesStepsToHatch)
  egg.eggsteps = eggSteps
  egg.givePokerus if rand(65536)<POKERUS_CHANCE
  # Add egg to party
  $Trainer.party[$Trainer.party.length] = egg
and add this to it:
Code:
  mother.item = 0 if BREEDINGITEM.include?(mother.item)
  father.item = 0 if BREEDINGITEM.include?(father.item)
If either of the parent Pokemon is holding an item that you listed in the BREEDINGITEM array, then it will be removed.
 
In order to have the parent Pokemon lose their items after producing an egg you need 2 things. The first being an array of items you wish to discard (You don't want to accidentally lose your Amulet Coin or EXP Share)
and the second part that actually removes the items.
In PField_DayCare above def pbDayCareGenerateEgg add this:
Code:
BREEDINGITEM = [202,70]
The numbers listed here match the numbers of the items in PBS/items.txt with 202 being Everstone and 70 being Destiny Knot. You can add as many items to this list as you want. These will be the items that will be removed once an egg is generated.

Now find the this block of code:
Code:
  # Set all stats
  egg.happiness = 120
  egg.iv[0] = ivs[0]
  egg.iv[1] = ivs[1]
  egg.iv[2] = ivs[2]
  egg.iv[3] = ivs[3]
  egg.iv[4] = ivs[4]
  egg.iv[5] = ivs[5]
  egg.moves[0] = finalmoves[0]
  egg.moves[1] = finalmoves[1]
  egg.moves[2] = finalmoves[2]
  egg.moves[3] = finalmoves[3]
  egg.calcStats
  egg.obtainText = _INTL("Day-Care Couple")
  egg.name = _INTL("Egg")
  eggSteps = pbGetSpeciesData(babyspecies,egg.form,SpeciesStepsToHatch)
  egg.eggsteps = eggSteps
  egg.givePokerus if rand(65536)<POKERUS_CHANCE
  # Add egg to party
  $Trainer.party[$Trainer.party.length] = egg
and add this to it:
Code:
  mother.item = 0 if BREEDINGITEM.include?(mother.item)
  father.item = 0 if BREEDINGITEM.include?(father.item)
If either of the parent Pokemon is holding an item that you listed in the BREEDINGITEM array, then it will be removed.

Man I would love to have your knowledge about RUBI, thank you very much for that! You're making my game's RPG completely change and for the better <3
 
In order to have the parent Pokemon lose their items after producing an egg you need 2 things. The first being an array of items you wish to discard (You don't want to accidentally lose your Amulet Coin or EXP Share)
and the second part that actually removes the items.
In PField_DayCare above def pbDayCareGenerateEgg add this:
Code:
BREEDINGITEM = [202,70]
The numbers listed here match the numbers of the items in PBS/items.txt with 202 being Everstone and 70 being Destiny Knot. You can add as many items to this list as you want. These will be the items that will be removed once an egg is generated.

Now find the this block of code:
Code:
  # Set all stats
  egg.happiness = 120
  egg.iv[0] = ivs[0]
  egg.iv[1] = ivs[1]
  egg.iv[2] = ivs[2]
  egg.iv[3] = ivs[3]
  egg.iv[4] = ivs[4]
  egg.iv[5] = ivs[5]
  egg.moves[0] = finalmoves[0]
  egg.moves[1] = finalmoves[1]
  egg.moves[2] = finalmoves[2]
  egg.moves[3] = finalmoves[3]
  egg.calcStats
  egg.obtainText = _INTL("Day-Care Couple")
  egg.name = _INTL("Egg")
  eggSteps = pbGetSpeciesData(babyspecies,egg.form,SpeciesStepsToHatch)
  egg.eggsteps = eggSteps
  egg.givePokerus if rand(65536)<POKERUS_CHANCE
  # Add egg to party
  $Trainer.party[$Trainer.party.length] = egg
and add this to it:
Code:
  mother.item = 0 if BREEDINGITEM.include?(mother.item)
  father.item = 0 if BREEDINGITEM.include?(father.item)
If either of the parent Pokemon is holding an item that you listed in the BREEDINGITEM array, then it will be removed.

I wanted to upgrade this script to v18, it is essential for me ... could you help me?
It is a Multiple Saves Script.

Spoiler:


the problem is that i get this error in v18.

Spoiler:
 
I wanted to upgrade this script to v18, it is essential for me ... could you help me?
It is a Multiple Saves Script.

Spoiler:


the problem is that i get this error in v18.

Spoiler:


I am not sure, but I will take a look this weekend when I have some free time.
 
I am not sure, but I will take a look this weekend when I have some free time.


they did an upgrade for me, I'll test it, thanks! But since this has been fixed, I have another question kkkkkk.
How do I give Shinys Pokémon a very low Catch rate? I would like to standardize a rate for all shinys, so it would be simple. And I would also like to add another system. Put a percentage of the chance that the Shinys pokemon will escape during battles. If you can, my next big update will change the shinys hunt completely 😮😮😮
 
Note quite a standardize catchrate for all shinies, but you can make it harder to catch them!

In PField_EncounterModifiers change:
Code:
Events.onWildPokemonCreate += proc { |_sender, e|
  pokemon = e[0]
  if $game_switches[SHINY_WILD_POKEMON_SWITCH]
    pokemon.makeShiny
  end
}
to this. Change the XX to the variable you wish to use and change 0.5 the the odds you want. 0.5 being half the chance to catch the Pokemon.
Code:
Events.onWildPokemonCreate += proc { |_sender, e|
  pokemon = e[0]
  if $game_switches[SHINY_WILD_POKEMON_SWITCH]
    pokemon.makeShiny
  end
  if pokemon.shiny?
    $game_variables[XX] = 0.5
  else
    $game_variables[XX] = 1
  end
}

Next go under PokeBall_CatchEffects and for every instance of "catchRate" add *$game_variables[XX] to it.
Since the PokeBall and PremierBall don't have any modifiers you will need to add. Paste this above the GreatBall
Code:
BallHandlers::ModifyCatchRate.add(:POKEBALL,proc { |ball,catchRate,battle,battler,ultraBeast|
  next catchRate*$game_switches[50]
})

BallHandlers::ModifyCatchRate.add(:PREMIERBALL,proc { |ball,catchRate,battle,battler,ultraBeast|
  next catchRate*$game_switches[50]
})
 
Last edited:
Note quite a standardize catchrate for all shinies, but you can make it harder to catch them!

In PField_EncounterModifiers change:
Code:
Events.onWildPokemonCreate += proc { |_sender, e|
  pokemon = e[0]
  if $game_switches[SHINY_WILD_POKEMON_SWITCH]
    pokemon.makeShiny
  end
}
to this. Change the XX to the variable you wish to use and change 0.5 the the odds you want. 0.5 being half the chance to catch the Pokemon.
Code:
Events.onWildPokemonCreate += proc { |_sender, e|
  pokemon = e[0]
  if $game_switches[SHINY_WILD_POKEMON_SWITCH]
    pokemon.makeShiny
  end
  if pokemon.shiny?
    $game_variables[XX] = 0.5
  else
    $game_variables[XX] = 1
  end
}

Next go under PokeBall_CatchEffects and for every instance of "catchRate" add *$game_variables[XX] to it.
Since the PokeBall and PremierBall don't have any modifiers you will need to add. Paste this above the GreatBall
Code:
BallHandlers::ModifyCatchRate.add(:POKEBALL,proc { |ball,catchRate,battle,battler,ultraBeast|
  next catchRate*$game_switches[50]
})

BallHandlers::ModifyCatchRate.add(:PREMIERBALL,proc { |ball,catchRate,battle,battler,ultraBeast|
  next catchRate*$game_switches[50]
})

tomorrow i'll tell you if it worked! But, would there be a way to add a system that makes shinys Pokémon run away during the game, Roamings-style Pokémon that use the Roar attack? They don't need to use that move, just run away ... would it be possible?
 
Back
Top