Hello. I'm interested in an edit that makes Emerald generate all IVs of all encountered Pokemon at 31. What's the best way to go about this?
linobigatti
March 3rd, 2017 9:35 AM
I want to know how it would be to create mysterious gifts
ItsFrickenMe
March 11th, 2017 7:58 PM
Quote:
Originally Posted by FBI
(Post 8533235)
Roaming Pokemon!
So if I want to use this in Emerald...is it simply a matter of changing offsets? Would the ASM part be the same?
DizzyEgg
March 12th, 2017 1:34 AM
Quote:
Originally Posted by ItsFrickenMe
(Post 9592046)
So if I want to use this in Emerald...is it simply a matter of changing offsets? Would the ASM part be the same?
No, you can't just port things from one game to another. Also, roaming mechanics already exist in Emerald.
Squeetz
March 12th, 2017 6:40 AM
I'm practicing ASM and made a fun little routine for Firered (with some help from Spherical Ice) that counts the amount of Rare Candies the player has used.
If you want to punish your players for cheating by hacking in candies, then this might be of use to you.
After inserting this in a word-aligned offset, go to 0x1263F6 and place:
Code:
01 49 08 47 C0 46 XX XX XX 08
Where XX is the pointer to the routine, +1.
This routine will automatically add 1 to the variable you chose each time the player uses a rare candy.
How you handle the variable in a script is all up to you!
ItsFrickenMe
March 12th, 2017 7:14 AM
Quote:
Originally Posted by DizzyEgg
(Post 9592195)
Also, roaming mechanics already exist in Emerald.
Roaming mechanics already exist in Firered too, so why is this ASM needed at all?
ItsFrickenMe
March 14th, 2017 9:39 AM
Quote:
Originally Posted by DizzyEgg
(Post 9592195)
No, you can't just port things from one game to another. Also, roaming mechanics already exist in Emerald.
Answer me. Now.
DizzyEgg
March 14th, 2017 9:44 AM
Quote:
Originally Posted by ItsFrickenMe
(Post 9593626)
Answer me. Now.
Answer what?
ItsFrickenMe
March 14th, 2017 9:45 AM
Quote:
Originally Posted by DizzyEgg
(Post 9593633)
Answer what?
Why is it relevant that roaming mechanics are already in Emerald, when they're also already in FR?
DizzyEgg
March 14th, 2017 9:51 AM
Quote:
Originally Posted by ItsFrickenMe
(Post 9593634)
Why is it relevant that roaming mechanics are already in Emerald, when they're also already in FR?
You're right, you could modify or use the already existing system. That's what I would probably do.
I guess FBI made his own to have better control over it and to make it compatible with his swarming system.
mbcn10ww
March 16th, 2017 4:55 AM
There is a way to call a script with ASM? I want to make something like this:
If a flag is set do something, if not set show a message.
What's the command I use on a routine to make it work?
BLAx501!
March 16th, 2017 12:29 PM
Quote:
Originally Posted by mbcn10ww
(Post 9594585)
There is a way to call a script with ASM? I want to make something like this:
If a flag is set do something, if not set show a message.
What's the command I use on a routine to make it work?
Well, you could manage that by simply using scripts, but if you insist on using ASM:
FBI made this routine as a reply to something I asked some time ago on the ASM Help Thread. You just have to compile it, modifying the code to add your script location, insert the code on an aligned offset (is it said that way? xDD) and then callasm the routine offset + 1 as usual.
Hope this helps :D
mbcn10ww
March 16th, 2017 1:40 PM
Quote:
Originally Posted by BLAx501!
(Post 9594743)
Well, you could manage that by simply using scripts, but if you insist on using ASM:
FBI made this routine as a reply to something I asked some time ago on the ASM Help Thread. You just have to compile it, modifying the code to add your script location, insert the code on an aligned offset (is it said that way? xDD) and then callasm the routine offset + 1 as usual.
Hope this helps :D
I know it can be done only with scripts, but it's needed to edit another routine I have, then it looks better than I wanted, thanks for the reply, I will test it soon as possible and I tell if it worked. ^^
EDIT: Haven't worked, I tested running it by another routine, I tested it by running from the START menu, but haven't worked.
tkim
March 17th, 2017 10:35 PM
Quote:
Originally Posted by Squeetz
(Post 9595301)
Pokémon Ruby and Sapphire introduced a feature where if you bought 10 or more Poké Balls in the Mart, you would get a free Premier Ball.
Sadly, this feature was removed in FRLG, and so I tried to port it the best I could.
First, insert this text somewhere using XSE or something and write down the offset of where you inserted it:
Code:
I'll throw in a Premier Ball, too.
After that, assemble this routine in a word-aligned offset (ends in 0, 4, 8 or C)
(But first, replace the XXXXXX with the offset of where you inserted the Premier Ball message):
boughtball:
lsr r6, #0x10
mov r1, r6
cmp r1, #0x9 @if player bought over 9 pokeballs, attempt to add premierball
bhi tryadding
b next
tryadding:
mov r0, #0xC @premier ball ID
mov r1, #0x1 @amount of premier balls
ldr r7, bag_add_item
bl linkr7
lsl r0, r0, #0x18
lsr r0, r0, #0x18
cmp r0, #1
bne next @if no room for premier ball, skip to next
ldr r1, message
ldr r2, sub_809BF0C
mov r0, r5
bl displaymsg
b next
fullbag:
ldr r1, bagisfull
ldr r2, sub_809BF98
mov r0, r5
bl displaymsg
end:
pop {r4-r7}
pop {r0}
bx r0
After inserting the routine, navigate to 0x3DF0B4 and put the pointer to it, +1. (If I inserted the routine at 0x725030 I would put 31 50 72 08)
And that's it!
Hi. The routine works well but The hereyouare message doesn't seem to appear if I do receive the PREMIER BALL. Instead it goes straight to the 'I'll throw in a PREMIER BALL, too.' I would like to see both messages appear, just as it does in R/S/E. Thanks for the routine!
tkim
March 18th, 2017 11:40 AM
Quote:
Originally Posted by Squeetz
(Post 9595301)
Pokémon Ruby and Sapphire introduced a feature where if you bought 10 or more Poké Balls in the Mart, you would get a free Premier Ball.
Sadly, this feature was removed in FRLG, and so I tried to port it the best I could.
First, insert this text somewhere using XSE or something and write down the offset of where you inserted it:
Code:
Here you are!\nI'll throw in a Premier Ball, too.
Not what I meant but whatever.
Squeetz
March 18th, 2017 1:35 PM
Quote:
Originally Posted by tkim
(Post 9595892)
Not what I meant but whatever.
Sorry then.
I'm still learning.
tkim
March 18th, 2017 3:02 PM
Quote:
Originally Posted by Squeetz
(Post 9595968)
Sorry then.
I'm still learning.
What I meant was, I would like to see the 'I'll throw in...' message following the hereyouare message. Instead of combining the text, I would like to see two separate messages. (without using \p from XSE either)
Something like this.... (I have no knowledge of ASM)
Code:
tryadding:
mov r0, #0xC @premier ball ID
mov r1, #0x1 @amount of premier balls
ldr r7, bag_add_item
bl linkr7
lsl r0, r0, #0x18
lsr r0, r0, #0x18
cmp r0, #1
bne next @if no room for premier ball, skip to next
ldr r1, hereyouare
ldr r2, sub_809BF0C
mov r0, r5
bl displaymsg ldr r1, message
ldr r2, sub_809BF0C
mov r0, r5
bl displaymsg
b next
linobigatti
March 23rd, 2017 9:20 AM
how can i manipulate the mysterious gift system in FR?
MWisBest
March 23rd, 2017 6:07 PM
Quote:
Originally Posted by BluRose
(Post 9569452)
REUSABLE BALLS IN EMERALD
gracias a familiawerneck
routine with byte changes
Spoiler:
Code:
.text
.align 2
.thumb
@ FE3AA - 00 21
@ 56818 - 00 48 00 47 XX+1 XX XX XX
main:
bl deleteball
mov r9, r4
mov r10, r5 @ added because emerald
pop {r4-r7}
pop {r0}
bx r0
if y'all want to see specific equivalent addresses:
Spoiler:
Code:
[bpre]
2D924 - atkF0 - near end
9A1D8 - bag_remove_item
A1E30 - pokeball + 0x24
0203AD30 - var 800E
[bpee]
56818 - atkF0 - near end
D6AA4 - bag_remove_item
FE3AA - pokeball + 0x26
0203CE7C - last_used_item_maybe
have a nice day~
I fixed this so it doesn't delete the fishing rod in the safari zone, among other glitches. It'll now verify that the item is a ball of some kind before it deletes it.
The code looks strange. I'm guessing it could be improved somehow, but it works:
Code:
.text
.align 2
.thumb
@ FE3AA - 00 21
@ 56818 - 00 48 00 47 XX+1 XX XX XX
delete_item_if_pokeball:
ldr r0, .last_used_item
ldrh r0, [r0]
@ checks that the item id is premier ball or lower
cmp r0, #0xC
bls deleteball
@ support for custom pokeballs can be added like so:
@ cmp r0, #CUSTOM_BALL_ID
@ beq deleteball
finish:
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
EDIT: See here for a version that also makes safari balls reusable.
BluRose
March 23rd, 2017 6:24 PM
Quote:
Originally Posted by MWisBest
(Post 9599642)
I fixed this so it doesn't delete the fishing rod in the safari zone, among other glitches. It'll now verify that the item is a ball of some kind before it deletes it.
The code looks strange. I'm guessing it could be improved somehow, but it works:
Code:
.text
.align 2
.thumb
@ FE3AA - 00 21
@ 56818 - 00 48 00 47 XX+1 XX XX XX
delete_item_if_pokeball:
ldr r0, .last_used_item
ldrh r0, [r0]
@ checks that the item id is premier ball or lower
cmp r0, #0xC
bls deleteball
@ support for custom pokeballs can be added like so:
@ cmp r0, #CUSTOM_BALL_ID
@ beq deleteball
finish:
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
oh xD
i guess i forgot to edit my post with what i had posted here and here
muchas gracias amigo~
i'll edit my old post and direct to your method as well x3
ghoulslash
March 29th, 2017 4:48 AM
I hope this is the right place to ask, but I was wondering if anyone knows how to edit the following routines so that they don't end the script after completion? For example, use callasm 0x8XXXXXX and then continue with a msgbox, etc..
Naming the player from the overworld: callasm 0x809FC91
.align 2
place: .word 0x080568E1
ramlocation: .word 0x03005008
standard: .word 0x00003A4C
actualroutine: .word 0x0809D955
rivalname: .word 0x08FFFFFF @default name if left blank
jiangzhengwenjzw
March 29th, 2017 6:04 AM
Quote:
Originally Posted by ghoulslash
(Post 9604565)
I hope this is the right place to ask, but I was wondering if anyone knows how to edit the following routines so that they don't end the script after completion? For example, use callasm 0x8XXXXXX and then continue with a msgbox, etc..
Naming the player from the overworld: callasm 0x809FC91
Change the A9 at 0x9FCB4 to C5 and then try to callasm 0x809FC91. (i guess you should perform the 'lock' command again after the callasm)
MWisBest
March 29th, 2017 12:48 PM
Quote:
Originally Posted by MWisBest
(Post 9599642)
I fixed this so it doesn't delete the fishing rod in the safari zone, among other glitches. It'll now verify that the item is a ball of some kind before it deletes it.
The code looks strange. I'm guessing it could be improved somehow, but it works:
Spoiler:
Code:
.text
.align 2
.thumb
@ FE3AA - 00 21
@ 56818 - 00 48 00 47 XX+1 XX XX XX
delete_item_if_pokeball:
ldr r0, .last_used_item
ldrh r0, [r0]
@ checks that the item id is premier ball or lower
cmp r0, #0xC
bls deleteball
@ support for custom pokeballs can be added like so:
@ cmp r0, #CUSTOM_BALL_ID
@ beq deleteball
finish:
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
Made another improvement to the reusable pokeballs: safari balls can now be reused as well!
Code:
.text
.align 2
.thumb
@ FE3AA - 00 21
@ 56818 - 00 48 00 47 XX+1 XX XX XX
@ 3F008 - 02 E0 C0 46 C0 46 C0 46 ! NEW
@ Optional: change initial safari ball count?: FC0E6 - XX 20, XX = initial count
main:
@ if safari ball counter is not 0, then that's what we need to delete
ldr r1, .safari_ball_count
ldrb r0, [r1]
cmp r0, #0x0
bne delete_safari_ball
@ ...otherwise, delete the last used item (if it's a pokeball)
ldr r0, .last_used_item
ldrh r0, [r0]
@ checks that the item id is premier ball or lower
cmp r0, #0xC
bls delete_ball_in_bag
@ support for custom pokeballs can be added like so:
@ cmp r0, #CUSTOM_BALL_ID
@ beq delete_ball_in_bag
b finish
delete_safari_ball:
@ r0 already contains current safari ball count, and
@ r1 already contains safari ball count memory address
sub r0, #1
strb r0, [r1]
b finish
Originally Posted by jiangzhengwenjzw
(Post 9604607)
Change the A9 at 0x9FCB4 to C5 and then try to callasm 0x809FC91. (i guess you should perform the 'lock' command again after the callasm)
Thanks! Do you know how that change converts to assembly so I could try and do the same thing with the naming rival function?
jiangzhengwenjzw
March 30th, 2017 4:44 AM
Quote:
Originally Posted by ghoulslash
(Post 9605305)
Thanks! Do you know how that change converts to assembly so I could try and do the same thing with the naming rival function?
I guess the rival naming func is also built-in.
Change the A9 at 0x9FD54 to C5 and then try to callasm 0x809FD31. (It's from my old note in firered db, so i'm not sure whether it's correct or not...)