The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Other XSE Problem [ANSWERED]

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 May 5th, 2014 (8:39 AM). Edited May 5th, 2014 by AstralComet.
AstralComet's Avatar
AstralComet AstralComet is offline
PKMN-Trainer
 
Join Date: Jan 2014
Gender: Male
Posts: 21
As the Script Help Thread was closed for whatever reason, my only choice is to make a thread. Well, then let's go...

I'm working on a hack called FairyBlue, which is an emerald hack, and I've already made alot of progress. However, this script is not really working and I don't know why.

Spoiler:

#dynamic 0x800000

#org @start
checkflag 0x205
if 0x1 goto @nope
lock
applymovement 0x8 @1
waitmovement 0x0
showpokepic 0xFE 0x0 0x3
msgbox @one 0x6
callstd 0x4
closeonkeypress
hidepokepic
trainerbattle 0x3 0xA 0x0 @ze
showpokepic 0xFE 0x0 0x3
msgbox @two 0x6
callstd 0x4
closeonkeypress
hidepokepic
applymovement 0x8 @2
hidesprite 0x8
waitmovement 0x0
setflag 0x205
release
end

#org @nope
release
end

#org @one
= ???: Hey!\pGet out of my way!

#org @ze
= How...

#org @two
= My name is Max.\pMy parents were kidnapped a few\nyears ago, and now I am on a\ljourney to find the persons which\lkidnapped my parents. We'll meet\lagain.

#org @1
#raw 0xA 0xA 0xA 0xA 0xA 0xA 0xA 0xA 0x8 0x8 0xFE

#org @2
#raw 0xB 0x8 0x8 0xA 0xA 0xA 0xA 0xA 0xA 0xA 0xFE


Problems:
-Once a text is closed, it repeats one time. After that, the script continues. (this applies for both texts)
-The second applymovement doesn't works, it just skips to the hidesprite command.

I'd be happy if somebody could help me. Please, I really need help with it.

-AstralComet

P.S.: The showpokepic command is used to show a mugshot of the character.
__________________
To see a preview of my hack, click here: http://neoastralcomet.deviantart.com/art/Pokemon-Fairy-Blue-First-Screenshots-452441269

Hacks I'm working on:

Hacks I support:


Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old May 5th, 2014 (9:20 AM). Edited May 5th, 2014 by Orifiel.
Orifiel's Avatar
Orifiel Orifiel is offline
Priestess
 
Join Date: Aug 2013
Location: Tokyo, Japan
Gender: Female
Nature: Lonely
Posts: 413
Code:
#dynamic 0x800000

#org @start
checkflag 0x205
if 0x1 goto @nope
lock
applymovement 0x8 @1
waitmovement 0x0
showpokepic 0xFE 0x0 0x3
msgbox @one 0x6
closeonkeypress
hidepokepic
trainerbattle 0x3 0xA 0x0 @before @ze 
showpokepic 0xFE 0x0 0x3
msgbox @two 0x6
closeonkeypress
hidepokepic
applymovement 0x8 @2
waitmovement 0x0
hidesprite 0x8
setflag 0x205
release
end

#org @nope
release
end

#org @one
= ???: Hey!\pGet out of my way!

#org @before
= Let's battle!

#org @ze
= How...

#org @two
= My name is Max.\pMy parents were kidnapped a few\nyears ago, and now I  am on a\ljourney to find the persons which\lkidnapped my parents. We'll  meet\lagain.

#org @1
#raw 0xA 
#raw 0xA 
#raw 0xA 
#raw 0xA 
#raw 0xA 
#raw 0xA 
#raw 0xA 
#raw 0xA 
#raw 0x8 
#raw 0x8 
#raw 0xFE

#org @2
#raw 0xB 
#raw 0x8 
#raw 0x8 
#raw 0xA 
#raw 0xA 
#raw 0xA 
#raw 0xA 
#raw 0xA 
#raw 0xA 
#raw 0xA 
#raw 0xFE


