The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Other Battle scripting error..

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 August 17th, 2016 (2:07 AM). Edited August 17th, 2016 by buttjuice.
buttjuice's Avatar
buttjuice buttjuice is offline
 
Join Date: Jul 2016
Gender: Male
Nature: Lax
Posts: 107
I don't know what I'm doing wrong since I'm using practically the same script for all my battles. I changed the ID so that it is for the trainer, and the trainer exists in advanced trainer. Here it is;

Spoiler:
#dynamic 0x800000

#org @start
trainerbattle 0x0 0x004 0x0 @before @after
msgbox @beaten 0x6
release
end

#org @before
= Hey, have you battled my brother yet?

#org @after
= And I thought I was strong..

#org @beaten
= Have you seen a pichu yet?


Once I compile it into the rom, i get this;

Spoiler:
eXtreme Script Editor v1.1.1
-------------------------------------
08-17-2016 5:51:32 AM
-------------------------------------
Opening output: C:\Users\Bryce\Desktop\yo\Pokemon - Fire Red Version (U) (V1.0).gba...
Processing input script...
1 - #DYNAMIC
> lDynamicStart = 0x800000
3 - #ORG
> lNewOffset = 0x822808
4 - (5C) - TRAINERBATTLE [+14]
> bKind = 0x0
> iIndex = 0x4
> iReserved = 0x0
> pChallenge = 0x8822821
> pDefeat = 0x8822849
5 - (0F) - MSGBOX (native) [+8]
> pText = 0x8822868
> bType = 0x6
6 - (6C) - RELEASE [+1]
7 - (02) - END [+1]
9 - #ORG
> lNewOffset = 0x822821
10 - RAW TEXT [+38]
> sText = "Hey, have you battled my brother yet?"
12 - #ORG
> lNewOffset = 0x822849
13 - RAW TEXT [+29]
> sText = "And I thought I was strong.."
15 - #ORG
> lNewOffset = 0x822868
16 - RAW TEXT [+27]
> sText = "Have you seen a pichu yet?"
-------------------------------------
DYNAMIC_OFFSET 1
> sLabel = @start
> lOffset = 0x822808
DYNAMIC_OFFSET 2
> sLabel = @before
> lOffset = 0x822821
DYNAMIC_OFFSET 3
> sLabel = @after
> lOffset = 0x822849
DYNAMIC_OFFSET 4
> sLabel = @beaten
> lOffset = 0x822868
-------------------------------------
Cleaning up...
Closing output...
Finished processing input in 0.004 seconds.


Which to me says it's working, but I guess I could be wrong? I hit copy and get the script offset 822808. Once I hit "open script" in advance map, this is the script it shows me.

Spoiler:
'---------------
#org 0x822808


so uh, whats going on?
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old August 17th, 2016 (3:24 AM).
Obermarschall Obermarschall is offline
 
Join Date: Apr 2016
Gender: Male
Posts: 76
But does it work in your hack?
Usually mine does that too, however it works.
I guess it's the game who gives a static offset once it is compiled and added in the game. Because the dynamic offset searches for the next free space and thats then the result :) Correct me if I'm wrong!
__________________
Pokémon Red Lion:

http://www.pokemonredlion.ga
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old August 17th, 2016 (3:30 AM).
buttjuice's Avatar
buttjuice buttjuice is offline
 
Join Date: Jul 2016
Gender: Male
Nature: Lax
Posts: 107
Quote:
Originally Posted by Obermarschall View Post
But does it work in your hack?
Usually mine does that too, however it works.
I guess it's the game who gives a static offset once it is compiled and added in the game. Because the dynamic offset searches for the next free space and thats then the result :) Correct me if I'm wrong!
I don't believe it works because the scripts that usually work look more like this when I click "open script"
Spoiler:
'---------------
#org 0x1C696D
trainerbattle 0x0 0x2 0x0 0x81C6986 0x81C69A1
msgbox 0x81C69BC MSG_NORMAL '"Hmph.. Maybe my sister will beat y..."
release
end


'---------
' Strings
'---------
#org 0x1C6986
= Have you seen my sister?

#org 0x1C69A1
= Wow, you kicked my butt.

#org 0x1C69BC
= Hmph.. Maybe my sister will beat you!


It seems like it pretty much deletes my script which is so strange. I'll try and see if it works in game, though!
Reply With Quote
  #4   Link to this post, but load the entire thread.  
Old August 17th, 2016 (3:36 AM). Edited August 17th, 2016 by buttjuice.
buttjuice's Avatar
buttjuice buttjuice is offline
 
Join Date: Jul 2016
Gender: Male
Nature: Lax
Posts: 107
Okay, that's extremely weird. I deleted the event, because I noticed that the characters OW sprite wasn't the same as the one in advance map, and she's still there? Must be a complete glitch..but I don't really want to remap..

Good thing I have a backup that was not too far back. Still, wondering how I got that glitch? Has this happened to anybody before?
__________________
Reply With Quote
  #5   Link to this post, but load the entire thread.  
Old August 17th, 2016 (3:45 AM).
Obermarschall Obermarschall is offline
 
Join Date: Apr 2016
Gender: Male
Posts: 76
Ah ok I see your point.
I had this once. Could it be that you compiled it with a copy of your rom? Or a backup version but you accidently opened another rom in advance map?
__________________
Pokémon Red Lion:

http://www.pokemonredlion.ga
Reply With Quote
  #6   Link to this post, but load the entire thread.  
Old August 17th, 2016 (4:07 AM).
buttjuice's Avatar
buttjuice buttjuice is offline
 
Join Date: Jul 2016
Gender: Male
Nature: Lax
Posts: 107
Quote:
Originally Posted by Obermarschall View Post
Ah ok I see your point.
I had this once. Could it be that you compiled it with a copy of your rom? Or a backup version but you accidently opened another rom in advance map?
I wish that was the case :/ but no biggie, im almost caught up. Just hate having to reinsert tiles.
Reply With Quote
  #7   Link to this post, but load the entire thread.  
Old August 17th, 2016 (4:19 AM).
Obermarschall Obermarschall is offline
 
Join Date: Apr 2016
Gender: Male
Posts: 76
Too bad I hope someone else knows a solution to that :/
__________________
Pokémon Red Lion:

http://www.pokemonredlion.ga
Reply With Quote
  #8   Link to this post, but load the entire thread.  
Old August 17th, 2016 (4:54 AM). Edited August 17th, 2016 by buttjuice.
buttjuice's Avatar
buttjuice buttjuice is offline
 
Join Date: Jul 2016
Gender: Male
Nature: Lax
Posts: 107
It seems when I added new tiles that my new scripts were no longer working. Anybody know if they actually correlate?

So, it seems the tiles were overwriting the scripts or something. I had to specify the search between 710000 and 0xFFFFFF when I inserted the tiles, and repointed them and now am all good. :D
__________________
Reply With Quote
  #9   Link to this post, but load the entire thread.  
Old August 22nd, 2016 (6:48 AM).
JakkJames JakkJames is offline
Just basically noobing life
 
Join Date: Aug 2016
Gender: Male
Posts: 1
I had this same problem with scripting. Try doing it like ;
$00822808
Then when you open the script using XSE it should appear as your own custom script. Make sure you put 2 x 0's infront of your offset.
__________________
> Just too lazy to actually finish a ROM hack <
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
Thread Tools

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:10 AM.