Binary Hack Research & DevelopmentGot a well-founded knack with your binary Pokémon hacks? Love reverse-engineering them? For the traditional Pokémon ROM hacker, this is the spot for polling and gathering your ideas, and then implementing them! Share your hypothesis, get ideas from others, and collaborate to create!
I think that's a big problem. Not only the scene of registering Pokemon data is not right, but the data in Pokedex is also wrong when I open it to see the data. For example, I caught Gary's squirtle but in the Pokedex the data of Pidgey is obtained and squirtle is still marked not caught. I challenged another trainer with 2 Pokemon and the same thing happened.
Hi, thank you for your reports. I've now fixed the bugs and will attach the fixes to this post.
Quote:
Originally Posted by DarkPsychic
Thank you so much!!! ^_^
Now I can start my hack....
It will be interesting to see if others use this as well...
Honestly I was just happy to get a reply at all for them requests,
I read the terms of the thread and wasn't even going to post but I thought hell with it midas well try...
I figured what the answers would be, but thought that it would be a good idea to get a programmers opinion on the subjects.
Usually to get a reply at all from the top asm programmers, scripters and graphic artist on here is a shot in the dark. So I do really appreciate it!
I would like to add though that I did try to make the Dawn Stone an its because of the gendercheck that it needs asm... From what I have been told, But you are right GoGo has it but wont release it until he feels the need I guess... sadly >_<
But that can always be worked around....
Again though THANK YOU!!!!!!
You need a donation button >_<
Alright, I'll make a Pokemon Gender check routine for you next time I've got time.
Quote:
Originally Posted by Aruaruu
Yeah that is true. Going through all those item scripts and such is going to be a nightmare if I truly want to do it. XD
Well the idea is to prevent that. I know I filled up my bag with full restores and revives. :D
Hmmm, alright I'll look into it. It's just going to be painful because I'd need to make look-up tables and people need to keep those tables updated and such.
Quote:
Originally Posted by Urobolos
How do you randomize the Trainer ID, because skipping the Oak Intro causes it to default at 000000.
Oh, that's an interesting side effect. Yes, I can change it really easily using my Random number generator. Routine may come sometime tomorrow.
Trainer Pokemon Capturing bug fixes
There were two bugs that needed squashing. The first one was the Pokedex being incorrectly updated. The second one was the pokedex graphic being incorrectly updated. These routines are fixes for specifically trainer capturing, however, they will do no harm at all if you insert them into a ROM without the trainer hack. For those of you with buggy Pokedexes, I suggest you pay some attention, because this is the key to fixing those as well.
I'll attach some technical explanations of how the thing is implemented later, and the cause of the bug.
Fixing the Pokedex update
The Pokedex is incorrectly updated in the case you don't capture the opponent's first Pokemon. This is because the game assumes that the Pokemon captured is in the first slot. There aren't any double wild battles in FireRed, so the case of two Pokemon aren't covered. Not to mention that it was never originally intended for the player to be able to capture trainer Pokemon. If anyone is planning on double wild battles in FireRed, this is how you would fix the capturing system here as well.
How to insert:
Compile and insert into free space the following routine:
Now navigate to 0x2D95E and insert the following byte changes:
Code:
00 00 00 48 00 47 XX XX XX 08
Where XX XX XX is the reverse hex pointer to where you inserted this routine +1
Usage:
There isn't a usage for this hack. It's run internally and is 100% (tested) and safe for wild battles as well.
Fixing the Pokedex graphic
The Pokedex graphic suffered the same issue as the Pokedex update, however the routines aren't connected, so you need to fix both to yield a proper result.
How to insert:
Compile and insert the following routine into free space:
How do you randomize the Trainer ID, because skipping the Oak Intro causes it to default at 000000.
In response to this:
Setting a random Secret and Trainer ID
Requires the insertion of Random Number generator
So apparently TID isn't set if you skip the intro, and I'm sure SID is probably also not set. The following routine will randomize them for you!
To insert:
There's some orange text here, set it to be the pointer to where you inserted the random number generator routine +1 (keep the 0x8 prefix, but don't reverse the pointer).
After you've fixed the pointer, compile and insert into free space.
No rush at all...
I am very appreciative for not only the Bank System I have been trying to get for years but every single contribution you bring to the community ^_^
So I again Thank and applaud you an even the rest of the contributors!!!
Joexv,
Dawn Stone- Effect: Causes Male Kirlia to evolve into Gallade.
Causes Female Snorunt to evolve into Froslass.
Now navigate to 0x2D9DC and insert the following byte changes:
Code:
00 48 00 47 XX XX XX 08
Where XX XX XX is the reverse hex pointer to where you inserted your routine +1.
Usage:
There isn't a usage, it's run interally. I'm about 23% sure this might fix some people's Pokedex image bug as well.
Will these codes fix the graphic problem of expanded pokemon? It shares the same pokemon
__________________
This signature has been disabled.
Scrollbar appears
Please review and fix the issues by reading the signature rules.
You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.
Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
Great work! The current problem was solved but I found another bug. When the old man in Firered taught you how to catch pokemon, the weedle he caught was registered on the Pokedex and it appeared in my team!
Edit: Moreover, when I watched the Teachy TV, as it caught a Jigglypuff, it didn't appear in my team but is registered in the Pokedex and marked as caught!
There's some orange text here, set it to be the pointer to where you inserted the random number generator routine +1 (keep the 0x8 prefix, but don't reverse the pointer).
After you've fixed the pointer, compile and insert into free space.
Will these codes fix the graphic problem of expanded pokemon? It shares the same pokemon
It likely won't. There's a lot of things that go wrong, there's limiting code everywhere. So unless you fix those and keep the data/clean and consistent you're going to get bugs all day :)
Quote:
Originally Posted by jiangzhengwenjzw
Great work! The current problem was solved but I found another bug. When the old man in Firered taught you how to catch pokemon, the weedle he caught was registered on the Pokedex and it appeared in my team!
Edit: Moreover, when I watched the Teachy TV, as it caught a Jigglypuff, it didn't appear in my team but is registered in the Pokedex and marked as caught!
Woah. That's actually a cool side-effect imo (especially since you can change what Pokemon the old guy catches you). But you can overcome with this clever use of the PSS full party swap routine. Basically call it at the start of the techy tv script, then use the PSS again at the end of the script.
Quote:
Originally Posted by Urobolos
It won't compile in HackMew's compiler. It complains for both "mov r2, 0xFFFF" lines that 0xFFFF/65535 is "out of range".
Using the Battle Mode + Remove White Out add-on. Is there any flag or variable to check whether I won or lost the last battle? (particularly for trainers)
I'm trying to branch a script using the 0x1 Trainerbattle byte. With a trainer having a 'victory' message and a 'defeated' message.
The return value from the routine will be in variable 0x8000.
Genderless = 0
Female = 1
Male = 2
Quote:
Originally Posted by urzzz
Hi,
Using the Battle Mode + Remove White Out add-on. Is there any flag or variable to check whether I won or lost the last battle? (particularly for trainers)
I'm trying to branch a script using the 0x1 Trainerbattle byte. With a trainer having a 'victory' message and a 'defeated' message.
Many thanks :-)
RAM location 0x2023E8A will be zero if they lost. Something else if they won.
The return value from the routine will be in variable 0x8000.
Genderless = 0
Female = 1
Male = 2
There isn't. I'll edit the routine to have one shortly.
This is awesome! Upgrading your Party Item Checker Routine
A new var will be set making the game checks If an specified Pokemon holding an specified item in an specified party slot.
Example, A bulbasaur holding Master ball in Party Slot number 1.
__________________
This signature has been disabled.
Scrollbar appears
Please review and fix the issues by reading the signature rules.
You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.
Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
This is awesome! Upgrading your Party Item Checker Routine
A new var will be set making the game checks If an specified Pokemon holding an specified item in an specified party slot.
Example, A bulbasaur holding Master ball in Party Slot number 1.
This is what it's capable of currently. It works with a species argument, and if you don't provide a species it will just look for the item.
This is what it's capable of currently. It works with a species argument, and if you don't provide a species it will just look for the item.
Huh? I dont understand,... Is it possible to your routine?
__________________
This signature has been disabled.
Scrollbar appears
Please review and fix the issues by reading the signature rules.
You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.
Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
Location: If I'm online, it's a safe bet I'm at a computer.
Gender:
Male
Nature: Relaxed
Posts: 984
Quote:
Originally Posted by Lance32497
Huh? I dont understand,... Is it possible to your routine?
Yes, he's saying that the routine is able to check whether a certain species in the party is carrying a specific item. If you give it a species to check for as well as an item, it will check both. If you give it just the item, it'll simply try to find the item.
Yes, he's saying that the routine is able to check whether a certain species in the party is carrying a specific item. If you give it a species to check for as well as an item, it will check both. If you give it just the item, it'll simply try to find the item.
No, That is Not what I mean, I know that routines usage. what I mean is The game will check not only the Specie and Item but also party slot,
example: A bulbasaur holding Master ball in 1st slot only.
__________________
This signature has been disabled.
Scrollbar appears
Please review and fix the issues by reading the signature rules.
You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.
Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
No, That is Not what I mean, I know that routines usage. what I mean is The game will check not only the Specie and Item but also party slot,
example: A bulbasaur holding Master ball in 1st slot only.
I'm telling you that is exactly what it does...
Code:
#dyn 0x740000
#org @start
lock
faceplayer
setvar 0x8000 0xspecies
setvar 0x8001 0xItemID
storevar 0x0 0x8000
storevar 0x1 0x8001
callasm 0x[Where you inserted the above routine +1]
compare 0x8000 0x6
if == jump @notFound
storevar 0x2 0x8000
msgbox @result
callstd MSG_NORMAL
release
end
#org @notFound
msgbox @failed
callstd MSG_NORMAL
release
end
#org @failed
= No match found for /v/h02 with a /v/h03
#org @result
= /v/h02 with a /v/h03 found in /v/h04
#dyn 0x740000
#org @start
lock
faceplayer
setvar 0x8000 0xspecies
setvar 0x8001 0xItemID
storevar 0x0 0x8000
storevar 0x1 0x8001
callasm 0x[Where you inserted the above routine +1]
compare 0x8000 0x6
if == jump @notFound
storevar 0x2 0x8000
msgbox @result
callstd MSG_NORMAL
release
end
#org @notFound
msgbox @failed
callstd MSG_NORMAL
release
end
#org @failed
= No match found for /v/h02 with a /v/h03
#org @result
= /v/h02 with a /v/h03 found in /v/h04
All it does is tell the exact slot of an specified Pokemon holding specified item...
what I really mean is it will check only in 1st slot(lets say) Even though you have bulbasaur holding masterball in 2nd, 3rd, 4th, 5th, or 6th slot, it ignores it because it just needs to check only in 1st.
By the way, how if I have 2 Bulbasaurs holding Masterball in same party, will this not affect the entire script? (thats why I request this routine to add new var that will be set in order for the game to check only in an specific area
: another example:
Scrollbar appears
Please review and fix the issues by reading the signature rules.
You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.
Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
All it does is tell the exact slot of an specified Pokemon holding specified item...
what I really mean is it will check only in 1st slot(lets say) Even though you have bulbasaur holding masterball in 2nd, 3rd, 4th, 5th, or 6th slot, it ignores it because it just needs to check only in 1st.
By the way, how if I have 2 Bulbasaurs holding Masterball in same party, will this not affect the entire script? (thats why I request this routine to add new var that will be set in order for the game to check only in an specific area
: another example:
Hello Lance32497 ,
Now I might be wrong here but
I think "compare 0x8000 0x6" is the slots...
ergo "0x6" is comparing the routine to all 6 slots in the party...
Try changing that to "0x1"...
Now again I am not a scripter and am just starting to really learn my self...
so take my advice with a grain of salt... >_<
Oh an so this post is not off topic,
This is not really a request but more of "is it even possible"
Changing the Battle system to Action Battle System like Mystery Dungeon...
Example would be when you get into a battle, "Player" and challenging Trainer are warped to a simple small map where battle...
Here is the link that gave me the idea, Check it out when you have time FBI Agent an again I would just like to know if this can even be done?
Cause I assume Asm could do it is the only reason I bring it up...
Hello Lance32497 ,
Now I might be wrong here but
I think "compare 0x8000 0x6" is the slots...
ergo "0x6" is comparing the routine to all 6 slots in the party...
Try changing that to "0x1"...
Now again I am not a scripter and am just starting to really learn my self...
so take my advice with a grain of salt... >_<
Oh an so this post is not off topic,
This is not really a request but more of "is it even possible"
Changing the Battle system to Action Battle System like Mystery Dungeon...
Example would be when you get into a battle, "Player" and challenging Trainer are warped to a simple small map where battle...
Here is the link that gave me the idea, Check it out when you have time FBI Agent an again I would just like to know if this can even be done?
Cause I assume Asm could do it is the only reason I bring it up...
Scrollbar appears
Please review and fix the issues by reading the signature rules.
You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.
Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
RAM location 0x2023E8A will be zero if they lost. Something else if they won.
This worked a treat!, copied the byte from RAM to a varaible and branched from there. Thank you very much, and keep up the good work :-)
if I could suggest/request one more thing (if it's feasible?). When you knock out/faint another trainers Pokémon. You are shown the next Pokémon the trainer will be using and also prompted if you want to switch out your current in-play Pokémon.
Is it possible to skip the prompt (without switching) and continue through to the 'go [bufferedpokemon]!' message and continue the battle?
I'm aiming to have a system where the Player is on an even playing field with the AI. Where if the player wanted to switch a pokémon for any reason, they would have to sacrifice a full turn to do so.
Teaching a move in certain pokemon using Script
So this is different in Teaching moves in overworld, instead of choosing who is the pokemon compatible for the move, it will automagically replaces the 1st or the Last move that the pokemon knows.
__________________
This signature has been disabled.
Scrollbar appears
Please review and fix the issues by reading the signature rules.
You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.
Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
This worked a treat!, copied the byte from RAM to a varaible and branched from there. Thank you very much, and keep up the good work :-)
if I could suggest/request one more thing (if it's feasible?). When you knock out/faint another trainers Pokémon. You are shown the next Pokémon the trainer will be using and also prompted if you want to switch out your current in-play Pokémon.
Is it possible to skip the prompt (without switching) and continue through to the 'go [bufferedpokemon]!' message and continue the battle?
I'm aiming to have a system where the Player is on an even playing field with the AI. Where if the player wanted to switch a pokémon for any reason, they would have to sacrifice a full turn to do so.
Many thanks
Either turn set mode on in the options, or put 28 92 87 1D 08 at x1D8727. Be warned that the latter approach has a nasty side effect; scrubs will complain about your hack being "bugged" or that you removed a feature that should've stayed.
Teaching a move in certain pokemon using Script
So this is different in Teaching moves in overworld, instead of choosing who is the pokemon compatible for the move, it will automagically replaces the 1st or the Last move that the pokemon knows.
You just want to overwrite a Pokemon's first move? That sounds like a bad idea. What's wrong with the over-world ingame move tutor?
Quote:
Originally Posted by Lance32497
All it does is tell the exact slot of an specified Pokemon holding specified item...
what I really mean is it will check only in 1st slot(lets say) Even though you have bulbasaur holding masterball in 2nd, 3rd, 4th, 5th, or 6th slot, it ignores it because it just needs to check only in 1st.
By the way, how if I have 2 Bulbasaurs holding Masterball in same party, will this not affect the entire script? (thats why I request this routine to add new var that will be set in order for the game to check only in an specific area
: another example:
Either turn set mode on in the options, or put 28 92 87 1D 08 at x1D8727. Be warned that the latter approach has a nasty side effect; scrubs will complain about your hack being "bugged" or that you removed a feature that should've stayed.
Either turn set mode on in the options, or put 28 92 87 1D 08 at x1D8727. Be warned that the latter approach has a nasty side effect; scrubs will complain about your hack being "bugged" or that you removed a feature that should've stayed.
Completely forgot about the options menu. But yeah the idea was to force the option. Haters gonna hate!