• 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.
10,078
Posts
15
Years
    • UK
    • Seen Oct 17, 2023
    Which of the setmaptiles didn't work? :) also 282 and 281 are the correct block values?
     
    Last edited:

    jiangzhengwenjzw

    now working on katam
    181
    Posts
    11
    Years
    • Seen today
    Which of the setmaptiles didn't work? :) also 282 and 281 are the correct block values?

    Sorry, I just found that I made an extremely silly mistake so the script didn't work. Now the problem was solved.
    Thank you for your help and Sorry for wasting your time.:(
    @Magic
    @destinedjagold
     

    Joexv

    ManMadeOfGouda joexv.github.io
    1,037
    Posts
    11
    Years
  • Hello, everyone! Can anyone tell me how to make a 'nickname your Pokemon' script?

    simply call 0x1A74EB (for fire red) 0x2723DD (for Emerald)
    after a yes no box to nickname the last pokemon you were given.
     
    Last edited:

    DrFuji

    [I]Heiki Hecchara‌‌[/I]
    1,691
    Posts
    14
    Years
  • Hello, everyone! Can anyone tell me how to make a 'nickname your Pokemon' script?

    Nicknaming is quite easy to do in FireRed and can be done with as little as one/ two specials depending on the situation you're in. The main special you would use is special 0x9E, which opens the nickname screen for your party Pokemon, based on the value of variable 0x8004 (0x0 for your first Pokemon, 0x1 for your second etc). This works in tandem with special 0x9F which allows you to choose a Pokemon in your party and then places its position value in 0x8004. You won't need special 0x9F and can set 0x8004 manually if you know the exact position of the Pokemon in the player's party that you want to change, though this is generally only reserved for when they receive their starter Pokemon. There are other auxiliary specials that can be used but aren't necessary for the script to run properly. You can read about them in the following script or this this thread.

    Here's a quick rough example of a nicknaming script in action for FireRed:

    Spoiler:


    Don't forget to read the original script in an unmodified ROM and try to follow what its doing so you can learn how it works and how to make your own.
     

    Joexv

    ManMadeOfGouda joexv.github.io
    1,037
    Posts
    11
    Years
  • Nicknaming is quite easy to do in FireRed and can be done with as little as one/ two specials depending on the situation you're in. The main special you would use is special 0x9E, which opens the nickname screen for your party Pokemon, based on the value of variable 0x8004 (0x0 for your first Pokemon, 0x1 for your second etc). This works in tandem with special 0x9F which allows you to choose a Pokemon in your party and then places its position value in 0x8004. You won't need special 0x9F and can set 0x8004 manually if you know the exact position of the Pokemon in the player's party that you want to change, though this is generally only reserved for when they receive their starter Pokemon. There are other auxiliary specials that can be used but aren't necessary for the script to run properly. You can read about them in the following script or this this thread.

    Here's a quick rough example of a nicknaming script in action for FireRed:

    Spoiler:


    Don't forget to read the original script in an unmodified ROM and try to follow what its doing so you can learn how it works and how to make your own.

    Oops I completely forgot about the 8004 var. wouldn't the same process work if you just use a check Pokemon save that result to the. Var?
     
    17
    Posts
    9
    Years
    • Seen Apr 6, 2015
    Yes, you can simply set the var #0x8004 to any value between 0 and 5, representing the Pokémon slot in your party.
     
    16
    Posts
    9
    Years
    • Seen Nov 28, 2015
    I need help once again. The script below is a level script, but it doesn't seem to run whenever I walk into the lab.

    Spoiler:


    Anyway to fix this issue?
     
    Last edited by a moderator:

    GoGoJJTech

    (☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
    2,475
    Posts
    11
    Years
  • I need help once again. The script below is a level script, but it doesn't seem to run whenever I walk into the lab.

    Spoiler:


    Anyway to fix this issue?

    If you want a script to run whenever you enter a map, you don't use script tiles. You use level scripts.

    Basically level scripts run either before/when you enter a map, and you can specify conditions. Cooley has a level script tutorial, so go ahead and check it out.
     
    Last edited by a moderator:
    16
    Posts
    9
    Years
    • Seen Nov 28, 2015
    If you want a script to run whenever you enter a map, you don't use script tiles. You use level scripts.

    Basically level scripts run either before/when you enter a map, and you can specify conditions. Cooley has a level script tutorial, so go ahead and check it out.

    I did do that. I actually found that tutorial and put the var number where the flag number is supposed to be, hit CTRL+H to go into advanced map viewer, took the map offset, decompiled it and changed the 0xFFFF to 0x0. When I enter the refurbished lab the game then just goes into an infinite pause. I posted the script to see if there are any issues with the script that I need to change, or if it's because of the var or offset I used.
     
    5,256
    Posts
    16
    Years
  • Just posting as a reminder that script-related questions belong in this thread, the Script Help Thread, and not in the Quick Q&A Thread. Also, you should always wrap scripts - particularly ones of that length - in [SPOILER][/SPOILER] tags, to make browsing the forum better. I've taken care of it now, but please just bear that in mind in the future. Thanks :D

    As for why your script is not working, it most likely because of the variable you are using, 0x4016, being temporary. Instead, try and use variables above 0x4030 in general, although I tested with 0x4026 and it worked fine. You may also want to add a checksound command after each of the sound commands.
     

    Joexv

    ManMadeOfGouda joexv.github.io
    1,037
    Posts
    11
    Years
  • Is there an xse script command for a silent item give script? Cause giveitem 0x# 0x1 and 0x1 both give me a obtained popup and I would like one with no popup.:)
     
    10,078
    Posts
    15
    Years
    • UK
    • Seen Oct 17, 2023
    You can use the additem command instead I believe. :) I hope that's a command and I'm not making it up.
     

    GoGoJJTech

    (☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
    2,475
    Posts
    11
    Years
  • Is there an xse script command for a silent item give script? Cause giveitem 0x# 0x1 and 0x1 both give me a obtained popup and I would like one with no popup.:)

    "Additem" is another command that simply stashes an item into the bag. It's useful if you want different messages to play instead of the normal ones or if you want it completely silent.
     

    leyn09

    Truant Trainer
    84
    Posts
    13
    Years
  • I need help regarding JPAN Hacked Engine timer specials. Here's my script:

    Spoiler:



    So this is just a test script that starts a timer (special 0x46). Then, I used special2 0x8010 0x4a to read the timer then compare it to 0xA (10 seconds). What the problem is it always compares higher than 0xA, so it will call @bad even i talked with the npc again in less than 10 sec.

    I used this script to print my timer readings:

    Spoiler:


    For some reason, it's always reads 268 and it does not change as time goes by. :(

    PLEASE HELP AND THANKS!
     
    Last edited by a moderator:

    Urritguyz

    What's going on everyone
    11
    Posts
    9
    Years
    • Seen Jan 5, 2018
    I've encountered a strange problem in my Firered Hack. When I get my starter from Prof. Oak, he says "this pokémon is really quite energetic." and after that, the game freezes. Every time. I've looked at the script - which I never changed - and I think I may have messed up when it comes to variable 0x4031. It's an important var when it comes to the starter selection, and I think I used it somewhere else. I'm trying to look for the event I used it in to change it, but is there anything I can do from here?

    Any help is appreciated.
     

    Blah

    Free supporter
    1,924
    Posts
    11
    Years
  • I've encountered a strange problem in my Firered Hack. When I get my starter from Prof. Oak, he says "this pokémon is really quite energetic." and after that, the game freezes. Every time. I've looked at the script - which I never changed - and I think I may have messed up when it comes to variable 0x4031. It's an important var when it comes to the starter selection, and I think I used it somewhere else. I'm trying to look for the event I used it in to change it, but is there anything I can do from here?

    Any help is appreciated.

    Show us the script. The variable isn't special outside the context, so it can still be overwritten without complications. It's quite certain that the problem lies in the script.
     

    Urritguyz

    What's going on everyone
    11
    Posts
    9
    Years
    • Seen Jan 5, 2018
    Show us the script. The variable isn't special outside the context, so it can still be overwritten without complications. It's quite certain that the problem lies in the script.

    I was in luck. Turned out I had made a backup a few hours before the error happened and so I lost very little progress. I'm continuing from the back up now. :)

    But thanks for your help regardless.
     
    3
    Posts
    9
    Years
    • Seen Jun 5, 2016
    I'm hacking pokemon emerald and I made an event where a team aqua member blocks your path.
    you battle him, he runs away and you can get trough, but I have a problem.
    After the battle, he runs away like he's supposed to, his sprite also dissapears, but whenever you re-enter the map, the aqua member is on the path again...

    Aqua member script: note: the person event ID was set to 1 (0001)
    Spoiler:


    Map script Script type: 03 (On entering map/on menu close)
    Spoiler:


    I'm trying to find out why the sprite doesn't want to be hidden when you enter the map for hours now...
     

    PurpleOrange

    still don't know what I'm doing
    367
    Posts
    10
    Years
  • I'm hacking pokemon emerald and I made an event where a team aqua member blocks your path.
    you battle him, he runs away and you can get trough, but I have a problem.
    After the battle, he runs away like he's supposed to, his sprite also dissapears, but whenever you re-enter the map, the aqua member is on the path again...

    Aqua member script: note: the person event ID was set to 1 (0001)
    Spoiler:


    Map script Script type: 03 (On entering map/on menu close)
    Spoiler:


    I'm trying to find out why the sprite doesn't want to be hidden when you enter the map for hours now...

    flag 5004 doesn't exist, for a list of working flags look here https://www.pokecommunity.com/showthread.php?t=330008
     
    Status
    Not open for further replies.
    Back
    Top