The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Other Scripts simply don't save to rom.

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 13th, 2014 (2:30 PM).
rortik rortik is offline
 
Join Date: Aug 2014
Gender: Female
Posts: 59
I write a script that has no errors, can be anything from a simple message to a complex one, write it to a COMPLETELY NEW event, with a COMPLETELY FRESH offset I got from FSF, hit compile, it compiles properly, then when I close XSE and reopen the script, it's gone. Sometimes it just disappears, sometimes it replaces my script with a random setvar statement.


This only happens sometimes, but when it does happen it continues to happen nomatter how many times I try it. Some days I'll go write a script and it'll work perfectly-- and I'm using exactly the same procedure.


1.9.2 Advance Map and XSE are the only tools involved.
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old September 13th, 2014 (3:54 PM).
Sniper's Avatar
Sniper Sniper is offline
ふゆかい
 
Join Date: Nov 2013
Location: Philippines
Gender: Male
Nature: Quiet
Posts: 1,412
Can I see your script? Also what version of XSE are you using? The old version is very buggy :(
__________________


Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old September 13th, 2014 (4:11 PM).
DJTiki's Avatar
DJTiki DJTiki is offline
absolutely should have never given me the internet
 
Join Date: Mar 2014
Location: Florida, USA
Gender: Male
Nature: Adamant
Posts: 1,256
Quote:
Originally Posted by rortik View Post
COMPLETELY NEW event, with a COMPLETELY FRESH offset I got from FSF
Sounds like you are using an old version of XSE. XSE automatically finds free space and complies via a simple command. Which version are you using? And if you can, can we the see the script, you are trying to compile.
Reply With Quote
  #4   Link to this post, but load the entire thread.  
Old September 13th, 2014 (8:43 PM).
rortik rortik is offline
 
Join Date: Aug 2014
Gender: Female
Posts: 59
I don't have an example of one of the scripts it was happening with.

I'll post one the next time it happens.

But seriously, it has happened with a script identical to another one except with a slightly different movement (for if the player stepped on the next square over)

I'll also check what version of XSE I have
Reply With Quote
  #5   Link to this post, but load the entire thread.  
Old September 13th, 2014 (11:04 PM).
rortik rortik is offline
 
Join Date: Aug 2014
Gender: Female
Posts: 59
Happened again. I hit compile and it works fine...


'---------------
#org 0x304F18
setvar 0x4060 0x1
msgbox 0x8304F19 MSG_KEEPOPEN '"[player]: Wow, so this is St..."
closeonkeypress
warp 0x1 0x4 0xFF 0x4 0x7
end


'---------
' Strings
'---------
#org 0x304F19
= [player]: Wow, so this is Stone City.[bit more text here]



XSE 1.1.1, A-Map 1.9.2, Ruby rom, Mauville city, green script tile


No idea why :/


Replaces it with this every time:

'---------------
#org 0x304F18
setvar 0x1FD 0xF0
Reply With Quote
  #6   Link to this post, but load the entire thread.  
Old September 13th, 2014 (11:14 PM).
DJTiki's Avatar
DJTiki DJTiki is offline
absolutely should have never given me the internet
 
Join Date: Mar 2014
Location: Florida, USA
Gender: Male
Nature: Adamant
Posts: 1,256
Nothing is wrong with your script, ao I have no idea on how you could've messed up. You also have the right versions for everything. But usually you would place setvar after everything else(but I don't think it matters).

This is quite interesting. Are making sure your scripts are in Free Space?
Reply With Quote
  #7   Link to this post, but load the entire thread.  
Old September 14th, 2014 (12:36 AM).
rortik rortik is offline
 
Join Date: Aug 2014
Gender: Female
Posts: 59
Quote:
Originally Posted by DJTiKi View Post
Nothing is wrong with your script, ao I have no idea on how you could've messed up. You also have the right versions for everything. But usually you would place setvar after everything else(but I don't think it matters).

This is quite interesting. Are making sure your scripts are in Free Space?

I'm using FSF to get free space... How much do I need? I'm just leaving at the default, it usually works.

I mean, there's an almost identical script in Slateport (AKA The University):

'---------------
#org 0x14BC88
setvar 0x4052 0x1
msgbox 0x8165A57 MSG_KEEPOPEN '"[player]: I've finally made it to\..."
closeonkeypress
warp 0x1 0x3 0xFF 0x4 0x7
end


'---------
' Strings
'---------
#org 0x165A57
= [player]: I've finally made it to\nTHE UNIVERSITY! Wow! But I feel[etc. etc.]


This script works perfectly. Made exactly the same way. In fact, I simply copy-pasted right out of this script and changed the relevant offsets and text and stuff before compiling.
Reply With Quote
  #8   Link to this post, but load the entire thread.  
Old September 14th, 2014 (12:43 AM).
Sniper's Avatar
Sniper Sniper is offline
ふゆかい
 
Join Date: Nov 2013
Location: Philippines
Gender: Male
Nature: Quiet
Posts: 1,412
I seriously don't know what's wrong with your script. But It's best to re-do everything.
__________________


Reply With Quote
  #9   Link to this post, but load the entire thread.  
Old September 14th, 2014 (12:53 AM).
rortik rortik is offline
 
