• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Code: ASM Resource Thread

Blah

Free supporter
1,924
Posts
11
Years
What if the Pokémon I choose to evolve has two evolutions available, like Gloom, Slowpoke or Poliwhirl? Would it just go for the normal level-up evolution, which is the first in their data?

Yeah, the first one. It also handles Eevee like that as well. In game, we have things like stones, time based evolutions and other similar ways the game knows who to evolve into what. However, if we just randomly decide to evolve Eevee using this, there's really no way the code can know which evolution the player wants. So if you are dumb enough to evolve a Pokemon with a branching evolution path with this, then it's your fault :P

If I were to integrate this to check for which evolution to give a Pokemon based on the given ingame circumstances, I'd have to create a check for each Pokemon. On top of that, if someone expands Pokemon, the checks also need to be expanded. It's just not feasible to maintain.

EDIT: I should mention that with little edits, you can set the evolution you want. I.e Force the Pokemon in slot x to evolve into a y. So there's possibilities like that, but I don't suggest you really try and evolve something with multiple evolution paths like this.
 
6,355
Posts
18
Years
  • Seen Apr 16, 2020
Yeah, the first one. It also handles Eevee like that as well. In game, we have things like stones, time based evolutions and other similar ways the game knows who to evolve into what. However, if we just randomly decide to evolve Eevee using this, there's really no way the code can know which evolution the player wants. So if you are dumb enough to evolve a Pokemon with a branching evolution path with this, then it's your fault :P

If I were to integrate this to check for which evolution to give a Pokemon based on the given ingame circumstances, I'd have to create a check for each Pokemon. On top of that, if someone expands Pokemon, the checks also need to be expanded. It's just not feasible to maintain.

EDIT: I should mention that with little edits, you can set the evolution you want. I.e Force the Pokemon in slot x to evolve into a y. So there's possibilities like that, but I don't suggest you really try and evolve something with multiple evolution paths like this.

I was thinking of using your routine to have an NPC in-game that would evolve your Slowpoke or Poliwhirl holding a King's Rock. I guess I'll just switch the evolution methods so that the King's Rock one is first instead.
 

Blah

Free supporter
1,924
Posts
11
Years
I was thinking of using your routine to have an NPC in-game that would evolve your Slowpoke or Poliwhirl holding a King's Rock. I guess I'll just switch the evolution methods so that the King's Rock one is first instead.

No, no! Use a modified one.
Here:

Spoiler:


That one uses the variable 0x8002 to determine it's evolution. You can use it to evolve into a specific evolution that way. Or be silly and evolve Rattata into a Venasaur :3


Mini update:

Remember how the TMs were showing quantities? Well I fixed that now. I'll edit my original post with the details as well. Here it is:

Compile and insert into free space:
Spoiler:


Now navigate to 0x131EF4 and insert:
Code:
00 48 00 47 XX XX XX 08
Where XX XX XX is the pointer to where you assembled the routine +1

Now navigate to 0x131EA5 and change the byte to E0
That's all.
3nina1p.png
 
Last edited:
6,355
Posts
18
Years
  • Seen Apr 16, 2020
Nice work on the TMs! So I'm guessing your new "silent evolution" routine is actually a species change routine so it could also work for form changing.
 

Blah

Free supporter
1,924
Posts
11
Years
Nice work on the TMs! So I'm guessing your new "silent evolution" routine is actually a species change routine so it could also work for form changing.

Yeah, that's all evolution is. A species change, with some stat recalculation updates. Hopefully one day someone can use this for a mega evolution in battle or something!

As for forms, yes, though in battle form changing is still a very much complicated process :P
Here's something you can do:

uqv62F3.png

T8SGLQg.png
 

Lance32497

LanceKoijer of Pokemon_Addicts
792
Posts
9
Years
Yeah, that's all evolution is. A species change, with some stat recalculation updates. Hopefully one day someone can use this for a mega evolution in battle or something!

As for forms, yes, though in battle form changing is still a very much complicated process :P
Here's something you can do:

uqv62F3.png

T8SGLQg.png

Hey? sorry for being noob...
How your code really works?
Is that In-Game or Overworld?

then I dont know what happened in your ss... could you explain it to me?
 

Blah

Free supporter
1,924
Posts
11
Years
Hey? sorry for being noob...
How your code really works?
Is that In-Game or Overworld?

then I dont know what happened in your ss... could you explain it to me?

It's a forced inbattle evolution in the screenshots. I've commented the code for evolution if you want to read and see.


*awaits more requests*
 

Joexv

ManMadeOfGouda joexv.github.io
1,037
Posts
11
Years
Hey so the silent evo asm doesnt compile for me. I get an error saying 0xfffffffc is too big. I cant fing that offsets so Im kinda confused.

Also how does it work is it via item or what?
 

