The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Other National Dex at the start & Shiny Starter problem

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 February 16th, 2015 (2:24 AM). Edited February 17th, 2015 by LanceD.
LanceD LanceD is offline
 
Join Date: Feb 2014
Gender: Male
Posts: 82
I wanted to enable the National Dex right at the beginning of the game by adding the special 0x16F command to the start of Prof. Oak's script, but I've run into a problem.

First section of Oak's script (wherein I add the National Dex command):
Spoiler:
#org 0x169595
lock
faceplayer
checkflag 0x2
if 0x1 goto 0x8169600
compare 0x4055 0x9
if 0x1 goto 0x8169903
compare 0x4055 0x8
if 0x1 goto 0x8169A6E
checkflag 0x82C
if 0x1 goto 0x81699CE
compare 0x4052 0x1
if 0x1 goto 0x8169903
compare 0x4055 0x6
if 0x1 goto 0x81698D6
compare 0x4057 0x1
if 0x4 goto 0x816961E
compare 0x4055 0x4
if 0x1 goto 0x8169614
compare 0x4055 0x3
if 0x1 goto 0x816960A
msgbox 0x818E116 MSG_KEEPOPEN '"OAK: Now, [player].\pInside those ..."
release
end

Now, if I add the special 0x16F command at the start of the script, after faceplayer, the end of the script messes up:
Spoiler:
#org 0x169595
lock
faceplayer
special 0x16F
checkflag 0x2
if 0x1 goto 0x8169600
compare 0x4055 0x9
if 0x1 goto 0x8169903
compare 0x4055 0x8
if 0x1 goto 0x8169A6E
checkflag 0x82C
if 0x1 goto 0x81699CE
compare 0x4052 0x1
if 0x1 goto 0x8169903
compare 0x4055 0x6
if 0x1 goto 0x81698D6
compare 0x4057 0x1
if 0x4 goto 0x816961E
compare 0x4055 0x4
if 0x1 goto 0x8169614
compare 0x4055 0x3
if 0x1 goto 0x816960A
msgbox 0x818E116 0xF '"OAK: Now, [player].\pInside those ..."
nop
setdoorclosed 0x1A72 0x908
call 0xF026C
checksound

----------------------------------------------------------------------------------------------------

I have a similar problem when making my Starter shiny (for which I use the Shinyzer tool):

This is the section of the starter script where I add the shiny command:
Spoiler:
#org 0x169C74
hidepokepic
hidesprite LASTTALKED
msgbox 0x818E2E5 MSG_KEEPOPEN '"This POKéMON is really quite\nener..."
call 0x81A6675
setflag 0x828
setflag 0x291
givepokemon 0x4002 0x5 0x0 0x0 0x0 0x0
copyvar 0x4031 0x4001
bufferpokemon 0x0 0x4002
preparemsg 0x818E30D '"[player] received the [buffer1]\nf..."
waitmsg
fanfare 0x13E
waitfanfare
msgbox 0x81A56A7 MSG_YESNO '"Do you want to give a nickname to\..."
compare LASTRESULT 0x1
if 0x1 goto 0x8169CCC
compare LASTRESULT 0x0
if 0x1 goto 0x8169CDC
end

Now, If I add the commands to have the starter be shiny, I get this:
Spoiler:
#org 0x169C74
hidepokepic
hidesprite LASTTALKED
msgbox 0x818E2E5 MSG_KEEPOPEN '"This POKéMON is really quite\nener..."
call 0x81A6675
setflag 0x828
setflag 0x291
callasm 0x8800101
setvar 0x8003 0x1

givepokemon 0x4002 0x5 0x0 0x0 0x0 0x0
copyvar 0x4031 0x4001
bufferpokemon 0x0 0x4002
preparemsg 0x818E30D '"[player] received the [buffer1]\nf..."
waitmsg
fanfare 0x13E
waitfanfare
msgbox 0x81A56A7 MSG_YESNO '"Do you want to give a nickname to\..."
compare LASTRESULT 0x1
if 0x1 goto 0x8169CCC
compare 0x160D 0x8004
nop
nop
call 0x81A74EB
goto 0x8169CDC

