• 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] Everytime I compile a script, my GBA file gets bigger

Jehowi

Your Master Superior
61
Posts
15
Years
  • I have started to notice that each time I compile a script, my GBA file gets A LOT bigger. Like, in an hour it went from 32 MB to 76 MB. I'm afraid I'm breaking the game. Is there anything I can do about it?
     

    Phantom Phoenix

    Lost on the road of life
    167
    Posts
    8
    Years
    • Age 27
    • ???
    • Seen Jul 1, 2020
    I never heard about this problem . But be more specific.
    1. What script editor you are using ? Xse or PKSV?
    2. What ROM you are using ?
    3. And show an example script . ( Which after compiling made the ROM bigger )
     

    Jehowi

    Your Master Superior
    61
    Posts
    15
    Years
  • 1. I'm using pksvui
    2. I'm using a fire red rom
    3. here's an example script that's not working yet because i'm doing something wrong (note: the raw things appeared after compiling):

    #org 0x8AA2550
    '-----------------------------------
    checkflag 0x236
    if true jump 0x8AA25AA ' Flag is set
    compare LASTRESULT 0x2
    if == jump 0x8AA26B0 ' Equal To
    lockall
    storeitem 0x0 HYPERPOTION
    checkitem HYPERPOTION 1
    compare LASTRESULT 0x0
    if == jump 0x8AA25BC ' Equal To
    msgbox 0x8AA25EC ' The old man is in pa...
    callstd MSG_YESNO ' Yes/No message
    compare LASTRESULT NO
    if == jump 0x8AA25B3 ' Equal To
    removeitem HYPERPOTION 1
    msgbox 0x8AA261D ' You gave a HYPER POT...
    callstd MSG_NOCLOSE ' Non-closing message
    setflag 0x236
    copyvarifnotzero 0x8000 TM03
    copyvarifnotzero 0x8001 0x1
    callstd MSG_OBTAIN ' Obtained the XXXXXX!
    releaseall
    end

    #org 0x8AA25AA
    '-----------------------------------
    msgbox 0x8AA26B0 ' Thanks a lot. I alre...
    callstd MSG_SIGN ' Signpost-style message
    end

    #org 0x8AA26B0
    '-----------------------------------
    checkobedience 0xD5DC
    #raw 0xE2
    #raw 0xDF
    #raw 0xE7
    nop0 ' #raw 0x0
    #raw 0xD5
    nop0 ' #raw 0x0
    #raw 0xE0
    #raw 0xE3
    #raw 0xE8
    setdoorclosed 0xC300 0xD500
    #raw 0xE0
    #raw 0xE6
    #raw 0xD9
    #raw 0xD5
    #raw 0xD8
    #raw 0xED
    nop0 ' #raw 0x0
    #raw 0xDA
    #raw 0xD9
    #raw 0xD9
    #raw 0xE0
    CMD_FE 0x0
    #raw 0xD6
    #raw 0xD9
    #raw 0xE8
    #raw 0xE8
    #raw 0xD9
    #raw 0xE6
    tempspriteface 0xFF 0xC9
    #raw 0xEB
    #raw 0xEB
    #raw 0xEB
    setdoorclosed 0xADAD 0xC700
    #raw 0xED
    nop0 ' #raw 0x0
    #raw 0xD6
    #raw 0xD5
    #raw 0xD7
    #raw 0xDF
    tempspriteface 0x0 0xC3
    nop0 ' #raw 0x0
    #raw 0xD7
    #raw 0xD5
    #raw 0xE2
    givetocoincase 232 ' Bear in mind, it's not in hex
    #raw 0xE1
    #raw 0xE3
    #raw 0xEA
    #raw 0xD9
    nop0 ' #raw 0x0
    #raw 0xD5
    CMD_FE 0xE1
    #raw 0xE9
    #raw 0xE7
    #raw 0xD7
    #raw 0xE0
    #raw 0xD9
    tempspriteface 0xFA 0xC3
    #raw 0xDA
    nop0 ' #raw 0x0
    #raw 0xE3
    #raw 0xE2
    #raw 0xE0
    #raw 0xED
    nop0 ' #raw 0x0
    #raw 0xD5
    nop0 ' #raw 0x0
    #raw 0xE2
    #raw 0xDD
    #raw 0xD7
    #raw 0xD9
    nop0 ' #raw 0x0
    #raw 0xED
    #raw 0xE3
    #raw 0xE9
    #raw 0xE2
    #raw 0xDB
    nop0 ' #raw 0x0
    #raw 0xE1
    #raw 0xD5
    #raw 0xE2
    nop0 ' #raw 0x0
    #raw 0xD7
    #raw 0xE3
    #raw 0xE9
    #raw 0xE0
    #raw 0xD8
    #raw 0xFA
    #raw 0xDA
    #raw 0xD9
    #raw 0xE8
    #raw 0xD7
    #raw 0xDC
    nop0 ' #raw 0x0
    #raw 0xE1
    #raw 0xD9
    nop0 ' #raw 0x0
    #raw 0xD5
    nop0 ' #raw 0x0
    updatecoins 0xD3 0xCA
    #raw 0xBF
    comparehiddenvar 0x0 0xC9CA
    checkobedience 0xC9C3
    #raw 0xC8
    setdoorclosed 0xADAD 0xFFFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    #raw 0xFF
    'Decompiler stopped due to failsafe mechanism (too many #RAW 0xFF commands)

    #org 0x8AA25BC
    '-----------------------------------
    msgbox 0x8AA26D6 ' Owww... My back! I c...
    callstd MSG_SIGN ' Signpost-style message
    end

    #org 0x8AA25B3
    '-----------------------------------
    msgbox 0x8AA25C5 ' What?! You're going ...
    callstd MSG_SIGN ' Signpost-style message
    end


    #org 0x8AA25EC
    = The old man is in pain. Give him a\nHYPER POTION?

    #org 0x8AA261D
    = You gave a HYPER POTION to the old\nman.\nThanks kid, you're a life saver.\nI'll be able to get up in a\nminute. Take this as a token of\nmy gratitude!

    #org 0x8AA26B0
    = Thanks a lot. I already feel\n better!

    #org 0x8AA26D6
    = Owww... My back! I can't move a\nmuscle!\lIf only a nice young man could\lfetch me a HYPER POTION...

    #org 0x8AA25C5
    = What?! You're going to\nleave me here?!
     

    Jehowi

    Your Master Superior
    61
    Posts
    15
    Years
  • Switch to XSE.

    Would if I could. I stopped using XSE because it stopped being able to read the simplest commands. While checking my script, it'd say things like: 'Unknown Keyword: msgbox', and stop compiling my script altogether. Of course msgbox is a very simple and well known keyword. There's no solution online for this problem. It just doesn't recognize it. If i cannot use msgbox, there's no point in using XSE. I also tried using message and other stuff, but it just doesn't work.
     

    Wüfzhéévk

    Ǵ̸͙̘͐̓ͅl̷̚͠͝? ?? �̝i̷͕͊t̵̠̼̹̆c? ?� �̣̭̓h̷̻̰̭̏͊e̵
    57
    Posts
    8
    Years
  • Would if I could. I stopped using XSE because it stopped being able to read the simplest commands. While checking my script, it'd say things like: 'Unknown Keyword: msgbox', and stop compiling my script altogether. Of course msgbox is a very simple and well known keyword. There's no solution online for this problem. It just doesn't recognize it. If i cannot use msgbox, there's no point in using XSE. I also tried using message and other stuff, but it just doesn't work.
    I think that the error must be from the script editor, as it was said, you should change to XSE, but as you said, XSE also stopped working for me when reading the commands but I think that that XSE error must be from the download as I tried downloading an unofficial version of it and it worked.
     

    Jehowi

    Your Master Superior
    61
    Posts
    15
    Years
  • I download XSE again, still not working. It barely recognizes any command.

    Anyway, that's not the problem right now. I had backups from my game, so I could recover from the possibly fatal errors. I almost got the script running. Everything works fine, up until the point I hand over the HYPER POTION. The text message: "You gave the HYPER POTION to the old man" appears, but after that it immediately shows the OBTAIN TM3 message instead of showing the messagebox: "Thanks, kid..." . What Am I doing wrong that it skips on that messagebox?

    Here's the script:

    #dyn 0x740000
    #org @begin
    '-----------------------------------
    checkflag 0x236
    if true jump @flagwasset ' Flag is set
    lockall
    storeitem 0x0 HYPERPOTION
    checkitem HYPERPOTION 1
    compare LASTRESULT 0x0
    if == jump @nopotioninbag ' Equal To
    msgbox @helpyesno ' The old man is in pa...
    callstd MSG_YESNO ' Yes/No message
    compare LASTRESULT NO
    if == jump @nomessage ' Equal To
    removeitem HYPERPOTION 1
    msgbox @gavepotion ' You gave a HYPER POT...
    callstd MSG_NORMAL
    msgbox @thanking
    callstd MSG_NORMAL --> This red part is the part that gets skipped all the time. It sets the flag 0x236 correctly, and it shows the obtain message. I have no idea why it skips this message... Deleting the messagebox and adding the text behind the messagebox above it doesn't work either. It shows only the first two lines of text, then skips...

    setflag 0x236
    copyvarifnotzero 0x8000 TM03
    copyvarifnotzero 0x8001 0x1
    callstd MSG_OBTAIN ' Obtained the XXXXXX!
    releaseall
    end

    #org @flagwasset
    '-----------------------------------
    msgbox @thanksmessage ' Thanks a lot. I alre...
    callstd MSG_NORMAL ' Signpost-style message
    end


    #org @nopotioninbag
    '-----------------------------------
    msgbox @nopotioninbag1 ' Owww... My back! I c...
    callstd MSG_NORMAL ' Signpost-style message
    end

    #org @nomessage
    '-----------------------------------
    msgbox @nomessage1 ' What?! You're going ...
    callstd MSG_NORMAL ' Signpost-style message
    end

    #org @thanking
    = Thanks kid, you're a life saver.\nI'll be able to get up in a\nminute. Take this as a token of\nmy gratitude!

    #org @helpyesno
    = The old man is in pain. Give him a\nHYPER POTION?

    #org @gavepotion
    = You gave a HYPER POTION to the old\nman.

    #org @thanksmessage
    = Thanks a lot. I already feel\nbetter!

    #org @nopotioninbag1
    = Owww... My back! I can't move a\nmuscle!\lIf only a nice young man could\lfetch me a HYPER POTION...

    #org @nomessage1
    = What?! You're going to\nleave me here?!
     
    Last edited:
    Back
    Top