The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Script Advance map not saving my text edits, and strings merging on their own

Notices
For all updates, view the main page.

Binary ROM Hacking Need 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.

Ad Content
Reply
 
Thread Tools
  #1   Link to this post, but load the entire thread.  
Old January 3rd, 2017 (4:08 PM).
llamamon llamamon is offline
 
Join Date: Sep 2016
Location: Canada
Gender: Female
Nature: Lax
Posts: 9
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
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old January 3rd, 2017 (4:22 PM).
Trev's Avatar
Trev Trev is offline
i gave you everything...
 
Join Date: May 2012
Age: 26
Gender: Male
Nature: Sassy
Posts: 1,505
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.
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old February 21st, 2017 (10:13 AM).
PokeLuc247's Avatar
PokeLuc247 PokeLuc247 is offline
 
Join Date: Apr 2015
Location: Ontario, Canada
Age: 25
Gender: Male
Nature: Calm
Posts: 14
Quote:
Originally Posted by Trev View Post
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?
Reply With Quote
  #4   Link to this post, but load the entire thread.  
Old February 21st, 2017 (12:02 PM).
Crizzle's Avatar
Crizzle Crizzle is offline
Legend
 
Join Date: Apr 2015
Location: USA
Age: 28
Gender: Male
Posts: 943
Quote:
Originally Posted by PokeLuc247 View Post
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.
__________________
Pokemon Savage Silver
Check out the crappy hacks that I made:

Credit to Corazon(or whatever he calls himself now) for banner.
Pokemon CAWPS
Pokemon Outlaw
Reply With Quote
  #5   Link to this post, but load the entire thread.  
Old February 21st, 2017 (4:12 PM).
Trev's Avatar
Trev Trev is offline
i gave you everything...
 
Join Date: May 2012
Age: 26
Gender: Male
Nature: Sassy
Posts: 1,505
That, except with XSE you don't need to use the freespace command.
Reply With Quote
  #6   Link to this post, but load the entire thread.  
Old February 22nd, 2017 (8:33 AM).
PokeLuc247's Avatar
PokeLuc247 PokeLuc247 is offline
 
Join Date: Apr 2015
Location: Ontario, Canada
Age: 25
Gender: Male
Nature: Calm
Posts: 14
Quote:
Originally Posted by Crizzle View Post
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?
Reply With Quote
  #7   Link to this post, but load the entire thread.  
Old February 22nd, 2017 (8:34 AM).
PokeLuc247's Avatar
PokeLuc247 PokeLuc247 is offline
 
Join Date: Apr 2015
Location: Ontario, Canada
Age: 25
Gender: Male
Nature: Calm
Posts: 14
Quote:
Originally Posted by Trev View Post
That, except with XSE you don't need to use the freespace command.
Thanks. I am familiar with XSE so I should be able to figure it out.
Reply With Quote
  #8   Link to this post, but load the entire thread.  
Old February 22nd, 2017 (11:05 AM).
Crizzle's Avatar
Crizzle Crizzle is offline
Legend
 
Join Date: Apr 2015
Location: USA
Age: 28
Gender: Male
Posts: 943
Quote:
Originally Posted by Trev View Post
That, except with XSE you don't need to use the freespace command.
But I like the freespace command.:)

Quote:
Originally Posted by PokeLuc247 View Post
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.
__________________
Pokemon Savage Silver
Check out the crappy hacks that I made:

Credit to Corazon(or whatever he calls himself now) for banner.
Pokemon CAWPS
Pokemon Outlaw
Reply With Quote
  #9   Link to this post, but load the entire thread.  
Old February 22nd, 2017 (1:23 PM).
Trev's Avatar
Trev Trev is offline
i gave you everything...
 
Join Date: May 2012
Age: 26
Gender: Male
Nature: Sassy
Posts: 1,505
Quote:
Originally Posted by Crizzle View Post
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.
Reply With Quote
  #10   Link to this post, but load the entire thread.  
Old February 22nd, 2017 (1:28 PM).
Crizzle's Avatar
Crizzle Crizzle is offline
Legend
 
Join Date: Apr 2015
Location: USA
Age: 28
Gender: Male
Posts: 943
Quote:
Originally Posted by Trev View Post
Unless you're adding more commands to the script, in which case you'll want to replace the pointers containing commands with dynamic ones.
Yeah, of course.
__________________
Pokemon Savage Silver
Check out the crappy hacks that I made:

Credit to Corazon(or whatever he calls himself now) for banner.
Pokemon CAWPS
Pokemon Outlaw
Reply With Quote
Reply

Quick Reply

Join the conversation!

Create an account to post a reply in this thread, participate in other discussions, and more!

Create a PokéCommunity Account
Ad Content

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 9:17 AM.