Join Date: Aug 2014
Gender: Female
Posts: 59
Well WTF!!!!! After a few more attempts, I decided to go try compiling the script from Petalburg. It did the same thing. So I used FSF to try a new offset (like my 10th one) and made THIS script: (hint: it's the same, with a different offset)

#org 0x304F8E
setvar 0x4060 0x1
msgbox 0x8304F19 MSG_KEEPOPEN '"[player]: Wow, so this is St..."
closeonkeypress
warp 0x1 0x4 0xFF 0x4 0x7
end


'---------
' Strings
'---------
#org 0x304F19
= [player]: Wow, so this is Stone City.[bit more text here]



And it fkin worked.

No idea why that should make ANY difference. Yup. ^.^

Moved it back to Mauville, appears to have worked fine.
Reply With Quote
  #10   Link to this post, but load the entire thread.  
Old September 14th, 2014 (12:55 AM).
rortik rortik is offline
 
Join Date: Aug 2014
Gender: Female
Posts: 59
Btw I'd still like to find out why the heck this was happening...

On a side note, anyone know what flag I have to mark to get ridda the damn Wailmer in Lilycove? Deleting the Magma dude didn't do anything.
Reply With Quote
  #11   Link to this post, but load the entire thread.  
Old September 14th, 2014 (1:06 AM).
rortik rortik is offline
 
Join Date: Aug 2014
Gender: Female
Posts: 59
I think I might have figured out my issue when actually watching the numbers FSF is spitting out at me. Hope you guys can tell me if this would explain it.

I was opening FSF, hitting "search" and copying down the offset.

Then I was opening the similar script in Slateport, copying it, pasting it down and deleting the beginning offset.

Then (here's my mistake) I was hitting "find next" on FSF without compiling. Since I hadn't written my pasted script to the rom, it was simply moving 1 byte forward- giving me 1 byte to complete my script (not happening). Then I was using that for the message offset. Repeat until I needed no more offsets, compile, exit.


If this is my issue, I assume that if I want to copy/paste scripts, I need to compile it with the old crap still in it, then use FSF to replace the offsets and then change what I needed to one at a time- therefore ensuring I have enough space to write my script to memory.


Is this possibly my issue?

I think I might have figured out my issue when actually watching the numbers FSF is spitting out at me. Hope you guys can tell me if this would explain it.

I was opening FSF, hitting "search" and copying down the offset.

Then I was opening the similar script in Slateport, copying it, pasting it down and deleting the beginning offset.

Then (here's my mistake) I was hitting "find next" on FSF without compiling. Since I hadn't written my pasted script to the rom, it was simply moving 1 byte forward- giving me 1 byte to complete my script (not happening). Then I was using that for the message offset. Repeat until I needed no more offsets, compile, exit.


If this is my issue, I assume that if I want to copy/paste scripts, I need to compile it with the old crap still in it, then use FSF to replace the offsets and then change what I needed to one at a time- therefore ensuring I have enough space to write my script to memory.


Is this possibly my issue?
Reply With Quote
  #12   Link to this post, but load the entire thread.  
Old September 14th, 2014 (2:30 AM).
daniilS's Avatar
daniilS daniilS is offline
busy trying to do stuff not done yet
 
Join Date: Aug 2013
Age: 23
Gender: Male
Posts: 409
Use dynamic offsets. For example, look at this:

Quote:
'---------------
#org 0x304F18
setvar 0x4060 0x1
msgbox 0x8304F19 MSG_KEEPOPEN '"[player]: Wow, so this is St..."
closeonkeypress
warp 0x1 0x4 0xFF 0x4 0x7
end


'---------
' Strings
'---------
#org 0x304F19
= [player]: Wow, so this is Stone City.[bit more text here]
The text is inserted 1 byte after the script (18&19), thus overwriting all but the setvar command. Make it something like this:

Code:
'---------------
#dynamic 0x800000
#org @icanhazscript
setvar 0x4060 0x1
msgbox @icanhaztext MSG_KEEPOPEN '"[player]: Wow, so this is St..."
closeonkeypress
warp 0x1 0x4 0xFF 0x4 0x7
end


'---------
' Strings
'---------
#org @icanhaztext
= [player]: Wow, so this is Stone City.[bit more text here]
Then when it's compiled, xse will tell you the offset it put @icanhazscript at. Copy/paste that offset into a-map.
__________________
Reply With Quote
  #13   Link to this post, but load the entire thread.  
Old September 14th, 2014 (2:57 PM).
rortik rortik is offline
 
Join Date: Aug 2014
Gender: Female
Posts: 59
Quote:
Originally Posted by daniilS View Post
Use dynamic offsets. For example, look at this:


The text is inserted 1 byte after the script (18&19), thus overwriting all but the setvar command. Make it something like this:

Code:
'---------------
#dynamic 0x800000
#org @icanhazscript
setvar 0x4060 0x1
msgbox @icanhaztext MSG_KEEPOPEN '"[player]: Wow, so this is St..."
closeonkeypress
warp 0x1 0x4 0xFF 0x4 0x7
end


'---------
' Strings
'---------
#org @icanhaztext
= [player]: Wow, so this is Stone City.[bit more text here]
Then when it's compiled, xse will tell you the offset it put @icanhazscript at. Copy/paste that offset into a-map.
Worked perfectly, thanks.
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.