• 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.

Teh Blazer

Divider of Zero
776
Posts
15
Years
  • I'm having some trouble with my script. For one, the people I move, they don't appear, they're just invisible. Second, when the script finishes, you take control of the guy standing next to you and his palette is messed up. WHat went wrong? Oh yeah, it's XSE.

    Spoiler:
     
    Last edited:

    Swolligator

    Butcher of the Sands
    1,955
    Posts
    14
    Years
  • Okay, I admit to being a newbie to scripting.
    You appear from the intro screen and the script starts when you walk forward (into the script), the person talks to you. I have got most of it but it seems that you have to get the PokeDex first then talk to the person.

    Here it is:
    Spoiler:


    It is done on XSE, all i need help with is to make it so that the person does not give you another Absol when you talk to them, turns to face you when you step forward (into the script) and make it so you don't have to get the PokeDex to obtain the Absol.
    Can someone please point out where I have gone wrong, what i need to fix and help me please?
     
    47
    Posts
    13
    Years
  • I'm having some trouble with my script. For one, the people I move, they don't appear, they're just invisible. Second, when the script finishes, you take control of the guy standing next to you and his palette is messed up. WHat went wrong? Oh yeah, it's XSE.

    Spoiler:

    The script itself looks pretty ok to me. Did you use dynamic offsets when compiling this? Or did you just compile the hard coded offsets like you placed it here? You may have overwritten some game data which could explain the bugs you end up with.

    I suggest you try putting it on a backup version of your rom with dynamic offsets starting at 0x800000. After compiling it you will get a list with the offsets so you know which one to use in advancemap.

    example:
    Spoiler:
     
    119
    Posts
    14
    Years
  • Okay, I admit to being a newbie to scripting.
    You appear from the intro screen and the script starts when you walk forward (into the script), the person talks to you. I have got most of it but it seems that you have to get the PokeDex first then talk to the person.

    Here it is:
    Spoiler:


    It is done on XSE, all i need help with is to make it so that the person does not give you another Absol when you talk to them, turns to face you when you step forward (into the script) and make it so you don't have to get the PokeDex to obtain the Absol.
    Can someone please point out where I have gone wrong, what i need to fix and help me please?

    Shouldn't you put a checkflag or checkvar command at the beginning of the script?

    By the way, the script now calls the following: If the flag is 0x1, you goto to the pointer in which you get an Absol. If the flag is 0x0, the man/woman says he wants to give you an Absol. Correct me if I'm wrong, but that doesn't make sense to me, really. :-\

    xoax said:
    I'm posting this again.......
    Quote:
    In Ruby, how can i change the poxedex given be already national? What's the special for it?
    Go to XSE > Help > Guide > Appendix > Specials > R/S Specials. Oops, I see there is no national dex special there. Well then I don't know. Diegoisawesomes tutorial doesn't have the special either. Maybe you should decompile a script from ruby. When you complete the Hoenn dex you recieve the nat. dex right?

    Anyone on my question/problem:
    Clicky
     
    16
    Posts
    13
    Years
    • Seen May 5, 2016
    First of, I want to make one thing clear: I just started scripting some hours ago with givepokemon, wildbattle etc. scripts. So I'm a biiig n00b.


    Game: Pokemon Ruby
    Type: AXV
    Editor: XSE

    I wanted to insert a person that heals your Pokémons into the Petalburg Cave (Yeah, cave)

    Well, I don't really know how to make it work, but I've tried this:

    Code:
    '-----------------------
    #org 0x6B2418
    msgbox 0x6B2418 '"It is hard to get through\nthis..."
    callstd 0x2
    fadescreen 0x1
    special 0x0
    fadescreen 0x0
    end
    
    
    '---------
    ' Strings
    '---------
    #org 0x6B2418
    = It is hard to get through\nthis cave.\pLet me heal your POKéMONS.

    From what I know of, fadescreen 0x1 fades the screen, and 0x0 unfades it. And special 0x0 = healing. But when I compile it, it just says:

    Code:
    '-----------------------
    #org 0x6B2418
    cmdC3 0xE8
    nop

    I have done something wrong, I know. But what it is... I'm completely lost. Some help would be apprieciated.



    Furthermore, I found this script in Pokemon AshGray (A hacked FireRed made by Hirakuanh ... dl.poke-mega dot org/pokemon-ash-gray-1-65 ...) and edited it a little, just to see, if it would work. (Then I will make another one that looks kinda the same, just to prevent extreme credit-madness. Of course I will still give credit.)

    Code:
    '-----------------------
    #org 0x8189BB
    lockall
    checkflag 0x1006 [U][B]////If you go to bed, this flag activates////[/B][/U]
    if 0x0 goto 0x880000C
    setvar 0x6061 0x1
    releaseall
    end
    
    '-----------------------
    #org 0x80000C
    showsprite 0x1
    sound 0x9
    applymovement 0x1 0x882023B
    applymovement MOVE_PLAYER 0x8820307
    waitmovement 0x0
    applymovement 0x1 0x882030C
    applymovement MOVE_PLAYER 0x8801DE6
    textcolor 0x0
    msgbox 0x881D2FD '"\c\h01ÇMOM: [player]! Get to bed!\n..."
    callstd 0x4
    closeonkeypress
    applymovement 0x1 0x8820311
    sound 0x9
    waitmovement 0x1
    hidesprite 0x1
    setflag 0x2C
    releaseall
    end
    
    
    '-----------
    ' Movements
    '-----------
    #org 0x82023B
    #raw 13 'Step Right (Normal)
    #raw FE 'End of Movements
    
    #org 0x820307
    #raw 10 'Step Down (Normal)
    #raw 62 'Exclamation Mark (!)
    #raw 3 'Face Right
    #raw FE 'End of Movements
    
    #org 0x82030C
    #raw 4A 'Face Player
    #raw FE 'End of Movements
    
    #org 0x801DE6
    #raw 1 'Face Up
    #raw FE 'End of Movements
    
    #org 0x820311
    #raw 12 'Step Left (Normal)
    #raw FE 'End of Movements
    
    
    '---------
    ' Strings
    '---------
    #org 0x81D2FD
    = \c\h01ÇMOM: [player]! Get to bed!\nIt's 11:00! You should be asleep!\pGo to bed and don't forget to\nchange into your pajamas!



    I edited it a little to see, if it would work in my Ruby. (I heard the movements/raw-thing are different from Firered?) ... Well, it didn't work.

    Code:
    '-----------------------
    #org 0x6B16AC
    lockall
    checkflag 0x1006
    if 0x0 goto 0x6B2600
    setvar 0x6061 0x1
    releaseall
    end
    
    '-----------------------
    #org 0x6B2600
    showsprite 0x14
    sound 0x9
    applymovement MOVE_PLAYER 0x6B2618
    applymovement 0x1 0x6B260C
    waitmovement 0x0
    applymovement 0x1 0x6B2624
    applymovement MOVE_PLAYER 0x22F1A8
    textcolor 0x0
    msgbox 0x23CE28 '"[player]! Get to bed!\n..."
    callstd 0x4
    closeonkeypress
    applymovement 0x1 0x23CE1C
    sound 0x9
    waitmovement 0x1
    hidesprite 0x14
    setflag 0x2C
    releaseall
    end
    
    
    '-----------
    ' Movements
    '-----------
    #org 0x6B2618
    #raw 10 'Step Down (Normal)
    #raw 62 'Exclamation Mark (!)
    #raw FE 'End of Movements
    
    #org 0x6B260C
    #raw 13 'Step Down (Normal)
    #raw FE 'End of Movements
    
    #org 0x6B2624
    #raw 4A 'Face Player
    #raw FE 'End of Movements
    
    #org 0x22F1A8
    #raw 1 'Face Up
    #raw FE 'End of Movements
    
    #org 0x23CE1C
    #raw 12 'Step Up (Normal)
    #raw FE 'End of Movements
    
    
    '---------
    ' Strings
    '---------
    #org 0x23CE28
    = \c\h01ÇMOM: [player]! Get to bed!\nIt's 11:00! You should be asleep!\pGo to bed!!



    The script itself just doesn't activate. NOTHING happens, when I step on the green S-tile. Nothing. The Game froze before, but now nothing happens. The ID of the mom is 002C, the var-number is 6061 (Is that the problem?) and var-value 0000. When I compile it and open the script again, only the part from #org 0x6B16AC to applymovement MOVE_PLAYER 0x6B2618 is left. Everything else is gone. What do I do wrong? And how do I find out what the movements in Ruby are?

    And can somebody please send me a link to XSE download? The one I have is outdated (I think..) And all the links I find are outdated too.. Or maybe I'm wrong, but better be safe than sorry.
     
    Last edited:
    119
    Posts
    14
    Years
  • First of, I want to make one thing clear: I just started scripting some hours ago with givepokemon, wildbattle etc. scripts. So I'm a biiig n00b.


    Game: Pokemon Ruby
    Type: AXV
    Editor: XSE

    I wanted to insert a person that heals your Pokémons into the Petalburg Cave (Yeah, cave)

    Well, I don't really know how to make it work, but I've tried this:

    (...)

    I have done something wrong, I know. But what it is... I'm completely lost. Some help would be apprieciated.



    Furthermore, I found this script in Pokemon AshGray (A hacked FireRed made by Hirakuanh ... dl.poke-mega dot org/pokemon-ash-gray-1-65 ...) and edited it a little, just to see, if it would work. (Then I will make another one that looks kinda the same, just to prevent extreme credit-madness. Of course I will still give credit.)

    (...)

    I edited it a little to see, if it would work in my Ruby. (I heard the movements/raw-thing are different from Firered?) ... Well, it didn't work.

    (...)

    The script itself just doesn't activate. NOTHING happens, when I step on the green S-tile. Nothing. The Game froze before, but now nothing happens. The ID of the mom is 002C, the var-number is 6061 (Is that the problem?) and var-value 0000. When I compile it and open the script again, only the part from #org 0x6B16AC to applymovement MOVE_PLAYER 0x6B2618 is left. Everything else is gone. What do I do wrong? And how do I find out what the movements in Ruby are?

    And can somebody please send me a link to XSE download? The one I have is outdated (I think..) And all the links I find are outdated too.. Or maybe I'm wrong, but better be safe than sorry.
    1. Are you sure you've got a right offset with enough space? Do you use FreeSpaceFinder? It happens to me sometimes too, just try to find another offset. Check the size of the script in Windows Explorer or similar. Always take a few ten bytes extra.

    2. I'm not able to find a major mistake in your second script. Maybe the flag 1006 is already turned 'on'. You should add a msgbox under the "if 0x0 goto..." line. Type something like "flag 1006 is 0x1" and you will know for sure when playing the game.

    3. You can update XSE by clicking Help > Live Update. It works better than downloading a new version.
     
    16
    Posts
    13
    Years
    • Seen May 5, 2016
    1. I have downloaded FSF some days ago, but never actually tried it. I might give it a try in a few minutes.

    2. Hm.. I'll try the messagebox. If that doesn't work, I'll take a look on the flag again.

    3. Okay, thanks.


    Thank you for your answer.


    Okay, now everything is intact when I save (Found a offset with enough space).. Everything seems to work when I save it.

    I changed var-number to 4050 and unknown to 0300 and now it works (d'oh)

    But.. The sprite of my mom is visible all the time. She is standing on the staircase. But she doesn't move. The 'hero' is the only one that moves. And the message is displayed twice.. D:
     
    Last edited:
    119
    Posts
    14
    Years
  • 1. I have downloaded FSF some days ago, but never actually tried it. I might give it a try in a few minutes.

    2. Hm.. I'll try the messagebox. If that doesn't work, I'll take a look on the flag again.

    3. Okay, thanks.


    Thank you for your answer.


    Okay, now everything is intact when I save (Found a offset with enough space).. Everything seems to work when I save it.

    I changed var-number to 4050 and unknown to 0300 and now it works (d'oh)

    But.. The sprite of my mom is visible all the time. She is standing on the staircase. But she doesn't move. The 'hero' is the only one that moves. And the message is displayed twice.. D:
    First of all, what is the person event number of 'mom'? In your script, you use 0x1 when using msgbox, and 0x14 when using applymovement. Correct me if I'm wrong, but I think those have to be the same if they apply to the same overworld.
    And when exactly should 'mom' be invisible? To make her invisible, you should set the flag, which matches the Person ID of the overworld. But I can see you got that already. Does 'mom' has to be invisible before/at the start of the script? In that case, the flag/Person ID should be set before the script (preferrably before you enter the map).
    I have absolutely no idea why the message would show up twice. That remains a mystery :P
    And a few other things that might bug: I think you should use 'clearflag 0x...' when using 'showsprite'. Again, correct me if I'm wrong, I'm not completely sure about this. Add 'waitmovement 0x0' after the 'applymovements'. (Sometimes you missed them?)

    So:
    - Check the Person Event Nr. of 'mom' and correct if needed.
    - Be sure you set the flag of 'mom's Person ID before you enter the map (or you would have to work with level script which are complicated and do not work best in these types of scripts).

    I hope I could help.
     
    16
    Posts
    13
    Years
    • Seen May 5, 2016
    Haha, I found the reason to why the script worked uncorrectly.

    The moms event number thing is 15. So I had to write F, and NOT 15 into hidesprite.. Hex, not decimal..

    Do anybody know why this script doesn't work?

    Again, Pokemon Ruby, AXV, XSE.

    Code:
    '---------------
    #org 0x6BB844
    checkflag 0x2002
    if 0x0 goto 0x6B2744
    
    '---------------
    #org 0x6B2744
    lock
    msgbox 0x6B2594 MSG_KEEPOPEN '"Hello, I'm the Cutter...."
    closeonkeypress
    applymovement 0x1 0x6B2710
    waitmovement 0x0
    msgbox 0x6B26A0 MSG_KEEPOPEN '"How dare you wear shoes..."
    closeonkeypress
    clearflag 0x860
    msgbox 0x6B25DC MSG_KEEPOPEN '"The Cutter took your..."
    closeonkeypress
    applymovement MOVE_PLAYER 0x6B271C
    applymovement 0x1 0x6B2744
    setflag 0x2002
    release
    end
    
    '---------
    ' Strings
    '---------
    
    #org 0x6B2594
    = Hello, I'm the Cutter.
    
    #org 0x6B26A0
    = How dare you wear shoes in MY house?!\Get out! NOW!
    
    #org 0x6B25DC
    = The Cutter took your Running Shoes!
    
    '-----------
    ' Movements
    '-----------
    #org 0x6B2710
    #raw 0x56 'Exclamation Mark (!)
    #raw 0x46 'Jump in Place (Facing Down)
    
    #org 0x6B271C
    #raw 0x08 'Step Down (Normal)
    #raw 0x0A 'Step Left (Normal)
    #raw 0x0A 'Step Left (Normal)
    #raw 0x0A 'Step Left (Normal)
    #raw 0x0A 'Step Left (Normal)
    #raw 0x0A 'Step Left (Normal)
    #raw 0x08 'Step Down (Normal)
    #raw 0x08 'Step Down (Normal)
    
    #org 0x6B2744
    #raw 0x08 'Step Down (Normal)
    #raw 0x0A 'Step Left (Normal)
    #raw 0x0A 'Step Left (Normal)
    #raw 0x0A 'Step Left (Normal)
    #raw 0x0A 'Step Left (Normal)
    #raw 0x0A 'Step Left (Normal)
    #raw 0x08 'Step Down (Normal)
    #raw 0x08 'Step Down (Normal)

    When you go to the Cutter the first time, he will be mad at you for wearing shoes, then take your running shoes (Clearflag 0x860) and push you outside. (I've got some other scripts to write, so you have to get them back, and can't leave without them).. But when I write that into XSE and compile it, it just turn into

    Code:
    '---------------
    #org 0x6BB844
    checkflag 0x2002
    if 0x0 goto 0x86B2744
    '---------------
    #org 0x6B2744
    gotostd 0xA

    That doesn't make sense..

    I've used like five different offsets, all with about 1500 bytes of space.. So it should not be cut down to that. Or am I wrong?
     
    Last edited:
    119
    Posts
    14
    Years
  • I'm afraid I can't help you with that. Maybe someone else.

    I'm in need of help myself right now, actually. It's this level script. It used to work fine. However, something bugged with inserting new level scripts in other map, so I had to delete and reinsert the offset a few times. Somehow, I managed to fix that and reinsterted the script. However, now it freezes at the end of the script. I'm afraid it's something with the movecamera script, or the special managing it.

    Code:
    '---------------
    #org 0x163CAF
    lockall
    special 0x113
    applymovement MOVE_CAMERA 0x8163D1A
    waitmovement 0x0
    applymovement 0x1 0x8163D29
    waitmovement 0x0
    pause 0x20
    applymovement 0x1 0x8163D2D
    waitmovement 0x0
    pause 0x20
    applymovement 0x1 0x8163D32
    waitmovement 0x0
    applymovement MOVE_CAMERA 0x8163D3A
    waitmovement 0x0
    applymovement MOVE_PLAYER 0x8163D41
    waitmovement 0x0
    msgbox 0x8163D4B MSG_NORMAL '"Hello, [player]! I'm glad you came..."
    applymovement 0x1 0x8163D37
    waitmovement 0x0
    setvar 0x7001 0x1
    setvar 0x7002 0x0
    setflag 0x1003
    special 0x114
    releaseall
    end
    
    
    '---------
    ' Strings
    '---------
    #org 0x163D4B
    = Hello, [player]! I'm glad you came.
    
    
    '-----------
    ' Movements
    '-----------
    #org 0x163D1A
    #raw 0x11 'Step Up (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0xFE 'End of Movements
    
    #org 0x163D29
    #raw 0xE 'Step Left (Slow)
    #raw 0x1 'Face Up
    #raw 0xFE 'End of Movements
    
    #org 0x163D2D
    #raw 0xF 'Step Right (Slow)
    #raw 0xF 'Step Right (Slow)
    #raw 0x1 'Face Up
    #raw 0xFE 'End of Movements
    
    #org 0x163D32
    #raw 0xE 'Step Left (Slow)
    #raw 0x0 'Face Down
    #raw 0x62 'Exclamation Mark (!)
    #raw 0xFE 'End of Movements
    
    #org 0x163D3A
    #raw 0x10 'Step Down (Normal)
    #raw 0x10 'Step Down (Normal)
    #raw 0x10 'Step Down (Normal)
    #raw 0x10 'Step Down (Normal)
    #raw 0x10 'Step Down (Normal)
    #raw 0xFE 'End of Movements
    
    #org 0x163D41
    #raw 0x11 'Step Up (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0xFE 'End of Movements
    
    #org 0x163D37
    #raw 0x1 'Face Up
    #raw 0xFE 'End of Movements
     

    Kazbat028

    The Only Guy With a Girlfriend
    84
    Posts
    14
    Years
    • Seen Sep 5, 2011
    I had that issue as well. In advancemap, make sure the 'unknown' number is set 0003 and the VAR number is 4050.
     
    76
    Posts
    15
    Years
    • Seen Aug 8, 2021
    Okay, so I changed a script to add in an extra legendary battle, and now all of a sudden, any event sprites that should be invisible until a certain flag is triggered (i.e. Oak before you try to walk into the grass, the Silph Scope before you defeat Giovanni) are all visible, and I don't have any idea why. ;-;
    EDIT: Right, I guess I should include the script...
    Code:
    '-----------------------
    #org 0x16575C
    special 0x187
    compare LASTRESULT 0x2
    if 0x1 goto 0x81A7AE0
    special 0x188
    lock
    faceplayer
    startwildbattle 0xFC 0x50 0x0
    checksound
    msgbox2 0x81A6448 '"[.][.][.]"
    waitmsgbox
    pause 0xA
    playsong 0x2 0x2
    waitkeypress
    setflag 0x807
    special 0x138
    waitstate
    clearflag 0x807
    special2 LASTRESULT 0xB4
    compare LASTRESULT 0x1
    if 0x1 goto 0x816381B
    compare LASTRESULT 0x4
    if 0x1 goto 0x8163824
    compare LASTRESULT 0x5
    if 0x1 goto 0x8163824
    setflag 0x2BF
    release
    end
    
    '-----------------------
    #org 0x1A7AE0
    release
    end
    
    '-----------------------
    #org 0x16381B
    setflag 0x2BF
    goto 0x81A922D
    end
    
    '-----------------------
    #org 0x163824
    setvar 0x8004 0x91
    goto 0x81A9236
    end
    
    '-----------------------
    #org 0x1A922D
    fadescreen 0x1
    hidesprite LASTTALKED
    fadescreen 0x0
    release
    end
    
    '-----------------------
    #org 0x1A9236
    fadescreen 0x1
    hidesprite LASTTALKED
    fadescreen 0x0
    bufferpokemon 0x0 0x8004
    msgbox 0x83291D8 '"[.][.][.]"
    callstd 0x4
    release
    end
    
    
    '---------
    ' Strings
    '---------
    #org 0x1A6448
    = [.][.][.]
    
    #org 0x3291D8
    = [.][.][.]
     

    Kazbat028

    The Only Guy With a Girlfriend
    84
    Posts
    14
    Years
    • Seen Sep 5, 2011
    Okay, so I changed a script to add in an extra legendary battle, and now all of a sudden, any event sprites that should be invisible until a certain flag is triggered (i.e. Oak before you try to walk into the grass, the Silph Scope before you defeat Giovanni) are all visible, and I don't have any idea why. ;-;

    It would be helpful if you included the script you used in your post.
     

    Kazbat028

    The Only Guy With a Girlfriend
    84
    Posts
    14
    Years
    • Seen Sep 5, 2011
    The only thing I can see wrong with it is that on line 3 it should be

    compare LASTRESULT 0x1 not 0x2
     
    73
    Posts
    14
    Years
    • Seen Aug 31, 2014
    Script help @.@

    Spoiler:

    I need help with this script. Just playing around with the yes/no part for the pokemon either gives Charmander on Yes and No, or gives no pokemon on Yes (creating an infinite loop). Also, when the nickname screen appears, the picture and pokemon species name is "?". Can anyone help with these two problems?
     
    Status
    Not open for further replies.
    Back
    Top