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

BadEgg~

Pokémon: Volant Version Developer
  • 112
    Posts
    8
    Years
    I've heard and seen in many places that there's 1200 and up and I've seen it working, plus there's someone who's specifically said not to use 200 - 2FF, so I guess I'll just give up! It wasn't gonna get anywhere anyways!

    Flags 200 to 2FF are safe to use. I'm pretty sure if people are using flags >1200 they're using JPAN's engine or something.
     

    Le pug

    Creator of Pokémon: Discovery / Fat Kid
  • 870
    Posts
    10
    Years
    I've heard and seen in many places that there's 1200 and up and I've seen it working, plus there's someone who's specifically said not to use 200 - 2FF, so I guess I'll just give up! It wasn't gonna get anywhere anyways!

    Flags 200 to 2FF are safe to use. I'm pretty sure if people are using flags >1200 they're using JPAN's engine or something.

    You can use expand the amount of flags to use so you can use 0x900-0x18FF as well. That's a lot of flags! Anyways the thread is here: click me
     
  • 1,344
    Posts
    14
    Years
    • Seen Dec 10, 2021
    https://www.pokecommunity.com/showthread.php?p=4228056#4228056

    Also, was there's the follump tutorials where he uses 1200, but maybe that's just for pokescript? I mean I've used them before, but it may have been in pokescript!

    That tutorial is 7 years old. Maybe the flag appears to work, but all you're doing using it is overwriting arbitrary RAM that's being used for something else. It's not safe at all, and it's the reason a lot of old hacks have problems like bad eggs.
     

    Alex

    what will it be next?
  • 6,408
    Posts
    17
    Years
    • Seen Dec 30, 2022
    I'm playing with the getplayerpos command atm. Can anyone tell me if there's a more simplified way I can write this script? The idea is the NPC says something to you based on which direction you're talking to him from.

    Spoiler:

    The NPC in question is smack in the middle of the map (coordinates X: 0B Y: 0B), sorry if the variable checking gets a little confusing.
     
  • 1,344
    Posts
    14
    Years
    • Seen Dec 10, 2021
    I'm playing with the getplayerpos command atm. Can anyone tell me if there's a more simplified way I can write this script? The idea is the NPC says something to you based on which direction you're talking to him from.

    Spoiler:

    The NPC in question is smack in the middle of the map (coordinates X: 0B Y: 0B), sorry if the variable checking gets a little confusing.
    That's pretty much how you're meant to do it, but one thing is that you should avoid is using the vars around 4020. The one you're using is also used as a pedometer. Here's a list you can refer to to make sure you're using the correct vars.
     

    Alex

    what will it be next?
  • 6,408
    Posts
    17
    Years
    • Seen Dec 30, 2022
    That's pretty much how you're meant to do it, but one thing is that you should avoid is using the vars around 4020. The one you're using is also used as a pedometer. Here's a list you can refer to to make sure you're using the correct vars.

    Oh my God you beautiful man. This explains exactly why I'm getting a REPEL indicator. Thank you so much for this!!
     
  • 34
    Posts
    8
    Years
    Alright, so big 200+ line script. (it's just a bunch of repetition for the most part)

    I keep getting an error in debugging in XSE "Too many parameters on line 60. Correct number is 1."

    So, I go to line 60 and move the script down a line. Debug and it says there is an error on an empty line 60.

    I played around a bit more and it came down to the 3 lines I bolded, which are right at line 60. I am using XSE V 1.1.1.


    Spoiler:
     

    destinedjagold

    You can contact me in PC's discord server...
  • 8,593
    Posts
    16
    Years
    • Seen Dec 23, 2023
    Alright, so big 200+ line script. (it's just a bunch of repetition for the most part)

    I keep getting an error in debugging in XSE "Too many parameters on line 60. Correct number is 1."

    So, I go to line 60 and move the script down a line. Debug and it says there is an error on an empty line 60.

    I played around a bit more and it came down to the 3 lines I bolded, which are right at line 60. I am using XSE V 1.1.1.


    Spoiler:

    I hope that you're aware that you can call the same message to any parts of your script. You can even call previous texts on your new script as long as you know their offset address...

    For example...

    Code:
    #dynamic 0x800000
    
    #org @npc1
    faceplayer
    msgbox @1 0x6
    release
    end
    
    #org @npc2
    faceplayer
    msgbox @1 0x6
    release
    end
    
    #org @npc3
    faceplayer
    msgbox @1 0x6
    release
    end
    
    #org @1
    = Hello World!
    So there's no need to repeat the same lines of text over and over again.

    Anyway, I copy+pasted your script and tried compiling it, and the first error it gave me was this...

    Spoiler:

    And finally...these...
    Spoiler:

    Those were the only errors I encountered with your script.

    But seriously though, remove those identical lines of texts so you don't have to eat a whole bunch of space in your ROM. In scripting, texts eat a lot of space in the ROM. :/

    P.S.


    Spoiler:
     
  • 34
    Posts
    8
    Years

    Thanks a lot!

    With the pointing to something more than once thing, that's what I thought at first. When the script wasn't working I went through and repeated them, but forgot to save my script first. Good to know now though. :)



    I'm still getting the weird "Too many parameters on line 60" thing. I've been looking all over but haven't found anything on it.
     

    destinedjagold

    You can contact me in PC's discord server...
  • 8,593
    Posts
    16
    Years
    • Seen Dec 23, 2023
    Thanks a lot!

    With the pointing to something more than once thing, that's what I thought at first. When the script wasn't working I went through and repeated them, but forgot to save my script first. Good to know now though. :)



    I'm still getting the weird "Too many parameters on line 60" thing. I've been looking all over but haven't found anything on it.

    Then are you sure your XSE version is 1.1.1? After I fixed the errors I encountered from that script you posted, I was able to compile it. :/
     
  • 34
    Posts
    8
    Years
    Then are you sure your XSE version is 1.1.1? After I fixed the errors I encountered from that script you posted, I was able to compile it. :/

    I just reinstalled XSE, so I'm sure it's 1.1.1.

    Perhaps there's a setting or something I need to change? I've been looking around a lot and still can't find anything to help fix it.
     

    destinedjagold

    You can contact me in PC's discord server...
  • 8,593
    Posts
    16
    Years
    • Seen Dec 23, 2023
    I just reinstalled XSE, so I'm sure it's 1.1.1.

    Perhaps there's a setting or something I need to change? I've been looking around a lot and still can't find anything to help fix it.

    In XSE, go to Help and Click About. On the new window that will appear, the tool's version should be shown on the lower-right.

    If it's v1.1.1 and it's still causing errors, then maybe you should try using this XSE.

    https://www.mediafire.com/download/8qe70zzp45bjf91/Unofficial_XSE.zip
     
  • 34
    Posts
    8
    Years
    In XSE, go to Help and Click About. On the new window that will appear, the tool's version should be shown on the lower-right.

    If it's v1.1.1 and it's still causing errors, then maybe you should try using this XSE.

    https://www.mediafire.com/download/8qe70zzp45bjf91/Unofficial_XSE.zip

    Reinstalled again and still the same error.

    Spoiler:


    Here it is with the fixes.
     
  • 88
    Posts
    14
    Years
    That tutorial is 7 years old. Maybe the flag appears to work, but all you're doing using it is overwriting arbitrary RAM that's being used for something else. It's not safe at all, and it's the reason a lot of old hacks have problems like bad eggs.

    Well, it still doesn't work with 200, so what now, Einstein?
     
  • 1,682
    Posts
    8
    Years
    • Seen yesterday
    Reinstalled again and still the same error.

    Spoiler:


    Here it is with the fixes.

    There is an extra space in your script on line 60. I removed it and it compiled successfully into a clean FR ROM.
    Check and see if that's what caused your error.
     
  • 417
    Posts
    9
    Years
    • Seen Nov 20, 2016
    Well, it still doesn't work with 200, so what now, Einstein?
    Idk why you'd be sarcastic with someone who was trying to help you.

    The flags used by the setflag command begin at offset 0xEE0 of a specific saveblock. Variables begin at 0x1000 of the same saveblock. If you do the math, it is clear that 0x1200 isn't a valid flag unless the check/set/clear flag routines are changed, and this isn't even accounting for flags that are used by things other than generic overworld scripting.

    The fact that you script still doesn't work does not make chrunch wrong, it means that you made multiple errors in your script, so maybe you shouldn't be so rude about it. My suggestion? Maybe you mixed up the number 11 in A-Map and 0x11 in your script, and that your other events only worked by the pure coincidence that decimal and hex matched up for their numbers.
     
  • 88
    Posts
    14
    Years
    Idk why you'd be sarcastic with someone who was trying to help you.

    The flags used by the setflag command begin at offset 0xEE0 of a specific saveblock. Variables begin at 0x1000 of the same saveblock. If you do the math, it is clear that 0x1200 isn't a valid flag unless the check/set/clear flag routines are changed, and this isn't even accounting for flags that are used by things other than generic overworld scripting.

    The fact that you script still doesn't work does not make chrunch wrong, it means that you made multiple errors in your script, so maybe you shouldn't be so rude about it. My suggestion? Maybe you mixed up the number 11 in A-Map and 0x11 in your script, and that your other events only worked by the pure coincidence that decimal and hex matched up for their numbers.

    I was being sarcastic with him because he gave me attitude, and the "help" he gave me didn't do anything. He was rude before me. But of course, it's only rude when I do it. I was defending myself, and I used sarcasm, big whoop. And actually, yes, he is wrong. His suggestion didn't work.

    So what you think went wrong is what? That I messed something up? Could you give me a solution? The actual sprite of Oak says 3 and in the script it says the same, the equivalent for Leaf is 11, and 11 does not work. Do I use B? Or 0B? I tried, but they don't seem to be working!

    And it's actually not clear at all that 1200 isn't valid when it's been used and it's worked. What math are you talking about?
     
  • 417
    Posts
    9
    Years
    • Seen Nov 20, 2016
    I was being sarcastic with him because he gave me attitude, and the "help" he gave me didn't do anything. He was rude before me. But of course, it's only rude when I do it. I was defending myself, and I used sarcasm, big whoop. And actually, yes, he is wrong. His suggestion didn't work.

    So what you think went wrong is what? That I messed something up? Could you give me a solution? The actual sprite of Oak says 3 and in the script it says the same, the equivalent for Leaf is 11, and 11 does not work. Do I use B? Or 0B? I tried, but they don't seem to be working!

    And it's actually not clear at all that 1200 isn't valid when it's been used and it's worked. What math are you talking about?
    Uhh I don't interpret anything he posted here as being "rude" to you, but whatever. And no, he was not wrong. Like I said, the fact that it still didn't work only means that there were multiple errors.

    What I'm saying is that you may have made a hex conversion error. 11 is not the same thing as 0x11. 0x11 is 17. 11 is 0xB. On the other hand, 0x3 is the same as 3, which is why your Oak script works without converting to hex. If you are correctly converting to hex, then I don't know what the issue is.

    Math:
    offset 0x1000 - offset 0xEE0 = 0x120 bytes
    0x120 bytes times 8 bits per byte = 0x900 bits/flags
    Using the flag routine for a number beyond 0x900 would write to/reads from an area of the saveblock used for variables.
     
  • 1,344
    Posts
    14
    Years
    • Seen Dec 10, 2021
    I was being sarcastic with him because he gave me attitude, and the "help" he gave me didn't do anything. He was rude before me. But of course, it's only rude when I do it. I was defending myself, and I used sarcasm, big whoop. And actually, yes, he is wrong. His suggestion didn't work.

    So what you think went wrong is what? That I messed something up? Could you give me a solution? The actual sprite of Oak says 3 and in the script it says the same, the equivalent for Leaf is 11, and 11 does not work. Do I use B? Or 0B? I tried, but they don't seem to be working!

    And it's actually not clear at all that 1200 isn't valid when it's been used and it's worked. What math are you talking about?

    The entirety of the hacking community has agreed that those flags are unsafe, with actual research and proof to back it up. You're not some special snowflake who's just cracked the mystery of flags, if you think everyone except you is wrong why don't you give us a reason as to why other than "it's worked"?

    gl getting help here with that attitude mate
     
    Status
    Not open for further replies.
    Back
    Top