• 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

[T]ouko

Dedicated Scripter!
46
Posts
12
Years
    • Seen Jul 9, 2013
    I really thank you for this! Say, do you know what are the scripts for a roaming pokemon after you talk to them?

    Also, is it possible to have a double battle for wild pokemon? I was kinda thinking of making one for Latios and Latias for a hack S:

    About the double wild battle, if I'm correct, there's a "Wild Double/Triple Battle" thread in the "Research and Development" section (also in Emulation), you'll find your answer there, I think.

    For the roaming, maybe you could make it randomly pick a number between let's say 0-10. If 0 it'll be on Route 1, if it's 5 it will be at the Victory Road, for example... Just an idea though.
     

    Fortunado

    Prof. Hemlock is busy now...
    30
    Posts
    12
    Years
    • Seen Nov 26, 2011
    I have a small question. I'm trying to program an event that allows you to encounter Regirock in my ROM. To be a good sport, I want to make it so that if you beat the Elite 4 after K.O.-ing it instead of catching it, you'll be able to catch it again. Is there a command to check the player's Pokédex??
     

    [T]ouko

    Dedicated Scripter!
    46
    Posts
    12
    Years
    • Seen Jul 9, 2013
    I have a small question. I'm trying to program an event that allows you to encounter Regirock in my ROM. To be a good sport, I want to make it so that if you beat the Elite 4 after K.O.-ing it instead of catching it, you'll be able to catch it again. Is there a command to check the player's Pokédex??

    So you want to check if you already caught it or not? I wouldn't know how to do that. Curious, though.

    I also have a question, is it possible to let a trainer say something different when he wins a battle, like, yay I won, and something different when he loses, like, damn I lost?
     

    colcolstyles

    Yours truly
    1,588
    Posts
    15
    Years
  • I also have a question, is it possible to let a trainer say something different when he wins a battle, like, yay I won, and something different when he loses, like, damn I lost?

    When the player loses, it just says "Player is out of usable Pokémon. Player whited/blacked out" and then warps to the last healing spot. There is no victory text for the trainer.
     

    Lyzo

    Back from vacation
    261
    Posts
    17
    Years
  • I have a small question. I'm trying to program an event that allows you to encounter Regirock in my ROM. To be a good sport, I want to make it so that if you beat the Elite 4 after K.O.-ing it instead of catching it, you'll be able to catch it again. Is there a command to check the player's Pokédex??

    Not that I know of. It is possible with ASM though, and I don't think it's that hard to make either. I just recentley started learning it, and this was one of the first things you do, using Pokemon Data, so try and look up Shiny Quagsires ASM tutorial, that was the one I did ;)
     

    [T]ouko

    Dedicated Scripter!
    46
    Posts
    12
    Years
    • Seen Jul 9, 2013
    When the player loses, it just says "Player is out of usable Pokémon. Player whited/blacked out" and then warps to the last healing spot. There is no victory text for the trainer.

    Well, I found out if you use: trainerbattle 0x9 instead of 0x0 or 0x1 or 0x2, you can make a script with trainerbattle, and after the battle you can script further. Like with rival battles, you run into them, you battle them, they leave. And if you use 0x3 in the 3 parameter (called reserved), you get the oak explanation, like it's the first battle.

    Sorry I didn't say that, I forgot. But anyway, is there maybe a var in which is stored if you won or not....
     

    Lyzo

    Back from vacation
    261
    Posts
    17
    Years
  • So you want to check if you already caught it or not? I wouldn't know how to do that. Curious, though.

    I also have a question, is it possible to let a trainer say something different when he wins a battle, like, yay I won, and something different when he loses, like, damn I lost?

    ALright, after some searching I found out that this is possible. You can use
    Code:
    trainerbattle 0x09 [trainer] 0x3 @winchat @losechat
    If you do that you can have a message for both winning and losing. But you can only continue the script in one way, meaning that after that you'll need a sentence which fits with losing and winning...
     

    Fortunado

    Prof. Hemlock is busy now...
    30
    Posts
    12
    Years
    • Seen Nov 26, 2011
    Not that I know of. It is possible with ASM though, and I don't think it's that hard to make either. I just recentley started learning it, and this was one of the first things you do, using Pokemon Data, so try and look up Shiny Quagsires ASM tutorial, that was the one I did ;)

    Thanks for the help. This will help make my hack much better!
     

    Fortunado

    Prof. Hemlock is busy now...
    30
    Posts
    12
    Years
    • Seen Nov 26, 2011
    I hope you can manage the ASM :) If not, contact me and I'll have a try at it :P I'm also a beginner at ASM but maybe I can make it work :P

    I'll keep you in mind, Lyzo. Well, I'm off to decapatlize everything. =.=

    EDIT: Well, I'm trying to make a once-per-day step-count limited minigame. I've got most of the stuff down, I just need to know how to make it only happen once a day and have a step count limit of 500.
     
    Last edited:

    madarawolf

    Espada Cuarta
    56
    Posts
    15
    Years
    • Seen Jul 23, 2023
    I want to make a system like combing two pokemon. so I thought I would do it using a trade. for example, give venusaur and blastoise and get a venustoise back. Is it possible to set up a script that will let me do this?
     

    ZxC Mirai

    Huh?
    267
    Posts
    12
    Years
  • HELP!!

    could some one Tell me what is Wrong With this SCRIPT???

    #dynamic 0x800000

    #org @start
    checkflag 0x1000
    lock
    faceplayer
    msgbox @1 0x6
    applymovement 0xFF @move
    waitmovement 0x0
    msgbox @2 0x6
    applymovement 0x1 @move2
    Hidesprite 0x1
    setflag 0x1000
    release
    end

    #org @1
    = Finally You Have Come!\nPlease Fall in line over There!

    #org @move
    #raw 0x10
    #raw 0x10
    #raw 0x10
    #raw 0x10
    #raw 0x1
    #raw 0xFE

    #org @2
    = Alright!We can start Now!\pToday is the Giving of POKeMON and\nTask! Listen Up New Recruits!\pLet's Start with giving POKeMON\pThere are 4 PokeBalls Here!\nEach Contained\lMeowth,Zigzagoon,Ekans and Ratata.\pChoose one here!\phmmmmm!! You Over There\nWhat is your Name?\pMe?\pAer:Yeah You!\pIm [player]\pekekekekek!What a Name!\nYour the First To Pick Go on\lChoose One!\pAfter all of you have choose Meet\nme at ??? CITY! Got It?\pAlright i gotta go!

    #org @move2
    #raw 0x13
    #raw 0x13
    #raw 0x10
    #raw 0x10
    #raw 0x10
    #raw 0x12
    #raw 0x10
    #raw 0x10
    #raw 0x10
    #raw 0x60
    #raw 0xFE

    How can i make when it says the @2 he wouldn't say it Again??
    and when i finished talking to Him wouldn't move??
    i have put the Correct Person no.....:(
     

    Satoshi Ookami

    Memento Mori
    14,254
    Posts
    15
    Years
  • First you are missing waitmovement after second applymovement.
    Second... you shouldn't use hidesprite... it's buggy. It's better to hide your script with movement hide/disappear (find it in diegoisawesome's tutorial =) depending on the game =)).
    And then the another thing =)
    If you want that OW to disappear permanently delete checkflag 0x1000 command and put 1000 into person's ID in A-Map.
    If you want to leave OW where it is and you just don't want script to repeat itself add this after checkflag:
    if 0x1 goto @after

    And then the @after must be new #org with msgbox you want OW to say once it finishes the first script =)
     

    ZxC Mirai

    Huh?
    267
    Posts
    12
    Years
  • First you are missing waitmovement after second applymovement.
    Second... you shouldn't use hidesprite... it's buggy. It's better to hide your script with movement hide/disappear (find it in diegoisawesome's tutorial =) depending on the game =)).
    And then the another thing =)
    If you want that OW to disappear permanently delete checkflag 0x1000 command and put 1000 into person's ID in A-Map.
    If you want to leave OW where it is and you just don't want script to repeat itself add this after checkflag:
    if 0x1 goto @after

    And then the @after must be new #org with msgbox you want OW to say once it finishes the first script =)

    W0o0o0o0o0o0o0oW Thanks for the if 0x1 goto @after
    i finally figure out that Hidesprite and Fixed it :D

    Another Question:

    How could i make a Script Like Gary?

    in mine i have 2 Pokemon two choose ratata and meowth

    what script if i choose ratata he will choose meowth
    if i choose meowth he will choose ratata.

    #dynamic 0x800000
    #org @start
    checkflag 0x350
    lock
    faceplayer
    msgbox @talk 0x6
    applymovement 0xFF @wew
    waitmovement 0x0
    applymovement 0x09 @wew2
    waitmovement 0x0
    msgbox @talk2 0x6
    msgbox @talk3
    applymovement 0x09 @wew3
    waitmovement 0x0
    setflag 0x350
    release
    end

    #org @talk
    = So?You have Finished Choosing Your\nPOKeMON? Alright i Choose mine\lnow!\pGet out of the Way!

    #org @wew
    #raw 0x10
    #raw 0xFE

    #org @wew2
    #raw 0x13
    #raw 0x13
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0x2
    #raw 0xFE

    #org @talk2
    = Alright i take This one then!

    #org @talk3
    = I gotta go and see Aer in ???\nCity!\pYou must seee him too [player]!

    #org @wew3
    #raw 0x10
    #raw 0x10
    #raw 0x10
    #raw 0x10
    #raw 0x10
    #raw 0x10
    #raw 0x10
    #raw 0x10
    #raw 0x10
    #raw 0xFE



    and lastly what is the command when i talk to hi/her for the First time he/she will says:
    blah blah blah was looking for you!

    then after you tak to the blah blah blah his text will change with my Script is it if 0x1 goto @after??

    Thanks to anyone who help me :D
     
    Last edited:

    rstar095

    Baby Seal Clubber
    24
    Posts
    15
    Years
  • Ive done scripts before but I stopped hacking for a while and recently started again. Anyway here are two scripts Ive done.

    This one is very simple yet it keeps giving me "no dynamic start offset specified"
    #dynamic 0x80010080

    #org @start
    msgbox @sau 0x3
    end

    #org @sau
    = incomprehensible
    Here is another one.
    This one is a bit more complex but I can't see any problems with it. When I go into the game it doesn't do anything but another unedited sprite just dissapears.
    '---------------
    #org 0x720BE0
    lock
    faceplayer
    checkflag 0x828
    if 0x1 goto 0x8720C2C
    cry 0x173 0x0
    msgbox 0x8720C59 MSG_YESNO '"There is a BAGON in the\nPOKeBALL...."
    compare LASTRESULT 0x1
    if 0x1 goto 0x8720C86
    msgbox 0x8720C13 MSG_NORMAL '"The POKeBALL was left."
    release
    end

    '---------------
    #org 0x720C2C
    msgbox 0x8720C37 MSG_NORMAL '"The pokeball turned into stone."
    release
    end

    '---------------
    #org 0x720C86
    givepokemon 0x173 0x5 0x0 0x0 0x0 0x0
    fanfare 0x13E
    hidesprite LASTTALKED
    setflag 0x200
    msgbox 0x8720CAC MSG_NORMAL '"You recieved BAGON.\pThe\nrest\nof..."
    setflag 0x828
    release
    end


    '---------
    ' Strings
    '---------
    #org 0x720C59
    = There is a BAGON in the\nPOKeBALL. Take it?

    #org 0x720C13
    = The POKeBALL was left.

    #org 0x720C37
    = The pokeball turned into stone.

    #org 0x720CAC
    = You recieved BAGON.\pThe\nrest\nof the POKeBALLs turned\nto\lstone.
    ej7cic.jpg
     

    Fortunado

    Prof. Hemlock is busy now...
    30
    Posts
    12
    Years
    • Seen Nov 26, 2011
    What is "trainerbattle 0x5"? I believe it's rematch, but I'm not sure.
     

    Simmy93

    Aspiring Emulator
    104
    Posts
    12
    Years
  • Not sure if this is the place to seek help with this issue but it's holding me back from starting my hack. I've followed the fantastic map editing tutorial on this forum but no matter how many times I try I always end up with this result.

    Spoiler:


    Can anyone assist? Or point me in the direction where someone could? Thank you so, so much.
     

    ZxC Mirai

    Huh?
    267
    Posts
    12
    Years
  • W0o0o0o0o0o0o0oW Thanks for the if 0x1 goto @after
    i finally figure out that Hidesprite and Fixed it :D

    Another Question:

    How could i make a Script Like Gary?

    in mine i have 2 Pokemon two choose ratata and meowth

    what script if i choose ratata he will choose meowth
    if i choose meowth he will choose ratata.

    #dynamic 0x800000
    #org @start
    checkflag 0x350
    lock
    faceplayer
    msgbox @talk 0x6
    applymovement 0xFF @wew
    waitmovement 0x0
    applymovement 0x09 @wew2
    waitmovement 0x0
    msgbox @talk2 0x6
    msgbox @talk3
    applymovement 0x09 @wew3
    waitmovement 0x0
    setflag 0x350
    release
    end

    #org @talk
    = So?You have Finished Choosing Your\nPOKeMON? Alright i Choose mine\lnow!\pGet out of the Way!

    #org @wew
    #raw 0x10
    #raw 0xFE

    #org @wew2
    #raw 0x13
    #raw 0x13
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0x2
    #raw 0xFE

    #org @talk2
    = Alright i take This one then!

    #org @talk3
    = I gotta go and see Aer in ???\nCity!\pYou must seee him too [player]!

    #org @wew3
    #raw 0x10
    #raw 0x10
    #raw 0x10
    #raw 0x10
    #raw 0x10
    #raw 0x10
    #raw 0x10
    #raw 0x10
    #raw 0x10
    #raw 0xFE



    and lastly what is the command when i talk to hi/her for the First time he/she will says:
    blah blah blah was looking for you!

    then after you tak to the blah blah blah his text will change with my Script is it if 0x1 goto @after??

    Thanks to anyone who help me :D


    CAN SOMEONE ANSWER THIS QUESTION ????? PLEASE!! :D
     

    Fortunado

    Prof. Hemlock is busy now...
    30
    Posts
    12
    Years
    • Seen Nov 26, 2011
    CAN SOMEONE ANSWER THIS QUESTION ????? PLEASE!! :D

    Code:
    #dynamic 0x800000
    
    #org @start
    lock
    checkflag 0x(flag) 'This would be your first Pokémon's Poké Ball sprite.
    if 0x1 goto @getfire
    checkflag 0x(flag) 'Second Pokémon
    if 0x1 goto @getwater
    checkflag 0x(flag) 'Third
    if 0x1 goto @getgrass
    release
    end
    
    #org @getfire
    applymovement 0x03 (Your rival's no. on screen) @walkfire
    waitmovement 0x0
    msgbox @illtake 0x2
    msgbox @rivalreceives 0x4
    closeonkeypress
    applymovement 0x?? (The poké ball he is getting) @disappear
    waitmovement (or play your fanfare)
    release
    end
    
    ...(just do the same as above, just edit it a bit)
    
    #dynamic 0x71A300
    msgbox @waitup 0x2
    applymovement 0x03 @catchup
    waitmovement 0x0
    trainerbattle 0x1 0x001 0x0 (or 0x3, I believe, for Oak's explanation) @before @win @after
    end
    
    #org @waitup
    =Hey, wait up, [player_name]!
    
    #org @catchup...
     
    Back
    Top