The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Battle FireRed: Script a Battle Between 2 NPCs

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 September 8th, 2018 (7:49 AM).
DeathOrDoom0 DeathOrDoom0 is offline
 
Join Date: Aug 2018
Location: Hoschton, GA
Gender: Male
Nature: Jolly
Posts: 36
Does anyone know how to do this for FireRed?
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old September 9th, 2018 (4:16 AM).
BirdstarCat13 BirdstarCat13 is offline
 
Join Date: Nov 2017
Gender: Male
Posts: 476
Script an event that involves 2 NPCs talking to te player, then trigger a double battle. Kind of simple
__________________
-------------------------
I hate signatures that are just a line of text without any clear division. You weirdos know who you are ;)
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old September 9th, 2018 (4:45 AM). Edited September 9th, 2018 by DeathOrDoom0.
DeathOrDoom0 DeathOrDoom0 is offline
 
Join Date: Aug 2018
Location: Hoschton, GA
Gender: Male
Nature: Jolly
Posts: 36
Quote:
Originally Posted by BirdstarCat13 View Post
Script an event that involves 2 NPCs talking to te player, then trigger a double battle. Kind of simple
Why would a double battle work? I want an NPC vs. another NPC.
Reply With Quote
  #4   Link to this post, but load the entire thread.  
Old September 9th, 2018 (10:00 AM).
Koople's Avatar
Koople Koople is offline
 
Join Date: Nov 2016
Nature: Relaxed
Posts: 88
Quote:
Originally Posted by DeathOrDoom0 View Post
Does anyone know how to do this for FireRed?
Is the player controlling one of the NPCs, or are you intending for it to be a cutscene? The former would be relatively easy, the latter quite difficult.
Reply With Quote
  #5   Link to this post, but load the entire thread.  
Old September 9th, 2018 (10:05 AM).
DeathOrDoom0 DeathOrDoom0 is offline
 
Join Date: Aug 2018
Location: Hoschton, GA
Gender: Male
Nature: Jolly
Posts: 36
Quote:
Originally Posted by Koople View Post
Is the player controlling one of the NPCs, or are you intending for it to be a cutscene? The former would be relatively easy, the latter quite difficult.
If the player controls the NPC that would work
Reply With Quote
  #6   Link to this post, but load the entire thread.  
Old September 9th, 2018 (11:15 AM).
Koople's Avatar
Koople Koople is offline
 
Join Date: Nov 2016
Nature: Relaxed
Posts: 88
Quote:
Originally Posted by DeathOrDoom0 View Post
If the player controls the NPC that would work
In this case you can do something like the following (in a script)
1. save the player's pokemon data somewhere (free ram, see FBI's portable storage system for example)
2. give the player the NPC's pokemon (givepokemon should work)
3. swap the player's battle backsprite with the NPCs (use JPANs engine or this routine)
4. initiate the trainer battle
5. after the battle, delete the given pokemon (JPANs engine special or see this thread)
6. get the player's original pokemon back (eg. the portable storage system again)

You will probably want to allow the game to continue in the event the player loses the trainer battle, which means using Oak's tutorial battle (you can toggle the tutorial text with this or just allow continuation via a flag)

This might look like a lot but you'll learn a lot by getting it all to work. Good luck!
Reply With Quote
  #7   Link to this post, but load the entire thread.  
Old September 9th, 2018 (11:56 AM).
DeathOrDoom0 DeathOrDoom0 is offline
 
Join Date: Aug 2018
Location: Hoschton, GA
Gender: Male
Nature: Jolly
Posts: 36
Quote:
Originally Posted by Koople View Post
In this case you can do something like the following (in a script)
1. save the player's pokemon data somewhere (free ram, see FBI's portable storage system for example)
2. give the player the NPC's pokemon (givepokemon should work)
3. swap the player's battle backsprite with the NPCs (use JPANs engine or this routine)
4. initiate the trainer battle
5. after the battle, delete the given pokemon (JPANs engine special or see this thread)
6. get the player's original pokemon back (eg. the portable storage system again)

You will probably want to allow the game to continue in the event the player loses the trainer battle, which means using Oak's tutorial battle (you can toggle the tutorial text with this or just allow continuation via a flag)

This might look like a lot but you'll learn a lot by getting it all to work. Good luck!
Thank you!
Reply With Quote
  #8   Link to this post, but load the entire thread.  
Old September 9th, 2018 (5:08 PM).
BirdstarCat13 BirdstarCat13 is offline
 
Join Date: Nov 2017
Gender: Male
Posts: 476
Quote:
Originally Posted by DeathOrDoom0 View Post
Why would a double battle work? I want an NPC vs. another NPC.
That wasn't very clear...making a battle with two NPCs against each other doesn't seem very useful.
__________________
-------------------------
I hate signatures that are just a line of text without any clear division. You weirdos know who you are ;)
Reply With Quote
  #9   Link to this post, but load the entire thread.  
Old September 9th, 2018 (6:18 PM).
DeathOrDoom0 DeathOrDoom0 is offline
 
Join Date: Aug 2018
Location: Hoschton, GA
Gender: Male
Nature: Jolly
Posts: 36
Quote:
Originally Posted by BirdstarCat13 View Post
That wasn't very clear...making a battle with two NPCs against each other doesn't seem very useful.
It's useful if you're telling a story and using it as a device for telling a story
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
Thread Tools

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:13 AM.