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

[Other✓] A Few Battle Script Questions [Firered]

Crocky

SuperScarlet!
97
Posts
15
Years
    • Seen Jul 23, 2020
    How can I make a trainer battle script where the trainer checks that you have at least 2 Pokémon before you battle them? (Used for Double Battles)

    How can I implement the VS Seeker Script (so you can rematch defeated trainers) into a basic trainerbattle script?

    I'd really appreciate it if you would make it work into this script I currently use for battles.
    Spoiler:


    Also, is there a trainer battle editor out that allows you to set the Nature, EVs and IVs of a Pokémon?
     
    5,256
    Posts
    16
    Years
  • How can I make a trainer battle script where the trainer checks that you have at least 2 Pokémon before you battle them? (Used for Double Battles)

    I haven't tested it, but I believe trainerbattle 0x4 does this.

    How can I implement the VS Seeker Script (so you can rematch defeated trainers) into a basic trainerbattle script?

    After the trainerbattle command in a script, add this:

    Code:
    special2 LASTRESULT 0x39
    compare LASTRESULT 0x1
    if 0x1 goto @snippet1

    where @snippet1 would have the data for the rematch. I believe special 0x39 checks if the trainer has "agreed" to re-matching after you use the VS. Seeker.

    I'd really appreciate it if you would make it work into this script I currently use for battles.

    Code:
    #dynamic 0x800000
    
    #org @start
    trainerbattle 0x0 0x1 0x0 @string1 @string2
    msgbox @string3 0x6
    end
    
    #org @string1
    = Go, all my PIKACHUs!
    
    #org @string2
    = Nooo! My PIKACHUs!!!!!
    
    #org @string3
    = My PIKACHUs can be used to\ncharge my Nintendo DS Lite.
    This should work fine; make sure the overworld sprite in AdvanceMap has the "Trainer:" field checked, and a value in the "View radius:" field. As an aside, "PIKACHU" would be the grammatically correct way to refer to the plural of Pikachu, as is the case with all Pokémon.

    Also, is there a trainer battle editor out that allows you to set the Nature, EVs and IVs of a Pokémon?
    http://www.pokecommunity.com/showthread.php?t=307117

    This thread by DoesntKnowHowToPlay explains how to implement trainers with EVs on their Pokémon. As for the other two, I believe IVs are always maxed out on NPC Pokémon, and the natures are always neutral, though I haven't checked that so don't quote me on it.
     

    Crocky

    SuperScarlet!
    97
    Posts
    15
    Years
    • Seen Jul 23, 2020
    Spoiler:


    Thank you, I was able to get the double battle script working perfectly. However, I have been having issues with the vs seeker part. However, when I use the VS Seeker with this script:
    Spoiler:

    After I defeat the trainer, if I use the seeker nearby this trainer, it says there are no trainers within range to battle. I have view radius and the trainer flag set, do you know what would cause this issue?
     
    5,256
    Posts
    16
    Years
  • That very well may just be the VS. Seeker's own timer. If I recall correctly, you can only use the VS. Seeker after every fifty steps. Try running back and forth a while.
     

    Crocky

    SuperScarlet!
    97
    Posts
    15
    Years
    • Seen Jul 23, 2020
    That very well may just be the VS. Seeker's own timer. If I recall correctly, you can only use the VS. Seeker after every fifty steps. Try running back and forth a while.

    Unfortunately it isn't the VS Seeker's timer. The message I am getting, "There are no TRAINERS within range who can battle... The VS SEEKER was turned off" is the same message that is displayed when you are in areas with no trainers at all, such as towns.
     
    5,256
    Posts
    16
    Years
  • Hm, the double battle in FireRed on Bond Bridge's rematch isn't trainerbattle 0x4 but trainerbattle 0x7. That may be the trainerbattle parameter for re-matching double battles.

    Try this?

    Code:
    #dynamic 0x800000
    #org @start
    trainerbattle 0x4 0x285 0x0 @string1 @string2 @string5
    special2 LASTRESULT 0x39
    compare LASTRESULT 0x1
    if 0x1 goto @snippet1
    msgbox @string3 0x6
    end
    
    #org @snippet1
    trainerbattle [B]0x7[/B] 0x285 0x0 @string4 @string2 @string5
    msgbox @string3 0x6
    end
    
    
    #org @string1
    = Go, all my Pikachu!
    
    #org @string2
    = Nooo! My Pikachu!
    
    #org @string3
    = My Pikachu can be used to\ncharge my Nintendo DS Lite.
    
    #org @string4
    = My Pikachu are back!
    
    #org @string5
    = You need two Pokémon to double\nbattle!
     

    Crocky

    SuperScarlet!
    97
    Posts
    15
    Years
    • Seen Jul 23, 2020
    Spoiler:

    Hmm, even with that change it still is not working. I tested this script in a clean rom, and the script I compiled in XSE will not work with the VS Seeker, however the original double battle that you referenced does. Weird!
     
    98
    Posts
    10
    Years
    • Seen May 8, 2021
    soyy but isnt resolved.... vs seeker is doesnt response and doesnt work with created trainers... any solution?
     
    Back
    Top