The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Other Bits of text keep appearing in other scripts

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 September 9th, 2014 (8:48 PM).
rortik rortik is offline
 
Join Date: Aug 2014
Gender: Female
Posts: 59
For the most part, when I write scripts they execute fine. But sometimes, at the end of a textbox, the game will randomly add in text from another script I wrote, along with random characters.

Any way to prevent this from happening?
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old September 9th, 2014 (9:01 PM).
Le pug's Avatar
Le pug Le pug is offline
Creator of Pokémon: Discovery / Fat Kid
 
Join Date: Aug 2013
Location: Le bed
Age: 30
Gender: Male
Nature: Bold
Posts: 870
you're overwriting offsets somehow. stop and it won't happen lol. create fresh scripts and save them to new offsets rather than working under old offsets in xse then jump compiling your changes cus it'll just overwrite the bytes after the offset cus it'll need more space
__________________
Retired. Thank you guys for a wonderful five years.
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old September 9th, 2014 (10:52 PM). Edited September 10th, 2014 by Christos.
rortik rortik is offline
 
Join Date: Aug 2014
Gender: Female
Posts: 59
It happens when I use FSF to get free space too.

How do I know when I'm out of space in a script?

It also sometimes prevents me from overwriting scripts, even if they're empty and I compile it properly.

I just close it and that random bit of text comes back, or in some cases the entire script deletes itself and is replaces by a random setvar line.
Reply With Quote
  #4   Link to this post, but load the entire thread.  
Old September 10th, 2014 (12:25 AM).
Christos's Avatar
Christos Christos is offline
 
Join Date: Feb 2006
Gender: Male
Nature: Serious
Posts: 6,355
Quote:
Originally Posted by rortik View Post
It happens when I use FSF to get free space too.

How do I know when I'm out of space in a script?

It also sometimes prevents me from overwriting scripts, even if they're empty and I compile it properly.

I just close it and that random bit of text comes back, or in some cases the entire script deletes itself and is replaces by a random setvar line.
What script editor are you using? If it has a dynamic scripting feature, like XSE, then you should have no problems with overwritten text, as your scripts would be compiled into free space automatically.
__________________

A Pokemon that is discriminated!
Support squirtle and make it everyone's favourite.
Reply With Quote
  #5   Link to this post, but load the entire thread.  
Old September 10th, 2014 (1:26 AM).
rortik rortik is offline
 
Join Date: Aug 2014
Gender: Female
Posts: 59
Quote:
Originally Posted by Christos View Post
What script editor are you using? If it has a dynamic scripting feature, like XSE, then you should have no problems with overwritten text, as your scripts would be compiled into free space automatically.

I'm using XSE through Advance Map.

So you're telling me my problem is not that it's writing the scripts over each other?


Why would this be happening then?

Here's an example of what is happening:

I have a script in Littleroot town that gives me a message when I walk through. I write/compile the script and it works fine.

I have another script in Slateport that makes me enter a "dream." Since one of the upper floors in Littleroot is an usused map, the "dream" is located there. At one point, I had a script up there giving the player a message. I decided I didn't need it, so I scrapped the script, deleting it on Advance Map.

Now the first script has part of the second one tacked onto the end of one of its' strings. When I delete the extra text, compile, and close, it does absolutely no good. As soon as I reopen it the random text is back.

Another example:
I've attempted to put a script that activates the first time you try to enter Slateport's Pokemon Center. No matter WHAT I put in this script, it deletes itself as soon as I close XSE. I'm doing it EXACTLY the same way I'm doing other scripts, which work, but it STILL ISN'T HAPPENING.

Final example:
I've slightly edited the text when you first encounter team aqua/magma in Petalburg woods, as the teams won't be present in my hack. I've also added additional text onto the researcher's final line. The problem is the game takes bits of the end text (where the grunt is like "wow how'd you win" or whatever) and sticking it onto the beginning where he challenges you.

The text also rolled over onto the boy's text a little bit further into the woods. When I manually edited it out, just making the boy's script say "hello" it deleted the end of the text from what I'd added to the researcher, replacing it with "hello." This is why I think it's writing over itself.



No idea what's wrong.
Reply With Quote
  #6   Link to this post, but load the entire thread.  
Old September 10th, 2014 (1:51 AM).
Christos's Avatar
Christos Christos is offline
 
Join Date: Feb 2006
Gender: Male
Nature: Serious
Posts: 6,355
Quote:
Originally Posted by rortik View Post
Final example:
I've slightly edited the text when you first encounter team aqua/magma in Petalburg woods, as the teams won't be present in my hack. I've also added additional text onto the researcher's final line. The problem is the game takes bits of the end text (where the grunt is like "wow how'd you win" or whatever) and sticking it onto the beginning where he challenges you.

The text also rolled over onto the boy's text a little bit further into the woods. When I manually edited it out, just making the boy's script say "hello" it deleted the end of the text from what I'd added to the researcher, replacing it with "hello." This is why I think it's writing over itself.
You can't just add in text in existing scripts, since they'll overwrite other text. Editing it while keeping the same character length or less should be okay, but I suggest repointing the text to empty space. If you get accustomed to dynamic scripting there should be no problem.
__________________

A Pokemon that is discriminated!
Support squirtle and make it everyone's favourite.
Reply With Quote
  #7   Link to this post, but load the entire thread.  
Old September 10th, 2014 (2:10 AM).
rortik rortik is offline
 
Join Date: Aug 2014
Gender: Female
Posts: 59
Quote:
Originally Posted by Christos View Post
You can't just add in text in existing scripts, since they'll overwrite other text. Editing it while keeping the same character length or less should be okay, but I suggest repointing the text to empty space. If you get accustomed to dynamic scripting there should be no problem.
Ok, so whenever I want to make a script, just use FSF to get new space, don't remake already existing scripts.

That explains all the problems except for the script-deleting-itself-outside-slateport-pokemon-center issue.

Thanks!
Reply With Quote
  #8   Link to this post, but load the entire thread.  
Old September 10th, 2014 (2:25 AM).
Christos's Avatar
Christos Christos is offline
 
Join Date: Feb 2006
Gender: Male
Nature: Serious
Posts: 6,355
Quote:
Originally Posted by rortik View Post
Ok, so whenever I want to make a script, just use FSF to get new space, don't remake already existing scripts.

That explains all the problems except for the script-deleting-itself-outside-slateport-pokemon-center issue.

Thanks!
Here's an example of what dynamic script looks like, to make things easier for you.

#dynamic 0x800000

#org @start
msgbox @text 0x2
end

#org @text
= text


The "#dynamic 0x800000" command is so that XSE will insert the script in free space after the offset 800000 in the ROM. When you compile the script a window will show up with the offsets the scripts were inserted in (@start and @text, you can use any names you want as long as they start with a @ symbol). Simply copy the offset for @start and paste it in Advance Map.

Now if you'd like to just edit text in existing scripts, just put a dynamic command at the top of the script, and replace the text offset you want to edit with @text, for example, and compile.

Also, can you be more specific on the script that deletes itself? How is it deleted and what kind of script is it?
__________________

A Pokemon that is discriminated!
Support squirtle and make it everyone's favourite.
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:09 AM.