News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Pokemon Fire Red Starter Pokemon Script  (Read 644 times)

caminopreacher

  • Full Member
  • ***
  • Posts: 124
  • "What is a man?"
    • View Profile
Pokemon Fire Red Starter Pokemon Script
« on: September 17, 2019, 04:42:36 pm »
Hello all,
I just posted my Pokemon Fire Red Legends mod, and I'm currently working on another one that I want to edit the starters. I'm making Blue the main character and Red his rival. I want red to pick Charmander when I pick Squirtle, but not sure how to edit the script for that, nor the future rival battles (I'm unable to access them in Advance Map for example)
Here is the script I'm staring at for the starter Pokeballs in Oak's Lab. Looking to change it. Any suggestions would be greatly appreciated.


'---------------
#org 0x169C23
lock
faceplayer
setvar 0x4001 0x0
setvar 0x4002 0x1
setvar 0x4003 0x4
setvar 0x4004 0x7
compare 0x4055 0x3
if 0x4 goto 0x8169E5C
compare 0x4055 0x2
if 0x1 goto 0x8169C59
msgbox 0x818EA91 MSG_KEEPOPEN '"Those are POKé BALLS.\nThey contai..."
release
end

'---------------
#org 0x169E5C
msgbox 0x818EABD MSG_KEEPOPEN '"That's PROF. OAK's last POKéMON."
release
end

'---------------
#org 0x169C59
applymovement 0x4 0x81A7667
waitmovement 0x0
showpokepic 0x4002 0xA 0x3
textcolor 0x0
compare 0x4001 0x0
if 0x1 goto 0x8169C8C
compare 0x4001 0x1
if 0x1 goto 0x8169CAB
compare 0x4001 0x2
if 0x1 goto 0x8169CCA
end

'---------------
#org 0x169C8C
msgbox 0x818E2EA MSG_YESNO '"I see! BULBASAUR is your choice.\n..."
compare LASTRESULT 0x1
if 0x1 goto 0x8169CEC
compare LASTRESULT 0x0
if 0x1 goto 0x8169CE9
end

'---------------
#org 0x169CAB
msgbox 0x818E27F MSG_YESNO '"Hm! SQUIRTLE is your choice.\nIt's..."
compare LASTRESULT 0x1
if 0x1 goto 0x8169CEC
compare LASTRESULT 0x0
if 0x1 goto 0x8169CE9
end

'---------------
#org 0x169CCA
msgbox 0x818E20C MSG_YESNO '"Ah! CHARMANDER is your choice.\nYo..."
compare LASTRESULT 0x1
if 0x1 goto 0x8169CEC
compare LASTRESULT 0x0
if 0x1 goto 0x8169CE9
end

'---------------
#org 0x169CEC
hidepokepic
hidesprite LASTTALKED
msgbox 0x818E35D MSG_KEEPOPEN '"This POKéMON is really quite\nener..."
call 0x81A66ED
setflag 0x828
setflag 0x291
givepokemon 0x4002 0x5 0x0 0x0 0x0 0x0
copyvar 0x4031 0x4001
bufferpokemon 0x0 0x4002
preparemsg 0x818E385 '"[player] received the [buffer1]\nf..."
waitmsg
fanfare 0x13E
waitfanfare
msgbox 0x81A571F MSG_YESNO '"Do you want to give a nickname to\..."
compare LASTRESULT 0x1
if 0x1 goto 0x8169D44
compare LASTRESULT 0x0
if 0x1 goto 0x8169D54
end

'---------------
#org 0x169CE9
hidepokepic
release
end

'---------------
#org 0x1A66ED
copyvar 0x8012 0x8013
return

'---------------
#org 0x169D44
setvar 0x8004 0x0
call 0x81A7563
goto 0x8169D54

'---------------
#org 0x169D54
closeonkeypress
compare 0x4001 0x0
if 0x1 goto 0x8169D77
compare 0x4001 0x1
if 0x1 goto 0x8169D97
compare 0x4001 0x2
if 0x1 goto 0x8169D87
end

'---------------
#org 0x1A7563
fadescreen 0x1
special 0x9E
waitstate
return

'---------------
#org 0x169D77
applymovement 0x8 0x8169DDA
waitmovement 0x0
goto 0x8169DA7

'---------------
#org 0x169D97
applymovement 0x8 0x8169DEA
waitmovement 0x0
goto 0x8169DA7

'---------------
#org 0x169D87
applymovement 0x8 0x8169DE3
waitmovement 0x0
goto 0x8169DA7

'---------------
#org 0x169DA7
textcolor 0x0
msgbox 0x818DDAC MSG_KEEPOPEN '"[rival]: I'll take this one, then!"
hidesprite 0x4004
textcolor 0x3
bufferpokemon 0x0 0x4003
preparemsg 0x818DDCA '"[rival] received the [buffer1]\nfr..."
waitmsg
fanfare 0x13E
waitfanfare
setvar 0x4055 0x3
checkflag 0x83E
if 0x1 call 0x8169DD4
release
end

'---------------
#org 0x169DD4
setvar 0x4070 0x1
return


'---------
' Strings
'---------
#org 0x18EA91
= Those are POKé BALLS.\nThey contain POKéMON!

#org 0x18EABD
= That's PROF. OAK's last POKéMON.

#org 0x18E2EA
= I see! BULBASAUR is your choice.\nIt's very easy to raise.\pSo, [player], you want to go with\nthe GRASS POKéMON BULBASAUR?

#org 0x18E27F
= Hm! SQUIRTLE is your choice.\nIt's one worth raising.\pSo, [player], you've decided on the\nWATER POKéMON SQUIRTLE?

#org 0x18E20C
= Ah! CHARMANDER is your choice.\nYou should raise it patiently.\pSo, [player], you're claiming the\nFIRE POKéMON CHARMANDER?

#org 0x18E35D
= This POKéMON is really quite\nenergetic!

#org 0x18E385
= [player] received the [buffer1]\nfrom PROF. OAK!

#org 0x1A571F
= Do you want to give a nickname to\nthis [buffer1]?

#org 0x18DDAC
= [rival]: I'll take this one, then!

#org 0x18DDCA
= [rival] received the [buffer1]\nfrom PROF. OAK!


'-----------
' Movements
'-----------
#org 0x1A7667
#raw 0x3 'Face Right
#raw 0xFE 'End of Movements

#org 0x169DDA
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0xFE 'End of Movements

#org 0x169DEA
#raw 0x10 'Step Down (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x2E 'Face Up (Delayed)
#raw 0xFE 'End of Movements

#org 0x169DE3
#raw 0x10 'Step Down (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x2E 'Face Up (Delayed)
#raw 0xFE 'End of Movements

4l3j4ndr0

  • Jr. Member
  • **
  • Posts: 47
  • Gameboy Color Rules!
    • View Profile
Re: Pokemon Fire Red Starter Pokemon Script
« Reply #1 on: September 18, 2019, 06:14:46 am »
Maybe try whit "Advance Starter" tool.

PowerPanda

  • Jr. Member
  • **
  • Posts: 86
    • View Profile
Re: Pokemon Fire Red Starter Pokemon Script
« Reply #2 on: September 18, 2019, 01:47:50 pm »
Advance Starter is the tool you need for changing the starter Pokemon. Adavance Trainer is the tool you need to edit the rival battles.

caminopreacher

  • Full Member
  • ***
  • Posts: 124
  • "What is a man?"
    • View Profile
Re: Pokemon Fire Red Starter Pokemon Script
« Reply #3 on: September 18, 2019, 02:27:27 pm »
Advance Starter is the tool you need for changing the starter Pokemon. Adavance Trainer is the tool you need to edit the rival battles.

I actually tried those a while back, but the text in both of them came up jiberish and I kept getting an "unhandled exception" error because Microsoft... :(

I had heard the trainer one was a virus also.

4l3j4ndr0

  • Jr. Member
  • **
  • Posts: 47
  • Gameboy Color Rules!
    • View Profile
Re: Pokemon Fire Red Starter Pokemon Script
« Reply #4 on: September 19, 2019, 09:00:04 pm »
Quote
I'm making Blue the main character and Red his rival. I want red to pick Charmander when I pick Squirtle, but not sure how to edit the script for that, nor the future rival battles.

It's not much easier if you change Red image to Blue whit a tile editor?

Name is given at the beginning of the game so...

If there are some text referring to Blue should be changed to Red, (Can easily be done with a hex editor)

anyways seems you have problems changing the starters  so I made a patch to change Rival pokemons.

Download the .ips Here

I change this:

Your Starter/Rival starter
Bulbasaur/Squirtle
Squirtle/Charmander
Charmander/Bulbasaur

I modified these bytes

Main Character
0x169BBA
0x169D87
0x169DBD
Rival
0x23B7F4
0x23B7FC
0x23B804


caminopreacher

  • Full Member
  • ***
  • Posts: 124
  • "What is a man?"
    • View Profile
Re: Pokemon Fire Red Starter Pokemon Script
« Reply #5 on: September 20, 2019, 03:33:39 pm »
Thanks so much! I'm using Fire Red 1.1, but when I apply the patch and start a fresh save, I'll choose charmander and rival still chooses Bulbasaur and the text becomes indecipherable? Not sure why. Btw, sorry about the late reply, I was just notified today of this post for some reason.

4l3j4ndr0

  • Jr. Member
  • **
  • Posts: 47
  • Gameboy Color Rules!
    • View Profile
Re: Pokemon Fire Red Starter Pokemon Script
« Reply #6 on: September 20, 2019, 09:38:09 pm »

Quote
I want red to pick Charmander when I pick Squirtle
OK.
Squirtle>Charmander
Quote
I'll choose charmander and rival still chooses Bulbasaur
Charmander>Bulbasaur
So... you want Charmander>Squirtle?

What will happen if you select Bulbasaur?

Bulbasaur>Bulbasaur.

There are only 3 pokeballs to choose.

I use the "Pokemon - FireRed Version (USA)" rom for the patch, <Was the one you use for Pokemon Fire Red Legends>

Anyways PowerPanda is correct.
Quote
Advance Starter is the tool you need for changing the starter Pokemon. Advance Trainer is the tool you need to edit the rival battles.

Try in another windows, I can confirm those program works fine on win 10.



caminopreacher

  • Full Member
  • ***
  • Posts: 124
  • "What is a man?"
    • View Profile
Re: Pokemon Fire Red Starter Pokemon Script
« Reply #7 on: September 20, 2019, 10:38:24 pm »
Windows 10 is all I have to work with currently. Does anyone have safe download links for Advance Starter and Advance Trainer? Every youtube video I find with them, people in the comments are complaining about viruses.

Thanks again, everyone, for your help and patience.

Jorpho

  • Hero Member
  • *****
  • Posts: 4160
  • The cat screams with the voice of a man.
    • View Profile
Re: Pokemon Fire Red Starter Pokemon Script
« Reply #8 on: September 20, 2019, 11:08:14 pm »
A lot of these tools are flagged as viruses for no good reason.  Just check your download at http://www.virustotal.com .
This signature is an illusion and is a trap devised by Satan. Go ahead dauntlessly! Make rapid progres!

caminopreacher

  • Full Member
  • ***
  • Posts: 124
  • "What is a man?"
    • View Profile
Re: Pokemon Fire Red Starter Pokemon Script
« Reply #9 on: September 22, 2019, 01:36:59 am »
Awesome! Got the starters switched and the rival battles as well. Now I just need to edit the text that the rival is involved in and do the sprite swaping! I'll keep everyone posted! :woot!: :woot!:

September 22, 2019, 11:01:56 am - (Auto Merged - Double Posts are not allowed before 7 days.)
It's not much easier if you change Red image to Blue whit a tile editor?

Name is given at the beginning of the game so...

If there are some text referring to Blue should be changed to Red, (Can easily be done with a hex editor)

anyways seems you have problems changing the starters  so I made a patch to change Rival pokemons.

Download the .ips Here

I change this:

Your Starter/Rival starter
Bulbasaur/Squirtle
Squirtle/Charmander
Charmander/Bulbasaur

I modified these bytes

Main Character
0x169BBA
0x169D87
0x169DBD
Rival
0x23B7F4
0x23B7FC
0x23B804


Success! I was finally able to open Advance Trainer and Starter. I edited the starters, as well as all of the rival battle teams. I've switched the overworld sprites and back battle sprites for Red and Blue. The only thing that seems to be missing is both the fishing and surf animations remain unchanged. I'm messing around with UnlZ gba to switch around the actual sprites, so we'll see how that goes.

The reason the colors for red and blue are odd is because if I switch them, it also impacts other sprites in the world. I need to find out a way to maybe reassign the pointer for their palettes? (No idea how to do that one...) Pointers would be appreciated.


Here's what I have so far. It's all coming together!

https://www.mediafire.com/file/nkgjj9jqcmhgx7s/Water_Blue_Hack.ips/file

September 26, 2019, 07:48:46 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
It's not much easier if you change Red image to Blue whit a tile editor?

Name is given at the beginning of the game so...

If there are some text referring to Blue should be changed to Red, (Can easily be done with a hex editor)

anyways seems you have problems changing the starters  so I made a patch to change Rival pokemons.

Download the .ips Here

I change this:

Your Starter/Rival starter
Bulbasaur/Squirtle
Squirtle/Charmander
Charmander/Bulbasaur

I modified these bytes

Main Character
0x169BBA
0x169D87
0x169DBD
Rival
0x23B7F4
0x23B7FC
0x23B804


I figured out why I kept getting the unhandeled exception error. I was using Fire Red 1.1 instead of 1.0. The programs all work now. I've swapped the overworld sprites, the battle sprites and the sprite on the trainer card. The only ones I can't locate are the ones in the Intro with Professor Oak. You wouldn't happen to know how to access them?
« Last Edit: September 26, 2019, 07:48:46 pm by caminopreacher »