The PokéCommunity Forums

The PokéCommunity Forums (https://www.pokecommunity.com/index.php)
-   Binary ROM Hacking (https://www.pokecommunity.com/forumdisplay.php?f=284)
-   -   Battle NPC Battles (https://www.pokecommunity.com/showthread.php?t=419356)

KitsuV March 22nd, 2019 6:03 PM

NPC Battles
 
Alright. so I've got most of my problems worked out so far, and now I want to actually progress:laugh-squinted: The next thing on my list is a battle, so I was wondering how to set up trainers using Hopeless Trainer Editor, and get them into AdvanceMap. I feel stupid asking all these questions, but that's what this forum is for, so I might as well make the most out of it!

Karl March 22nd, 2019 8:02 PM

Go into HTE and select a trainer you want to edit.

For this example I'll choose the trainer in slot 270:



Edit the Pokémon as desired and save it.

Then open up XSE and write a trainerbattle script. It should look something similar to this:

Spoiler:
Code:

#dynamic 0x800000

#org @start
trainerbattle 0x0 0x270 0x0 @see @win
msgbox @after 0x6
end

#org @see
= Aha! I've been waiting for someone to\nshow up for a while. This'll be fun!

#org @win
= I can't believe I thought this was a\ngood idea\hb0

#org @after
= You're way too strong for us\hb0\nAim high!




As you can see after the trainerbattle command I have specified which trainer (270) is needed.

Compile the script and assign an NPC in AdvanceMap the offset value. Also, check the trainer box and set a view radius in the right-hand column.

Providing you've done everything correctly, the battle will take place!

You can find more information on trainer battles in this guide.

KitsuV March 22nd, 2019 8:11 PM

Quote:

Originally Posted by Synonym (Post 9996520)
Go into HTE and select a trainer you want to edit.

For this example I'll choose the trainer in slot 270:



Edit the Pokémon as desired and save it.

Then open up XSE and write a trainerbattle script. It should look something similar to this:

Spoiler:
Code:

#dynamic 0x800000

#org @start
trainerbattle 0x0 0x270 0x0 @see @win
msgbox @after 0x6
end

#org @see
= Aha! I've been waiting for someone to\nshow up for a while. This'll be fun!

#org @win
= I can't believe I thought this was a\ngood idea\hb0

#org @after
= You're way too strong for us\hb0\nAim high!




As you can see after the trainerbattle command I have specified which trainer (270) is needed.

Compile the script and assign an NPC in AdvanceMap the offset value. Also, check the trainer box and set a view radius in the right-hand column.

Providing you've done everything correctly, the battle will take place!

You can find more information on trainer battles in this guide.

Alright. So another problem. When I try to open my ROM in HTE, I get the error message: "ROM Code {temp.Code} is not supported!" It does this with every ROM I have on my computer, so it's not just the ones I've been working on. Am I doing something weird?

KitsuV March 22nd, 2019 8:14 PM

And when I don't get that message, I get an "unhandled exception" error instead, eve on clean ROMS

Ace Trainer Slash March 22nd, 2019 8:20 PM

Have you tried Advanced Trainer Editor, or G3T for editing battles? Those are the ones I usually use to edit battles, and they work like a charm. :)

And I'm sure any edited trainer with those programs will work in conjunction to the script for a trainer battle posted by Synonym. :)

Hope this helps!

KitsuV March 22nd, 2019 8:30 PM

Quote:

Originally Posted by Ace Trainer Slash (Post 9996531)
Have you tried Advanced Trainer Editor, or G3T for editing battles? Those are the ones I usually use to edit battles, and they work like a charm. :)

And I'm sure any edited trainer with those programs will work in conjunction to the script for a trainer battle posted by Synonym. :)

Hope this helps!

I would have tried G3T first, but my computer seems to struggle with opening .rar files, and I can't find a zip version of the download. And I haven't seen Advanced Trainer Editor yet

Karl March 22nd, 2019 8:32 PM

Quote:

Originally Posted by KitsuV (Post 9996525)
Alright. So another problem. When I try to open my ROM in HTE, I get the error message: "ROM Code {temp.Code} is not supported!" It does this with every ROM I have on my computer, so it's not just the ones I've been working on. Am I doing something weird?

I had the same issue before. I downloaded the latest .NET Framework and it solved the error for me.

KitsuV March 22nd, 2019 8:35 PM

Quote:

Originally Posted by Synonym (Post 9996535)
I had the same issue before. I downloaded the latest .NET Framework and it solved the error for me.

Alright. I'm kinda dumb, so where can I find the newest .NET framework then? Hopefully it works out fine

Ace Trainer Slash March 22nd, 2019 8:40 PM

Quote:

Originally Posted by KitsuV (Post 9996534)
I would have tried G3T first, but my computer seems to struggle with opening .rar files, and I can't find a zip version of the download. And I haven't seen Advanced Trainer Editor yet

With .rar files, it's required you use WinRAR to extract the file.

I'm not sure, however, where I can find a link to Advanced Trainer Editor, that's doesn't seem to be a virus. I've checked the official page of it on Pokecommunity, but the link is down, I downloaded it ages ago, but I'm not sure where.

Karl March 22nd, 2019 8:42 PM

Quote:

Originally Posted by KitsuV (Post 9996536)
Alright. I'm kinda dumb, so where can I find the newest .NET framework then? Hopefully it works out fine

Lol. Google.

KitsuV March 22nd, 2019 8:44 PM

Quote:

Originally Posted by Synonym (Post 9996541)
Lol. Google.

Alright, that was not the answer lol
I tried, and it says I already have the latest version, so it's a different problem with me


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


Like our Facebook Page Follow us on Twitter © 2002 - 2018 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.

Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.