Blah

Free supporter
1,924
Posts
11
Years
Hey so the silent evo asm doesnt compile for me. I get an error saying 0xfffffffc is too big. I cant fing that offsets so Im kinda confused.

Also how does it work is it via item or what?

I just copy-pasted and compiled it with no problems.

usage:
Set the slot of the Pokemon you want to evolve in var 0x8001 (0x0 to 0x5). Then callasm to this routine and the rest is done automagically.
So if I wanted to evolve the 3rd Pokemon in my party I would put:
setvar 0x8001 0x2
callasm 0xOffset +1

Here's a compiled version:
Code:
FF B5 49 48 00 88 64 21 48 43 48 49 40 18 07 1C 0B 21 47 4B 00 F0 84 F8 05 1C 00 F0 29 F8 06 1C 38 1C 38 21 42 4B 00 F0 7B F8 04 1C 38 1C 3D 4A 31 1C 11 80 0B 21 3F 4B 00 F0 72 F8 38 1C 3E 4B 00 F0 6E F8 30 1C 3D 4B 00 F0 6A F8 30 1C 02 21 3B 4B 00 F0 65 F8 30 1C 03 21 39 4B 00 F0 60 F8 38 1C 38 21 32 4B 00 F0 5B F8 A0 42 37 D1 0C E0 04 21 41 43 40 18 C0 00 32 4B C1 18 48 88 8A 88 90 42 00 DC 70 47 10 1C 70 47 38 1C 2E 49 0A 1C 02 21 27 4B 00 F0 44 F8 2C 48 0B 21 69 43 09 18 0D 1C 29 49 0C 1C 00 20 0A 28 0D D0 01 35 29 78 01 34 22 78 8A 42 32 D1 FF 2A 00 D0 02 E0 FF 29 02 D0 2C E0 01 30 EF E7 20 4A 0B 20 46 43 B6 18 38 1C 32 1C 02 21 17 4B 00 F0 22 F8 1F E0 A0 42 D3 D0 02 1C 38 1C 19 21 11 4B 00 F0 19 F8 01 1C 00 09 A2 42 01 D9 09 18 00 E0 09 1A 09 4A 11 60 19 21 38 1C 0B 4B 00 F0 0B F8 38 1C 0A 4B 00 F0 07 F8 38 1C 38 21 06 4B 00 F0 02 F8 DF E7 FF BD 18 47 C0 46 B8 70 03 02 BA 70 03 02 84 42 02 02 E9 FB 03 08 7D 03 04 08 7D E4 03 08 99 32 04 08 75 8E 08 08 54 97 25 08 D0 1C 02 02 E0 5E 24 08
 

Lance32497

LanceKoijer of Pokemon_Addicts
792
Posts
9
Years
It's a forced inbattle evolution in the screenshots. I've commented the code for evolution if you want to read and see.


*awaits more requests*

