• 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

239
Posts
8
Years
  • Age 31
  • Seen Apr 15, 2024
GREAT!!!!
Can u make a example script please? I don't understand how to make it (I just read the README text in the repository). Thank you :)

There is an example nicknaming script at the bottom of the readme file.

The usage is essentially:
Code:
writebytetooffset 0x1 <state tracker ram>
special 0x3c
waitstate
writebytetooffset 0x0 <state_tracker ram>

This will let you select a pokemon from the box, and store the relevant location information to var8000 and var8001. Then, using the updated specials you can manipulate that pokemon's data.
 
51
Posts
9
Years
  • Age 33
  • Seen Nov 18, 2023
Ok. But how can insert 2 Pokémon in the box? For example bulbasaur e squirtle?
 
239
Posts
8
Years
  • Age 31
  • Seen Apr 15, 2024
Ok. But how can insert 2 Pokémon in the box? For example bulbasaur e squirtle?

The routine doesn't let you deposit pokemon to the box, just select them. The hack itself does nothing except save useful information.
 
1
Posts
5
Years
  • Age 30
  • Seen Feb 24, 2019
For Emerald (Changes in Red):
Spoiler:

Insert at 0x9C8EA.

Nice idea, however it didn't work for Pokemon Emerald BPEE, it automatically reset when the char moves.
 

Lunos

Random Uruguayan User
3,114
Posts
15
Years
Here you go! (admittedly I have not tested it)

Code:
.text
.align 2
.thumb
.thumb_func
.global GetHappiness

