The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking > Binary Hack Research & Development
Reload this Page Code ASM Resource Thread

Notices
For all updates, view the main page.

Binary Hack Research & Development Got 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!

Ad Content
Reply
 
Thread Tools
  #426   Link to this post, but load the entire thread.  
Old January 5th, 2015 (1:25 AM).
Trainer 781
Guest
 
Posts: n/a
Quote:
Originally Posted by Lance32497 View Post

Hello ^_^
What is the mystery byte?
There's no item wide lens in Gen3 right? then Should I create new item? then what is next?
It is actually the Hold Effect Item byte or Special Value 1 byte. You should create a new item for this then assign it hold effect item byte.
Reply With Quote
  #427   Link to this post, but load the entire thread.  
Old January 5th, 2015 (2:11 AM).
DizzyEgg's Avatar
DizzyEgg DizzyEgg is offline
 
Join Date: Feb 2014
Location: Poland
Age: 25
Gender: Male
Nature: Quiet
Posts: 794
I have a simple request. Could anyone implement the toxic orb?
__________________
Support Pokeemerald!

Pokeemerald starter pack:
Emerald Expansion
Reply With Quote
  #428   Link to this post, but load the entire thread.  
Old January 5th, 2015 (3:57 AM).
Lance32497's Avatar
Lance32497 Lance32497 is offline
LanceKoijer of Pokemon_Addicts
 
Join Date: Aug 2014
Location: Criscanto town-Ginoa Region xD
Gender: Male
Nature: Adamant
Posts: 792
Quote:
Originally Posted by KDS View Post
It is actually the Hold Effect Item byte or Special Value 1 byte. You should create a new item for this then assign it hold effect item byte.
There are 42 Mystery bytes(in Hex) in rom, so Does it mean I should use the existing Mystery byte or I can expand it so that Ill be having more than 42 Mystery bytes?
__________________
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.
Reply With Quote
  #429   Link to this post, but load the entire thread.  
Old January 5th, 2015 (5:43 AM).
Trainer 781
Guest
 
Posts: n/a
Quote:
Originally Posted by Lance32497 View Post
There are 42 Mystery bytes(in Hex) in rom, so Does it mean I should use the existing Mystery byte or I can expand it so that Ill be having more than 42 Mystery bytes?
Lol, you should use a new number. Just open up an item editor and select your desired item, then in the special value 1 field enter a number that you kept instead of ZZ in the ASM. ( just make sure that no. is different from the prexisting item's special value numbers, you can check locksmitharmy's hold-item effect thread in the R&D forum for reference).
Reply With Quote
  #430   Link to this post, but load the entire thread.  
Old January 5th, 2015 (6:24 AM).
Lance32497's Avatar
Lance32497 Lance32497 is offline
LanceKoijer of Pokemon_Addicts
 
Join Date: Aug 2014
Location: Criscanto town-Ginoa Region xD
Gender: Male
Nature: Adamant
Posts: 792
Quote:
Originally Posted by KDS View Post
Lol, you should use a new number. Just open up an item editor and select your desired item, then in the special value 1 field enter a number that you kept instead of ZZ in the ASM. ( just make sure that no. is different from the prexisting item's special value numbers, you can check locksmitharmy's hold-item effect thread in the R&D forum for reference).
ahhhhm so lets say I used 43, is that right? I read his thread and the rom has 42(in Hex), 43 as my new effect byte.
__________________
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.
Reply With Quote
  #431   Link to this post, but load the entire thread.  
Old January 5th, 2015 (6:50 AM).
Trainer 781
Guest
 
Posts: n/a
Quote:
Originally Posted by Lance32497 View Post
ahhhhm so lets say I used 43, is that right? I read his thread and the rom has 42(in Hex), 43 as my new effect byte.
It is fine. But i prefer keeping larger numbers like 73-76 to be on the safe side
Reply With Quote
  #432   Link to this post, but load the entire thread.  
Old January 5th, 2015 (7:42 AM).
Blah's Avatar
Blah Blah is offline
Free supporter
 
Join Date: Jan 2013
Location: Unknown Island
Gender: Male
Posts: 1,924
Quote:
Originally Posted by Mickey` View Post
Finally, I found the problem !

It works perfectly. Thank you for your work fbi, you're great ! {XD}
Wow, I'm an idiot, sorry. I forgot completely about that haha. Well, at least hopefully it was a good exercise for you :P

Quote:
Originally Posted by Dark Zeta View Post
I was wondering if the battle by turn routine also worked with double battles.
90% sure it does (I haven't tested, but I do believe they use that portion of code in both battle types).

Quote:
Originally Posted by Lance32497 View Post
so this code works?
It does work. I've tested that one quite thoroughly :X


Updates:
- Pokemon custom attacks routine has been updated
- Battle by move (and turn) bug fixes + efficiency updates
- some other small bug fixes that I don't feel like listing (EV berries and stuffs)

I'm currently working on having one time/limited quantity buying for marts right now. I expect that to be done sometime this week, lately I've been lazy and busy :P
__________________
...
Reply With Quote
  #433   Link to this post, but load the entire thread.  
Old January 5th, 2015 (8:58 AM).
Mickey` Mickey` is offline
 
Join Date: May 2011
Posts: 88
Quote:
Originally Posted by FBI agent View Post
Wow, I'm an idiot, sorry. I forgot completely about that haha. Well, at least hopefully it was a good exercise for you :P
Yes, it was :P

I have another question (because nobody replied to my previous post) : does anyone know the offset of the routine which check the Cave byte (Regular/Dark, Flash usable/Dark, Flash unusable) ?

Thanks !
Reply With Quote
  #434   Link to this post, but load the entire thread.  
Old January 5th, 2015 (9:14 AM).
Blah's Avatar
Blah Blah is offline
Free supporter
 
Join Date: Jan 2013
Location: Unknown Island
Gender: Male
Posts: 1,924
Quote:
Originally Posted by Mickey` View Post
Yes, it was :P

I have another question (because nobody replied to my previous post) : does anyone know the offset of the routine which check the Cave byte (Regular/Dark, Flash usable/Dark, Flash unusable) ?

Thanks !
The map is a cave if in RAM location 0x2036E11 is 0x1 and the lightING is determined at 0x2036E13 I believe. There are a lot of routines that check the current map header, so there isn't really a particular routine that I can give you which checks this. I can tell you that the routine for flash is at 0x80C9B2C
__________________
...
Reply With Quote
  #435   Link to this post, but load the entire thread.  
Old January 5th, 2015 (10:09 AM).
Mickey` Mickey` is offline
 
Join Date: May 2011
Posts: 88
Quote:
Originally Posted by FBI agent View Post
The map is a cave if in RAM location 0x2036E11 is 0x1 and the lightING is determined at 0x2036E13 I believe. There are a lot of routines that check the current map header, so there isn't really a particular routine that I can give you which checks this. I can tell you that the routine for flash is at 0x80C9B2C
Thanks a lot ! I'm going to check if I can use these offsets.
Reply With Quote
  #436   Link to this post, but load the entire thread.  
Old January 5th, 2015 (3:34 PM). Edited January 7th, 2015 by Lance32497.
Lance32497's Avatar
Lance32497 Lance32497 is offline
LanceKoijer of Pokemon_Addicts
 
Join Date: Aug 2014
Location: Criscanto town-Ginoa Region xD
Gender: Male
Nature: Adamant
Posts: 792
Quote:
Originally Posted by KDS View Post
It is fine. But i prefer keeping larger numbers like 73-76 to be on the safe side
Ahhh, Thanks ^_^
May I ask, When you tested that, what mystery byte did you used?

EDIT: FBI about your Temporary Deleting the EXP GAIN portion, it doesnt share EVs of a Pokemon I battled before
__________________
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.
Reply With Quote
  #437   Link to this post, but load the entire thread.  
Old January 7th, 2015 (10:26 PM).
Xencleamas's Avatar
Xencleamas Xencleamas is offline
Suddenly lurking in the shadows...
 
Join Date: Feb 2014
Gender: Male
Nature: Adamant
Posts: 456
Quote:
Originally Posted by FBI agent View Post

Temporarily disabling EXP gains from battle



It was brought to my attention by some requesters that for their battle/tournament events they wouldn't want their Pokemon leveling up. This routine disables the exp gains in battle. Note that the player can still use stuff like Rare Candy to level. The fix to that is exactly the same as this, but with slight modifications. I hope you don't give the player a chance to rare candy in battle though or I will go to your hack's thread and severly criticize your lack of common sense :c


How to insert:

Compile and insert the following routine into free space:

Spoiler:

Code:
.text
.align 2
.thumb
.thumb_func

main:
	push {r0-r3}
	mov r0, #0xFF
	lsl r0, r0, #0x1
	add r0, r0, #0x4
	ldr r2, =(0x806E6D0 +1) @checkflag 0xFF *0x2 + 4 = 0x202
	bl linker
	cmp r0, #0x1
	beq skip
	pop {r0-r3}
	cmp r0, #0x64
	beq noCrash
	ldr r0, =(0x8021D24 +1)
	bx r0
	
skip:
	pop {r0-r3}
	
noCrash:
	ldr r1, [r5]
	add r1, #0x53
	ldrb r0, [r1]
	ldr r2, =(0x8021D04 +1)

linker:
	bx r2
		
.align 2
Here's a compiled version:
Code:
0F B4 FF 20 40 00 04 30 07 4A 00 F0 0C F8 01 28 04 D0 0F BC 64 28 02 D0 04 48 00 47 0F BC 29 68 53 31 08 78 02 4A 10 47 D1 E6 06 08 25 1D 02 08 05 1D 02 08


Now navigate to 0x21CFA and insert the following byte changes:
Code:
00 00 00 49 08 47 XX XX XX 08
Where XX XX XX is the reverse hex pointer to where you inserted this routine +1.

Usage:

If flag 0x202 is set, the EXP gains will be disabled. Obviously, to re-enable just clear the flag.
Currently the way I'm doing this is by making the game act like the player's party is already max level, so therefore they don't gain exp :)
Hmm... that's one good thing to implement. If someone has a passion to make Black Tower/White Treehollow in any hack, do you have (or will you make) an independent routine to disable the usage of items (holding is still able)?
__________________
Reply With Quote
  #438   Link to this post, but load the entire thread.  
Old January 16th, 2015 (6:50 PM).
Joexv's Avatar
Joexv Joexv is offline
ManMadeOfGouda
joexv.github.io
 
Join Date: Oct 2012
Location: Oregon
Age: 25
Gender: Male
Nature: Sassy
Posts: 1,035
Ok so I hath a request. Both are for Emerald.
1: a routine that allows you to dynamically change the wild pokemon of the route you are in, via variables or such.
this was already done for Fire Red so I would hope it wouldnt be too terrible to port.

2: a routine that only allows flying/dragon type pokemon to be sent out into battle. Pretty much like the sky battles in x/y. But not quite the same.
__________________
New living flesh vessel who dis?
Reply With Quote
  #439   Link to this post, but load the entire thread.  
Old January 16th, 2015 (8:52 PM).
Lance32497's Avatar
Lance32497 Lance32497 is offline
LanceKoijer of Pokemon_Addicts
 
Join Date: Aug 2014
Location: Criscanto town-Ginoa Region xD
Gender: Male
Nature: Adamant
Posts: 792
Quote:
Originally Posted by joexv View Post
Ok so I hath a request. Both are for Emerald.
1: a routine that allows you to dynamically change the wild pokemon of the route you are in, via variables or such.
this was already done for Fire Red so I would hope it wouldnt be too terrible to port.

2: a routine that only allows flying/dragon type pokemon to be sent out into battle. Pretty much like the sky battles in x/y. But not quite the same.
What?
Is that true?
May I have the name who did that?
__________________
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.
Reply With Quote
  #440   Link to this post, but load the entire thread.  
Old January 16th, 2015 (8:55 PM).
Joexv's Avatar
Joexv Joexv is offline
ManMadeOfGouda
joexv.github.io
 
Join Date: Oct 2012
Location: Oregon
Age: 25
Gender: Male
Nature: Sassy
Posts: 1,035
Quote:
Originally Posted by Lance32497 View Post
What?
Is that true?
May I have the name who did that?
Yes its true.
Jpan.
Its in his hacked engine.
Spoiler:
Special 0x58 – Wild Pokémon Data Switch

Receives Arguments? Yes.
0x8006 = Pointer location
Key
0x0 = loaded with LoadPointer
0x1 = at variable 0x8008 and 0x8009, like special 0x56
0x2 = insert by hand or already there.
--------------------------------
Variable 0x8005 is the location. Same key as special 0x56 variable 0x8007

Returns values? No

Use this to switch the pokémon that appear in the map with a set of fresh new ones. I will briefly explain how the Wild pokémon data is laid out:

Name Bytes Description
Minimum level 1 The minimum level the pokémon appears at
Maximum Level 1 The maximum level the pokémon might appear at. Oddly enough, if this level is smaller than the previous one, the original game switches them both.
Pokémon species 2 The pokémon in-game number.

Repeat this for as long as you need for each type, that is:
 For grass wild data, place 12 pokémon, in order from least rare to most rare. Even if only one pokémon type appears in the entire route, fill all slots with pokémon, copies of the old ones. Any empty slots will lead to angry ??????? at LV 0, and nobody wants that.
There is a percentage table for the chances of appearance here, but I don’t have one, sorry.
 For Surfing area, place 5 pokémon from least rare to rarest. Fill every slot.
 For Tree Area, do the same as the Surfing area.
 For Fishing area, there are 10 pokemon to fill. The first two are caught by the Old Rod, the next three by the Good Rod and the last five by the Super rod

This will allow you to switch dynamically the Wild data on your map for all of the four, using a separate memory bank for each. That means that you can use all different wild data for all four or, if you wish, fill all with the same data. Just remember, you must fill each individually with the respective slot, on at a time, even if they’re equal.
__________________
New living flesh vessel who dis?
Reply With Quote
  #441   Link to this post, but load the entire thread.  
Old January 19th, 2015 (9:15 PM).
Red John's Avatar
Red John Red John is offline
Progressing Assembly hacker
 
Join Date: May 2014
Location: Where ever there is peace and darkness
Gender: Male
Nature: Lonely
Posts: 137
Can we still contribute here? I have some "Alpha" abilities to contribute
__________________
Reply With Quote
  #442   Link to this post, but load the entire thread.  
Old January 20th, 2015 (4:24 AM).
C me's Avatar
C me C me is offline
Creator of Pokemon League Of Legends
 
Join Date: Jan 2014
Age: 26
Gender: Male
Posts: 681
This is for Pokemon Emerald.

Basically to balance strong moves like hyper beam, those moves have a recharge turn where you can't use any moves. This forces the player to use these moves in a more tactical way like behind a substitute or something. As I am thinking of implementing new moves into my hack, some of them will be op and therefore would be unfair to spam every turn.

The 'recharge' effect would not be optimal for what I want to do though, what would seem more optimal is something similar to the disable feature.

I can't post links yet but im sure you know how it works.

The 'cooldown' mechanic would work like this: after a move has been used the next turn it cannot be used again but other moves can. Just like with disable there is a message box saying 'cooldown'which conveniently has the same number of letters as 'disabled' so no need to repoint. If the move is selected a message box will appear saying 'X is on cooldown', x being the move. Unlike the move disable, the number of turns the move would be disabled for isn't random but is preset somewhere in the ROM in a 'disable table' where each move would have a value for the number of turns to be disabled. Multiple moves can be disabled at the same time and if all the moves are disabled then struggle is used, although this would almost never happen because most moves will be disabled for less than 4 turns. This effect would also have to happen for the AI. If possible the disable timer wouldn't stop through status effects and a move will not be enabled after switching the pokemon out,i.e not a temporary status condition.

I know this will require ASM knowledge which I really don't have but I can work my way around a hex editor if that helps.

So I guess my question is how could this be implemented and how difficult is it to implement?

I understand this is a big ask but it's a core feature to my new battle system and I don't think it is impossible to do.

Thank You
Reply With Quote
  #443   Link to this post, but load the entire thread.  
Old January 20th, 2015 (5:57 AM).
Christos's Avatar
Christos Christos is offline
 
Join Date: Feb 2006
Gender: Male
Nature: Serious
Posts: 6,355
Quote:
Originally Posted by Lone Knight View Post
Can we still contribute here? I have some "Alpha" abilities to contribute
Yeah, anyone can contribute.
__________________

A Pokemon that is discriminated!
Support squirtle and make it everyone's favourite.
Reply With Quote
  #444   Link to this post, but load the entire thread.  
Old January 27th, 2015 (4:39 PM). Edited January 27th, 2015 by hihohilton.
hihohilton's Avatar
hihohilton hihohilton is offline
 
Join Date: Feb 2013
Location: a house
Gender: Other
Nature: Sassy
Posts: 9
if possible could you make a code to give gift pokemon custom/hidden abilities that are carried during evolution and also a code that lets you choose which ability a trainers pokemon has
Reply With Quote
  #445   Link to this post, but load the entire thread.  
Old January 28th, 2015 (7:30 AM).
Blah's Avatar
Blah Blah is offline
Free supporter
 
Join Date: Jan 2013
Location: Unknown Island
Gender: Male
Posts: 1,924
Quote:
Originally Posted by hihohilton View Post
if possible could you make a code to give gift pokemon custom/hidden abilities that are carried during evolution and also a code that lets you choose which ability a trainers pokemon has
Hi, the Pokemon with custom attack routine covers "gifted" Pokemon's movesets. I'm not sure what you mean by, "carried during evolution". Perhaps you can specify a little more?

I'll work on a routine to edit trainer Pokemon's stuff soon. Btw, I'm personally open to requests again, though I probably don't want to do anything battle related :x
__________________
...
Reply With Quote
  #446   Link to this post, but load the entire thread.  
Old January 28th, 2015 (10:08 PM).
hihohilton's Avatar
hihohilton hihohilton is offline
 
Join Date: Feb 2013
Location: a house
Gender: Other
Nature: Sassy
Posts: 9
Quote:
Originally Posted by FBI agent View Post
Hi, the Pokemon with custom attack routine covers "gifted" Pokemon's movesets. I'm not sure what you mean by, "carried during evolution". Perhaps you can specify a little more?

I'll work on a routine to edit trainer Pokemon's stuff soon. Btw, I'm personally open to requests again, though I probably don't want to do anything battle related :x
What i mean is that say in your hack you had given bulbasaur overgrow and effect spore but you wanted a special gift one with chlorophyll well would it be possible to do that and by carried by evolution i mean if said bulbasaur was to evolve it would still have chlorophyll
Reply With Quote
  #447   Link to this post, but load the entire thread.  
Old January 29th, 2015 (2:51 AM).
Lance32497's Avatar
Lance32497 Lance32497 is offline
LanceKoijer of Pokemon_Addicts
 
Join Date: Aug 2014
Location: Criscanto town-Ginoa Region xD
Gender: Male
Nature: Adamant
Posts: 792
I googled it so I dont know if it has been done, I have watched a youtube vid about changing player OW in FireRed but the uploader didnt give the code, could you find that out?
__________________
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.
Reply With Quote
  #448   Link to this post, but load the entire thread.  
Old January 29th, 2015 (8:44 AM).
Kenny1's Avatar
Kenny1 Kenny1 is offline
On a break from Rom hacking, to improve other skills.
 
Join Date: Nov 2013
Gender: Male
Posts: 86
Quote:
Originally Posted by Lance32497 View Post
I googled it so I dont know if it has been done, I have watched a youtube vid about changing player OW in FireRed but the uploader didnt give the code, could you find that out?
JPAN did it, I think that is what you're looking for.
__________________
I'm no longer active here, I check back every now and then to see what happens, but that's it. I no longer hack either.
Reply With Quote
  #449   Link to this post, but load the entire thread.  
Old January 30th, 2015 (6:29 AM).
Lance32497's Avatar
Lance32497 Lance32497 is offline
LanceKoijer of Pokemon_Addicts
 
Join Date: Aug 2014
Location: Criscanto town-Ginoa Region xD
Gender: Male
Nature: Adamant
Posts: 792
hello, can anyone here make an evolution method where when pokemon's holding an specific item(like trade holding item) maxed out its happiness, it will evolve..
I think it will just combine Via Happiness and Trade holding item)
__________________
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.
Reply With Quote
  #450   Link to this post, but load the entire thread.  
Old January 30th, 2015 (8:58 AM).
Blah's Avatar
Blah Blah is offline
Free supporter
 
Join Date: Jan 2013
Location: Unknown Island
Gender: Male
Posts: 1,924
Quote:
Originally Posted by hihohilton View Post
What i mean is that say in your hack you had given bulbasaur overgrow and effect spore but you wanted a special gift one with chlorophyll well would it be possible to do that and by carried by evolution i mean if said bulbasaur was to evolve it would still have chlorophyll
I'm pretty sure that's how it works ingame already. The ability bit doesn't change when a Pokemon evolves in FR. 90% sure.

Quote:
Originally Posted by Lance32497 View Post
hello, can anyone here make an evolution method where when pokemon's holding an specific item(like trade holding item) maxed out its happiness, it will evolve..
I think it will just combine Via Happiness and Trade holding item)
Yeah, that's exactly how it would be done. Though these kind of evolutions, which can happen at any time are harder to handle in game. We would have to do the checks kinda frequently. The question becomes, how frequent? Well actually not frequent at all. Just two checks in both scenarios. Pokemon reaches max happiness and Pokemon receives item. So if I was coding this I'd make two different breaks at the Happiness adder, and a second at the give item part.

Was that the information you were looking for? Or did you want me to do one for you?
__________________
...
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 8:46 AM.