OH! MY! GOD!
WITH THIS HACK!
WE CAN FAKE MEGA EVOLUTION!!!!
AWESOME! AWESOME! AWESOME!
By the way, what will I do in inbattle if I want my bulbasaur changes specie in to Ivysaur? What will I press? Sorry I am just so excited..
And theres no compile version for it?
I lost my THUMB compiler >:(

Oh! I hope you can make a routine for it ^_^
Can you port to FireRed the Mach Bike and Acro Bike effect?
and
Can you also port EV-Reducing berries?
and another 1
sorry, there are so many ideas come up in my mind
Can you make a certain Pokemon when It enters the battle it will call a weather effect without having Drizzle, Drought, and Sand Stream?
It is also nice if you can also add new weather effects like thunderstorm and Cold breeze ahahaha
 
Last edited by a moderator:

Blah

Free supporter
1,924
Posts
11
Years
OH! MY! GOD!
WITH THIS HACK!
WE CAN FAKE MEGA EVOLUTION!!!!
AWESOME! AWESOME! AWESOME!
By the way, what will I do in inbattle if I want my bulbasaur changes specie in to Ivysaur? What will I press? Sorry I am just so excited..
And theres no compile version for it?
I lost my THUMB compiler >:(

Oh! I hope you can make a routine for it ^_^
Can you port to FireRed the Mach Bike and Acro Bike effect?
and
Can you also port EV-Reducing berries?
and another 1
sorry, there are so many ideas come up in my mind
Can you make a certain Pokemon when It enters the battle it will call a weather effect without having Drizzle, Drought, and Sand Stream?
It is also nice if you can also add new weather effects like thunderstorm and Cold breeze ahahaha

- EV reducing berries
- Weather affects when entering battle
- Maybe the bike (I hear that there's only a few movement modes in FR, after I confirm a few things I might try)
- adding new weather effects is something iirc it's been done already.

Okay, how about the Incense items? The Sea and Lax incenses were used in Gen 3 to breed Azurill and Wynaut, and then 7 more were introduced in Gen 4 for the new pre-evolutions.

http://bulbapedia.bulbagarden.net/wiki/Incense

Request received!
EDIT: Christos I took a quick peak right now, and frankly speaking, this is very easy to do, however it's not very keen to customization. What I mean by that is, I'd have to jump directly into the part which checks for the incense branch out and do my own checks for other cases. Which means I'd have to know the following things:
- Pre-evolved Pokemon's species index (so this may change depending on how someone updated their dex)
- If no incense what to turn it into's index (ditto from above)
- Item ID of the item required to achieve effect

Actually I can overcome these by making it read off of a table.


Afaik Jambo51has already discovered this
I'm willing to bet his version is out of date now. Please give links! :P

EDIT: Turns out he did it the way I was going to do it. With a table, well, I guess he's already done it and removed the need for me to do it.
http://www.romhack.me/tutorials/view/adding-new-incense-items-pok-233mon-combinations/
 
Last edited:

Blah

Free supporter
1,924
Posts
11
Years

Inheriting IVs from parents (via Destiny Knot, in the daycare)


How to insert:

Before doing anything, look at the code. There are two comments that say:
@masterball lol. Change to item you want :D
@Parent2 has masterball :D
At those lines, change the line to "cmp r0, #0xDestinyKnotItemID" and
"cmp r3, #0xDestinyKnotItemID" respectively.

Once you're done that, compile and insert into free space.
Spoiler:


Here's a compiled version:
Code:
48 B4 76 46 28 1C 0C 21 26 4A 00 F0 49 F8 03 1C 28 1C 8C 30 0C 21 23 4A 00 F0 42 F8 01 28 0A D0 01 2B 08 D0 B6 46 48 BC 68 46 29 1C 1E 4B 00 F0 38 F8 1E 48 00 47 05 23 00 F0 26 F8 1B 88 90 B4 27 24 E4 18 00 27 06 2F 18 D0 A7 42 14 D0 01 23 00 F0 1A F8 18 1C 00 88 8C 21 48 43 40 19 27 21 C9 19 13 4A 00 F0 1C F8 12 4A 10 80 27 21 C9 19 68 46 11 4B 00 F0 15 F8 01 37 E4 E7 68 46 0F 4B 00 F0 0E F8 90 BC CD E7 0D 4A 00 F0 09 F8 00 04 00 0C 19 1C 0B 4B 00 F0 04 F8 06 4B 18 80 70 47 10 47 18 47 45 FD 03 08 C1 5A 04 08 01 61 04 08 E9 FB 03 08 D0 70 03 02 7D 03 04 08 7D E4 03 08 C9 4E 04 08 85 46 1E 08
Now go to 0x460F8 and insert the following:
Code:
 00 48 00 47 XX XX XX 08
Where XX XX XX is the pointer in reverse hex +1 of the routine you just compiled.


How it works:
When the egg is generated, we check both parents to see if their holding an item matching the item we're looking for. If they are, the egg inherits 5/6 IVs from their parents. Each parent has a 50% chance to pass down one of their IVs.

There is no usage section, because the rest is done automagically when you have two compatible Pokemon in the daycare and they make an egg :)

Also, sorry for the double post, I wanted a fresh post for the first page :P
 
Last edited:
252
Posts
10
Years
  • Age 27
  • Seen Jul 6, 2019
Ok, this one's for Christos, who requested this on IRC.
EDIT: And for MrDollSteak, cuz rombase. (who doesn't like new items?)

Weather Rocks

The following routines hijack the setweather commands and make them check your held item's effect byte.

First, insert this routine, and keep note of where you inserted this. This returns the held item effect byte to r0:
Code:
.text
.align 2
.thumb
.thumb_func
.global itemcheck

main:
ldr r0, .items
ldr r1, .struct
ldr r2, .bank
ldrb r2, [r2]
mov r3, #0x58
mul r2, r3
add r1, r2
add r1, #0x2E
ldrh r1, [r1]
mov r2, #0x2C
mul r1, r2
add r0, r1
ldrb r0, [r0, #0x12]
bx lr

.align 2
.items: .word 0x083DB028
.struct: .word 0x02023BE4
.bank: .word 0x02023D6B

Next, insert these routines:

Smooth Rock:
Spoiler:

Damp Rock:
Spoiler:

Heat Rock:
Spoiler:

Icy Rock:
Spoiler:


If you look closely, you'll notice .routine: .word 0x08800001 in every one of the rock routines. Change the address to the address you inserted your first routine (the item check routine) at.

That's all! I've tested the Icy Rock routine, and it works. I haven't tested the others, but there's no reason they shouldn't work, unless I made a stupid mistake somewhere. Happy hacking!
 
Last edited:
Back
Top