• 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.

[Scripting Question] Wild ZORUA / ZOROARK ability ILLUSION

9
Posts
4
Years
    • Seen Apr 18, 2024
    [Essentials v20.1]

    Hi, I know that :ILLUSION ability only works with trainers. I want it to work with a hardcoded wild too.

    Does anyone know how I could hardcode a wild Zoroark event to start with the illusion of a specific pokemon? An event like this:

    Code:
    pkmn = Pokemon.new(:ZOROARK, 50)
    pkmn.ability = :ILLUSION
    pkmn.form = 0
    
    # Modify Zoroark's Illusion to (Pikachu, for example):
    
    # illusion_however_it_is_done = :PIKACHU
    
    WildBattle.start(pkmn)

    I know there's some code that needs to be touched for this to work, but I don't even know where to start.

    I need help! :D

    (Please, without using $game_switches, I don't think it's necessary for this)

    Thank you! <3
     
    Last edited:

    Frost the Fox

    FroststormFrenzy
    16
    Posts
    2
    Years
    • Seen Jun 14, 2023
    Try setting "@effects[PBEffects::Illusion]" during battle, as that's the way it works. With EBDX, you could just have it set in a battle script, but idk how you'd do it in vanilla Essentials without using variables/switches in some way
     
    188
    Posts
    9
    Years
    • Seen May 16, 2024
    The original Illusion script sets the species and name as the last active Pokémon in the party (unless the Illusionist is the only active member). What you want to try and do for Illusion in the wild is to set the species and name to a random local species. The easiest way I know how is to hard code two arrays, one for the species and one for the name. In a case/when statement based on the current map, set the arrays to whichever species are found locally and their names (how the species would appear in the game's text). At the end of the case statement, use wildspecies.sample to return a random element to a variable (randelem for explanation's sake) and set the wild Pokémon's species and name to the random element from the species and name arrays (use the same array index).
     
    9
    Posts
    4
    Years
    • Seen Apr 18, 2024
    Thanks! But don't worry, I already solved it:

    (broken link removed)
     
    Back
    Top