Code ASM Resource Thread Page 15

Started by esperance September 19th, 2014 3:13 PM
  • 456460 views
  • 1607 replies

Lance32497

LanceKoijer of Pokemon_Addicts

Male
Criscanto town-Ginoa Region xD
Seen August 13th, 2017
Posted January 1st, 2017
793 posts
8.1 Years
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?
Move tutor is limited. Then, as I have said, it will be taught automagically, like in Daycare, it replaces the last move learned by the pokemon.
Alright. This is a minor edit of the existing code. Use 0x8004 for slot number. Everything else is the same.
Spoiler:

.text
.align 2
.thumb
.thumb_func

main:
	push {r0-r6, lr}
	ldr r5, =(0x20370C0)
	ldrb r5, [r5]
	mov r0, #0x64
	mul r0, r0, r5
	mov r1, r0
	ldr r0, =(0x2024284)
	add r0, r0, r1
	mov r4, r0
	mov r1, #0xC
	ldr r2, =(0x803FBE8 +1)
	bl linker
	ldr r3, .ITEM
	ldrb r3, [r3]
	cmp r0, r3
	beq PokeMatch

none:
	ldr r0, .MON
	mov r1, #0x6
	strb r1, [r0]
	pop {r0-r6, pc}	

	

PokeMatch:
	ldr r4, .MON
	ldrh r4, [r4]
	cmp r4, #0x0
	beq found
	ldr r2, =(0x803FBE8 +1)
	mov r0, r4
	mov r1, #0xB
	bl linker
	ldr r4, .MON
	ldrh r4, [r4]
	cmp r0, r4
	bne none

found:
	ldr r2, .MON
	strb r5, [r2]
	pop {r0-r6, pc}
	
	
linker:
	bx r2
	
	
.align 2

.ITEM:
	.word 0x020270B8 + (0x8001 * 2) @ITEM ID
.MON:
	.word 0x020270B8 + (0x8000 *2) @PKMN SPECIES
Nice one! I really like you! Thanks for this :)
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.

MrDollSteak

Formerly known as 11bayerf1

Age 27
Male
Hong Kong
Seen 3 Days Ago
Posted 1 Week Ago
859 posts
13.8 Years
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.
That sounds like a game breaking bug. 0/10 would not use.

FBI

Free supporter

Male
Unknown Island
Seen 6 Days Ago
Posted July 15th, 2022
1,926 posts
9.7 Years
Finally, thanks to Jambo, the routine is finished
Changing textboxes depending on var
This uses variable 40F0, but it can be changed(probably :P)

First compile this routine:
Spoiler:
.text
.thumb
.thumb_func
.align 2

Main:
push {r0}
ldr r0, .Var
bl Decrypt
ldrh r0, [r0, #0x0]
ldr r1, .Table
lsl r0, r0, #0x2
ldr r1, [r1, r0]
pop {r0}
mov r2, #0xA0
lsl r2, r2, #0x2
ldr r3, .Ret
bx r3

Decrypt:
ldr r1, .Decrypt
bx r1

.align 2
.Var
	.word 0x000040F0

.Decrypt:
	.word 0x0806E455

.Table
 	.word 0xDEADBEEF

.Ret:
	.word 0x0814FECF
Compiled:
Spoiler:
01 B4 07 48 00 F0 09 F8 00 88 07 49 80 00 09 58 01 BC A0 22 92 00 05 4B 18 47 02 49 08 47 C0 46 F0 40 00 00 55 E4 06 08 EF BE AD 08 CF FE 14 08

Change DEADBEEF to the offset of this table(add the extra images):
C8 F1 41 08 0C 0B 47 08


Lastly the hook:
Spoiler:
00 49 08 47 XX XX XX 08
Replace XX XX XX with the pointer to your routine +1
Insert this at 0x0814FEC4


Usage:
You would setvar 0x40F0 to the number of your choice, 0x0 would be the first, 0x1 second etc.
Great work, I'll add it to the first post soon

Move tutor is limited. Then, as I have said, it will be taught automagically, like in Daycare, it replaces the last move learned by the pokemon.

Nice one! I really like you! Thanks for this :)
You just expand the bit map. Read the thread about expanding TMs, it talks about the move tutor stuff.

