Criminon
Forever Spriting
- 265
- Posts
- 12
- Years
- He / Him
- California
- Seen Apr 11, 2024
Ability switching:
Very simple, it turned out to not have to adjust the PID.
How to insert:
Just compile the following routine into free space:
Spoiler:
Code:.text .align 2 .thumb .thumb_func main: push {r0-r4, lr} ldr r1, =(0x20370C0) @var 0x8004 ldrb r1, [r1] mov r2, #0x64 mul r1, r1, r2 ldr r0, =(0x2024284) add r0, r0, r1 @slot mov r4, r0 @save slot mov r1, #0x2E ldr r3, =(0x803FBE8 +1) bl linker cmp r0, #0x1 beq setZero mov r0, #0x1 b setNew setZero: mov r0, #0x0 setNew: lsl r0, r0, #0x18 lsr r0, r0, #0x18 ldr r2, =(0x20370D0) @set inverse strb r0, [r2] mov r0, r4 mov r1, #0x2E ldr r3, =(0x804037C +1) bl linker pop {r0-r4, pc} linker: bx r3 .align 2
Usage:
Set in variable 0x8004 the slot number of the Pokemon who's ability you want to swap. Note that Pokemon with only 1 ability won't have their abilities swapped. I've made it so it's easy to use with special 0x9F in your ability swap item script.
Am I supposed to be calling the ASM on this?
Spoiler:
#dynamic 0x800000
#org @start
lock
call @menu
special2 0x800B 0xBA
goto @next
'---------------
#org @menu
special 0x9F
waitstate
return
'---------------
#org @end
release
end
'---------------
#org @next
fanfare 0x71
waitfanfare
msgbox @text1 MSG_KEEPOPEN '"[buffer1]'s potential has\nbeen re..."
removeitem 0x72 0x1 ///this is set up for items. this is the item I used.
closeonkeypress
release
end
'---------
' Strings
'---------
#org @text1
= [buffer1]'s ability has\nbeen swapped.
#org @start
lock
call @menu
special2 0x800B 0xBA
goto @next
'---------------
#org @menu
special 0x9F
waitstate
return
'---------------
#org @end
release
end
'---------------
#org @next
fanfare 0x71
waitfanfare
msgbox @text1 MSG_KEEPOPEN '"[buffer1]'s potential has\nbeen re..."
removeitem 0x72 0x1 ///this is set up for items. this is the item I used.
closeonkeypress
release
end
'---------
' Strings
'---------
#org @text1
= [buffer1]'s ability has\nbeen swapped.
This is what I'm using for it, but it doesn't seem to be doing anything. I AM using the JPAN engine if that helps. I know it references 8004 a lot, but it shouldn't matter on this, right?
Also! I have a few ASM ideas, and as long as its not against the rules, I would be happy to pay you for them!
Would it be possible to make it so you permanently have a chance to receive a held item from wild pokemon after fainting them? Kind of like a loot system? Maybe even a check to see if you have enough item space and then maybe spawning a pokeball with the item for a later pickup that disappears once you leave the map? I'm imagining the later would be harder, but would love to hear back from you. Everything you do is amazing, and I can't wait to understand ASM more.
Another interesting one would be modifying the trainer views to have it when a certain variable is set, they don't see you. I've been planning on adding in the cardboard box from MSG, haha.
And finally a variable that when toggled causes a certain amount of money to be taken from each battle you have. with a message. IE: "20% of your rewards have gone to Team Rocket" I plan on making being a team rocket member a possibility, allowing you to catch trainer pokemon, (which is already done) but at the same time you lose funds from trainer battles, as well as people treat you differently.
Last edited: