The PokéCommunity Forums

The PokéCommunity Forums (https://www.pokecommunity.com/index.php)
-   Binary Hack Research & Development (https://www.pokecommunity.com/forumdisplay.php?f=195)
-   -   Code ASM Resource Thread (https://www.pokecommunity.com/showthread.php?t=339153)

Trainer 781 January 5th, 2015 1:25 AM

Quote:

Originally Posted by Lance32497 (Post 8565455)

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.

DizzyEgg January 5th, 2015 2:11 AM

I have a simple request. Could anyone implement the toxic orb?

Lance32497 January 5th, 2015 3:57 AM

Quote:

Originally Posted by KDS (Post 8566102)
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?

Trainer 781 January 5th, 2015 5:43 AM

Quote:

Originally Posted by Lance32497 (Post 8566210)
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).

Lance32497 January 5th, 2015 6:24 AM

Quote:

Originally Posted by KDS (Post 8566296)
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.

Trainer 781 January 5th, 2015 6:50 AM

Quote:

Originally Posted by Lance32497 (Post 8566338)
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

Blah January 5th, 2015 7:42 AM

Quote:

Originally Posted by Mickey` (Post 8562757)
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 (Post 8565315)
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 (Post 8565455)
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

Mickey` January 5th, 2015 8:58 AM

Quote:

Originally Posted by FBI agent (Post 8566411)
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 !

Blah January 5th, 2015 9:14 AM

Quote:

Originally Posted by Mickey` (Post 8566492)
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

Mickey` January 5th, 2015 10:09 AM

Quote:

Originally Posted by FBI agent (Post 8566516)
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.

Lance32497 January 5th, 2015 3:34 PM

Quote:

Originally Posted by KDS (Post 8566358)
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

Xencleamas January 7th, 2015 10:26 PM

Quote:

Originally Posted by FBI agent (Post 8547363)

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)?

Joexv January 16th, 2015 6:50 PM

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.

Lance32497 January 16th, 2015 8:52 PM

Quote:

Originally Posted by joexv (Post 8582761)
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?

Joexv January 16th, 2015 8:55 PM

Quote:

Originally Posted by Lance32497 (Post 8582858)
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.

Red John January 19th, 2015 9:15 PM

Can we still contribute here? I have some "Alpha" abilities to contribute

C me January 20th, 2015 4:24 AM

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

Christos January 20th, 2015 5:57 AM

Quote:

Originally Posted by Lone Knight (Post 8586889)
Can we still contribute here? I have some "Alpha" abilities to contribute

Yeah, anyone can contribute.

hihohilton January 27th, 2015 4:39 PM

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

Blah January 28th, 2015 7:30 AM

Quote:

Originally Posted by hihohilton (Post 8596656)
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

hihohilton January 28th, 2015 10:08 PM

Quote:

Originally Posted by FBI agent (Post 8597445)
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

Lance32497 January 29th, 2015 2:51 AM

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?

Kenny1 January 29th, 2015 8:44 AM

Quote:

Originally Posted by Lance32497 (Post 8598475)
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.

Lance32497 January 30th, 2015 6:29 AM

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)

Blah January 30th, 2015 8:58 AM

Quote:

Originally Posted by hihohilton (Post 8598344)
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 (Post 8600107)
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?


All times are GMT -8. The time now is 8:46 AM.


Like our Facebook Page Follow us on Twitter © 2002 - 2018 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.

Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.