In the past, I attempted forme change (using my own silent evolution which works the same except it would handle changing Rotom's attacks and handling PP etc.). I used the special 0x9F that allowed the party selection screen (correct me if I'm wrong).

This, however, causes problems (like losing control of your character and gaining control of an NPC) when transitioning between different maps that don't have warps (town -> route). I know it's the special because I used in-game scripts that used the same special. I also used the scripts without the special and both the in-game and my scripts worked. I also used the scripts and transitioned through a warp or didn't transition and there was no problem.

FBI, I saw previously you advised using this special and I remembered what happened. Have you had similar problems with this? (This is a problem when trying to use the "script from bag" but that's also not the cause of the glitch).

Also, 2 suggestions for ASM. Scripts that read the EVs and IVs of individual mons in the party. I had coding for this but it used JPAN's decryption, I ran into that special 0x9F problem, and I don't have it on me :(
I personally have not had any problems with special 0x9F. I also suggest that you use the game's own decryption function. I'll look into making a routine which reads EVs/IVs.

That sounds like a game breaking bug. 0/10 would not use.
go finish ur rombase

Hello, I have a quick question before I start using any of these wonderful ASM hacks. For anything that uses a flag or variable, if I have this hack in my ROM hack do I need to alter any offsets or are they all compatible without needing to edit anything?
Hi. My advice is don't use that. There's 255 safe flags in the game + the game flags. There's also 238 safe to use variables + the ingame variables and temporary variables. If you use these, you will 100% not run out of variables/flags unless your ROM is a 256MB mega hack. Also Jambo made the 0x8000 - 0x8016 variables saved, which are temporary and don't really need saving (not that it matters). Basically he uses JPAN's memory save blocks and saves the variables/flags onto there. So you would need to re-point the PSS, Roaming, seen counter, berry system and the bag restoration/deletion routines. The rest work regardless.

But like I said, there really isn't a need to expand the variables/flags. Fire Red uses plenty for it's original story, and there are a lot of "spares" as I've mentioned. Utilizing those you surely won't run out unless you're scripting/organizing very poorly.
...
Wherever
Seen April 18th, 2015
Posted December 19th, 2014
3 posts
8.5 Years
Your works are insanely great, I like them all, thanks!

Here are some request
Custom Runtime Trainer
Simply read every data from RAM to built a custom trainer via script, very useful when doing something like battle tower

The ability to adjust the chance to meet a shiny pokemon
Double (or adjust by using percentage) the original chance when set, or having a Shiny Charm inside your bag.

Lance32497

LanceKoijer of Pokemon_Addicts

Male
Criscanto town-Ginoa Region xD
Seen August 13th, 2017
Posted January 1st, 2017
793 posts
8.1 Years
Aaahmmm....
I dont know how to expand Move tutor, but its ok ^_^ I should throw my request in garbage and think of an implementation that fits on your taste.
Updating Daycare System
This routine will let you put 6 Pokemons in a daycare, making the first 2 Pokemon you put in a daycare will be able to gain experience and to produce an egg, and the remaining 4 pokemon will grow only.
Static Level for a Pokemon
It will be useful for events, like a disease spreads out that causes an Specific pokemon not to grow or gain experience and EV's...
in short, making Magikarp,example, to be permanent level 0
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.

Kenny1

On a break from Rom hacking, to improve other skills.

Male
Seen November 6th, 2017
Posted January 11th, 2017
86 posts
8.9 Years
If this is not ASM just tell me i'm being stupid, but is there an ASM code that you can use to help you change the HP bars? I want to change mine and ive discovered nothing yet :S
Wouldn't this be graphics? Unless you're wanting to change them when an event happens?
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.

Lance32497

LanceKoijer of Pokemon_Addicts

Male
Criscanto town-Ginoa Region xD
Seen August 13th, 2017
Posted January 1st, 2017
793 posts
8.1 Years
Setting Gender for A Trainers Pokemon
All it does is set a var for into whatever slot we want(0-5), then set a var again for gender(0-2) or whatever method you will use, The problem that I think this implementation will encounter is for when we attempt to set the 6 slot even thought it only has 4 Pokemon, but we can prevent 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.

FBI

Free supporter

Male
Unknown Island
Seen 6 Days Ago
Posted July 15th, 2022
1,926 posts
9.7 Years

Getting IVs and EVs



The routines are very similar so I ended up just combining the two routines into one. Basically given a slot number of a Pokemon in 0x8004, the routines will return the EVs or IVs, respectively, into the vars 0x8005-0x800A with 0x8003 as the IV/EV switch.


How to insert:

Compile and insert the following routine into free space:

Spoiler:

.text
.align 2
.thumb
.thumb_func

main:
	push {r0-r5, lr}
	mov r4, #0x0
	
loop:
	cmp r4, #0x6
	bhi end
	ldr r0, =(0x20370C0) @var 0x8004 = slot number
	ldrh r0, [r0]
	mov r1, #0x64
	mul r1, r1, r0
	ldr r0, =(0x2024284)
	add r0, r0, r1
	ldr r3, =(0x20370BE)
	ldrh r3, [r3]
	cmp r3, #0x0
	beq EVs
	add r1, r1, #0x27 @IV
	b continue
	
EVs:
	add r1, r1, #0x1A
	
continue:
	ldr r2, =(0x803FBE8 +1)
	bl linker
	mov r1, r0
	@get var
	ldr r2, =(0x20370C2) @using vars 0x8005-0x800A
	lsl r0, r4, #0x1
	add r2, r2, r0
	strh r1, [r2] @store IV in var
	add r4, r4, #0x1
	b loop

linker:
	bx r2
	
end:
	pop {r0-r5, pc}

.align 2



Usage:
setvar 0x8003 0x[anything except 0 = IV, 0 = EV]
setvar 0x8004 0x[slot number 0 to 5]
callasm 0x[this routine +1]

The variables will be:
0x8005: HP IV/EV
0x8006: Atk IV/EV
0x8007: Def IV/EV
0x8008: Spd IV/EV
0x8009: S.atk IV/EV
0x800A: S.def IV/EV
...

FBI

Free supporter

Male
Unknown Island
Seen 6 Days Ago
Posted July 15th, 2022
1,926 posts
9.7 Years
If this is not ASM just tell me i'm being stupid, but is there an ASM code that you can use to help you change the HP bars? I want to change mine and ive discovered nothing yet :S
Hi this is just simple graphics hacking. I'm 98% sure that the HP boxes are in UNLZ, it's hacked the same as most other graphics, except there are limitations to size and position due to where the animations take place iirc. But, yes, there isn't the need for ASM hacks to edit this.

Your works are insanely great, I like them all, thanks!

Here are some request
Custom Runtime Trainer
Simply read every data from RAM to built a custom trainer via script, very useful when doing something like battle tower

The ability to adjust the chance to meet a shiny pokemon
Double (or adjust by using percentage) the original chance when set, or having a Shiny Charm inside your bag.
I will work on adjusting shiny encounters. I don't really understand what you mean by "custom runtime trainer".

Aaahmmm....
I dont know how to expand Move tutor, but its ok ^_^ I should throw my request in garbage and think of an implementation that fits on your taste.
Updating Daycare System
This routine will let you put 6 Pokemons in a daycare, making the first 2 Pokemon you put in a daycare will be able to gain experience and to produce an egg, and the remaining 4 pokemon will grow only.
Static Level for a Pokemon
It will be useful for events, like a disease spreads out that causes an Specific pokemon not to grow or gain experience and EV's...
in short, making Magikarp,example, to be permanent level 0
I said I wasn't going to finish the day care system a week ago-ish for imo valid reasons. Static lvls for Pokemon is too hack-specific for me to work on. Not to mention I think it ruins game play.

Hmm... Interesting. Have you tried using it from an item script using Darthatron's item hack? (I know that's a shot in the dark asking that, but that's when I encountered the bug).

At the time, I didn't know there was a built-in decryption function.

Thank you and thank you for this thread. It has inspired me to restart rom hacking. I wish you the best of luck in your future endeavors (and routines).
Admittedly, I haven't used it from an item script. I've used it in overworld plenty of times in different occasions and it all seems to work. Make sure you have a "waitstate" or "waitspecial" right after the special is used. I believe it's set as a task in game, so the rest of the script/routine runs before the special finishes if you don't have those lines following.

Setting Gender for A Trainers Pokemon
All it does is set a var for into whatever slot we want(0-5), then set a var again for gender(0-2) or whatever method you will use, The problem that I think this implementation will encounter is for when we attempt to set the 6 slot even thought it only has 4 Pokemon, but we can prevent that.
Setting gender is actually a harder problem than what you may be lead to believe. It requires mathematical manipulation of the last byte of a Pokemon's PID. This byte ends up controlling to a degree not just gender, but ability, nature and the s.def speed IV as well. Setting "gender" while still hoping to keep randomized stats is actually the same problem as the Shiny Pokemon problem (which I actually solved :P). Why do you want to set gender to enemy Pokemon? It seems like you're just suggesting random things for the sake of making suggestions :/


Kinda announcement:
I'm probably going to stop taking requests by the end of this week. When I started this thread I used to know next to nothing and it was quite fun to discover things, make algorithms and learn stuff all while helping out the community. I've felt some growth as a hacker and the experience was very nice. Recently, I've been a little tempted to make my own hack (that and I'll be helping someone else with theirs as well), so I won't have the time to be dedicating to fulfill requests anymore. Feel free to keep posting them though, if I see something that looks cool, I'll likely come up with an implementation :)