Main:
	push {r0-r2, lr}
	ldr r0, .var8004
	ldrb r0, [r0]	@slot num
	mov r1, #0x64
	mul r0, r1
	ldr r1, .PartyData
	add r0, r1, r0
	mov r1, #0x20	@happiness
	bl GetAttribute
	ldr r1, .var8004
	strb r0, [r1, #0x2]	@store into var8005
	pop {r0-r2, pc}
	
GetAttribute:
	ldr r2, =(0x0803FBE8 +1)
	bx r2
	
.align 2
.PartyData:	.word 0x02024284
.var8004:	.word 0x020370C0
Welp, it didn't work.
I compiled the routine and dropped it in the offset 71A250, wrote this script and once I checked it In-Game, this was the result.
yGrrQAK.png

Note: Just for the record, the savefile is right after defeating my Rival for the very first time, so there's no way for my Pokémon to have 76 points.

Dunno if you'll be able to fix it, but in any case thank you very much.
Would you be willing to reshare the script (the link is no longer working) in code tags? I am relatively new and trying to figure this stuff out.
Surprisingly, I just stumbled upon a thread that I made in the Spanish community "Whack a Hack!" where I reposted Ghoulslash's routine (giving all the credits to him, naturally.)
I also posted a script to get the routine working there, but instead of carelessly pasting it in Hastebin like I did here, I've put it in Pastebin.

Soo... yeah, here it is.
https://pastebin.com/2tv2QX18
 

AkameTheBulbasaur

Akame Marukawa of Iyotono
409
Posts
10
Years
So because I have a life, I spent way too long yesterday writing a routine to change the measurements for the height and weight in the PokeDex to be in metric (for those who eschew the imperial system).

EDIT: I neglected to have this change the units for SEEN entries as well as CAUGHT entries. I fixed that now.

bVZzTYj.png

d1mFFEB.png

Height (Feet to Metres - (Uncaught Pokemon)):
Spoiler:


Height (Feet to Metres):
Spoiler:


Weight (Pounds to Kilograms):
Spoiler:
 
Last edited:

Cam

dum camel
38
Posts
8
Years
  • Age 27
  • Seen Mar 31, 2022
>Ruby/Saphhire
>nothing to see here
Real disappointing considering I'm stuck with a ruby base for certain reasons.
 

AtecainCorp.

Rejishan awake...
1,377
Posts
15
Years
Unhidden Power [FR]

This routine makes the game calculate and display the actual type of Hidden Power in battle and in status screens. If, for example, a Pok�mon's Hidden Power type is Water, it will display as a Water-type move, just like Surf or any other Water-type move.

in-battle.png
status-screen.png


Note that this only calculates and displays the type, not the base power.

I try remade it for Ruby
 
44
Posts
9
Years
  • Age 32
  • Seen Mar 10, 2024
Hello, I am looking to add battle items X Sp Def and X Evasion to the game (And perhaps, if it's workable, X HP)

I do not own IDA Pro, so it's going to be a real challenge trying to locate the correct offsets for the Battle Items. I don't know how it's done, but I guess I can request a tutorial here.

I will give credit when requested!

This is the location of the battle effect:

0FE4B9
 
Last edited:
44
Posts
6
Years
  • Age 30
  • Seen Mar 22, 2024
I have a great idea for fire red I was thinking of in game player name change like to set the player name to a predefined name.
For example if the player name is David by setflag or setvar it could be changed to Mike I.e.,name decided by the hacker.
Sorry if this is too complicated and thanks in advance.
 
239
Posts
8
Years
  • Age 31
  • Seen Apr 15, 2024
I have a great idea for fire red I was thinking of in game player name change like to set the player name to a predefined name.
For example if the player name is David by setflag or setvar it could be changed to Mike I.e.,name decided by the hacker.
Sorry if this is too complicated and thanks in advance.

The player's name can be changed from the overworld via callasm 0x809FC91

I have a pretty old routine I wrote to change the OT name of your pokemon to the new name based on matching OTIDs, so traded pokemon will retain their OT names. Note that I wrote it a while ago so there may be bugs

Spoiler:
 
Last edited:
81
Posts
7
Years
  • Age 30
  • Seen Apr 22, 2024
EV-enhancing items (Power Items)


Spoiler:

For Ruby:

Spoiler:
 
44
Posts
6
Years
  • Age 30
  • Seen Mar 22, 2024
The player's name can be changed from the overworld via callasm 0x809FC91

I have a pretty old routine I wrote to change the OT name of your pokemon to the new name based on matching OTIDs, so traded pokemon will retain their OT names. Note that I wrote it a while ago so there may be bugs

Spoiler:
No no I want to set player name to another one without any freedom to player, so I decide the name not the player.
But thanks anyways.
By the way can you help me I'm stuck with the random trainer id and secret id generator routine it won't compile for me please help.
 
Last edited:
2
Posts
10
Years
  • Seen Aug 1, 2019
I
EDIT:

I was testing this routine out just now, and I'm not entirely sure if it's working correctly.
It looks to me like the Eggs are inheriting 3 stats alone, when they should always inherit 5 stats :/
I've been doing tests using this routine and XXXX.

In my last attempt for example, the results of the Egg were:
-03 HP IVs. Charmander has 30 and Ditto 26.
-03 Atk IVs inherited from Charmander.
-22 Def IVs inherited from Charmander or Ditto (both have 22 Def IVs.)
-23 Spd IVs. Charmander has 31 and Ditto 25.
-19 SpAtk IVs. Charmander has 31 and Ditto 10.
-31 SpDef IVs inherited from Ditto.

If we assume that HP is the random stat in this spread, Spd and SpAtk are the issue here.
The Egg should have inherited Charmander's or Ditto's values in those stats after all, right?
Has anyone tested this yet?

I did, I checked IV with the IV display summary screen routines. I edited the save so both parents have 31 IV in all stats, yet the child only have 3 stats with 31 IV.

Also for some reasons, sometimes if I give the destiny knot to the other parent or to both it crash when I talk to get the eggs. Did you figure it out?
 
239
Posts
8
Years
  • Age 31
  • Seen Apr 15, 2024
No no I want to set player name to another one without any freedom to player, so I decide the name not the player.
But thanks anyways.
By the way can you help me I'm stuck with the random trainer id and secret id generator routine it won't compile for me please help.

Actually, that's much easier. This will let you load a new player name into loadpointer 0x0 and then force the change. Make sure the player's name is 7 characters or less or else it will fail.
Spoiler:


eg. if I insert the above at 0x990000, then in XSE I could do the following to force the player's name to be Fred.
Code:
#dynamic 0x800000
#org @start
lock
faceplayer
loadpointer 0x0 @name
callasm 0x8990001
msgbox @newName 0x6
release
end
#org @name
= Fred
#org @newName
= Your new name is [player]!

By the way can you help me I'm stuck with the random trainer id and secret id generator routine it won't compile for me please help.
I'm not sure what routine you're talking about, sorry :/
 
Last edited:
44
Posts
6
Years
  • Age 30
  • Seen Mar 22, 2024
Actually, that's much easier. This will let you load a new player name into loadpointer 0x0 and then force the change. Make sure the player's name is 7 characters or less or else it will fail.
Spoiler:


eg. if I insert the above at 0x990000, then in XSE I could do the following to force the player's name to be Fred.
Code:
#dynamic 0x800000
#org @start
lock
faceplayer
loadpointer 0x0 @name
callasm 0x8990001
msgbox @newName 0x6
release
end
#org @name
= Fred
#org @newName
= Your new name is [player]!


I'm not sure what routine you're talking about, sorry :/
Thanks for this quick response and for the routine not tried it yet though.
The routine I was talking about is this http://www.pokecommunity.com/showpost.php?p=8536952&postcount=333
 
3
Posts
6
Years
  • Age 25
  • Seen May 10, 2019
Actually, that's much easier. This will let you load a new player name into loadpointer 0x0 and then force the change. Make sure the player's name is 7 characters or less or else it will fail.
Spoiler:


eg. if I insert the above at 0x990000, then in XSE I could do the following to force the player's name to be Fred.
Code:
#dynamic 0x800000
#org @start
lock
faceplayer
loadpointer 0x0 @name
callasm 0x8990001
msgbox @newName 0x6
release
end
#org @name
= Fred
#org @newName
= Your new name is [player]!


I'm not sure what routine you're talking about, sorry :/

I tried running this script with the same offsets in FireRed but when I go to speak to the NPC i assigned the script to the game freezes. Is there something I could've missed? I compiled the ASM, assigned the correct offsets in the hex editior. Thankyou:)
 
44
Posts
6
Years
  • Age 30
  • Seen Mar 22, 2024
Someone help like all the asm routine I compile won't work for some god damn reason someone reply if you know how to fix this and if you post a compiler which works for you it would be more helpful.
 
Back
Top