• 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

bigboi

Hacker of the 3rd Generation
20
Posts
13
Years
  • Just because this Ash guy here didn't properly explain what he meant, I'll do it for you.
    See how the slashes / and \ are different. Well, you need to use \ this one.

    Thanks for that. It works.

    I have another problem. I make multiple people in a room, and one is deleted, while 2 share the same script. They all have different script offsets. How does this not work?
     
    Last edited by a moderator:

    qaz015393

    pokemon revenge developer
    789
    Posts
    14
    Years
    • Seen yesterday
    thanks i finally understand how to use xse but i need help with one thing. can someone tell me what i did wrong im trying to enter a city & then have a pokemon notice me run away from me. did i do the code right.were did i ness up.
    Code:
    #dynamic 0x2166F0
    
    #org @start
    checkflag 0x01
    if 0x01 goto @done
    lock
    faceplayer
    textcolor 0x01
    msgbox @talk1 0x6
    setflag 0x4
    release
    end
    
    #org @done
    faceplayer
    clearflag 0x04
    release
    end
    
    #org @talk1
    = !!!
     

    HackinJohn

    FireRed ROM Hacker
    92
    Posts
    17
    Years
  • Is there any script to remove a Pokemon from your party?

    For instance, in my current hack game, there is a scene where you have no Pokemon, the Prof. of the region lets you borrow one, but I want the Prof. to take it back right away. I'm guessing it's something like "removepokemon" but I'm not sure. I've searched this tut and I've missed it if it's included somewhere.

    Thanks!
     

    colcolstyles

    Yours truly
    1,588
    Posts
    15
    Years
  • Is there any script to remove a Pokemon from your party?

    For instance, in my current hack game, there is a scene where you have no Pokemon, the Prof. of the region lets you borrow one, but I want the Prof. to take it back right away. I'm guessing it's something like "removepokemon" but I'm not sure. I've searched this tut and I've missed it if it's included somewhere.

    Thanks!

    HackMew posted some nice ASM code that allows you to do that. You can find it here.
     

    5qwerty

    [b][font="open sans"]WHOLLY MOLEY[/font][/b]
    2,102
    Posts
    15
    Years
    • Seen today
    Hey, could someone help me with this script? I just can't seem to get it to work.

    Spoiler:

    Everything else is fine, I just can't initiate the trainerbattle script.

    thanks i finally understand how to use xse but i need help with one thing. can someone tell me what i did wrong im trying to enter a city & then have a pokemon notice me run away from me. did i do the code right.were did i ness up.
    Code:
    #dynamic 0x2166F0
    
    #org @start
    checkflag 0x01
    if 0x01 goto @done
    lock
    faceplayer
    textcolor 0x01
    msgbox @talk1 0x6
    setflag 0x4
    release
    end
    
    #org @done
    faceplayer
    clearflag 0x04
    release
    end
    
    #org @talk1
    = !!!
    To run away from you? You have to have an applymovement script.
    And I don't know if flags 0x1 - 0x9 work. It sure didn't for me.

    And I'm not really sure what you're doing here.
    They script will just repeat over again, because you're setting a different flag at the end of the script. (It's supposed to be the same one)

    And even if the flag 0x1 is checked, why would you have a clearflag for 0x4 in the @done script?

    If the flag is checked, you should just have release end for @done.

    Somebody slap me if I'm wrong.
     
    Last edited:

    FANOFFIRESTARTERS!!!

    Call me FOFS
    40
    Posts
    15
    Years
    • Seen Sep 11, 2021
    This is great THX!
    But i am having a problem with FR flag 0x82F...running shoes...
    whenever i do a script to get me the shoes i dont get them. but the script says that I should. help?
     
    7
    Posts
    13
    Years
  • Hey guys, I'm new here and just wanted to ask a 2questions?

    I've searched alot to try and find the answer here but no luck...

    My questions are:

    1. In Xse, I do everything right, codes etc...follow them strictly step by step.
    -----------------------------
    #dynamic 0x800000

    #org @start
    lock
    faceplayer
    message @1 0x6
    release
    end

    #org @1
    = Hello World
    --------------------------------

    . When I test it, the character simply turns to me but he doesn't talk...Can't seem to figure out whats wrong. Any help would be greatly appreciated guys. ( Also, if I use FSF to find free space and I put it copy it to Xse, when I finish the codes and press compile, a box comes on saying that "THE ROM DOESN'T HAVE ENOUGH SPACE"..And the FSF option within Xse is unclickable , its not highlighted at all. Any tips also?
    -----------
    2. When I create a new house using a new map on advance map, I can't seem to enter the house when I test it. The screen goes black and the game freezes... All warps are correctly inserted and I've checked it so many times. Do you know what i'm doing wrong?

    Thank you Everyone
     

    rstar095

    Baby Seal Clubber
    24
    Posts
    15
    Years
  • #dynamic 0x2DD0F8
    #org @start
    lock
    Faceplayer
    msgbox @1 0x5
    compare LASTRESULT 0x1
    if 0x1 goto @take
    msgbox @2 0x6
    release
    end

    #org @take
    checkflag 0x829
    if 0x0 goto @pokedex
    msgbox @after 0x6
    cry 0x32 0x0
    wildbattle 0x32 0x5 0x0
    fadescreen 0x1
    fadescreen 0x0
    hidesprite 0x800F
    setflag 0x200
    release
    end

    #org @pokedex
    setflag 0x829
    setflag 0x82F
    setflag 0x828
    givepokemon 0x32 0x5 0x0 0x0 0x0 0x0
    fanfare 0x13E
    special 0x16F
    msgbox @3 0x6
    fadescreen 0x1
    fadescreen 0x0
    hidesprite 0x800F
    setflag 0x201
    release
    end

    #org @3
    = You obtained a Pokedex,\nNidoran(m), and\lrunning shoes!

    #org @2
    = Everything was left\nthe way it was

    #org @1
    = There is a pokeball with\nNidoran(m) and other stuff\lTake it?

    #org @after
    = Nidoran(m) appeared from\nthe pokeball\lHe appears to be\nangry.


    This is my first script and i compiled it but when i go to the item i get a diglett and i have another one with nidoran female and it gives me a zubat. Also when it fades out it fades but when i walk over where it was, it reappears. anyone know whats wrong?
    O and ^post, you need to have free space finder in the same folder as xse, and your rom ran out of space. Try a Rom expander?
     
    Last edited:
    79
    Posts
    13
    Years
    • Seen Aug 27, 2014
    Script timing issue

    I have a lot of events in my hack and i was wondering how to make on script after another specific one. i have my game so far starting in kanto and you get your starter and the pokedex like normal but i want my script for oaks aide to give you the national dex exactly after you get the pokedex in oaks lab if somebody could help with this i would be very grateful!

    heres the script

    #dynamic offset

    #org @start
    applymovement 0x1 @move
    waitmovement 0x0
    applymovement 0x1 @move2
    waitmovement 0x0
    pause 0x10
    applymovement 0xFF @move3
    waitmovement 0x0
    checkflag 0x10A
    if 1 jump @talk
    special 0x16F
    setflag 0x10A
    fanfare 0x13E
    msgbox @talk2 0x6
    waitfanfare
    release
    end

    #org @talk
    msgbox @talk3
    boxset 0x6
    release
    end

    #org @talk3
    = Like your new pokedex?

    #org @talk2
    = Your pokedex was upgraded!
     

    Team Rocket Boss Giovanni

    Let us meet again someday!
    175
    Posts
    19
    Years
    • Age 29
    • PA
    • Seen Nov 13, 2023
    I'm having trouble with my script.

    Spoiler:


    I'm having trouble with the hidesprite, whenever I move away from the Pokeball after the whole script is done, it appears again. What's wrong?
     

    0m3GA ARS3NAL

    Im comin' home...
    1,816
    Posts
    16
    Years
  • I'm having trouble with my script.

    Spoiler:


    I'm having trouble with the hidesprite, whenever I move away from the Pokeball after the whole script is done, it appears again. What's wrong?

    Set a flag before the hidesprite that is the same as the ID of the sprite you wanna make disappear.
     
    79
    Posts
    13
    Years
    • Seen Aug 27, 2014
    I have a lot of events in my hack and i was wondering how to make on script after another specific one. i have my game so far starting in kanto and you get your starter and the pokedex like normal but i want my script for oaks aide to give you the national dex exactly after you get the pokedex in oaks lab if somebody could help with this i would be very grateful!

    heres the script

    #dynamic offset

    #org @start
    applymovement 0x1 @move
    waitmovement 0x0
    applymovement 0x1 @move2
    waitmovement 0x0
    pause 0x10
    applymovement 0xFF @move3
    waitmovement 0x0
    checkflag 0x10A
    if 1 jump @talk
    special 0x16F
    setflag 0x10A
    fanfare 0x13E
    msgbox @talk2 0x6
    waitfanfare
    release
    end

    #org @talk
    msgbox @talk3
    boxset 0x6
    release
    end

    #org @talk3
    = Like your new pokedex?

    #org @talk2
    = Your pokedex was upgraded!

    Can anybody help me with my script somebody told me to hex edit it do i just use xse and find the offset to the script but then what do i do?
     

    Echidna

    i don't care what's in your hair
    2,077
    Posts
    13
    Years
  • Hey guys. I'm new and i'v been reading this tutorial from the start. I understood everything but it won't work. I input the code 100% like it says in the tuorial, but i think i'm doing the compiling wrong.please someone give me a list of all steps after writing the code from openning the rom to compiling and saving the offset.

    OH and when i open advance map and choose xse as my script editor via "settings" "choose script editor" it says "are offsets seperated from the rom name by ":" (default) or " " in the preffered script editor?? => Yes for ":" : No for " "." WHAT IS THIS??????? WHAT DO I CHOOSE AND HOW DOES THIS AFFECT MY SCRIPTING ???? PLEASE HELP ME!!!!!!!!

    SOMEONE HELP ME QUICK !!!!!! I"M WORKING ON ONE OF THE BEST HACKS EVER. I MADE A LONG GAME WHICH BY THE WAY ISN'T BORING AND I PROMISE EVERYONE HERE WILL GET THE COMPLETE VERION WHICH DOESN'T EVEN LOOK LIKE A HACK (BECAUSE OF MY EXP. IN MAKING A COOL MAP) BUT THE EVENTS WON'T WORK AND SCRIPTING IS MY PROBLEM.I NEED THE INFO I REQUESTED. OH AND MY TALKING SCRIPT WORKED BUT THE PERSON JUST KEEPS TALKING AND DOESN'T WAIT FOR ME TO PRESS A. WHY ??????? HELP ME BY ANSWERING MY QUESTIONS SO I CAN GO BACK TO WORKING ON MY HACK WHICH IS BY THE WAY "TITANIUM VERSION" !!!!!!!! WICKED GAME.

    I'M GOING TO LUNCH. PLEASE SOMEONE ANSWER MY QUESTION UNTILL I COME BACK. ANYONE. IT DOESN'T MATTER AS LONG AS IT WORKS.
     
    Last edited:
    10
    Posts
    14
    Years
  • #dynamic 0x2DD0F8
    #org @start
    lock
    Faceplayer
    msgbox @1 0x5
    compare LASTRESULT 0x1
    if 0x1 goto @take
    msgbox @2 0x6
    release
    end

    #org @take
    checkflag 0x829
    if 0x0 goto @pokedex
    msgbox @after 0x6
    cry 0x32 0x0
    wildbattle 0x32 0x5 0x0
    fadescreen 0x1
    fadescreen 0x0
    hidesprite 0x800F
    setflag 0x200
    release
    end

    #org @pokedex
    setflag 0x829
    setflag 0x82F
    setflag 0x828
    givepokemon 0x32 0x5 0x0 0x0 0x0 0x0
    fanfare 0x13E
    special 0x16F
    msgbox @3 0x6
    fadescreen 0x1
    fadescreen 0x0
    hidesprite 0x800F
    setflag 0x201
    release
    end

    #org @3
    = You obtained a Pokedex,\nNidoran(m), and\lrunning shoes!

    #org @2
    = Everything was left\nthe way it was

    #org @1
    = There is a pokeball with\nNidoran(m) and other stuff\lTake it?

    #org @after
    = Nidoran(m) appeared from\nthe pokeball\lHe appears to be\nangry.


    This is my first script and i compiled it but when i go to the item i get a diglett and i have another one with nidoran female and it gives me a zubat. Also when it fades out it fades but when i walk over where it was, it reappears. anyone know whats wrong?
    O and ^post, you need to have free space finder in the same folder as xse, and your rom ran out of space. Try a Rom expander?



    i dont know about the fading out thing but about the pokemon ( the nidorans ) did you convert there pokedex number to hex...ie nidoran(m) is 32 i think and that converted to hex is...20 do the same for any other pokemon in your hack as XSE comes with a dec to hex calculator on the right... hope this helps a little

    Well about on of my scripts I have a little problem...

    Its the opening script in my hack where you recieve a Pichu and all the main characters are introduced...

    My problem is that out of the 5 characters in the script only Prof.Oak, PLAYER and Melissa appear whereas RIVAL and your mum dont appear for their part. Everything else goes smoothly other then that. Heres the script:

    Spoiler:


    anyhelp is appreciated :D thanks :)
     
    Last edited:
    24
    Posts
    15
    Years
    • Seen Mar 2, 2013
    I'm getting very frustrated now.
    Everytime you figure something out a new problem arises.

    '-----------------------
    #org 0x8000F5
    lock
    faceplayer
    msgbox 0x880010B '"Don't you think the water is\nbeaut..."
    if 0x1 goto 0x8800135
    msgbox 0x880016E '"Children these days just do not\nap..."
    end
    '-----------------------
    #org 0x800135
    cmdC3 0xE8
    givecoins 0xE7


    '---------
    ' Strings
    '---------
    #org 0x80010B
    = Don't you think the water is\nbeautiful?
    #org 0x80016E
    = Children these days just do not\nappreciate nature...\lIt makes me sad.

    The bit highlighted just appeared from no where!
    I am trying a simple Yes/No question but this appears in the midst of my script :(

    Please help.
     
    Back
    Top