But yeah, thank you so much for the requests and fun these past couple of weeks. It was a blast!
...

Smeargle

Illusory

Non-binary
In the fabric of life
Seen October 21st, 2015
Posted December 26th, 2014
160 posts
9.9 Years
Hey man, love everything you've done so far. You've done a great service to the hacking community along with everyone else who has posted their ASMagic codes here.

That being said now that I've buttered you up :P... Pokemon XY and ORAS have a feature called Consecutive fishing or chain fishing. Basically once the player hooks a pokemon it starts a counter at the end of the battle that goes up by one every consecutive time the player encounters the same pokemon. It greatly increases the chance of the same pokemon getting hooked as well, however if the player encounters a different pokemon or moves from the tile he was fishing on the counter goes back down to 0.
The higher the counter goes the greater the chance of the pokemon being shiny.

If I may request one thing before you stop mass producing these magic codes, It would be this.
However, if it is easier I believe it would be more rewarding if the pokemons level raised as the counter did instead of the pokemon becoming shiny. Or perhaps having the ability to hook it to your wild battle special attacks.

Here are some links:
http://bulbapedia.bulbagarden.net/wiki/Fishing
http://www.serebii.net/xy/fishchain.shtml

Finally, in XY it keeps record of your highest score. If you manage to beat the man who teaches you about this trick record he will reward you with an item.

