• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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 Help Thread (DO NOT REQUEST SCRIPTS)

Status
Not open for further replies.
2
Posts
14
Years
    • Seen Feb 18, 2013
    Tried it, stupid Hexidecimal mistake, but the script works all the way through now, but I don't warp. Trying to use the SS Aqua Animation and then warp to a new area. Not sure what I'm doing wrong!
    :(

    #dynamic 0x800000

    #org @start
    lock
    faceplayer
    msgbox @1 0x5
    compare 0x800D 0x1
    if 0x1 goto @check
    msgbox @2 0x6
    release
    end

    #org @check
    checkitem 0x16F 0x1
    compare 0x800D 0x1
    if 0x4 goto @got
    release
    end

    #org @got
    msgbox @3 0x6
    pause 0x14
    special 0x187
    compare LASTRESULT 0x2
    if 0x1 goto 0x81A7AE0
    special 0x188
    fadescreen 0x1
    special 0x17B
    waitstate
    goto @warp
    end

    #org @warp
    warp 0x20 0x4 0x1 0x0 0x0

    #org @3
    = All aboard!

    #org @1
    = Would you like to ride the\n FERRY?

    #org @2
    = No ride today!
     

    miksy91

    Dark Energy is back in action! ;)
    1,480
    Posts
    15
    Years
  • Tried it, stupid Hexidecimal mistake, but the script works all the way through now, but I don't warp. Trying to use the SS Aqua Animation and then warp to a new area. Not sure what I'm doing wrong!
    :(

    #dynamic 0x800000

    #org @start
    lock
    faceplayer
    msgbox @1 0x5
    compare 0x800D 0x1
    if 0x1 goto @check
    msgbox @2 0x6
    release
    end

    #org @check
    checkitem 0x16F 0x1
    compare 0x800D 0x1
    if 0x4 goto @got
    release
    end

    #org @got
    msgbox @3 0x6
    pause 0x14
    special 0x187
    compare LASTRESULT 0x2
    if 0x1 goto 0x81A7AE0
    special 0x188
    fadescreen 0x1
    special 0x17B
    waitstate
    goto @warp
    end

    #org @warp
    warp 0x20 0x4 0x1 0x0 0x0

    #org @3
    = All aboard!

    #org @1
    = Would you like to ride the\n FERRY?

    #org @2
    = No ride today!
    Try taking out "goto @warp" and change it to the warp command (warp 0x20...).
     

    hinkage

    Everyone currently in an argument with this member
    384
    Posts
    13
    Years
    • Seen Apr 27, 2024
    Tried it, stupid Hexidecimal mistake, but the script works all the way through now, but I don't warp. Trying to use the SS Aqua Animation and then warp to a new area. Not sure what I'm doing wrong!
    :(

    #dynamic 0x800000

    #org @start
    lock
    faceplayer
    msgbox @1 0x5
    compare 0x800D 0x1
    if 0x1 goto @check
    msgbox @2 0x6
    release
    end

    #org @check
    checkitem 0x16F 0x1
    compare 0x800D 0x1
    if 0x4 goto @got
    release
    end

    #org @got
    msgbox @3 0x6
    pause 0x14
    special 0x187
    compare LASTRESULT 0x2
    if 0x1 goto 0x81A7AE0
    special 0x188
    fadescreen 0x1
    special 0x17B
    waitstate
    goto @warp
    end

    #org @warp
    warp 0x20 0x4 0x1 0x0 0x0

    #org @3
    = All aboard!

    #org @1
    = Would you like to ride the\n FERRY?

    #org @2
    = No ride today!


    Try changing it to "warp 0x20 0x4 0xFF 0x0 0x0"
     

    Sierraffinity

    Desperately trying to retire from ROM hacking
    1,069
    Posts
    16
    Years
  • Tried it, stupid Hexidecimal mistake, but the script works all the way through now, but I don't warp. Trying to use the SS Aqua Animation and then warp to a new area. Not sure what I'm doing wrong!
    :(

    #dynamic 0x800000

    #org @start
    lock
    faceplayer
    msgbox @1 0x5
    compare 0x800D 0x1
    if 0x1 goto @check
    msgbox @2 0x6
    release
    end

    #org @check
    checkitem 0x16F 0x1
    compare 0x800D 0x1
    if 0x4 goto @got
    release
    end

    #org @got
    msgbox @3 0x6
    pause 0x14
    special 0x187
    compare LASTRESULT 0x2
    if 0x1 goto 0x81A7AE0
    special 0x188
    fadescreen 0x1
    special 0x17B
    waitstate
    goto @warp
    end

    #org @warp
    warp 0x20 0x4 0x1 0x0 0x0

    #org @3
    = All aboard!

    #org @1
    = Would you like to ride the\n FERRY?

    #org @2
    = No ride today!
    Add waitstate and end after the warp. Like so:

    Code:
    #org @warp
    warp 0x20 0x4 0x1 0x0 0x0
    [B]waitstate
    end[/B]
     
    7
    Posts
    12
    Years
    • Seen May 7, 2012
    So, with flags, how do you know what Hexidecimal code you put after the command? Is it any combination that hasn't been used? Or is there a list of what each combination does?
     

    Winter Wonderland

    Puts the fun in dysfunctional
    305
    Posts
    12
    Years
  • So, I tried multiple different ways and I can't seem to get it to work. everything works fine up until I hit the warp. When I hit the warp, the script freezes. Any help/advice?
    Spoiler:

    Thanks in advance.
     
    3,830
    Posts
    14
    Years
    • Age 27
    • OH
    • Seen Feb 26, 2024
    So, I tried multiple different ways and I can't seem to get it to work. everything works fine up until I hit the warp. When I hit the warp, the script freezes. Any help/advice?
    Spoiler:

    Thanks in advance.

    When you do the warp, it will start with the next command, but once the warp has happened, the script ends, so you'll need a level script for the rest. Plus, you don't need the fadescreens.
     
    7
    Posts
    12
    Years
    • Seen May 7, 2012
    When I script and then do the script in-game, sometimes script from one line in the strings will go into the line above it and that's how it will play out in-game. Then, when I go to edit the script, the text is all jumbled up like I said above. This generally happens two people are talking to each other.

    Any advice?
     

    OMGWURMPLES!

    För Sverige i tiden
    49
    Posts
    14
    Years
    • Seen Jun 15, 2012
    So, I'm trying to make a starter Pokemon script.
    Code:
    #dynamic 0x800260
    #org @getstartersquirt
    goto @check
    setflag 0x910
    hidesprite 0x0910
    release
    end
    
    #org @take
    givepokemon 0x7 0x5 0x0 0x0 0x0 0x0
    fanfare 0x13E
    msgbox @3 0x4
    waitfanfare
    closeonkeypress
    msgbox @4 0x5
    hidepokepic
    compare 0x800D 0x1
    if 0x1 gosub @name
    msgbox @5 0x2
    setflag 0x828
    setflag 0x910
    applymovement 8 @moverival
    msgbox @6 0x06
    checkflag 0x910
    if 0x0 goto @pokedisappear
    release
    end
    
    #org @name
    countpokemon
    subvar 0x800D 0x1
    copyvar 0x8004 0x800D
    fadescreen 0x1a
    special 0x166
    waitstate
    return
    
    #org @check
    showpokepic 0x7 0x0A 0x03
    msgbox @7 0x5
    compare 0x800D 0x1
    if 0x1 goto @take
    hidepokepic
    return
    
    #org @7
    = Do ya want this SQUIRTLE? \nIt's fun to raise!
    
    #org @3
    = You've received a SQUIRTLE!
    
    #org @4
    = Would you like to nickname this \nSQUIRTLE?
    
    #org @5
    = Take good care of it!
    
    #org @6
    = I'll have this one, then!
    
    #org @moverival
    #raw 0x03 0x13 0x013 0x01 0x11 0x03 0x013 0x13 0x13 0x0
    
    #org @pokedisappear
    setflag 0x920
    hidesprite 0x920
    release
    end
    When I go to the overworld to talk to it (the Pokeball sprite, I mean), the picture of the Squirtle shows up, but nothing else. I'm locked in place, so I can't move, but I can't do anything. Can this be helped? Is there anything I need to change?
     
    29
    Posts
    12
    Years
  • So, I'm trying to make a starter Pokemon script.
    Spoiler:

    When I go to the overworld to talk to it (the Pokeball sprite, I mean), the picture of the Squirtle shows up, but nothing else. I'm locked in place, so I can't move, but I can't do anything. Can this be helped? Is there anything I need to change?
    You might wanna check out how this is done in the Fire-Red starter script, a good way to do this is to use:
    setvar 0x4001 0x1 '-- Setting variable to check against for message text
    setvar 0x4002 0x7 '-- Setting variable to check against for showpokepic*, givepokemon** & bufferpokemon***
    *(showpokepic 0x4002 0xA 0x3)
    **(givepokemon 0x4002 0x5 0x0 0x0 0x0)
    ***(bufferpokemon 0x0 0x4002)
    setvar 0x4003 0x1 '-- Setting variable to use with bufferpokemon* for rivals pokemon
    *(bufferpokemon 0x0 0x4003)
    setvar 0x4004 0x5 '-- Setting variable to use with hidesprite* for rivals pokeball
    *(hidesprite 0x4004)

    If no one else have fixed you script tomorrow(9+hours from now) I'll do it, I'm already late for my sleep due to own script issue debugging.
     

    OMGWURMPLES!

    För Sverige i tiden
    49
    Posts
    14
    Years
    • Seen Jun 15, 2012
    You might wanna check out how this is done in the Fire-Red starter script, a good way to do this is to use:
    setvar 0x4001 0x1 '-- Setting variable to check against for message text
    setvar 0x4002 0x7 '-- Setting variable to check against for showpokepic*, givepokemon** & bufferpokemon***
    *(showpokepic 0x4002 0xA 0x3)
    **(givepokemon 0x4002 0x5 0x0 0x0 0x0)
    ***(bufferpokemon 0x0 0x4002)
    setvar 0x4003 0x1 '-- Setting variable to use with bufferpokemon* for rivals pokemon
    *(bufferpokemon 0x0 0x4003)
    setvar 0x4004 0x5 '-- Setting variable to use with hidesprite* for rivals pokeball
    *(hidesprite 0x4004)

    If no one else have fixed you script tomorrow(9+hours from now) I'll do it, I'm already late for my sleep due to own script issue debugging.
    Ah, thank you! I'll try, but I'm relatively new to scripting (aka, been doing it for like 2 weeks) so I really have no idea what I'm doing. XD
     
    29
    Posts
    12
    Years
  • Ah, thank you! I'll try, but I'm relatively new to scripting (aka, been doing it for like 2 weeks) so I really have no idea what I'm doing. XD

    No problem, I know the feeling I have been hacking / scripting Pokémon for less than a month my self, anyway here is the promised script, though note that I'm not sure the movement is correct, you'll need someone with exp in that to fix that.
    Spoiler:
     
    Last edited:

    OMGWURMPLES!

    För Sverige i tiden
    49
    Posts
    14
    Years
    • Seen Jun 15, 2012
    No problem, I know the feeling I have been hacking / scripting Pokémon for less than a month my self, anyway here is the promised script, though note that I'm not sure the movement is correct, you'll need someone with exp in that to fix that.
    Spoiler:

    What is the "preparemsg" thing supposed to be? Line 27? XSE doesn't seem to be able to use it.
     
    29
    Posts
    12
    Years
  • What is the "preparemsg" thing supposed to be? Line 27? XSE doesn't seem to be able to use it.

    What version of XSE are you using ?
    Also what ROM are you hacking ?

    It's the original Fire-Red started script "player recieve X! from bla bla bla." message.

    You could just change it to:
    Spoiler:

    NOTE that if you replace the "preparemsg" you'll need to remove the "waitmsg" too.
     

    OMGWURMPLES!

    För Sverige i tiden
    49
    Posts
    14
    Years
    • Seen Jun 15, 2012
    What version of XSE are you using ?
    Also what ROM are you hacking ?

    It's the original Fire-Red started script "player recieve X! from bla bla bla." message.

    You could just change it to:
    Spoiler:

    NOTE that if you replace the "preparemsg" you'll need to remove the "waitmsg" too.
    I'm using the newest XSE (or whatever 1.1.1 is), and I'm hacking FireRed.
    I'll replace it and see if it works.

    EDIT: Upon putting the script in, the Squirtle box shows up, but nothing else happens.
    Again.
     
    29
    Posts
    12
    Years
  • I'm using the newest XSE (or whatever 1.1.1 is), and I'm hacking FireRed.
    I'll replace it and see if it works.

    EDIT: Upon putting the script in, the Squirtle box shows up, but nothing else happens.
    Again.

    Sorry, there where a few issues,
    but the main one was the movement missing the "0xFE" at the end,
    since movement was never terminated the script didn't continue.

    Anyway here is a fully working script inside spoiler,
    I tested it and it's working on my BPRE 1.0 ROM (Fire-Red 1.0)

    Note that "preparemsg" should work 100% in XSE 1.1.1,
    so I simply fixed the other issues and kept it in the script,
    but you can replace it with a msgbox if you chose to.

    Also note that I kept the "setflag 0x920" in the script, from your own script,
    it's not used by the script currently,
    the script doesn't account for reappearing sprites in it's current form,
    since I don't know your flags, but you should easily be able to set those.

    Anyway you should really take a look in the original starter script,
    and make sure to read the notes in this script -> '-- msg

    Spoiler:
     

    OMGWURMPLES!

    För Sverige i tiden
    49
    Posts
    14
    Years
    • Seen Jun 15, 2012
    Sorry, there where a few issues,
    but the main one was the movement missing the "0xFE" at the end,
    since movement was never terminated the script didn't continue.

    Anyway here is a fully working script inside spoiler,
    I tested it and it's working on my BPRE 1.0 ROM (Fire-Red 1.0)

    Note that "preparemsg" should work 100% in XSE 1.1.1,
    so I simply fixed the other issues and kept it in the script,
    but you can replace it with a msgbox if you chose to.

    Also note that I kept the "setflag 0x920" in the script, from your own script,
    it's not used by the script currently,
    the script doesn't account for reappearing sprites in it's current form,
    since I don't know your flags, but you should easily be able to set those.

    Anyway you should really take a look in the original starter script,
    and make sure to read the notes in this script -> '-- msg

    Spoiler:
    I'm still having the extremely strange problem of the picture showing up, but no text box...
    Is there any way to fix it? It seems to compile fine and everything...
     
    29
    Posts
    12
    Years
  • I'm still having the extremely strange problem of the picture showing up, but no text box...
    Is there any way to fix it? It seems to compile fine and everything...

    Send me a PM with your e-mail and a link to a copy of your Fire Red ROM, and I'll have a look and see if I can figure out why it's doing that.
     
    54
    Posts
    13
    Years
    • Seen Jul 5, 2013
    Hi, I maybe posted on the wrong thread before, but anyway I have a problem with my script (you don't say?!)

    I want to redo the OAK's animation in Pallet town, but XSE scrambles my scripting.

    This is the original script: pastie.org/3865800
    And this is the scrambled script: pastie.org/3865812

    As you can see one of my msgbox disappeared and a goto to some unknown address is show instead.

    If you know... Thanks in adv.
     

    DrFuji

    [I]Heiki Hecchara‌‌[/I]
    1,691
    Posts
    14
    Years
  • Hi, I maybe posted on the wrong thread before, but anyway I have a problem with my script (you don't say?!)

    I want to redo the OAK's animation in Pallet town, but XSE scrambles my scripting.

    This is the original script: pastie.org/3865800
    And this is the scrambled script: pastie.org/3865812

    As you can see one of my msgbox disappeared and a goto to some unknown address is show instead.

    If you know... Thanks in adv.

    Are you opening the script through Advance Map and trying to edit it from there? That's what I believe you are doing, which isn't good practice and is the reason why your commands are becoming garbled.

    You need to have dynamic pointers (@talk, @move etc.) rather than static pointers (0x81655ED, 0x81656CE etc.) which you receive when you open a script from Advance Map. If you are working with static pointers, like you have shown by posting your scripts here straight from being opened in Advance Map, then you can't make them longer at all - This is because XSE will automatically overwrite what ever data you have at the address you have specified with the static pointers. Here is an example of what I'm talking about:

    Code:
    #org 0x80004E
    lockall
    applymovement 0x1 0x8800064
    waitmovement 0x1
    msgbox 0x8800067 0x2
    releaseall
    end
    
    #org 0x800064
    #raw 0x11
    #raw 0xFE
    
    #org 0x800067
    = Hello world!

    In this script that I have opened from Advance Map and cleaned up a little you see that I am using static pointers that tell me what offset parts of the script are assigned to. If I suddenly realised that the OW I'm moving needs to step upwards three more times and subsequently added three more 'raw 0x11's to his movements and then compiled the script again, this is what it would look like once I reload it:

    Code:
    #org 0x80004E
    lockall
    applymovement 0x1 0x8800064
    waitmovement 0x1
    msgbox 0x8800067 0x2
    releaseall
    end
    
    #org 0x800064
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0xFE
    
    #org 0x800067
    = Ù\nllo world!

    As you can see, the text in the message box has now been corrupted and is unusable, as the extra movement data that I added has overwritten three bytes of what was otherwise perfectly legible text. This is the problem with static offsets, you can't add any data that would otherwise expand the size of your script. It is good for quickly altering small things like values and variables you are using as that won't lengthen your script, but it is otherwise improper for everyday XSE use.

    If you are opening a script that was in the original game then I'd suggest changing each static pointer to a dynamic one. It may take some time, but you'll ensure that nothing will be overwritten. Once you've finished writing a new script/ converting the static pointer, I would advise saving it as a .rbc file, which is as easy as going to 'File > Save As' and saving your script as you would any other program. This way you can open up your script in the future with your dynamic pointers already in place and reinsert it again if you need to lengthen it.
     
    Status
    Not open for further replies.
    Back
    Top