• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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.

How to Stage an Event Double Encounter + How to make Wild Pokemon AI "Smarter"

39
Posts
13
Years
  • I plan to make a map where you have a partner and there is an event battle which contains two pokemon at the end of the map. Is there a way to stage an event double wild battle? And also, how do you make pokemon AI "smarter", as in the wild pokemon will not use status affecting moves like Thunder Wave if your pokemon is already Paralyzed or something. The reason for this is that my fangame is mostly battling wild pokemon.

    One last question, how much more exp do you get when fighting a pokemon from a trainer, than a pokemon with the same level in the wild? Please answer in percents (i.e 15% more exp, etc)

    I appreciate all the help. Sincerely,
    HankMan
     

    Maruno

    Lead Dev of Pokémon Essentials
    5,286
    Posts
    16
    Years
    • Seen May 3, 2024
    For double wild event encounters, use this:

    Code:
    pbDoubleWildBattle(PBSpecies::PIKACHU,17,PBSpecies::CLEFAIRY,19)
    That's for a Level 17 Pikachu and a Level 19 Clefairy. There are two optional arguments you can put on the end, to record the outcome and decide whether the player can flee respectively. As with double trainer battles against two trainers, make sure to deactivate the event you didn't speak to, so that you can't speak to each in turn and battle them twice.

    The AI for deciding which move to use is kept in the script section PokeBattle_AI, sorted by function code. Generally speaking, AI is a tough thing to do, but actually here it's quite easy. Try not to go to extremes when changing the probabilities, because that's boring.

    You gain 50% extra Exp from a trainer-owned Pokémon than from an identical wild Pokémon.
     
    39
    Posts
    13
    Years
  • Thank you very much, sir! ^_^

    Uh-oh, new problem. It seems that when I test the double wild battle, only the first pokemon mentioned in the script takes action. The second just does nothing. Is there a way to fix this? Thanks.
     
    Last edited:

    Maruno

    Lead Dev of Pokémon Essentials
    5,286
    Posts
    16
    Years
    • Seen May 3, 2024
    It works fine for me. Make sure you're using the latest version of Essentials - this was a bug in an older version, but was fixed in (apparently) version 1.
     
    39
    Posts
    13
    Years
  • Hmm... Now it works for me. Sometimes it works, sometimes it doesn't. Maybe it's due to my having a partner trainer for the battle.
     

    Maruno

    Lead Dev of Pokémon Essentials
    5,286
    Posts
    16
    Years
    • Seen May 3, 2024
    Yes, I put it on in response to this question, since it make me notice that it was missing.

    Y'know, anyone can edit the wiki...
     

    Maruno

    Lead Dev of Pokémon Essentials
    5,286
    Posts
    16
    Years
    • Seen May 3, 2024
    Sorry, I forgot you were blind. I didn't know Wikia doesn't cater to blind people, but it's nice to see you're doing what you're doing despite it all.
     
    Back
    Top