Now, I'm sure that was a tall order, but if your looking for final requests figured I'd give something I've been looking for.
Thanks either way~
Male
Seen July 14th, 2020
Posted September 14th, 2015
215 posts
10.1 Years
Hi this is just simple graphics hacking. I'm 98% sure that the HP boxes are in UNLZ, it's hacked the same as most other graphics, except there are limitations to size and position due to where the animations take place iirc. But, yes, there isn't the need for ASM hacks to edit this.
Hey do you know if there is a guide helping me do this? Ive been trying forever!

Lance32497

LanceKoijer of Pokemon_Addicts

Male
Criscanto town-Ginoa Region xD
Seen August 13th, 2017
Posted January 1st, 2017
793 posts
8.1 Years
Setting gender is actually a harder problem than what you may be lead to believe. It requires mathematical manipulation of the last byte of a Pokemon's PID. This byte ends up controlling to a degree not just gender, but ability, nature and the s.def speed IV as well. Setting "gender" while still hoping to keep randomized stats is actually the same problem as the Shiny Pokemon problem (which I actually solved :P). Why do you want to set gender to enemy Pokemon? It seems like you're just suggesting random things for the sake of making suggestions :/
Sorry, I just want to make a trainer who's his gender is same to his pokemon, sorry for my damn question
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.

