Script Advance map not saving my text edits, and strings merging on their own
Binary ROM HackingNeed a helping hand or just want to talk about binary ROM hacks? Get comments and answers to any ROM Hacking-related problems, questions or thoughts you have here.
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:
#org 0x1F97B4
= Hey!\nYou[.]\pWho are you?\pOh, you're [player], aren't you?\nMoved in next door, right?\pI didn't know that you're a girl.\pDad, PROF. BIRCH, said that our new\nnext-door neighbor is a GYM LEADER's\lkid, so I assumed you'd be a guy.\pMy name's SEAN.\nSo, hi, neighbor!\pHuh? Hey, [player], don't you have\na POKéMON?\pDo you want me to go catch you one?\pAw, darn, I forgot[.]\pI'm supposed to go help my dad catch\nsome wild POKéMON.\pSome other time, okay?
But if instead I leave the room and go towards the door instead to trigger the event, I get:
Spoiler:
#org 0x1F90B4
= Hey!\nYou[.]\pWho are you?\pOh, you're [player], aren't you?\nMoved in next door, right?\pI didn't know that you're a girl.\pDad, PROF. BIRCH, said that our new\nnext-door neighbor is a GYM LEADER's\lkid, so I assumed you'd be a guy.\pMy name's BRENDAN.\nSo, hi, neighbor!\pHuh? Hey, [player], don't you have\na POKéMON?\pDo you want me to go catch you one?\pAw, darn, I forgot[.]\pI'm supposed to go help my dad catch\nsome wild POKéMON.\pSome other time, okay?
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:
#org 0x1EC7A6
= STEPHANIE: Let's see[.] The POKéMON found\non ROUTE 103 incOh, hi, [player]\v\h05!\p[.]Oh, I see, my dad gave you\na POKéMON as a gift.\pSince we're here, let's have a quick\nbattle!\pI'll give you a taste of what being\na TRAINER is like.
(rival is facing away this whole time talking. this conversation ends with rival turning around finally, [!], then saying the next line)
#org 0x1EC7DE
= Oh, hi, [player]\v\h05!\p[.]Oh, I see, my dad gave you\na POKéMON as a gift.\pSince we're here, let's have a quick\nbattle!\pI'll give you a taste of what being\na TRAINER is like.
(now the battle actually starts)
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
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.
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.
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?
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:
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!".
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:
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?
That, except with XSE you don't need to use the freespace command.
But I like the freespace command.:)
Quote:
Originally Posted by PokeLuc247
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.
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.