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

Sierra's MEGA-HUGE XSE Scripting Tutorial

0m3GA ARS3NAL

Im comin' home...
1,816
Posts
16
Years
  • Say I have the offset for some text, is there any way for me to find out the offset of the script which calls that text?

    A search function would be handy, of course I haven't a clue whether that's possible though.

    Yeah, lets sat the offset of the text is 0x823131, you would do a search (In a hex editor) for 31318208 (Because we use Hex reversal)

    AaBbCcDd
    would become
    DdCcBbAa
     

    HackinJohn

    FireRed ROM Hacker
    92
    Posts
    17
    Years
  • Another quick question.

    I've tried everything, so I need help.
    I'm trying to make my Oak overworld (Person Event No.: 3) to disappear completely once I talk to him, and he does, but as soon as I come back to the map, he's back. o.O;

    Spoiler:


    Thanks ahead of time [:
     
    6
    Posts
    14
    Years
    • Seen Apr 6, 2010
    i need help in the giveitem script. i type it in and it says #define on line 21 with hs the msg_obtain
     

    indohekrz

    Logged Out
    12
    Posts
    14
    Years
  • I've tried everything, so I need help.
    I'm trying to make my Oak overworld (Person Event No.: 3) to disappear completely once I talk to him, and he does, but as soon as I come back to the map, he's back. o.O;

    Spoiler:


    Thanks ahead of time [:

    Do you put the flag on Oak's overworld???

    You must put:
    People ID: 2000

    Or maybe, you must use hidesprite (the red text).
     

    NintendoWalkthrudude

    Creator of Pokemon Ninja!
    49
    Posts
    14
    Years
  • I find this tutorial very useful diego, but I have a question.

    I want it so when you talk to Professor Oak he says, "Want a pokemon?" and if you say yes he gives you a totodile, but if you say no he gives you a cyndaquil anyways. How can I get this to happen? I tried combining both the YES/NO script with the give pokemon script and it didn't work..
     

    indohekrz

    Logged Out
    12
    Posts
    14
    Years
  • I find this tutorial very useful diego, but I have a question.

    I want it so when you talk to Professor Oak he says, "Want a pokemon?" and if you say yes he gives you a totodile, but if you say no he gives you a cyndaquil anyways. How can I get this to happen? I tried combining both the YES/NO script with the give pokemon script and it didn't work..

    Try this script:
    Spoiler:


    Attention: This only work if you don't have a pokemon.

    If you have a pokemon, change the flag to other flag.
    Example: ... 0x828 change to ... 0x900 (... = setflag or checkflag.)
     
    Last edited:

    NintendoWalkthrudude

    Creator of Pokemon Ninja!
    49
    Posts
    14
    Years
  • Try this script:
    Spoiler:


    Attention: This only work if you don't have a pokemon.

    If you have a pokemon, change the flag to other flag.
    Example: ... 0x828 change to ... 0x900 (... = setflag or checkflag.)

    Thank you, but when I click NO, it just he just repeats the question!
     

    Sierraffinity

    Desperately trying to retire from ROM hacking
    1,069
    Posts
    16
    Years
  • Thank you, but when I click NO, it just he just repeats the question!
    Code:
    #dynamic 0x800000
    
    #org @start
    checkflag 0x828
    if 0x1 goto @done
    checkflag 0x828
    if 0x0 goto @willgive
    end
    
    #org @done
    lock
    faceplayer
    msgbox @already 0x6
    release
    end
    
    #org @willgive
    lock
    faceplayer
    msgbox @ask 0x5
    compare LASTRESULT 0x0
    if 0x1 goto @cyndaquil
    compare LASTRESULT 0x1
    if 0x1 goto @totodile
    end
    
    #org @cyndaquil
    msgbox @givecynda 0x4
    givepokemon 0x9B 0x5 0x0 0x0 0x0 0x0
    fanfare 0x13E
    msgbox @get 0x4
    waitfanfare
    msgbox @takecare 0x6
    setflag 0x828
    release
    end
    
    #org @totodile
    msgbox @givetoto 0x4
    givepokemon 0x9E 0x5 0x0 0x0 0x0 0x0
    fanfare 0x13E
    msgbox @get2 0x4
    waitfanfare
    msgbox @takecare 0x6
    setflag 0x828
    release
    end
    
    #org @already
    = That is Johto pokemon.
    
    #org @ask
    = Want a pokemon?
    
    #org @get
    = [player] received Cyndaquil from Oak.
    
    #org @get2
    = [player] received Totodile from Oak.
    
    #org @givecynda
    = But, you need a pokemon.\pThis pokemon for you.
    
    #org @givetoto
    = Okay, this is for you.
    
    #org @takecare
    = Please take care of your\npokemon.
    Before, the script was checking for "if not no, goto @cyndaquil" and "if yes, it's yes, then go to @totodile", but I fixed it.
     

    NintendoWalkthrudude

    Creator of Pokemon Ninja!
    49
    Posts
    14
    Years
  • Code:
    #dynamic 0x800000
    
    #org @start
    checkflag 0x828
    if 0x1 goto @done
    checkflag 0x828
    if 0x0 goto @willgive
    end
    
    #org @done
    lock
    faceplayer
    msgbox @already 0x6
    release
    end
    
    #org @willgive
    lock
    faceplayer
    msgbox @ask 0x5
    compare LASTRESULT 0x0
    if 0x1 goto @cyndaquil
    compare LASTRESULT 0x1
    if 0x1 goto @totodile
    end
    
    #org @cyndaquil
    msgbox @givecynda 0x4
    givepokemon 0x9B 0x5 0x0 0x0 0x0 0x0
    fanfare 0x13E
    msgbox @get 0x4
    waitfanfare
    msgbox @takecare 0x6
    setflag 0x828
    release
    end
    
    #org @totodile
    msgbox @givetoto 0x4
    givepokemon 0x9E 0x5 0x0 0x0 0x0 0x0
    fanfare 0x13E
    msgbox @get2 0x4
    waitfanfare
    msgbox @takecare 0x6
    setflag 0x828
    release
    end
    
    #org @already
    = That is Johto pokemon.
    
    #org @ask
    = Want a pokemon?
    
    #org @get
    = [player] received Cyndaquil from Oak.
    
    #org @get2
    = [player] received Totodile from Oak.
    
    #org @givecynda
    = But, you need a pokemon.\pThis pokemon for you.
    
    #org @givetoto
    = Okay, this is for you.
    
    #org @takecare
    = Please take care of your\npokemon.
    Before, the script was checking for "if not no, goto @cyndaquil" and "if yes, it's yes, then go to @totodile", but I fixed it.

    Thanks a ton man, I refer to this tut like crazy so thanks for helping me out!
    I think you should put in your main post about this sort of thing.

    Also, I want one space, if stepped on you are checked for a pokemon, if you have one you are allowed through, but if you don't, you are pushed back one space. Would it be just like the script for the Guards in FR, like I would only have to replace the flag and text, or would it be different?
     
    Last edited:
    33
    Posts
    14
    Years
    • Seen Jan 4, 2017
    This may be a bit on the off-topic side...But if anyone is pretty experienced with scripting and could help me out.
    I would really appreciate it if someone could add me on MSN so we could discuss some of the pointers on scripting.

    Thanks in advance,

    3n3rGyZ
     

    NintendoWalkthrudude

    Creator of Pokemon Ninja!
    49
    Posts
    14
    Years
  • I tried this script:

    Spoiler:


    But it doesn't work. I was trying to have it check pokemon, and if you have one you go onthrough and if you dont you go back one space to the left. Kinda like the cycling road entrances. But with only 2 script squares, But it just freezes you there while the guard stares at you.
    I even adjusted the unknown and varnumber to like the picture, but it doesnt work still.
     
    Last edited:

    Vigilante

    Ringleader of Hell
    319
    Posts
    14
    Years
    • Seen Dec 26, 2009
    I don't really get the yes/no thing, I've tried it and it didn't work :/. Help me get a working one?
     

    NintendoWalkthrudude

    Creator of Pokemon Ninja!
    49
    Posts
    14
    Years
  • I don't really get the yes/no thing, I've tried it and it didn't work :/. Help me get a working one?

    Its basically, if they click yes you point them to #org @yes and if they pick no you point them to #org @no, unless you just want it to end when you click yes or no. Its basically all in the MSGBOX Number, you just have to add extra basic stuff depending on what you are planning to do with that particular script.
     

    Fendaril

    Novice Mario 64 hacker.
    43
    Posts
    16
    Years
    • Seen Aug 20, 2010
    Hello Diego. First before anything your tutorial acts as an excellent reference for me. It's almost as if a professional wrote it.

    Now here is my problem. I have a script that suppose to move my player but after its completed my player freezes on the spot without the msgbox function activating.
    Below is my code.

    Also do you know how to get XSE NOT to autogenerate extra code? It sometimes likes to generate extra unneeded movement commands.

    Code:
    '---------------
    #org 0x80050A
    checkflag 0x8D4
    if 0x1 goto 0x880054C
    setflag 0x8D4
    lock
    applymovement MOVE_PLAYER 0x880052C
    waitmovement 0x0
    release
    msgbox 0x8800534 MSG_NORMAL '"you notice a pokeball"
    closeonkeypress
    end
    
    '---------------
    #org 0x80054C
    release
    end
    
    
    '---------
    ' Strings
    '---------
    #org 0x800534
    = you notice a pokeball
    
    
    '-----------
    ' Movements
    '-----------
    #org 0x80052C
    #raw 0x56 'Exclamation Mark (!)
    #raw 0x0 'Face Down
    #raw 0x1 'Face Up
    #raw 0x2 'Face Left
    #raw 0x3 'Face Right
    #raw 0x2 'Face Left
    #raw 0x3 'Face Right
     
    Back
    Top