The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Script I am tying to script, am I doing it wrong?

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 22nd, 2020 (6:43 AM). Edited February 23rd, 2020 by McPaul.
McPaul's Avatar
McPaul McPaul is offline
On my way to become a controversial and hated member.
 
Join Date: Mar 2018
Location: Switzerland
Gender: Male
Posts: 286
I'm using Fire Red.

The first script I want to change is the Rival's one. It is like this:

Quote:
'---------------
#org 0x16955F
lock
faceplayer
compare 0x4055 0x3
if 0x1 goto 0x816958B
compare 0x4055 0x2
if 0x1 goto 0x8169581
msgbox 0x818DC67 MSG_KEEPOPEN '"[rival]: What, it's only [player]?..."
release
end

'---------------
#org 0x16958B
msgbox 0x818DD75 MSG_KEEPOPEN '"[rival]: My POKéMON looks a lot\nt..."
release
end

'---------------
#org 0x169581
msgbox 0x818DCE2 MSG_KEEPOPEN '"[rival]: Heh, I don't need to be\n..."
release
end


'---------
' Strings
'---------
#org 0x18DC67
= [rival]: What, it's only [player]?\nGramps isn't around.

#org 0x18DD75
= [rival]: My POKéMON looks a lot\ntougher than yours.

#org 0x18DCE2
= [rival]: Heh, I don't need to be\ngreedy like you. I'm mature!\pGo ahead and choose, [player]!

And what I did is this:

Quote:
'---------------
#dynamic 0x800000
#org @main
lock
faceplayer
compare 0x4055 0x3
if 0x1 goto 0x816958B
compare 0x4055 0x2
if 0x1 goto 0x8169581
msgbox @text1 0x6
release
end

'---------------
msgbox @text2 0x6
release
end

'---------------
msgbox @text3 0x6
release
end


'---------
' Strings
'---------
#org @text1
= [rival]: What, it's only [player]?\nGramps isn't around.

#org @text2
= [rival]: My POKéMON's indeed a lot\ntougher than yours.

#org @text3
= [rival]: Heh, I already have one,\nand it's the best of all!\pGo ahead and choose, [player]!
I compiled everything and changed the script offset in Advance Map to correspond the one it gave me in XSE and saved everything. But when I play the ROM or try to reopen the script, it's still the old one! So I don't understand anything anymore. What did I do wrong and how do I do for this not to happen anymore? Could someone help me please? Thanks!
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old February 22nd, 2020 (10:10 AM).
__fred__40's Avatar
__fred__40 __fred__40 is offline
fred
 
Join Date: Oct 2019
Location: mt silver
Gender: Male
Nature: Bold
Posts: 277
It doesnt work like that,you cant script with static offsets(0x800000) you have to use dynamic offsets(@msg,@move,etc)
for instance for the rival

#dynamic 0x1695D7
#org @start
lock
faceplayer
compare 0x4055 0x3
if 0x1 goto @goto
compare 0x4055 0x2
if 0x1 goto @goto2
msgbox @msg1 0x4
release
end

#org @goto
msgbox @msg2 0x4
release
end

#org @goto2
msgbox @msg3 0x4
release
end

#org @msg1
= [rival]: What, it's only [player]?\nGramps isn't around.

#org @msg2
= [rival]: My POKéMON looks a lot\ntougher than yours.

#org @msg3
= [rival]: Heh, I don't need to be\ngreedy like you. I'm mature!\pGo ahead and choose, [player]!
__________________
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old February 22nd, 2020 (11:29 AM).
Dr. Seuss's Avatar
Dr. Seuss Dr. Seuss is offline
Navegando en mi automóvil, hablando con la nena por el móvil 😎...
 
Join Date: Feb 2014
Location: Guatemala City
Age: 27
Gender: Male
Nature: Brave
Posts: 521
Quote:
Originally Posted by __fred__40 View Post
>Sniff<
Actually no. Dynamic indicates where to start looking for free space. Op's script seems to be correct.

I can see the issue is that you're still indicating the main script to jump to the original script when you type the if 0x1 goto... and you indicate the vanilla offsets

It could also be you're not pasting the @main offset generated when you hit compile.

In addition, Labels @text2 and @text3 are never called and ignored when you compile it therefore.
__________________
Graphic design is my passion...