I tried to fix your script, and this what happened. Your movements (#raw) were typed wrongly. I don't know where you got that idea (#raw 0xB 0x8...) And the trainer battle read this from diegoisawesome's tut under spoiler on how it works.
Spoiler:

Trainerbattle 0x0

Just a simple trainerbattle script:
Code:
#dynamic 0x800000  

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

#org @before 
= Go, all my PIKACHUs! 
 
#org @after 
= Nooo! My PIKACHUs!!!!!  

#org @beaten 
= My PIKACHUs can be used to\ncharge my Nintendo DS Lite.


trainerbattle
is a battle with a trainer. trainerbattle is great because the game keeps track of whether you have beaten a trainer or not. In this script, we have no need for a checkflag/setflag situation.
Now to explaining these values after the trainerbattle. These are:
trainerbattle 0x0 [Type of battle] 0x001 [Trainer ID] 0x0 [Reserved Byte (normally 0x0)] @before [Pointer to Message When Seen] @after [Pointer to Winning Message]
I guess I'll explain the type of battle. This byte determines whether it's a double battle, Gym Leader Battle, or another type. A normal trainerbattle is 0x0. The trainer will "see you", then go to the beginning message, then the battle, and then goes to the message when you win.
Now we'll move onto the Trainer ID. This is the ID of a trainer that's found in PET. For example, Brock can be found with with a Trainer ID of 0x19E, and Blaine can be found with 0x1A3.
Now, there are two pointers, @before & @after. I've labeled these to help display what they are used for. The first pointer, @before, shows the pointer to the message displayed before the battle.
Now onto @after. It's the pointer to the message after the battle, obviously! This message appears while we are still in the battle itself. Remember the colors that were mentioned towards the beginning of this tutorial? Well, we can use colors with this too! They're different, though. Sadly, I don't have a list for those values.

Now, if I were to test it in a ROM, what would happen after the trainerbattle? Nothing. The script ends. So why do I have a msgbox after it?
Remember how I talked about trainerbattle keeping track of whether you have beaten them or not? Well, once you beat the trainer, the trainerbattle will be skipped, so when you speak to them after beating them in a battle, it'll be treated like a normal message script.
Wait! Why don't I have a lock and faceplayer after the trainerbattle? The reason is that once you have beaten that trainer, trainerbattle will also act as the lock/faceplayer combo, and you don't have to worry about them in this script.
That's the scripting side of this command done. Now the A-Map side. Now compile this script, and test it in a ROM. Did it work like a normal in-game trainer battle? I bet your answer is no.
You'll need to fill in these boxes:


Also the @ze, I assumed it's the after battle message so I added the @before message it's like when someone spots you like a normal trainer or talks before battle starts. It was just an example, you can change it.
__________________
~ Pair | Character | Previously L96 ~
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old May 5th, 2014 (9:58 AM).
Spherical Ice's Avatar
Spherical Ice Spherical Ice is online now
 
Join Date: Nov 2007
Location: Leicester, UK
Age: 25
Posts: 5,251
Actually, it is perfectly fine to write all of the movements on one line. The rest of your amendments fix it though, regardless.
__________________
Reply With Quote
  #4   Link to this post, but load the entire thread.  
Old May 6th, 2014 (8:10 AM).
AstralComet's Avatar
AstralComet AstralComet is offline
PKMN-Trainer
 
Join Date: Jan 2014
Gender: Male
Posts: 21
Well, the applymovement error was pretty stupid, and it is now fixed. However, I do not want that extra message to show up. Is there a way to avoid that message? This is really confusing as it worked several times for me with other scripts without having to use that ugly extra message. =\
__________________
To see a preview of my hack, click here: http://neoastralcomet.deviantart.com/art/Pokemon-Fairy-Blue-First-Screenshots-452441269

Hacks I'm working on:

Hacks I support:


Reply With Quote
  #5   Link to this post, but load the entire thread.  
Old May 6th, 2014 (8:33 AM).
Christos's Avatar
Christos Christos is offline
 
Join Date: Feb 2006
Gender: Male
Nature: Serious
Posts: 6,355
Quote:
Originally Posted by AstralComet View Post
Well, the applymovement error was pretty stupid, and it is now fixed. However, I do not want that extra message to show up. Is there a way to avoid that message? This is really confusing as it worked several times for me with other scripts without having to use that ugly extra message. =\
Do you mean each text is repeated twice? Did you see Orifiel's corrections?

msgbox @one 0x6
callstd 0x4


This is what you're doing wrong. The text box's type is defined by the 0x6, and by writing callstd 0x4, it's like you're using the same text again with a text box type #4 after the #6 one. You should use closeonkeypress instead, if you actually want to hide the text box after the text shows up.
__________________

A Pokemon that is discriminated!
Support squirtle and make it everyone's favourite.
Reply With Quote
  #6   Link to this post, but load the entire thread.  
Old May 6th, 2014 (9:20 AM).
AstralComet's Avatar
AstralComet AstralComet is offline
PKMN-Trainer
 
Join Date: Jan 2014
Gender: Male
Posts: 21
Quote:
Originally Posted by Spheal View Post
Do you mean each text is repeated twice? Did you see Orifiel's corrections?

msgbox @one 0x6
callstd 0x4


This is what you're doing wrong. The text box's type is defined by the 0x6, and by writing callstd 0x4, it's like you're using the same text again with a text box type #4 after the #6 one. You should use closeonkeypress instead, if you actually want to hide the text box after the text shows up.
Thank you for the great help. Sadly, the closeonkeypress command screwed up the script as it was used twice in a row (as it is also used for the showpokepic command). However, I used callstd 0x6 and everything worked perfectly. I just used the wrong callstd. I feel stupid xD

Whatever, thank you for the help!
__________________
To see a preview of my hack, click here: http://neoastralcomet.deviantart.com/art/Pokemon-Fairy-Blue-First-Screenshots-452441269

Hacks I'm working on:

Hacks I support:


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