The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Other A Few Battle Script Questions [Firered]

Notices
For all updates, view the main page.

Binary ROM Hacking Need a helping hand or just want to talk about binary ROM hacks? Get comments and answers to any ROM Hacking-related problems, questions or thoughts you have here.

Ad Content
Reply
 
Thread Tools
  #1   Link to this post, but load the entire thread.  
Old May 16th, 2014 (11:39 AM).
Crocky's Avatar
Crocky Crocky is offline
SuperScarlet!
 
Join Date: Feb 2009
Posts: 97
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:
#dynamic 0x800000

#org @start
trainerbattle 0x0 0x001 0x0 @before @after
msgbox @beaten 0x6
release
end

#org @before
= Go, all my PIKACHUs!

#org @after
= Nooo! My PIKACHUs!!!!!

#org @beaten
= My PIKACHUs can be used to\ncharge my Nintendo DS Lite.


Also, is there a trainer battle editor out that allows you to set the Nature, EVs and IVs of a Pokémon?
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old May 16th, 2014 (12:17 PM).
Spherical Ice's Avatar
Spherical Ice Spherical Ice is online now
 
Join Date: Nov 2007
Location: Leicester, UK
Age: 25
Posts: 5,251
Quote:
Originally Posted by Crocky View Post
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.

Quote:
Originally Posted by Crocky View Post
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.

Quote:
Originally Posted by Crocky View Post
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.

Quote:
Originally Posted by Crocky View Post
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.
__________________
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old May 16th, 2014 (3:46 PM).
Crocky's Avatar
Crocky Crocky is offline
SuperScarlet!
 
Join Date: Feb 2009
Posts: 97
Quote:
Originally Posted by Spherical Ice View Post
Spoiler:
I haven't tested it, but I believe trainerbattle 0x4 does this.



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.



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.

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.

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:
#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 0x4 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!

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?
Reply With Quote
  #4   Link to this post, but load the entire thread.  
Old May 16th, 2014 (3:48 PM).
Spherical Ice's Avatar
Spherical Ice Spherical Ice is online now
 
Join Date: Nov 2007
Location: Leicester, UK
Age: 25
Posts: 5,251
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.
__________________
Reply With Quote
  #5   Link to this post, but load the entire thread.  
Old May 16th, 2014 (3:54 PM).
Crocky's Avatar
Crocky Crocky is offline
SuperScarlet!
 
Join Date: Feb 2009
Posts: 97
Quote:
Originally Posted by Spherical Ice View Post
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.
Reply With Quote
  #6   Link to this post, but load the entire thread.  
Old May 16th, 2014 (3:59 PM).
Spherical Ice's Avatar
Spherical Ice Spherical Ice is online now
 
Join Date: Nov 2007
Location: Leicester, UK
Age: 25
Posts: 5,251
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 0x7 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!
__________________
Reply With Quote
  #7   Link to this post, but load the entire thread.  
Old May 16th, 2014 (4:06 PM).
Crocky's Avatar
Crocky Crocky is offline
SuperScarlet!
 
Join Date: Feb 2009
Posts: 97
Quote:
Originally Posted by Spherical Ice View Post
Spoiler:
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 0x7 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!
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!
Reply With Quote
  #8   Link to this post, but load the entire thread.  
Old September 14th, 2015 (6:59 PM).
rhapsodian_pixo rhapsodian_pixo is offline
 
Join Date: Jul 2013
Gender: Male
Posts: 98
soyy but isnt resolved.... vs seeker is doesnt response and doesnt work with created trainers... any solution?
Reply With Quote
Reply

Quick Reply

Join the conversation!

Create an account to post a reply in this thread, participate in other discussions, and more!

Create a PokéCommunity Account
Ad Content

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 9:09 AM.