• 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.
24
Posts
15
Years
    • Seen Mar 2, 2013
    0_o


    Okay, a few issues here. Changes in bold, remember that 1. you need #dynamic 0x800000 (or whatever offset) before every script, and 2. XSE will figure out the offsets for you when you insert... 3. you need #raw 0xFE after all your movements

    How do I activate my script so that when I come downstairs from my room at the beginning of the game it activates?
    Is it a level script? I don't really understand the level script...
     

    ~Hot n' Cold~

    is too good for a title.
    329
    Posts
    15
    Years
  • I searched, but did not find. I'm probably gonna sound stupid, but...

    How do you insert scripts into characters on A-Map?
     

    destinedjagold

    You can contact me in PC's discord server...
    8,593
    Posts
    16
    Years
    • Seen Dec 23, 2023
    This is going to sound stupid as well...

    Where do I find the script offset?

    in XSE, after you are done with your script, you compile it, right?
    After it compiles, a pop-up shows up where you can see some offsets on the right and the other one(forgot what they are called) on the left.

    Example...
    Code:
    #dynamic 0x800000
    
    #org @start
    lock
    faceplayer
    checkflag 0x1000
    if 0x1 goto @done
    message @1 0x6
    setflag 0x1000
    release
    end
    
    #org @done
    message @2 0x6
    release
    end
    
    #org @1
    = Oh hai thar!
    
    #org @2
    = I already greeted you...

    After you compile that, as I said, in XSE, a pop-up appears, where on the left side, all those @ will be displayed and on the right will be their address in the ROM, which we call offsets.
    Commonly, we pick the very top since it's where we usually start our scripts, so we will take/copy the offset of the @start and paste it in a corresponding person/sign/script on Advance Map.
     

    BlitŻ1

    guahh my dog is so cute
    472
    Posts
    15
    Years


  • in XSE, after you are done with your script, you compile it, right?
    After it compiles, a pop-up shows up where you can see some offsets on the right and the other one(forgot what they are called) on the left.

    Example...
    Code:
    #dynamic 0x800000
    
    #org @start
    lock
    faceplayer
    checkflag 0x1000
    if 0x1 goto @done
    message @1 0x6
    setflag 0x1000
    release
    end
    
    #org @done
    message @2 0x6
    release
    end
    
    #org @1
    = Oh hai thar!
    
    #org @2
    = I already greeted you...
    After you compile that, as I said, in XSE, a pop-up appears, where on the left side, all those @ will be displayed and on the right will be their address in the ROM, which we call offsets.
    Commonly, we pick the very top since it's where we usually start our scripts, so we will take/copy the offset of the @start and paste it in a corresponding person/sign/script on Advance Map.

    But if you recompile a script with the same offset, it's best to use the offset by the new offset field xD
     

    timeshero2

    EkdIkOs
    23
    Posts
    15
    Years
  • I've been trying to script an event where once you walk down your bedroom stairs, or even once you begin the game [FireRed] you would automatically start off with a lv. 5 Eevee, as well as the PokeDex and Pokemon menus appearing. I've been trying to script this for about 6 months now, but I still can't seem to get it to work. I'm not asking for the script itself, because I know it's against the rules, but I would just like a little help in figuring out how to script it.
     

    Hiche..

     
    979
    Posts
    16
    Years
    • Seen Dec 27, 2014
    I've been trying to script an event where once you walk down your bedroom stairs, or even once you begin the game [FireRed] you would automatically start off with a lv. 5 Eevee, as well as the PokeDex and Pokemon menus appearing. I've been trying to script this for about 6 months now, but I still can't seem to get it to work. I'm not asking for the script itself, because I know it's against the rules, but I would just like a little help in figuring out how to script it.

    Well, this requires level scripting. Go to Cooley's Tutorial on Level scripting. This should help you.
    Also, for Pokemon menu: setflag 0x828 and for PokeDex menu: setflag 0x829.
     

    trebornosliw

    Learning
    516
    Posts
    14
    Years
    • Seen Jul 22, 2012
    Quick note here, if you want the National Dex to be enabled as well, include this:
    special 0x16F
     

    HackMew

    Mewtwo Strikes Back
    1,314
    Posts
    17
    Years
    • Seen Oct 26, 2011
    Quick note here, if you want the National Dex to be enabled as well, include this:
    special 0x16F

    That's for FR/LG anyway. Better specify, just in case. FYI, both the FR/LG and the Emerald National Dex special values can be found in the std.rbh file.
     

    trebornosliw

    Learning
    516
    Posts
    14
    Years
    • Seen Jul 22, 2012
    That's for FR/LG anyway. Better specify, just in case. FYI, both the FR/LG and the Emerald National Dex special values can be found in the std.rbh file.
    Oops, thanks for the clarification. I'm so used to hacking FR that I don't even remember there are other ROMs out there :P
     

    trebornosliw

    Learning
    516
    Posts
    14
    Years
    • Seen Jul 22, 2012
    Is there a way to delete all pre-existing scripts so that I can start off with a clean slate?
    Well, in theory I think you could go to the offset of each individual script and change the hex values to FFFF or 0000 or whatever, but 1. I have no idea how or if that would work, and 2. why would you want to?
    It's much more convenient to just delete the scripts you don't want through A-map.
     
    24
    Posts
    15
    Years
    • Seen Mar 2, 2013
    Well, in theory I think you could go to the offset of each individual script and change the hex values to FFFF or 0000 or whatever, but 1. I have no idea how or if that would work, and 2. why would you want to?
    It's much more convenient to just delete the scripts you don't want through A-map.

    I've been manually deleting the scripts by turning off events in each map, through A-map. But I was just curious if there was a faster, alternative route.
     

    0m3GA ARS3NAL

    Im comin' home...
    1,816
    Posts
    16
    Years
  • I've been manually deleting the scripts by turning off events in each map, through A-map. But I was just curious if there was a faster, alternative route.

    JPAN's Super Clean Fire-Red patch will erase EVERY SCRIPT and EVERY EVENT in the game.
    Every last one, including the level scripts.
    The level scripts aren't much of a problem when you can just copy them from a clean rom, but it is a good fast way to erase pretty much everything.

    You can find it in these forums, just search for JPAN's name. JPAN

    You'll find it eventually, use some initiative and search around yourself, BEFORE asking the question, kay?
     

    forestw785

    I divide by 0.
    60
    Posts
    14
    Years
    • Seen Dec 8, 2010
    Okay, I'm new to scripting, and I'm using pokescript.

    I'm trying to make a starter pokemon script of my own, and I want the balls to disappear after I select one of them. I have this script so far after following a few tutorials. Anyone mind telling me what and where I should add things to create this.

    I know it needs fadescreen somewhere.... but like I said; I'm new.

    Spoiler:


    ps. sorry, if this was already answered somewhere else.
     

    trebornosliw

    Learning
    516
    Posts
    14
    Years
    • Seen Jul 22, 2012
    Okay, I'm new to scripting, and I'm using pokescript.

    I'm trying to make a starter pokemon script of my own, and I want the balls to disappear after I select one of them. I have this script so far after following a few tutorials. Anyone mind telling me what and where I should add things to create this.

    I know it needs fadescreen somewhere.... but like I said; I'm new.

    Spoiler:


    ps. sorry, if this was already answered somewhere else.
    First rule of scripting: Pokescript=Hell.
    Seriously, go with XSE. It's easier, and other people use it, so they can actually help you.
     

    0m3GA ARS3NAL

    Im comin' home...
    1,816
    Posts
    16
    Years
  • Okay, I'm new to scripting, and I'm using pokescript.

    I'm trying to make a starter pokemon script of my own, and I want the balls to disappear after I select one of them. I have this script so far after following a few tutorials. Anyone mind telling me what and where I should add things to create this.

    I know it needs fadescreen somewhere.... but like I said; I'm new.

    Spoiler:


    ps. sorry, if this was already answered somewhere else.

    It looks like it would do fine.
    If you wanna learn XSE to give you an easier time (Since PokeScript will very likely bug up your game eventually...
    Here is the same script above, only in XSE form, and with any errors, changed if I find them. It will also be commented with comment lines, so you can understand better.

    Code:
    //As a bit of notice, Comments are easily noticed as two forward slashes, anything written after them will be ignored.
    
    #dynamic 0x800000 //See, in XSE, you don't have to manually search for free space like
    //PokeScript, #dynamic is telling XSE to look for data after 0x800000 in the Rom, useful eh?
    
    #org @start //In XSE, we use @ instead of $
    checkflag 0x828
    if b_true goto @done //Once again,  we use @ instead of $ in XSE
    message @1 0x5 //An interesting thing in XSE, we don't have a boxset command. Instead, we just add the boxset number we want after the pointer.
    compare LASTRESULT 0x1
    if b_true goto @take
    message @2 0x6 //Again, notice, instead of a boxset 6, we just add a 6.
    release
    end
    
    #org @take
    givepokemon 4 5 0
    fanfare 0x13E
    message @3 4
    waitfanfare
    closeonkeypress //Another cool thing, we have extra commands, instead of having to use #RAW commands... instead of that raw, we use the command closeonkeypress.
    setflag 0x828
    message @4 6
    release
    end
    
    #org @name
    call 0x1A74EB
    return
    
    #org @1 //looky here, you used the wrong slash... I changed it for you, it's \n, not /n
    1 =Do you want Charmander.[color=red][b]\[/b][/color]nThe fire-type Pokémon?
    
    #org @2 /Another interesting thing, when using a message command, you don't need to put the pointer name before any text, compare it to your original script.
    = \c\h01\h08OAK: Get one now!
    
    #org @3 //
    = \c\h01\h02You received a Charmander!
    
    #org @4
    = \c\h01\h02Would you like to rename Charmander?

    There we go, that should work fine.
     
    Status
    Not open for further replies.
    Back
    Top