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

destinedjagold

You can contact me in PC's discord server...
8,593
Posts
16
Years
    • Seen Dec 23, 2023
    #dynamic 0x1C6C33
    #org @start
    trainerbattle 0x0 0x23ABC8 0x0 @intro @defeat
    msgbox @msg 0x2
    end

    #org @intro
    = [Before Battle]

    #org @defeat
    = [After defeat]

    #org @msg
    = [After battled]

    That's a pretty big hex value for the trainer ID. Anyway, I suggest you write a new trainer script and compile it on free space instead of editing existing ones because you might accidentally overwrite its neighboring scripts.
     

    0

    Happy and at peace. :)
    556
    Posts
    8
    Years
  • When trying to implement a trainer battle into Pokemon Fire Red just for practice and to learn how it works, this error comes up every time:

    Error 6 "overflow" Line 3
    Wrong Parameter Type

    (I apparently can't post links yet. ) The "line 3" bit changes depending on what line the "trainerbattle 0x0 0x23ABC8 0x0 @intro @defeat" is on, so that's where the problem is.

    Spoiler:
    .

    I'm using A-trainer (Advance Trainer) and XSE. The error pops up whenever I debug it or try and compile it and I can't find a solution anywhere. As far as I can tell the script is fine apart from this...
    I will just link to Advance Trainer, just in case. Anyway, the problem is that you are trying to use a script to battle. Instead, you should be doing this.

    In Advance Trainer, you will have a value for a person. Lets say you edit the girl on Route 3 by Pewter. Her trainer flag is 0x74.
    Then in your script, you put the flag from Advance Trainer into the trainerbattle line.

    So, to have a battle with her, you would make this line trainerbattle 0x0 0x74 0x0 @intro @defeat
    You would change this for anyone you want. Just make the 0x74 the trainer you changed.

    Here is a very small video clip to illustrate:


    Hope this helps! Happy hacking!
     
    12
    Posts
    10
    Years
  • I'm extremely new to scripting and rom hacking in general. I am using advance map and xse. I am trying to make my own sign text. But in the script I'm getting a BAD RECORD NUMBER on line 1. But all I have is
    Spoiler:


    Aren't I supposed to do this? Or am I just completely wrong? Thank you for the help.
     

    destinedjagold

    You can contact me in PC's discord server...
    8,593
    Posts
    16
    Years
    • Seen Dec 23, 2023
    #dynamic 0x8000000
    #org @start
    lockall
    msgbox @talk 0x6
    release
    end

    #org @talk
    = Big brother is\n watching you.

    Remove one of the zeroes, and separate the text address from the main script. :3
     
    12
    Posts
    10
    Years
  • Remove one of the zeroes, and separate the text address from the main script. :3

    I swear I'm hopeless at this. Now I'm getting "Unknown keyword 'big' at line 9". :'(
    Here is the current script with what I believe are the changes necessary.
    Spoiler:


    Thanks for the help again.
     
    1,309
    Posts
    12
    Years
    • She/Her
    • Seen Nov 24, 2023
    I swear I'm hopeless at this. Now I'm getting "Unknown keyword 'big' at line 9". :'(
    Here is the current script with what I believe are the changes necessary.
    Spoiler:


    Thanks for the help again.

    Here's the corrected version; you need a "=" before any text! Using XSE's built-in text adjuster does this for you, it's super handy.

    #org @start
    lock
    msgbox @talk 0x6
    release
    end

    #org @talk
    = Big brother is \n watching you.
     

    0

    Happy and at peace. :)
    556
    Posts
    8
    Years
  • I swear I'm hopeless at this. Now I'm getting "Unknown keyword 'big' at line 9". :'(
    Here is the current script with what I believe are the changes necessary.
    Spoiler:


    Thanks for the help again.
    Alright, you just need a = before big brother.

    Spoiler:


    But you know, if you're using XSE, there is a really cool trick for adding person text.

    Hit Ctrl + t and it will give you a place to enter your own, and even add all the \n \ls and whatever to it!
    Just hit convert, and bam, you got it!

    Good luck, and happy hacking!
     

    0

    Happy and at peace. :)
    556
    Posts
    8
    Years
  • Here's the corrected version; you need a "=" before any text! Using XSE's built-in text adjuster does this for you, it's super handy.

    #org @start
    lock
    msgbox @talk 0x6
    release
    end

    #org @talk
    = Big brother is \n watching you.
    Same wavelength, down to the text adjuster, haha.
     
    4
    Posts
    7
    Years
    • Seen Jan 20, 2017
    Thanks guys! I'm still pretty new at this, so don't be surprised if I pop up in this thread again :D

    Yeah, I was going off of the offset in A-trainer, so that's where I went wrong I guess.
     
    1,278
    Posts
    9
    Years
  • Hello!
    I am having a problem with the sethealing from JPAN's engine
    I tried many times but it didn't work...
    Actually it kinda worked. I'm getting the first message by the nurse when I lose and that's it. The text is there the whole time until I leave the building. (Btw, the pokemons have been healed)
    The script I use is something similiar like this.
    Spoiler:
     

    0

    Happy and at peace. :)
    556
    Posts
    8
    Years
  • Hello!
    I am having a problem with the sethealing from JPAN's engine
    I tried many times but it didn't work...
    Actually it kinda worked. I'm getting the first message by the nurse when I lose and that's it. The text is there the whole time until I leave the building. (Btw, the pokemons have been healed)
    The script I use is something similiar like this.
    Spoiler:
    0x16B0FE is the pokemon center script. Most of what you are missing is the animations and such.

    Try to slim that script down, and it shouldn't be too hard.

    Your sethealingplace code is right, but you should add it to the pokemon center itself as a level script, to be activated each time someone enters the building, so that when they faint, they will automatically be healed.'

    In fact, you can change up the fainting message, and actually make the levelscript on the city itself.

    To change the fainting pokemon center, the location is here: 0x1A8D97

    To insert a proper level script go here.

    A good resource on specials is here.
     
    Last edited:
    1,278
    Posts
    9
    Years
  • 0x16B0FE is the pokemon center script. Most of what you are missing is the animations and such.

    Try to slim that script down, and it shouldn't be too hard.

    Your sethealingplace code is right, but you should add it to the pokemon center itself as a level script, to be activated each time someone enters the building, so that when they faint, they will automatically be healed.'

    In fact, you can change up the fainting message, and actually make the levelscript on the city itself.

    To change the fainting pokemon center, the location is here: 0x1A8D97

    To insert a proper level script go here.

    A good resource on specials is here.
    Thanks a lot!
    I'm on vacations actually right now.
    I will try it when I will be back.
     
    10
    Posts
    7
    Years
    • Seen Aug 26, 2016
    ROM: Firered
    Tool: PKSV
    When I step on the area that activates the script, the game freezes. Please help.
    Spoiler:
     
    1,682
    Posts
    8
    Years
    • Seen yesterday
    ROM: Firered
    Tool: PKSV
    When I step on the area that activates the script, the game freezes. Please help.
    Spoiler:

    While I don't use PKSV, there are a few things that stand out to me.
    Firstly, did you set up your script tile, with a var and var value? Because the game freezes when they aren't.
    Secondly, that flag you are checking is way too high, rule of thumb is between 200-2FF. Here's a list of all flags in FR.
     
    5
    Posts
    8
    Years
    • Seen Jul 30, 2016
    Hi, I'm completely new to this scripting stuff. I wanna know how to get the National Pokedex straight away or at least bypass it so I can evolve. I saw a few posts about it, but none literally made any sense to me. I saw a bunch of code but had no idea where to put it. Thanks.
     
    1,682
    Posts
    8
    Years
    • Seen yesterday
    Hi, I'm completely new to this scripting stuff. I wanna know how to get the National Pokedex straight away or at least bypass it so I can evolve. I saw a few posts about it, but none literally made any sense to me. I saw a bunch of code but had no idea where to put it. Thanks.

    Well to get the National dex, you first need to give the pokedex by setting flag 0x829 (FR) or 0x861 (Emerald).
    After you do that you must use special 0x16F (FR) or special 0x1F3 (Emerald), which activates the National dex.
    (I wasn't sure if Emerald also locks evolving, so I included it.)

    If you share the few posts you were referring to, I would be happy to explain it to you.
     
    37
    Posts
    8
    Years
    • Seen Sep 10, 2018
    Easy question, can Pokemon with custom moves be given with a script, such as a Dratini with Extremespeed? I know the general format for the script:

    Spoiler:


    But I'm not sure if it's possible to add arguments for custom moves.
     
    37
    Posts
    8
    Years
    • Seen Oct 4, 2021
    EDIT: I FIGURED IT OUT, BUT HAVE A NEW PROBLEM: I am trying to hide a Leaf sprite until she's activated, but she reappears when Oak leads you into the lab, but sometimes she's always there. How do I make sure she stays hidden when you're walked in? I really don't want to be walked THROUGH Leaf. And Leaf means Leaf, the female protagonist. Her sprite is extra. On the map. Not the player. Not an actual leaf? UNDERSTAND?


    This script is insane. People have told me that it's simple and that everyone on the planet knows how it works. They don't. There are multiple things going to Blue moving. Where exactly is right before that's activated? I wanna squeeze in an extra rival getting a Pokemon, but I don't know where!

    Spoiler:


    These lines seem to go in different places, but for one thing it's saying "if 0x1" twice, and...
    Spoiler:


    This just goes to 54 anyways!

    Spoiler:


    Like, why is there multiple of the same stuff? Where do I squeeze in something different? Please help me, and don't just say "read this tutorial that's general", it doesn't help. It's like learning how to build a spaceship on YouTube.
     
    Last edited:
    348
    Posts
    8
    Years
  • Easy question, can Pokemon with custom moves be given with a script, such as a Dratini with Extremespeed? I know the general format for the script:

    Spoiler:


    But I'm not sure if it's possible to add arguments for custom moves.

    change the Learnset by level using G3HS. Make Extremespeed to be learned at Lv5.
     
    Status
    Not open for further replies.
    Back
    Top