FBI

Free supporter

Male
Unknown Island
Seen 6 Days Ago
Posted July 15th, 2022
1,926 posts
9.7 Years
Hey man, love everything you've done so far. You've done a great service to the hacking community along with everyone else who has posted their ASMagic codes here.

That being said now that I've buttered you up :P... Pokemon XY and ORAS have a feature called Consecutive fishing or chain fishing. Basically once the player hooks a pokemon it starts a counter at the end of the battle that goes up by one every consecutive time the player encounters the same pokemon. It greatly increases the chance of the same pokemon getting hooked as well, however if the player encounters a different pokemon or moves from the tile he was fishing on the counter goes back down to 0.
The higher the counter goes the greater the chance of the pokemon being shiny.

If I may request one thing before you stop mass producing these magic codes, It would be this.
However, if it is easier I believe it would be more rewarding if the pokemons level raised as the counter did instead of the pokemon becoming shiny. Or perhaps having the ability to hook it to your wild battle special attacks.

Here are some links:
http://bulbapedia.bulbagarden.net/wiki/Fishing
http://www.serebii.net/xy/fishchain.shtml

Finally, in XY it keeps record of your highest score. If you manage to beat the man who teaches you about this trick record he will reward you with an item.

Now, I'm sure that was a tall order, but if your looking for final requests figured I'd give something I've been looking for.
Thanks either way~
Well, since you buttered me up...I'll accept this request. Nahh, jk. I actually didn't know about this kinda feature but it seems fun. I love doing ports and "systems" and stuff because those can be challenging to implement as well as rewarding to finish. Anyways, your request is accepted :P

Hey do you know if there is a guide helping me do this? Ive been trying forever!
Hi, I'm 99% sure it's just an image in UNLZ. http://www.pokecommunity.com/showthread.php?t=129606
Changing the size and the position of it may be difficult, but the image change is kinda easy. Anyways, if you're not sure if something belongs here, it's fine to ask in the simple questions thread first before bringing it here. Not that I really mind, but it keeps the thread organised :)

Sorry, I just want to make a trainer who's his gender is same to his pokemon, sorry for my damn question
It seems I may have offended you. Let me explain why I think making Pokemon the same gender as their trainer is not worth the effort. Before that, I want to point out that I said that I wouldn't make routines that didn't interest me or that not more and a few people can use. I want to make relevant routines which will stay relevant. I don't want to make a routine that'll be used in someone's hack once or twice and that's it. It's just not worth the effort or the work.

Think about it for a second. Make the trainer with the same gender as his Pokemon? I just don't see the point. Things like nicknaming, I've done for you because I can see SOME people using it. However, gender setting? Honestly, who cares about gender unless you were going to make a complete anime/mange remake with genders for the MC's Pokemon. Mostly, this routine is a little hard and the reward is null. Only you would use it since its creation, and I'm not writing routines for you, I'm writing them for everyone's uses and my enjoyment.
...

Ephraim225

Freaky Frillish Guy

Male
In America
Seen December 2nd, 2020
Posted December 3rd, 2019
161 posts
9.3 Years
Oh darn. I should've posted my request sooner. Guess I'll do it anyways. I have a request and something to contribute actually; these are both for Emerald.

My contribution is this:

Evolution based on contest condition
Spoiler:
Assemble this and insert it in free space, noting the offset:
Spoiler:
.text
.align 2
.thumb
.thumb_func

main:

