• 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] How do I increase the AI of a Wild Pokemon?

  • 107
    Posts
    4
    Years
    • Seen Apr 27, 2023
    How do I increase the AI of a Wild Pokemon? It would be nice to have smarter savages.
     
    What a coincidence, I actually did this in v17 and v18 a couple of weeks ago.
    the v18 version is very similar to the code the v19 version would have, so I just changed the respective calls to match.
    didn't test it, but the other versions I mentioned were and this is just variable name changes
    You do want to change how I calculate skill though, as it bases it off inverse catch rate, which can range from 0 to 255, while trainer AI levels only check between 1 and 100 (anything higher acts like champion AI).
    You might also want to change how a "wild battler" (wild mon that will use the ai) is defined, as the way I have here is less than 2 badges and the mon is less than level 25
    Spoiler:
     
    What a coincidence, I actually did this in v17 and v18 a couple of weeks ago.
    the v18 version is very similar to the code the v19 version would have, so I just changed the respective calls to match.
    didn't test it, but the other versions I mentioned were and this is just variable name changes
    You do want to change how I calculate skill though, as it bases it off inverse catch rate, which can range from 0 to 255, while trainer AI levels only check between 1 and 100 (anything higher acts like champion AI).
    You might also want to change how a "wild battler" (wild mon that will use the ai) is defined, as the way I have here is less than 2 badges and the mon is less than level 25
    Spoiler:

    Thanks Vendily
     
    What a coincidence, I actually did this in v17 and v18 a couple of weeks ago.
    the v18 version is very similar to the code the v19 version would have, so I just changed the respective calls to match.
    didn't test it, but the other versions I mentioned were and this is just variable name changes
    You do want to change how I calculate skill though, as it bases it off inverse catch rate, which can range from 0 to 255, while trainer AI levels only check between 1 and 100 (anything higher acts like champion AI).
    You might also want to change how a "wild battler" (wild mon that will use the ai) is defined, as the way I have here is less than 2 badges and the mon is less than level 25
    Spoiler:

    ---------------------------
    PokeFallen v4.0
    ---------------------------
    [Pokémon Essentials version 18.1]

    [EBDX v1.0.15]

    Exception: NoMethodError

    Message: undefined method `badge_count' for #<PokeBattle_Trainer:0x10fe0cf8>



    Backtrace:

    AI_Move:8:in `pbChooseMoves'

    PokeBattle_AI:67:in `pbDefaultChooseEnemyCommand'

    Battle_Phase_Command:200:in `pbCommandPhaseLoop'

    Battle_Phase_Command:191:in `loop'

    Battle_Phase_Command:248:in `pbCommandPhaseLoop'

    Battle_Phase_Command:183:in `pbCommandPhase_ebdx'

    [EBDX] Battle Core:155:in `pbCommandPhase'

    Battle_StartAndEnd:320:in `pbBattleLoop_ebdx'

    Battle_StartAndEnd:320:in `logonerr'

    Battle_StartAndEnd:320:in `pbBattleLoop_ebdx'



    This exception was logged in

    C:\Users\USERNAME\Saved Games\PokeFallen v4_0\errorlog.txt.

    Press Ctrl+C to copy this message to the clipboard.
    ---------------------------
    OK
    ---------------------------

    I replaced your def pbChooseMoves (idxBattler) but this error appears in v18 with EBSDX, how to fix it?
     
    What a coincidence, I actually did this in v17 and v18 a couple of weeks ago.
    the v18 version is very similar to the code the v19 version would have, so I just changed the respective calls to match.
    didn't test it, but the other versions I mentioned were and this is just variable name changes
    You do want to change how I calculate skill though, as it bases it off inverse catch rate, which can range from 0 to 255, while trainer AI levels only check between 1 and 100 (anything higher acts like champion AI).
    You might also want to change how a "wild battler" (wild mon that will use the ai) is defined, as the way I have here is less than 2 badges and the mon is less than level 25
    Spoiler:

    Okay, replace the error line with this one:
    wildBattler = (@ battle.wildBattle? && @ battle.opposes? (idxBattler) && @ battle.pbPlayer.numbadges <2 && user.level <25)

    But a new error has come up in which I have not yet succeeded:
    ---------------------------
    PokeFallen v4.0
    ---------------------------
    [Pokémon Essentials version 18.1]

    [EBDX v1.0.15]

    Exception: NoMethodError

    Message: undefined method `species_data' for #<PokeBattle_Pokemon:0x10931b10>



    Backtrace:

    AI_Move: 14: in `pbChooseMoves'

    PokeBattle_AI: 67: in `pbDefaultChooseEnemyCommand '

    Battle_Phase_Command: 200: in `pbCommandPhaseLoop '

    Battle_Phase_Command: 191: in `loop '

    Battle_Phase_Command:248:in `pbCommandPhaseLoop'

    Battle_Phase_Command: 183: in `pbCommandPhase_ebdx '

    [EBDX] Battle Core:155:in `pbCommandPhase'

    Battle_StartAndEnd: 320: in `pbBattleLoop_ebdx '

    Battle_StartAndEnd: 320: in `logonerr '

    Battle_StartAndEnd: 320: in `pbBattleLoop_ebdx '



    This exception was logged in

    C: \ Users \ USERNAME \ Saved Games \ PokeFallen v4_0 \ errorlog.txt.

    Press Ctrl + C to copy this message to the clipboard.
    ---------------------------
    OK
    ---------------------------
     
    Oh man you were on v18 the whole time!
    well, at least you have it working, sorry for assuming.
    edit: sent to early
    Spoiler:
     
    Oh man you were on v18 the whole time!
    well, at least you have it working, sorry for assuming.
    edit: sent to early
    Spoiler:

    you are one of the most caring people in this community, thank you
     
    What a coincidence, I actually did this in v17 and v18 a couple of weeks ago.
    the v18 version is very similar to the code the v19 version would have, so I just changed the respective calls to match.
    didn't test it, but the other versions I mentioned were and this is just variable name changes
    You do want to change how I calculate skill though, as it bases it off inverse catch rate, which can range from 0 to 255, while trainer AI levels only check between 1 and 100 (anything higher acts like champion AI).
    You might also want to change how a "wild battler" (wild mon that will use the ai) is defined, as the way I have here is less than 2 badges and the mon is less than level 25
    Spoiler:

    Can you also post the method of increasing the AI of wild Pokemon for version 17.2?
     
    Can you also post the method of increasing the AI of wild Pokemon for version 17.2?

    Certainly!
    Edit: wrong one!
    Spoiler:
     
    Certainly!
    Edit: wrong one!
    Spoiler:

    Thanks a lot!
     
    Back
    Top