Development Forms and Formes

Started by daniilS January 1st, 2015 1:15 PM
  • 37131 views
  • 99 replies

daniilS

busy trying to do stuff not done yet

Age 23
Male
Seen March 2nd, 2021
Posted October 7th, 2015
409 posts
9.8 Years
Alright, I have been asked to share the routines I made for form(e) changing in Platinum Red & Blue multiple times, and I finally found the time to do so. This thread will be updated as I clean up old routines and create new ones. Enjoy.

Rotom & Deoxys
Spoiler:
This routine simply changes the index number of a Pokémon in your party.
.thumb

getpokeoffset:
	push {r4, lr}
	ldr r0, var8004
	ldrh r2, [r0]
	mov r0, #100
	mul r2, r0
	ldr r0, poke_slot_1
	add r4, r2, r0
getandsetnewindexnumber:
	ldr r2, var8005
	mov r1, #0xB
	mov r0, r4
	ldr r3, pokemon_setattr
	bl jump
recalc20bytes:
	mov r0, r4
	ldr r3, pokemon_calc_effective_stats
	bl jump
	pop {r4, pc}
jump:
	mov pc, r3
	
.align 2
	var8004:			.word 0x020270B8 + 0x8004 * 2
	poke_slot_1:			.word 0x02024284
	var8005:			.word 0x020270B8 + 0x8005 * 2
	pokemon_setattr:		.word 0x0804037C
	pokemon_calc_effective_stats:	.word 0x0803e47c

/*insert anywhere. set var 0x8004 to the desired pokemon's slot and 0x8005 to the new index number, then callasm this routine+1.*/


Burmy
Spoiler:
These routines will transform any Burmy that enters the battlefield according to the terrain.

The first routine, burmytransformjump:
.thumb

main:
	ldr r3, burmytransform
	mov pc, r3

burmytransform:	.word 0x________	@address of burmytransform.asm here

continue:
	str r0, [sp]

/*insert at 08030D40*/
That routine loads a second routine, burmytransform:
.thumb

getdex:
	mov r1, #0xB
	ldr r3, pokemon_getattr
	bl jump
	mov r6, r0
	ldr r3, species_to_pokedex_index
	bl jump
compareburmy:
	ldr r1, burmy_dex
	cmp r0, r1
	bne ender
getform:
	ldr r0, idx_for_battle_screen_elements_by_env
	ldrb r0, [r0]
	lsl r0, #0x1
	ldr r2, area_to_burmy_cloak_table
	add r2, r0
	ldrh r0, [r2]
	cmp r0, #0x0
	beq ender
burmeeeeeeeeeeeeeeeeeeh:
	mov r0, r4
	mov r1, #0xB
	ldr r3, pokemon_setattr
	bl jump
ender:
	mov r0, r6
	ldr r3, return
jump:
	mov pc, r3
	
.align
	pokemon_getattr:			.word 0x0803FBE8
	species_to_pokedex_index:		.word 0x08043298
	idx_for_battle_screen_elements_by_env:	.word 0x02022B50
	area_to_burmy_cloak_table:		.word 0x________	@pointer to burmytable here
	pokemon_setattr:			.word 0x0804037C
	return:					.word 0x08030D48
	burmy_dex:				.word ____		@dex number of burmy here

/*insert anywhere. place a pointer to this routine in burmytransformjump.*/
Now, this routine uses a so-called burmytable. It has ten halfword entries, being either zero or the index number of the following forms:
plant plant sandy 0000 0000 0000 sandy sandy trash plant
Insert it anywhere, and place a pointer to it in the routine above.


A note on spelling
Spoiler:
Please use the word forme for legendaries and form for other Pokémon. Thank you.

daniilS

busy trying to do stuff not done yet

Age 23
Male
Seen March 2nd, 2021
Posted October 7th, 2015
409 posts
9.8 Years
Oh my gosh you've finally RELEASED IT!!
I hope you release the arceus forms soon.
Yup, they're next! :D
I came home from work to this. I exploded from joy...

I really can't wait for the rest, but I do have a question. Will you be doing the moves related to Rotom?
Nope, the moves can be handled from the script. Ask Bela if you want an example


(by the way guys, an ugly version of this first routine has been available for quite some time :/)

LCCoolJ95

Limited Capacity

Age 28
Male
The World That Never Was
Seen 1 Day Ago
Posted March 25th, 2023
629 posts
14 Years
....I'm lost, what does this routine do, and how can I implement it?
"The greatest obstacle in life is Yourself. Overcome it, and you will achieve the greatest accomplishment of all." -Art Beins, 1982

Pokémon Theta Emerald EX: https://www.pokecommunity.com/showthread.php?t=386240

daniilS

busy trying to do stuff not done yet

Age 23
Male
Seen March 2nd, 2021
Posted October 7th, 2015
409 posts
9.8 Years
....I'm lost, what does this routine do, and how can I implement it?
It changes the index number of the Pokémon in party slot X (var 0x8004) to Y (var 0x8005). Instructions on how to implement it are in the last line of the routine, as always.

