• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Script✓] I am tying to script, am I doing it wrong?

McPaul

On my way to become a controversial and hated memb
  • 289
    Posts
    7
    Years
    I'm using Fire Red.

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

    '---------------
    #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:

    '---------------
    #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!
     
    Last edited:
    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]!
     

    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.
     
    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.
     
    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
     
    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
     
    Back
    Top