push {r0-r7}
add r0, r6, r7
lsl r0, r0, #0x3
add r0, r2, r0
add r3, r0, r3
ldrh r2, [r3, #0x2]
mov r0, r8

mov r1, #0x16 /* Stat we're checking */
bl decrypt
mov r11, r0
pop {r0-r7}
mov r1, r11
mov r4, r1

mov r1, #0x16 /* Checks coolness */
bl decrypt
mov r11, r0
pop {r0-r7}
mov r1, r11
cmp r4, r1
ble exit


mov r1, #0x17 /* Checks beauty */
bl decrypt
mov r11, r0
pop {r0-r7}
mov r1, r11
cmp r4, r1
ble exit


mov r1, #0x18 /* Checks cuteness */
bl decrypt
mov r11, r0
pop {r0-r7}
mov r1, r11
cmp r4, r1
ble exit


mov r1, #0x21 /* Checks smartness */
bl decrypt
mov r11, r0
pop {r0-r7}
mov r1, r11
cmp r4, r1
ble exit


mov r1, #0x2F /* Checks toughness */
bl decrypt
mov r11, r0
pop {r0-r7}
mov r1, r11
cmp r4, r1
ble exit


true:
mov r9, r3
pop {r0-r7}
mov r1, r9
ldr r0, levelcheckloc
bx r0

decrypt:
push {r0-r7}
ldr r2, decryptpoke
bx r2

exit:
pop {r0-r7}
ldr r0, noevo
bx r0

.align
levelcheckloc: .word 0x0806D32F
noevo: .word 0x0806D333
decryptpoke: .word 0x0806A519


This is an evolution method. A tutorial for inserting those is found right here. Now what this method does is it checks the Pokemon's level (which you set in G3HS or whichever program you use) and if it's high enough, it then checks to see if the given contest stat is the highest, and if it is, your Pokemon evolves. Basically it's sort of like Feebas but better, and you can use it for the other contest stats too. For example, to test this I made Eevee evolve into each of its five possible forms at level 26, with each form requiring a different contest stat to be the highest. Nothing happens if there is a tie or all stats are at zero.

To pick a contest stat, change the red text to one of the following:
Spoiler:
0x16 - Coolness
0x17 - Beauty
0x18 - Cuteness
0x21 - Smartness
0x2F - Toughness


There's one last step however: Before you assemble, you need to delete the colored section that checks the stat your Pokemon needs to evolve. So if your Pokemon needs Beauty to be the highest, delete the blue section. If you don't the code won't work, because it would then compare the contest stat you're using to itself, which would be a tie, so nothing would happen.

In case that's too confusing, here are already-assembled versions of the code for each stat:

Evolve if Coolness is highest:
Spoiler:
FF B4 F0 19 C0 00 10 18 C3 18 5A 88 40 46 16 21 00 F0 29 F8 83 46 FF BC 59 46 0C 1C 17 21 00 F0 22 F8 83 46 FF BC 59 46 8C 42 1F DD 18 21 00 F0 1A F8 83 46 FF BC 59 46 8C 42 17 DD 21 21 00 F0 12 F8 83 46 FF BC 59 46 8C 42 0F DD 2F 21 00 F0 0A F8 83 46 FF BC 59 46 8C 42 07 DD 99 46 FF BC 49 46 04 48 00 47 FF B4 04 4A 10 47 FF BC 02 48 00 47 C0 46 2F D3 06 08 33 D3 06 08 19 A5 06 08


Evolve if Beauty is highest:
Spoiler:
FF B4 F0 19 C0 00 10 18 C3 18 5A 88 40 46 17 21 00 F0 29 F8 83 46 FF BC 59 46 0C 1C 16 21 00 F0 22 F8 83 46 FF BC 59 46 8C 42 1F DD 18 21 00 F0 1A F8 83 46 FF BC 59 46 8C 42 17 DD 21 21 00 F0 12 F8 83 46 FF BC 59 46 8C 42 0F DD 2F 21 00 F0 0A F8 83 46 FF BC 59 46 8C 42 07 DD 99 46 FF BC 49 46 04 48 00 47 FF B4 04 4A 10 47 FF BC 02 48 00 47 C0 46 2F D3 06 08 33 D3 06 08 19 A5 06 08


Evolve if Cuteness is highest:
Spoiler:
FF B4 F0 19 C0 00 10 18 C3 18 5A 88 40 46 18 21 00 F0 29 F8 83 46 FF BC 59 46 0C 1C 16 21 00 F0 22 F8 83 46 FF BC 59 46 8C 42 1F DD 17 21 00 F0 1A F8 83 46 FF BC 59 46 8C 42 17 DD 21 21 00 F0 12 F8 83 46 FF BC 59 46 8C 42 0F DD 2F 21 00 F0 0A F8 83 46 FF BC 59 46 8C 42 07 DD 99 46 FF BC 49 46 04 48 00 47 FF B4 04 4A 10 47 FF BC 02 48 00 47 C0 46 2F D3 06 08 33 D3 06 08 19 A5 06 08


Evolve if Smartness is highest:
Spoiler:
FF B4 F0 19 C0 00 10 18 C3 18 5A 88 40 46 21 21 00 F0 29 F8 83 46 FF BC 59 46 0C 1C 16 21 00 F0 22 F8 83 46 FF BC 59 46 8C 42 1F DD 17 21 00 F0 1A F8 83 46 FF BC 59 46 8C 42 17 DD 18 21 00 F0 12 F8 83 46 FF BC 59 46 8C 42 0F DD 2F 21 00 F0 0A F8 83 46 FF BC 59 46 8C 42 07 DD 99 46 FF BC 49 46 04 48 00 47 FF B4 04 4A 10 47 FF BC 02 48 00 47 C0 46 2F D3 06 08 33 D3 06 08 19 A5 06 08


Evolve if Toughness is highest:
Spoiler:
FF B4 F0 19 C0 00 10 18 C3 18 5A 88 40 46 2F 21 00 F0 29 F8 83 46 FF BC 59 46 0C 1C 16 21 00 F0 22 F8 83 46 FF BC 59 46 8C 42 1F DD 17 21 00 F0 1A F8 83 46 FF BC 59 46 8C 42 17 DD 18 21 00 F0 12 F8 83 46 FF BC 59 46 8C 42 0F DD 21 21 00 F0 0A F8 83 46 FF BC 59 46 8C 42 07 DD 99 46 FF BC 49 46 04 48 00 47 FF B4 04 4A 10 47 FF BC 02 48 00 47 C0 46 2F D3 06 08 33 D3 06 08 19 A5 06 08


One final note: You could feasibly port this to Fire Red. You just have to change a couple offsets. Not that I'd know why you would use this in Fire Red - the player can't increase contest stats except by ASM and they can't even see them anyways.


And my request is an ASM code to Check the number of ribbons a Pokemon has from a particular contest. I'm not sure if Emerald has anything like Special 0x9F from Fire Red so if the code is only able to read the first Pokemon in the party I'm okay with that as I can check a Pokemon's ribbons from a particular contest and have that be output to LASTRESULT or something. I could probably do this on my own actually, but, I don't know where the game stores ribbon data, unfortunately.

Yes, I am a contest nut.

Lance32497

LanceKoijer of Pokemon_Addicts

Male
Criscanto town-Ginoa Region xD
Seen August 13th, 2017
Posted January 1st, 2017
793 posts
8.1 Years
It seems I may have offended you. Let me explain why I think making Pokemon the same gender as their trainer is not worth the effort. Before that, I want to point out that I said that I wouldn't make routines that didn't interest me or that not more and a few people can use. I want to make relevant routines which will stay relevant. I don't want to make a routine that'll be used in someone's hack once or twice and that's it. It's just not worth the effort or the work.

Think about it for a second. Make the trainer with the same gender as his Pokemon? I just don't see the point. Things like nicknaming, I've done for you because I can see SOME people using it. However, gender setting? Honestly, who cares about gender unless you were going to make a complete anime/mange remake with genders for the MC's Pokemon. Mostly, this routine is a little hard and the reward is null. Only you would use it since its creation, and I'm not writing routines for you, I'm writing them for everyone's uses and my enjoyment.
sorry again, dont worry I didnt took it seriously, I know that this is my fault, Ill think a better suggestion, I also recognized that my requests will be used for particular hacks, not for general. sorry again.
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.

Danny0317

Fluorite's back, brah

Age 22
Male
Seen February 19th, 2021
Posted March 11th, 2017
1,067 posts
9.3 Years
A bit late, but actually, the gender of a Pokemon is determined by the "trainer gender" if and only if the Pokemon has a 50-50 gender. Other than that, it goes to the one that has a higher chance, like for example, a trainer's Torchic will always be male unless edited.

Mystery Man

Don't be like me!

Age 26
Seen July 30th, 2022
Posted March 28th, 2022
205 posts
10.8 Years
Thank you so much for all of your work. So many conveniences we can easily add to our hacks! Really, thank you!

I do have some requests, mostly for those who seek to make battle facilities (i.e. tournaments) and the like into their hacks.
…The ability to turn off experience gain upon setting a flag (and on upon clearing it). This could also work well with the set level routine you’ve made, especially in parts where the team is temporarily set to a level to match the opponents (to avoid having the slightest advantage over them (gaining a level during the fight.))
…The ability to change battle styles (Shift, Set) via script. The battle style in battle facilities is always Set. In addition to that, this can be useful to people who want to make the important fights in their hack more challenging and perhaps "fairer" -- by eliminating that one huge advantage the player has over the opponent temporarily.
…Givepokemon with custom attacks. Like Extremespeed Dratini in Crystal and event Pokémon.
Male
Seen 1 Week Ago
Posted September 1st, 2019
33 posts
8.8 Years
How about some requests to actually break some trainers?

Can you add a battle mode like Battle Frontier battles? (You can't use items, battle is turned to set, you don't get XP during the battle.)
Let's say you use this battle style for certain trainers like Gym Leaders and Rivals. It would ramp up the difficulty of a hack without needing for some crazy stuff like giving Brock a lv.100 Diancie for the player's first gym battle.

Another suggestion I think that it would be interesting is expanded trainer sight.
For example, a trainer can spot you from a wider range (I always thought it was weird seeing the player at a diagonal spot close to the trainer and the trainer not even noticing.

How about a player detection system? Let's say the player is captured by team rocket.
The player needs to get out of the rocket base and there are no allied pokémon or cardboard boxes, so he needs to avoid the grunts patrolling. If he gets caught, he gets locked in again. That would be interesting to use with the expanded trainer sight I mentioned earlier.

A NPC that explicitly tells a pokémon's current IV and EV spread would be cool too, but I don't know if that can be done just with scripting.

Another NPC that tells what moves a pokémon can learn via level-up would be very useful too, since most hacks mess up with movepools, and since most hackers don't post their movepool changes the players are often left in the dark. And that's terrible.

And just some personal curiosity here. Is there a limit to how many Move Tutors you can have in the game?
Edit: More random curiosity. Since apparently there's no simple tool to edit some move effects of MrDollSteak's Rom Base, could you explain how I can edit the moves manually? I wanted to get more moves boosted by Mega Launcher, but I really have no idea on how to do that. Since it could require ASM, I figured that you might know something.

Good luck with your hack. Considering how much you've done just in this thread, I know that it's something to look forward to.
Ever seen a Stadium 2 Hack? There's one, and it needs your help!

Smeargle

Illusory

Non-binary
In the fabric of life
Seen October 21st, 2015
Posted December 26th, 2014
160 posts
9.9 Years
I love the all asm everyone on this topic has created for the community,
That being said, with permission, I am going to take it one small step further to make some of the more complicated asm into fully compatible patches; just for those of you out there who see these features, love them to bits, but can't work a hex editor to save your soul. ;P

Anyways, I was just going to go down the line of codes and patch them but I think it may be better to ask what you guys want as patches.
I'd like to also be careful I don't derail this thread by turning it into a patch request section, so if you do have one you would like send me a vm or pm so we can keep things organised here.

Furthermore, all future patches will be placed onto this post here, along with notes containing the locations of all the routines inside the rom.