Click on the picture to see the best hack ever created (?
Reply With Quote
  #4   Link to this post, but load the entire thread.  
Old February 22nd, 2020 (12:37 PM).
McPaul's Avatar
McPaul McPaul is offline
On my way to become a controversial and hated member.
 
Join Date: Mar 2018
Location: Switzerland
Gender: Male
Posts: 286
Thanks a lot for your answers.
What should I type in "goto" then?

Sorry I'm still a noob.
Reply With Quote
  #5   Link to this post, but load the entire thread.  
Old February 22nd, 2020 (1:23 PM).
Dr. Seuss's Avatar
Dr. Seuss Dr. Seuss is offline
Navegando en mi automóvil, hablando con la nena por el móvil 😎...
 
Join Date: Feb 2014
Location: Guatemala City
Age: 27
Gender: Male
Nature: Brave
Posts: 521
Quote:
Originally Posted by McPaul View Post
Thanks a lot for your answers.
What should I type in "goto" then?

Sorry I'm still a noob.
change them to whatever script you would like to get executed when jumped. SOmething like this:

Code:
'---------------
#dynamic 0x800000
#org @main
lock
faceplayer
compare 0x4055 0x3
if 0x1 goto @script1
compare 0x4055 0x2
if 0x1 goto @script2
msgbox @text1 0x6
release
end

'---------------
#org @script1
msgbox @text2 0x6
release
end

'---------------
#org @script2
msgbox @text3 0x6
release
end


'---------
' Strings
'---------
#org @text1
= [rival]: What, it's only [player]?\nGramps isn't around.

#org @text2
= [rival]: My POKéMON's indeed a lot\ntougher than yours.

#org @text3
= [rival]: Heh, I already have one,\nand it's the best of all!\pGo ahead and choose, [player]!
This will make your script completely different form the original one.
__________________
Graphic design is my passion...

Click on the picture to see the best hack ever created (?
Reply With Quote
  #6   Link to this post, but load the entire thread.  
Old February 22nd, 2020 (1:46 PM).
McPaul's Avatar
McPaul McPaul is offline
On my way to become a controversial and hated member.
 
Join Date: Mar 2018
Location: Switzerland
Gender: Male
Posts: 286
Oh like this, okay I understand. Thank you!
Reply With Quote
  #7   Link to this post, but load the entire thread.  
Old February 23rd, 2020 (5:32 AM).
McPaul's Avatar
McPaul McPaul is offline
On my way to become a controversial and hated member.
 
Join Date: Mar 2018
Location: Switzerland
Gender: Male
Posts: 286
It worked pretty well. The last thing I want to ask is how do you know when the text line should end in XSE and when you have to make a new paragraph ?
Reply With Quote
  #8   Link to this post, but load the entire thread.  
Old February 23rd, 2020 (6:25 AM).
MrMuggles MrMuggles is offline
 
Join Date: Feb 2020
Gender: Male
Posts: 20
Quote:
Originally Posted by McPaul View Post
It worked pretty well. The last thing I want to ask is how do you know when the text line should end in XSE and when you have to make a new paragraph ?
There's a "Text Adjuster" tool in XSE which helps with that. It'll let you type out what you want, convert it to the appropriate format and then insert it into the selected line in the script
Reply With Quote
  #9   Link to this post, but load the entire thread.  
Old February 23rd, 2020 (10:31 AM).
Dr. Seuss's Avatar
Dr. Seuss Dr. Seuss is offline
Navegando en mi automóvil, hablando con la nena por el móvil 😎...
 
Join Date: Feb 2014
Location: Guatemala City
Age: 27
Gender: Male
Nature: Brave
Posts: 521
Quote:
Originally Posted by McPaul View Post
It worked pretty well. The last thing I want to ask is how do you know when the text line should end in XSE and when you have to make a new paragraph ?
Press Ctrl + T and this will show the text adjuster where you can type without worrying of writing too many characters that may overflow the textbox
__________________
Graphic design is my passion...

Click on the picture to see the best hack ever created (?
Reply With Quote
  #10   Link to this post, but load the entire thread.  
Old February 23rd, 2020 (10:39 AM).
McPaul's Avatar
McPaul McPaul is offline
On my way to become a controversial and hated member.
 
Join Date: Mar 2018
Location: Switzerland
Gender: Male
Posts: 286
Oh yeah thanks!
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.