• 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] Advance map not saving my text edits, and strings merging on their own

9
Posts
7
Years
  • So I have been attempting to change the rival names in the script. I have gotten as far as editing the actual hex values where the names for [rival] and [player] are stored so that the default names changed. that went smooth, and MAY became STEPHANIE, and BRENDAN became SEAN. by next problem however, was that sometimes the game does not just use the [rival] variable for the rival name, and sometimes just says the name (ie, when may or Brendan are talking). so, to fix this, all i need to do is go into the scripts and find every time the name MAY or BRENDAN is used and change it manually. time consuming but easy enough. however, something is not working. here's where the trouble starts.

    some scripts I managed to successfully change: Like when you talk to the rival by clicking the pokeball.
    Spoiler:

    Advance map not saving my text edits, and strings merging on their own

    But if instead I leave the room and go towards the door instead to trigger the event, I get:
    Spoiler:

    Advance map not saving my text edits, and strings merging on their own


    and every time i try to edit and change BRENDAN to SEAN it changes back as soon as i close the window. i have tried saving compiling debugging and saving again before closing the window and it still changes back every time. i dont understand what i am doing wrong or how i managed to change some before.

    even more annoyingly, some scripts have started to run into each other. here's an example
    Spoiler:

    Advance map not saving my text edits, and strings merging on their own


    if anyone has any clue what happened, what I can do to fix it, or how to prevent it from happening agian if I do have to start from scratch with a clean ROM, I would really appreciate it. Thanks in advance
     

    Trev

    [span="font-size: 8px; color: white;"][font="Monts
    1,505
    Posts
    11
    Years
    • Age 27
    • Seen Nov 15, 2023
    If you want to edit text strings in XSE without repointing them, you have to make sure that you don't exceed the original number of characters. The better thing to do would be to repoint the text strings, using the #dynamic function to find the free space to put the string in.

    This tutorial will be of use to you.
     
    14
    Posts
    9
    Years
  • If you want to edit text strings in XSE without repointing them, you have to make sure that you don't exceed the original number of characters. The better thing to do would be to repoint the text strings, using the #dynamic function to find the free space to put the string in.

    This tutorial will be of use to you.
    I'm having a similar problem and your advice seems useful, but I'm not sure what you mean about using the #dynamic. Think you could explained it a bit for me?
     

    Crizzle

    Legend
    942
    Posts
    9
    Years
  • I'm having a similar problem and your advice seems useful, but I'm not sure what you mean about using the #dynamic. Think you could explained it a bit for me?

    First you need to under stand the basics of the ROM and it's offsets. The ROM has a limited amount of space. Some of it is already taken and the rest is free space. Luckily, FireRed has a ton of free space to add new stuff, including text, to the rom(Open FireRed in a hex editor and scroll through, you'll see tons of seemingly random letters but you'll also see tons of 'FF's which is free space.). An offset is pretty much an area of space being referred to, noted by a usually 6 digit hexidecimal number.

    Using #dynamic in your script as well as the @ symbol will make sure your script and text won't be overwriting already existing space but using free space. For example:

    Code:
    #freespace 0xFF
    #dynamic 0x800000
    #org @start
    msgbox @msg 0x2
    end
    
    #org @msg
    = Waddup, homie!

    This will compile into the ROM dynamically using free space that is located at or after the offset 0x800000(hexidecimal). If you give the @start offset(it'll be a hexidecimal number) to a person event(as it's script) and talk to said person in the game, s/he'll say "Waddup, homie!".

    Hopefully, that helped.
     

    Trev

    [span="font-size: 8px; color: white;"][font="Monts
    1,505
    Posts
    11
    Years
    • Age 27
    • Seen Nov 15, 2023
    That, except with XSE you don't need to use the freespace command.
     
    14
    Posts
    9
    Years
  • First you need to under stand the basics of the ROM and it's offsets. The ROM has a limited amount of space. Some of it is already taken and the rest is free space. Luckily, FireRed has a ton of free space to add new stuff, including text, to the rom(Open FireRed in a hex editor and scroll through, you'll see tons of seemingly random letters but you'll also see tons of 'FF's which is free space.). An offset is pretty much an area of space being referred to, noted by a usually 6 digit hexidecimal number.

    Using #dynamic in your script as well as the @ symbol will make sure your script and text won't be overwriting already existing space but using free space. For example:

    Code:
    #freespace 0xFF
    #dynamic 0x800000
    #org @start
    msgbox @msg 0x2
    end
    
    #org @msg
    = Waddup, homie!
    This will compile into the ROM dynamically using free space that is located at or after the offset 0x800000(hexidecimal). If you give the @start offset(it'll be a hexidecimal number) to a person event(as it's script) and talk to said person in the game, s/he'll say "Waddup, homie!".

    Hopefully, that helped.



    Yes it is helpful, but I do know how to do that. What I was referring to was the text jumping up into the wrong line and causing the person to say their next bit of their script at the same time as the current part.
    Like if you scripted someone to give you pokeballs and say something and it turned out like:
    {Hey trainer have these. [player] received 5 pokeballs. Now go catch some Pokémon.}
    {[player} received 5 pokeballs. Now go catch some Pokémon.}
    {Now go catch some Pokémon.}


    I'm trying to rescript the professor to have a new name and say some new things, but I want to leave most of his original scripting so he still does all the pokedex stuff to check your progress and his lines keep doing that. Is there a way of fixing it or do I have to just rewrite it?
     

    Crizzle

    Legend
    942
    Posts
    9
    Years
  • That, except with XSE you don't need to use the freespace command.

    But I like the freespace command.:)

    Yes it is helpful, but I do know how to do that. What I was referring to was the text jumping up into the wrong line and causing the person to say their next bit of their script at the same time as the current part.
    Like if you scripted someone to give you pokeballs and say something and it turned out like:
    {Hey trainer have these. [player] received 5 pokeballs. Now go catch some Pokémon.}
    {[player} received 5 pokeballs. Now go catch some Pokémon.}
    {Now go catch some Pokémon.}


    I'm trying to rescript the professor to have a new name and say some new things, but I want to leave most of his original scripting so he still does all the pokedex stuff to check your progress and his lines keep doing that. Is there a way of fixing it or do I have to just rewrite it?

    But that's how you avoid that from happening. Just replace the original text strings with dynamic ones, so there's no chance of overwriting. You can even keep it in the same script.
     

    Trev

    [span="font-size: 8px; color: white;"][font="Monts
    1,505
    Posts
    11
    Years
    • Age 27
    • Seen Nov 15, 2023
    But I like the freespace command.:)



    But that's how you avoid that from happening. Just replace the original text strings with dynamic ones, so there's no chance of overwriting. You can even keep it in the same script.

    Unless you're adding more commands to the script, in which case you'll want to replace the pointers containing commands with dynamic ones.
     
    Back
    Top