Why would the script mess up like that, and how can it be resolved/prevented? Any help would be greatly appreciated. Thanks in advance!

Note: This is in XSE and using the v1 Fire Red ROM.
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old February 16th, 2015 (2:47 AM).
Mana's Avatar
Mana Mana is offline
 
Join Date: Jan 2009
Location: UK
Age: 31
Gender: Male
Posts: 10,075
The script is messing up as you're extending it, it will end up running into the next script (or whatever coding is placed afterwards).

You've done some damage now, if you've not done much then best to start over. You need to repoint the scripts to a safe place by giving it a new pointer.

[In your new ROM]

In XSE replace

#org 0x169595

with:

#dynamic 0x800000
#org @start


Then make your changes. Once you have your new bits in, press the gears button to compile the script. A box should pop up with @start and a number - copy and paste that number into the correct A-Map event tile. Should then be in working order.

It should also work on fixing your Shinyzer problem, looks to be the same issue, but I haven't used it before so can't really suggest anything else anyway!
__________________
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old February 16th, 2015 (3:46 AM).
LanceD LanceD is offline
 
Join Date: Feb 2014
Gender: Male
Posts: 82
Oh! How could I have forgotten to move the script with the added commands to a new, big enough location! I feel so stupid now :t129:

Thanks for pointing that out to me :)

However, it would not work for the starter pokemon script since the section of the script wherein I add the shiny command isn't the beginning of the script. So if anyone has a solution for this I would love to hear it.

Thanks!
Reply With Quote
  #4   Link to this post, but load the entire thread.  
Old February 16th, 2015 (4:33 AM).
Mana's Avatar
Mana Mana is offline
 
Join Date: Jan 2009
Location: UK
Age: 31
Gender: Male
Posts: 10,075
Use the same idea, but you'll have to change more than one pointer. So throw #dynamic 0x800000 at the top, change the #org 0x169C74 to #org @new, and find any goto 0x169C74 (or similar) to goto @new.

That way it doesn't matter it's not at the beginning, as you're still repointing the longer section whilst keeping the rest intact.
__________________
Reply With Quote
  #5   Link to this post, but load the entire thread.  
Old February 16th, 2015 (5:45 AM). Edited February 16th, 2015 by LanceD.
LanceD LanceD is offline
 
Join Date: Feb 2014
Gender: Male
Posts: 82
Thanks ;)

I ended up having to repoint some of the dialogue too - namely I see! BULBASAUR is your choice.\nIt's very easy to raise.\pSo, [player], you want to go with\nthe GRASS POKéMON BULBASAUR? & Hm! SQUIRTLE is your choice.\nIt's one worth raising.\pSo, [player], you've decided on the\nWATER POKéMON SQUIRTLE? - since the first characters of these lines would disappear on me after adding the shiny commands to the script.
Reply With Quote
  #6   Link to this post, but load the entire thread.  
Old February 16th, 2015 (6:15 AM).
Mana's Avatar
Mana Mana is offline
 
Join Date: Jan 2009
Location: UK
Age: 31
Gender: Male
Posts: 10,075
All working now then? :) Editing existing scripts can be trouble.
__________________
Reply With Quote
  #7   Link to this post, but load the entire thread.  
Old February 16th, 2015 (7:25 AM). Edited February 16th, 2015 by LanceD.
LanceD LanceD is offline
 
Join Date: Feb 2014
Gender: Male
Posts: 82
Yes that's all for this issue. Thank you very much :)

There is another issue that I'm having. When my character walks over a specific tile on the map, I want a message box to pop up. I added a script event in advance map and applied a message box script to it, but when my character walks onto the tile, the game freezes. There are existing events in the game that work like this, and even if I copy one of those over it doesn't work only the original, pre-existing one does, even though they're the same in every way.

I could open a new thread for this one but since we're here now anyway?
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:10 AM.