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

Script Help Thread (DO NOT REQUEST SCRIPTS)

Status
Not open for further replies.

Orifiel

Priestess
413
Posts
10
Years
  • Initialized.
    #ORG
    -> 0x86B475C
    CHECKITEM
    -> 0x2
    Unknown value in CHECKITEM (Value must be integer)

    btw tried usin xse and it crashed

    Try downloading Unofficial XSE, also the script works completely different in XSE.
    If you are gonna use XSE then you must take XSE tutorial.
     

    Rezordaxx

    Asks many questions!
    290
    Posts
    10
    Years
  • Initialized.
    #ORG
    -> 0x86B475C
    CHECKITEM
    -> 0x2
    Unknown value in CHECKITEM (Value must be integer)

    btw tried usin xse and it crashed

    If u say it crashed we cant help you tell us the error message of the crash mine crashed before too bit now it works fine

    The value must always come right after the command so CHEKITEM 0x2
     

    JordanB500

    Former Pokemon League Champion
    104
    Posts
    16
    Years
  • ]i did it just says it that way in the log and the error is
    run-rime error 9
    Subscript out of range

    also where do i get the unofficial version?

    New_Bitmap_Image.jpg


    sorry still new to adding screenshots to the posts
     
    Last edited:

    JordanB500

    Former Pokemon League Champion
    104
    Posts
    16
    Years
  • ty one more question is there a way to change the script for the opening sequence with prof birch? or use different music for that part? i know i couldnt find that in am

    Edit: just changed the script again now it says
    Spoiler:


    and in xse it says too many parameters on line 4 the correct number is 2

    so still gettin nowhere
     
    Last edited:

    GoGoJJTech

    (☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
    2,475
    Posts
    11
    Years
  • ty one more question is there a way to change the script for the opening sequence with prof birch? or use different music for that part? i know i couldnt find that in am

    Edit: just changed the script again now it says
    Spoiler:


    and in xse it says too many parameters on line 4 the correct number is 2

    so still gettin nowhere

    The intro is not a script. It's ASM with text. You can find the offsets with a-text but I advise not using it to repoint
     
    215
    Posts
    11
    Years
    • Seen Jul 14, 2020
    Alright so I am writing a script where when you talk to this man, him and his abra will teleport you across the lake. When he does, you him and his abra will appear on the otherside and you can talk to him again and get teleported again.

    I have it set up so there are two old man (one is always hidden with a flag) and there is always an abra beside the old man (there are two but one is always hidden by a flag).

    This is what ACTUALLY happens when I talk to the old man. I get teleported across, but the old man I just talked to doesn't disapear while the abra does. When I try to talk to the other old man, he just stops after he tells abra to teleport.

    this is the code

    Spoiler:
     
    Last edited:

    Rezordaxx

    Asks many questions!
    290
    Posts
    10
    Years
  • ty one more question is there a way to change the script for the opening sequence with prof birch? or use different music for that part? i know i couldnt find that in am

    Edit: just changed the script again now it says
    Spoiler:


    and in xse it says too many parameters on line 4 the correct number is 2

    so still gettin nowhere

    You are getting somewhere but its not in XSE Language!

    Replace al the $ with @ because in pokescript $ is a pointer and in xse @ is a pointer

    You always start a xse script with #Dynamic 0x(theoffsetofyourscript)

    And the reason of your error is that you dont have 0x6 whicheans boxset 6 after the pointer to your text so it would be ;

    #dynamic 0x(offset)

    #org @start
    Lock
    Faceplayer
    Message @wantballs 0x6
    Release
    End

    #org @wantballs
    = Hey kid, you want some pokeballs?

    You get what i mean?
    So you put the pointers to your text then put 0x6 or 0x5 which is a yes/no box
    Then finish your script
    Make another #org with the pointer of your message and i you have got other messages you make other #org 's with those message pointers

    So if you translate your script to the xse way it will work
    There are some huge indepth xse tutorials in the tutorials section check them out!
    Hope this helped you more indepth!

    Edit: push f1 in xse if you want help with some commands
     
    61
    Posts
    10
    Years
    • Seen Nov 8, 2015
    I'm in DIRE NEED of assistance!

    I was editing Prof Elm's Lab in JohtoMap on my Pokemon Gold ROM, and I changed the offset for Cyndaquil's ball to 6670 from 40C8. When I re-checked the ROM (opening in JohtoMap) the offset reverted to 4070.

    I tried resetting it several times, but it kept going back to 4070. So, I fixed the part back to normal, and went to test my changes (from earlier). Everything is normal, I checked over and over, but WHENEVER I SELECT CYNDAQUIL it blanks out to a black screen and hangs, or resets all glitchy to the Title Screen.

    I repaired the map with the clean ROM back to the settings (checking Map Properties, and copy-pasting the good code from 180000 to 182670) and it still blanks out.

    I have no idea what JohtoMap did, but Cyndaquil's ball is damaged!!!
     

    miksy91

    Dark Energy is back in action! ;)
    1,480
    Posts
    15
    Years
  • I'm in DIRE NEED of assistance!

    I was editing Prof Elm's Lab in JohtoMap on my Pokemon Gold ROM, and I changed the offset for Cyndaquil's ball to 6670 from 40C8. When I re-checked the ROM (opening in JohtoMap) the offset reverted to 4070.

    I tried resetting it several times, but it kept going back to 4070. So, I fixed the part back to normal, and went to test my changes (from earlier). Everything is normal, I checked over and over, but WHENEVER I SELECT CYNDAQUIL it blanks out to a black screen and hangs, or resets all glitchy to the Title Screen.

    I repaired the map with the clean ROM back to the settings (checking Map Properties, and copy-pasting the good code from 180000 to 182670) and it still blanks out.

    I have no idea what JohtoMap did, but Cyndaquil's ball is damaged!!!
    Your problem is most likely something extremely simple like false bit values of Function part in [Color|Function] byte of the person event. As for what comes to the script pointer value changing into 4070, I don't know, but you probably did something wrong there.

    I could explain better, but what's the point..
     
    61
    Posts
    10
    Years
    • Seen Nov 8, 2015
    Your problem is most likely something extremely simple like false bit values of Function part in [Color|Function] byte of the person event. As for what comes to the script pointer value changing into 4070, I don't know, but you probably did something wrong there.

    I could explain better, but what's the point..
    Yeah, but what's odd is when I kept trying to change it to 6670, and saved, I would go back with it being 4070.

    But yeah, idk, it looked like it was reading the wrong value perhaps, or writing to the wrong value.

    *I guess I'll have to trigger some breakpoints in bgb to figure it out (groan)*
     

    miksy91

    Dark Energy is back in action! ;)
    1,480
    Posts
    15
    Years
  • Yeah, but what's odd is when I kept trying to change it to 6670, and saved, I would go back with it being 4070.

    But yeah, idk, it looked like it was reading the wrong value perhaps, or writing to the wrong value.

    *I guess I'll have to trigger some breakpoints in bgb to figure it out (groan)*
    Why don't you just hex edit everything first (event's data and script) and make see it work out in the game? When it works, there is obviously nothing wrong with the person event in general.

    Then you can check if Johtomap has still problems editing the event data. If it has, there is most likely some kind of programming error in that tool (although I doubt it since I have used it for a long time). It should load and store all kinds of data related to person events accurately (doesn't go for editing signposts though).
     
    61
    Posts
    10
    Years
    • Seen Nov 8, 2015
    Why don't you just hex edit everything first (event's data and script) and make see it work out in the game? When it works, there is obviously nothing wrong with the person event in general.

    Then you can check if Johtomap has still problems editing the event data. If it has, there is most likely some kind of programming error in that tool (although I doubt it since I have used it for a long time). It should load and store all kinds of data related to person events accurately (doesn't go for editing signposts though).

    The Map/Event data was reset to normal from copying the data from a clean ROM, however it still crashes. i.e. the script was always normal, even when reverted.

    I noticed a real oddity... it would stay on 0038: FF - rst 38, and the stack would keep popping 0039... I have no idea where the problem is coming from.

    The pointer BEFORE that is FE85, which is an OAM location, which contains the value FF... I can see that the pointer is wrong somehow... but FE85??

    EDIT: and now it's FE7E........ yeah..... ._.

    EDIT2: looking closer at the place where it's loading the values, it appears as though it should be 7DFE by what the values are showing, but it's loading it wrong.
     
    Last edited:

    miksy91

    Dark Energy is back in action! ;)
    1,480
    Posts
    15
    Years
  • The Map/Event data was reset to normal from copying the data from a clean ROM, however it still crashes. i.e. the script was always normal, even when reverted.

    I noticed a real oddity... it would stay on 0038: FF - rst 38, and the stack would keep popping 0039... I have no idea where the problem is coming from.

    The pointer BEFORE that is FE85, which is an OAM location, which contains the value FF... I can see that the pointer is wrong somehow... but FE85??

    EDIT: and now it's FE7E........ yeah..... ._.
    Okay, so the pointer to Cyndaquil script is back to normal (and so is its script, right) ?
    Does the problem only occur with Cyndaquil event?

    All I can pick up from this is that you have either programmed something wrong (with asm) yourself, or some data for example in rom bank 0 has been edited by an accident.

    Edit:
    Sounds like some "table handler" isn't doing the job right. Instead of loading some 16-bit value in little endian, you'll get it in big endian instead. If you can fix the problem by debugging, good. But if not, you can also try tracking down the bug with ips files (especially if you have kept backups). If you haven't kept regular backups, this method is pretty useless though. I really advise keeping backups though - I have almost 1000 copies of Dark Energy in my computer (with version numbers at the end of their names).

    P.S
    Just as interesting note, the freezing during that script happens due to a thing which is called "stack overflow". It's a common programming error especially when trying to implement a program, or part of it, with recursion.
     
    Last edited:

    Sniper

    ふゆかい
    1,412
    Posts
    10
    Years
  • Hi, I've made a setvar script on firered hack. (JPAN's engine patch)
    Then I have a successful one but when the script is done, it keeps repeating.
    Here's my script:
    Spoiler:


    I don't know what happens. I don't see anything wrong.
     
    61
    Posts
    10
    Years
    • Seen Nov 8, 2015
    Okay, so the pointer to Cyndaquil script is back to normal (and so is its script, right) ?
    Does the problem only occur with Cyndaquil event?

    All I can pick up from this is that you have either programmed something wrong (with asm) yourself, or some data for example in rom bank 0 has been edited by an accident.

    Edit:
    Sounds like some "table handler" isn't doing the job right. Instead of loading some 16-bit value in little endian, you'll get it in big endian instead. If you can fix the problem by debugging, good. But if not, you can also try tracking down the bug with ips files (especially if you have kept backups). If you haven't kept regular backups, this method is pretty useless though. I really advise keeping backups though - I have almost 1000 copies of Dark Energy in my computer (with version numbers at the end of their names).

    P.S
    Just as interesting note, the freezing during that script happens due to a thing which is called "stack overflow". It's a common programming error especially when trying to implement a program, or part of it, with recursion.

    Oh, it might have overflowed... anyways, it was apparently a corrupt save file. The save file had the data from last time it was changed to 4070, so it didn't revert back to 40C6 after the changes.

    Problem is fixed.
     

    Aethestode

    Hacker
    1,700
    Posts
    16
    Years
    • Seen Aug 14, 2023
    How can I remove the gender option in the beginning of FireRed where Oak ask yuour gender?
     
    Status
    Not open for further replies.
    Back
    Top