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

Help Thread: Script Help Thread

Status
Not open for further replies.

colonelsalt

Guaranteed to raise the smile
111
Posts
11
Years
  • Is there a "clean" way of erasing a script from a ROM without wasting any space? Overwriting the entire script with 0xFF-bytes in a hex editor seems the most intuitively reasonable solution, but how do I know exactly where my script ends and another begins?
     
    10,078
    Posts
    15
    Years
    • UK
    • Seen Oct 17, 2023
    Is there a "clean" way of erasing a script from a ROM without wasting any space? Overwriting the entire script with 0xFF-bytes in a hex editor seems the most intuitively reasonable solution, but how do I know exactly where my script ends and another begins?

    I believe you can use the #removeall 0xOFFSET command in XSE.
     
    22
    Posts
    9
    Years
    • Seen Apr 3, 2016
    I'm trying to add some legendary encounters to Pokémon FireRed but I'm having some trouble. I tried to add Suicune, Raikou and Entei using this script below, but I've got the following problem. If the player kills it or escapes from battle, they disappear, so it's fine, but if the player catches them, they don't disappear and therefore the player can catch it multiple times. What's wrong with my script? I can't find the problem, please, if anybody knows what's wrong, help me out with that. Here's the script I used for Entei:
    Spoiler:
     

    PokéMew1

    Pokémon Fuchsia
    484
    Posts
    10
    Years
  • I'm trying to add some legendary encounters to Pokémon FireRed but I'm having some trouble. I tried to add Suicune, Raikou and Entei using this script below, but I've got the following problem. If the player kills it or escapes from battle, they disappear, so it's fine, but if the player catches them, they don't disappear and therefore the player can catch it multiple times. What's wrong with my script? I can't find the problem, please, if anybody knows what's wrong, help me out with that. Here's the script I used for Entei:
    Spoiler:

    This is most likely because you may not have put the flag number on their overworld's in advance map. Double check that you have, and if not, then you can do so by clicking on their overworld's under events and typing the flag number in the person ID. For example if the flag I set in the script was 0x200, then you'd put 0200.
     
    22
    Posts
    9
    Years
    • Seen Apr 3, 2016
    This is most likely because you may not have put the flag number on their overworld's in advance map. Double check that you have, and if not, then you can do so by clicking on their overworld's under events and typing the flag number in the person ID. For example if the flag I set in the script was 0x200, then you'd put 0200.

    The person ID is right, this is the first thing I checked.
     
    10
    Posts
    10
    Years
    • Seen Jun 17, 2015
    I was wondering if it's possible to change some very specific things in pokémon (Emerald) ROMs. More specifically:

    1) Is it possible to change the damage moves do in a battle through a script, or do you have to manually change the damage of each attack? For example, if difficulty is set to 'difficult' I want moves to do a different amount of damage than when it's set on 'medium'.

    2) Is it possible to change the amount of Experience pokémon give in battle through a script? I know I can change the experience of every pokémon manually, but for example if I want to work with different difficulties I want to give different amount of experience for the same pokémon. If difficulty is 1, give full exp, if it's 2, give 3/4 * exp, if it's 3, give 1/2 * exp.

    3) Is it possible to take a single pokémon away from the player based on a criterium? For example, I'd like to take away the highest or lowest level pokémon away the player currently has in its party. Could that be done?

    4) Can you give pokémon variable levels? For example, I'd like a gym leader where the level of his pokémon are 2 above the highest level pokémon I currently have in my party. I know it's possible to give a trainer variable pokémon because in Glazed you fight a Mewtwo whos party is a copy of your party.

    5) Is it possible to look at the code of someone's hack? For example I want to know how player X made addition Y to his hack. Is it possible to look at his hack and learn how he did this? Like looking how the Mewtwo battle from above is coded, or how a new X/Y repel system is implemented?

    I looked for answers to these questions, but I always find very generic tutorials.
     

    Flying Turtle

    Some Random Ghost
    29
    Posts
    9
    Years
  • I'm testing some scripts and I did a script where the first time you talk to the rival he gives you a pokemon. The second time, he asks if you wanna battle and the third time beyond he just says something. It works fine, but when he asks if I wanna battle, even if I say "NO", he will battle me. Is there any way I can fix it?

    Spoiler:
     

    C me

    Creator of Pokemon League Of Legends
    681
    Posts
    10
    Years
    • Seen Apr 9, 2021
    I'm testing some scripts and I did a script where the first time you talk to the rival he gives you a pokemon. The second time, he asks if you wanna battle and the third time beyond he just says something. It works fine, but when he asks if I wanna battle, even if I say "NO", he will battle me. Is there any way I can fix it?

    Change '0x800d 0x0' to '0x800d 0x1'
     
    325
    Posts
    10
    Years
  • I'm testing some scripts and I did a script where the first time you talk to the rival he gives you a pokemon. The second time, he asks if you wanna battle and the third time beyond he just says something. It works fine, but when he asks if I wanna battle, even if I say "NO", he will battle me. Is there any way I can fix it?
    To emphasize on what C Me said, compare 0x800D 0x1 is actually what looks for yes, and compare 0x800D 0x0 is checking for no.
     

    Mystelex

    Guest
    0
    Posts
    Hey everybody ! I have made a script -
    Spoiler:

    Is this script correct ? I want the NPC to first check whether I have the item or not , and if I have it , I want the game to go to the @got pointer.
    (It doesn't work as desired. It goes to the @got pointer even if I don't have the item !)

    Another thing ! After the battle , it doesn't go to the @later pointer.
     
    Last edited:

    C me

    Creator of Pokemon League Of Legends
    681
    Posts
    10
    Years
    • Seen Apr 9, 2021
    Hey everybody ! I have made a script -
    Spoiler:

    Is this script correct ? I want the NPC to first check whether I have the item or not , and if I have it , I want the game to go to the @got pointer.
    (It doesn't work as desired. It goes to the @got pointer even if I don't have the item !)

    Another thing ! After the battle , it doesn't go to the @later pointer.

    You need compare LASRESULT 0x1 after the checkitem.

    No idea what's happening with the @later problem, looks fine to me.
     

    Mystelex

    Guest
    0
    Posts
    You need compare LASRESULT 0x1 after the checkitem.

    No idea what's happening with the @later problem, looks fine to me.

    Well , I tried it and I get an error saying that #define is missing.
     
    Status
    Not open for further replies.
    Back
    Top