Lance32497

LanceKoijer of Pokemon_Addicts

Male
Criscanto town-Ginoa Region xD
Seen August 13th, 2017
Posted January 1st, 2017
792 posts
8.8 Years
so the script

...
special 0x9F
waitstate
compare 0x8004 0x0
if false goto @1
setvar 0x8005 0x85
callasm 0x800000
...
by the way, thanks for this 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.

daniilS

busy trying to do stuff not done yet

Age 23
Male
Seen March 2nd, 2021
Posted October 7th, 2015
409 posts
9.8 Years
so the script
by the way, thanks for this routine
I used this:
compare 0x8004 0x5
if 0x2 goto @end
Yay, this is amazing! I have a doubt on this. Can I PM you?
Of course

daniilS

busy trying to do stuff not done yet

Age 23
Male
Seen March 2nd, 2021
Posted October 7th, 2015
409 posts
9.8 Years
Apologies if this doesn't contribute much to the thread but when you say "Platinum Red & Blue", what do you mean by that? Which rom is this for?
- Thanks,
By that I mean they're the routines used in this hack: link
Everything is just FR so far, until somebody ports it.

Lance32497

LanceKoijer of Pokemon_Addicts

Male
Criscanto town-Ginoa Region xD
Seen August 13th, 2017
Posted January 1st, 2017
792 posts
8.8 Years
I used this:
compare 0x8004 0x5
if 0x3 goto @end
Of course
I dont get it xD
what is 0x3?
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.
Male
USA
Seen September 26th, 2016
Posted June 14th, 2015
190 posts
10.4 Years
Could this asm be used in a way to get Mega Evolutions? Just a theory. I dont know much about ASM xD so yeah.
Pokemon Cosmic: A New Threat

For God so loved the world, that he gave his only begotten Son, that who ever believe in him should not perish, but have everlasting life. - John 3:16

I believe in Jesus Christ my Savior. If you do too, and aren't scared to admit it, then copy and paste this in your signature.[/sig-reason]

daniilS

busy trying to do stuff not done yet

Age 23
Male
Seen March 2nd, 2021
Posted October 7th, 2015
409 posts
9.8 Years
Could this asm be used in a way to get Mega Evolutions? Just a theory. I dont know much about ASM xD so yeah.
Not in its current form. Touched and I might create something for it later.
Male
USA
Seen September 26th, 2016
Posted June 14th, 2015
190 posts
10.4 Years
Not in its current form. Touched and I might create something for it later.
Alright well good luck on it. Thanks for everything you contribute.
Pokemon Cosmic: A New Threat

For God so loved the world, that he gave his only begotten Son, that who ever believe in him should not perish, but have everlasting life. - John 3:16

I believe in Jesus Christ my Savior. If you do too, and aren't scared to admit it, then copy and paste this in your signature.[/sig-reason]

daniilS

busy trying to do stuff not done yet

Age 23
Male
Seen March 2nd, 2021
Posted October 7th, 2015
409 posts
9.8 Years
I dont get it xD
what is 0x3?
I'm sorry, didn't see this one at first. Typo: I meant 0x2 , which means if greater than. Special 0x9F will return a party slot from 0 to 5, and 7 if no pokemon is selected.
Also, for the full script you need to check if the selected pokemon is in fact a Rotom or Deoxys too, of course.

EDIT: whoops, seems like I missed the fact that in Platinum you never actually have to select a Rotom or a Deoxys... :/
Derp here, so I guess this would require one of FBI's routines instead.

daniilS

busy trying to do stuff not done yet

Age 23
Male
Seen March 2nd, 2021
Posted October 7th, 2015
409 posts
9.8 Years
Just a question.

Will you be going all out on Shaymin's formes?
Yes
It was any possible to convert this code into RUBY or EMERALD?
Yes

dangitpcwhydomypostsevenneedtobe25charactersthisisridiculous

Lance32497

LanceKoijer of Pokemon_Addicts

Male
Criscanto town-Ginoa Region xD
Seen August 13th, 2017
Posted January 1st, 2017
792 posts
8.8 Years
I'm sorry, didn't see this one at first. Typo: I meant 0x2 , which means if greater than. Special 0x9F will return a party slot from 0 to 5, and 7 if no pokemon is selected.
Also, for the full script you need to check if the selected pokemon is in fact a Rotom or Deoxys too, of course.

EDIT: whoops, seems like I missed the fact that in Platinum you never actually have to select a Rotom or a Deoxys... :/
Derp here, so I guess this would require one of FBI's routines instead.
ahhhhh.... thanks I was just confused what and why 0x3
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.

daniilS

busy trying to do stuff not done yet

Age 23
Male
Seen March 2nd, 2021
Posted October 7th, 2015
409 posts
9.8 Years
Thank you for this.

On another note, what exactly were you referring to with Arceus and Giratina?
The routine that changes the index number based on hold item (and location).