The PokéCommunity Forums

The PokéCommunity Forums (https://www.pokecommunity.com/index.php)
-   Binary Hack Research & Development (https://www.pokecommunity.com/forumdisplay.php?f=195)
-   -   Code ASM Resource Thread (https://www.pokecommunity.com/showthread.php?t=339153)

tzujm33 December 26th, 2014 5:38 PM

I have an idea about limiting the amounts of items that one can carry. however i wouldnjt like it to be like in red or silver. I would like it to be that you have a maximum of kg you can carry and hat each item weighs a diffrent amount of kg. for example a bike could weittgh 10 kg(or some other unit) and pokeball 1 kg. If the limit of the bag is 100 kg, you could be carry either 100 pokeballs or 90 pokeballs and one bike.


Another idea would be like the "game over when whiting out" thing, with the differnce, that the whiting out does occur after your last Pokemon died, or in other words that you dont go to game over after whiting out, aslong as one has pokemons in the box or pension.


I'd totally appreciate someone implementing these ideas! And thx for all the stuff that is already there!

Trainer 781 December 26th, 2014 8:44 PM

Quote:

Originally Posted by FBI agent (Post 8548768)
Thanks :)
Jeez KDS, I don't wanna have to update the first post this often :P
Good job, lol.

Keep working harder and toil, matey. ;P

El Diabeetus December 26th, 2014 11:59 PM

Hm, just thought of another potential thing that hasn't been done. May not be do able, but what about Critical Capture?

RuFF December 27th, 2014 3:28 AM

I don't know if i'm the only one requesting a routine for pokemon ruby
I don't have something to contribute because i don't know how to asm
well i have 2 requests I hope you don't mind

1. You know when it's raining on the overworld it's raining in a pokemon battle. I'd like to see routine that when it's snowing/ashesfalling it's hailing in pokemon battle.

2. And a routine just like in JPAN's Hacked engine where you can make your own items that work with your custom scripts.

it's okay for me if this is not answered because i know that most of you hack fire red now

LocksmithArmy December 27th, 2014 6:26 AM

Quote:

Originally Posted by quil09 (Post 8549470)
2. And a routine just like in JPAN's Hacked engine where you can make your own items that work with your custom scripts.

This has been done... infact, complete item editor does it for you... super simple to implement

Volt-Ikazuchi December 27th, 2014 12:08 PM

Thanks for the No EXP Routine. This will really help to extract the salt of players who think they can level up mid Gym-Battle and get a advantage or something.

TheRabbit December 27th, 2014 8:28 PM

FBI - I know you said you aren't developing routines anymore but I was just looking for some insight. Have you ever looked into changing the events that affect the player's trainer card in FR?

As an example, if I wanted to make it so finishing a new event gives a trainer card star instead of that stupid Doduo game. How would I do this?

kearnseyboy6 December 27th, 2014 9:14 PM

Quote:

Originally Posted by TheRabbit (Post 8550604)
FBI - I know you said you aren't developing routines anymore but I was just looking for some insight. Have you ever looked into changing the events that affect the player's trainer card in FR?

As an example, if I wanted to make it so finishing a new event gives a trainer card star instead of that stupid Doduo game. How would I do this?

I'm pretty sure it's either a variable or flag that affects the trainer card. Just make your own events that change these variables.

Spherical Ice December 28th, 2014 2:41 AM

Quote:

Originally Posted by TheRabbit (Post 8550604)
FBI - I know you said you aren't developing routines anymore but I was just looking for some insight. Have you ever looked into changing the events that affect the player's trainer card in FR?

As an example, if I wanted to make it so finishing a new event gives a trainer card star instead of that stupid Doduo game. How would I do this?

Quote:

Originally Posted by kearnseyboy6 (Post 8550652)
I'm pretty sure it's either a variable or flag that affects the trainer card. Just make your own events that change these variables.

Just a reminder guys, not necessarily targeted only at you two, that this is for ASM resources, and so questions don't belong here. Instead, post in the ASM & Disassembly Help Thread in the future. Thanks!

DizzyEgg December 31st, 2014 2:58 PM

Hey, I've got a simple request.
Could you change the boost that held items such as mystic water, charcoal, magnet, twisted spoon etc. give from 10% to 20%.

Lance32497 December 31st, 2014 3:44 PM

Quote:

Originally Posted by FBI agent (Post 8527650)

Battle Modes!



In this post, we will be implementing a base skeleton structure to allow the hacker to add in their own battle modes, I'll also be including some example "add-ons" so you know how to do it yourself. The post currently contains possibilities for the hacker to implement routines which run once at the end of each turn (perfect for tournament clauses) and a routine which runs once every move is chosen and used (perfect for trainer sliding *hint hint danillS*).

I'm calling it a skeleton, but it's actually more like a hook into a routine which runs your routines!
It works like this:
1) Hook from original to routine which runs routines
2) If flag is set, routine runs the routines it's told to run
3) Returns back to hooking location

So all you really need to do to add new battle modes, is add to the list of routines we call (Which is simple, I'll explain in detail later). I should also mention that these routines are called in ALL types of battle including wild, trainer, and scripted. Happy hacking!

Battle Routine By Move:



This routine will run, on average four times per turn. Once you select your move, once you use your move, once the opponents uses their move and at the end of the aftermath. This makes the routine a perfect branching place for an Oak-tutorial like battle.

How to insert:
Look at the routine below. The last line .table has an incomplete pointer. It says 0x[pointer to routine table]. Find enough free space (takes 4 byte per routine) in your ROM and set the pointer for .table to that. You do not add +1 to the pointer, nor is it in reverse hex. Once you've fixed the pointer, compile the routine into free space. The last pointer in the routine NEEDS to be 00 00 00 00.


Spoiler:

Code:

.text
.align 2
.thumb
.thumb_func

main
        push {r0-r4}
        mov r0, #0xBF @flag to check divided by 4
        lsl r0, r0, #0x2
        ldr r1, =(0x806E6D0 +1)
        bl linker
        cmp r0, #0x0
        beq noCrash
        ldr r4, .table

loop:
        ldr r1, [r4]
        cmp r1, #0x0 @check table entry is null
        beq noCrash
        bl linker @call table routine
        add r4, r4, #0x4 @get next table routine
        b loop

noCrash:
        pop {r0-r4}
        lsl r0, r0, #0x18
        lsr r0, r0, #0x18
        mov r10, r0
        lsl r1, r1, #0x10
        lsr r1, r1, #0x10
        ldr r2, =(0x2022874)
        ldr r0, =(0x800E2EA +1)
        bx r0

linker:
        bx r1

.align 2

.table:
        0x[pointer to routine table] @THIS IS FREE SPACE IF IT'S YOUR FIRST TIME USING THIS ROUTINE


Navigate to


Now navigate to 0xE2E0 and insert the byte changes:
Code:

00 4D 28 47 XX XX XX 08


Where XX XX XX is the reverse hex pointer to your routine +1.



Usage:
The routine is toggled by flag 0x2FC. Activate the flag to toggle routines called by this routine. To add routines into the list of called routines, navigate to the pointer of freespace you made .table point to. Insert into that table pointers in reverse hex +1 to wherever you compiled the addon routines make sure they have the 0x8 prefix. The structure of the table should be: [routine pointer in reverse hex +1 (4 bytes)] for each pointer in the table. I.e if I put the addon at 0x740000, the pointer would read 01 00 74 08.

why I got this error?
https://z-1-scontent-a-hkg.xx.fbcdn.net/hphotos-xpa1/v/t1.0-9/10896888_767975836603808_8462018698209144451_n.jpg?oh=9e352336e8c53b82ac50710c2d0f7edd&oe=5532469F

help please

Quote:

Originally Posted by FBI agent (Post 8527650)

Battle by turn addons:



Sleeping clause:
Spoiler:

Code:

.text
.align 2
.thumb
.thumb_func

main:
        push {r0-r3,lr}
        mov r2, #0x0 @pokemon counter
        mov r3, #0x0 @sleeping counter

loop:
        cmp r2, #0x5
        beq validateBattle
        ldr r0, =(0x202402C + 0x50)
        mov r1, #0x64
        mul r1, r1, r2
        add r0, r0, r1
        ldrb r0, [r0]
        lsl r0, r0, #0x5
        lsr r0, r0, #0x5
        cmp r0, #0x0 @check sleeping
        beq next
        add r3, r3, #0x1
next:
        add r2, r2, #0x1
        b loop

validateBattle:
        cmp r3, #0x1 @check amount sleeping <=1
        ble end
        ldr r0, =(0x2023E8A)
        mov r1, #0x5
        strb r1, [r0]       

end:
        pop {r0-r3, pc}

.align 2




Battle end by turn:
Spoiler:

Code:

.text
.align 2
.thumb
.thumb_func

main:
        push {r0-r1,lr}
        ldr r0, =(0x20370CC)
        ldrb r0, [r0]
        ldr r1, =(0x3994FA3)
        ldrb r1, [r1]
        cmp r1, r0
        bne end
        ldr r0, =(0x2023E8A)
        mov r1, #0x5
        strb r1, [r0]
end:
        pop {r0-r1, pc}

.align 2



Hi, if flag 0x2f8 has been set, will Sleeping clause and battle by end turn function simultaneously?

daniilS December 31st, 2014 3:56 PM

You need to put .word before the 0xpointerToTable I think.

Aruaruu December 31st, 2014 7:24 PM

Quote:

Originally Posted by DizzyEgg (Post 8556897)
Hey, I've got a simple request.
Could you change the boost that held items such as mystic water, charcoal, magnet, twisted spoon etc. give from 10% to 20%.

This can be done in nearly any item editor. Just change the second special value to whatever you want.

DizzyEgg January 1st, 2015 3:16 PM

Hey. I've got some ideas that could make the game more similar to the newer ones. I don't know if they're all doable in ASM or if they could be done without it. If so, sorry. Anyway, here's my ideas:
- Electric types are immune to paralysis.
- Sturdy negates all hits that would OHKO-ed them and leaves Pokemon with 1 HP
- Grass types' immunity to powder moves i.e spore, poison powder etc.
- New items such as toxic orb, flame orb, focus sash, scope lens etc.

Lance32497 January 2nd, 2015 4:28 AM

Quote:

Originally Posted by FBI agent (Post 8515384)
Use special 0x9F to select the Pokemon then callasm.


EV Reducing berries



Speaking of special 0x9F, I finished EV reducing berries which was rather easy.
First of all, follow this tutorial: http://www.pokecommunity.com/showthread.php?t=258426
until you get to the part where you have to give the item an effect via script.

Compile and insert into free space the following routine:
Spoiler:

Code:

.text
.align 2
.thumb
.thumb_func

main:
        push {r0-r4, lr}
        ldr r0, = (0x20370C0)
        ldrb r1, [r0]
        ldr r0, =(0x2024284)
        mov r2, #0x64
        mul r1, r1, r2
        add r0, r0, r1
        mov r4, r0
        ldr r2, =(0x20370D0)
        ldrb r1, [r2]
        push {r4}
        ldr r3, =(0x803FBE8 +1)
        bl linker
        pop {r4}
        ldr r2, =(0x20370B8)
        ldrb r3, [r2]
        cmp r3, r0
        bhi NoEffect
        sub r0, r0, r3
        mov r3, r0

end:
        mov r0, r4
        ldr r2, =(0x20370D0)
        ldrb r1, [r2]
        strh r3, [r2]
        ldr r3, =(0x804037C +1)
        bl linker
        pop {r0-r3, pc}

noEffect:
        ldr r2,  =(0x20370d0)
        mov r1, #0xFF
        strb r1, [r2]
        pop {r0-r4, pc}

linker:
        bx r3

.align 2


Here's a compiled version:
Code:

1F B5 10 48 01 78 10 48 64 22 51 43 40 18 04 1C 0E 4A 11 78 10 B4 0E 4B 00 F0 13 F8 10 BC 0D 4A 13 78 83 42 FE D8 C0 1A 03 1C 20 1C 07 4A 11 78 13 80 09 4B 00 F0 05 F8 0F BD 04 4A FF 21 11 70 1F BD 18 47 C0 70 03 02 84 42 02 02 D0 70 03 02 E9 FB 03 08 D2 70 03 02 7D 03 04 08




For the part of inserting a script to give your item functionality, you need to insert this script.
Code:

#dyn 0x740000
#org @start
special 0x9f
waitspecial
storepartypokemon 0x0 0x8004 'bufferpokemon2 in xse
setvar LASTRESULT 0x[EV to modify]
setvar 0x8000 0x[amount to decrease EV by]
callasm 0x[routine +1]
compare LASTRESULT 0xFF
if == jump @failed
storevar 0x1 0x800F 'buffervar in xse
msgbox @gain
callstd MSG_NORMAL
removeitem 0x[ID] 0x1
release
end

#org @failed
msgbox @noEffect
callstd MSG_NORMAL
release
end

#org @noEffect
= It would have no effect!

#org @gain
= \v\h02 gained \v\h03\nInsert the EV your berry gives


In variable 0x8000 put the amount the EV is to decrease by.
In variable 0x800D put which EV you want to modify, in this format:
0x1A - HP EV
0x1B - Attack EV
0x1C - Defence EV
0x1D - Speed EV
0x1E - Sp. Attack EV
0x1F - Sp. Defence EV

Tried and tested but it doesnt work

Mickey` January 2nd, 2015 5:17 AM

Quote:

Originally Posted by FBI agent (Post 8547374)

Adjusting Shiny encounter chance



[...]

After you've done that, compile and insert the following routine into free space:

Spoiler:

Code:

.text
.align 2
.thumb
.thumb_func

main:
        push {r0-r3}
        mov r0, #0x1 @item ID
        mov r1, #0x1
        ldr r2, =(0x8099F40 +1)
        bl linker
        cmp r0, #0x0
        beq normal
        mov r0, #0xA
        lsl r0, r0, #0x7
        add r0, r0, #0x55 @1/1365 chance with shiny charm
        b calcChance

normal:
        mov r0, #0x20
        lsl r0, r0, #0x7 @1/4096 chance normally

calcChance:
        ldr r1, =(0x20370B8)
        strh r0, [r1]
        ldr r2, .random
        bl linker
        cmp r0, #0xFF
        bne
        ldr r1, =(0x20370BC)
        strb r0, [r1]
        ldr r1, =(0x20370B8)
        mov r0, #0x0
        strh r0, [r1]

end:
        pop {r0-r3}
        sub SP, SP, #0x20
        mov r7, r0
        ldr r4, [SP, #0x40]
        ldr r4, [SP, #0x48]
        mov r5, #0xE
        ldr r6, =(0x803DAD8 +1)
        bx r6

linker:
        bx r2

.align 2

.random:
        .word 0x8[RANDOM +1]





[...]


I have two questions :

First, what did you forget after the bne in calcChance ? I don't really understand what this check does.

Also, if I want to change the shiny encounter chance (without the shiny charm), I have to change this two lines, right ?

Code:

mov r0, #0x20
lsl r0, r0, #0x7 @1/4096 chance normally


For example,

Code:

mov r0, #0x2
lsl r0, r0, #0x0


With this code, I have one chance on two to find a shiny Pokemon ?

Thanks ! :)

AkameTheBulbasaur January 2nd, 2015 1:38 PM

Quote:

Originally Posted by Lance32497 (Post 8560582)
Tried and tested but it doesnt work

How does it not work for you? Does is not run the script? Or does it run the script but not cause any effect? I was able to get it to run a script, and it seems to have worked for me. You can PM me and I'll help you out more.

Blah January 2nd, 2015 2:57 PM

Quote:

Originally Posted by daniilS (Post 8556959)
You need to put .word before the 0xpointerToTable I think.

Yeah, you're right. I miss some stuff from time to time when I port them from my computer to the site :x

Quote:

Originally Posted by Lance32497 (Post 8560582)
Tried and tested but it doesnt work

I know 2 confirmed people who've gotten it working. Uhhh...maybe you inserted it incorrectly or something.

Quote:

Originally Posted by Mickey` (Post 8560625)
I have two questions :

First, what did you forget after the bne in calcChance ? I don't really understand what this check does.

Also, if I want to change the shiny encounter chance (without the shiny charm), I have to change this two lines, right ?

Code:

mov r0, #0x20
lsl r0, r0, #0x7 @1/4096 chance normally


For example,

Code:

mov r0, #0x2
lsl r0, r0, #0x0


With this code, I have one chance on two to find a shiny Pokemon ?

Thanks ! :)

That should say, "bne end" sorry. Yes, your version would make it 50% chance for a shiny (though at that point you don't need the lsl)

Lance32497 January 2nd, 2015 3:22 PM

Quote:

Originally Posted by FBI agent (Post 8561631)
I know 2 confirmed people who've gotten it working. Uhhh...maybe you inserted it incorrectly or something.

huh? I check it off, by the way, I used LockSmithArmys complete item editor

Mickey` January 2nd, 2015 4:07 PM

Quote:

Originally Posted by FBI agent (Post 8561631)
That should say, "bne end" sorry. Yes, your version would make it 50% chance for a shiny (though at that point you don't need the lsl)

Okay, so I was right, but it doesn't work. I compile the 3 routines correctly, and it works only if I set the variable 8002 to 0xFF. But if I don't set the var to this value, the wild Pokemon isn't shiny. I tryed to set a great probability to encounter a shiny in the routine (1/2), but the wild Pokemon is still normal, not shiny...

daniilS January 2nd, 2015 4:43 PM

FBI had explained it should have been a bne end.

Blah January 3rd, 2015 12:45 AM

Quote:

Originally Posted by Lance32497 (Post 8561677)
huh? I check it off, by the way, I used LockSmithArmys complete item editor

I don't use many tools, so I'm not sure how that really works. I just know the routine is fine and dandy.

Quote:

Originally Posted by Mickey` (Post 8561758)
Okay, so I was right, but it doesn't work. I compile the 3 routines correctly, and it works only if I set the variable 8002 to 0xFF. But if I don't set the var to this value, the wild Pokemon isn't shiny. I tryed to set a great probability to encounter a shiny in the routine (1/2), but the wild Pokemon is still normal, not shiny...

It should work. I've tested the routine myself on a clean ROM and simply just pasted the code over here with some minor edits to make it insertable for others. Also it calls the random number generating routine to determine the chance. Did you insert that as well?

If you want to send me your ROM, I can point out what exactly is going downhill for you. Most of the time with these kind of problems it's a simple mistake somewhere or a missing routine.

I know for a fact this routine system works because I've also used it in other places like chain fishing (which I've also tested).

Lance32497 January 3rd, 2015 12:59 AM

I dont know why but all the scripts I made and inserted in LSA-Complete item editor came in an error, I really dont know why? I should contact him.

Mickey` January 3rd, 2015 3:27 AM

Quote:

Originally Posted by FBI agent (Post 8562645)
It should work. I've tested the routine myself on a clean ROM and simply just pasted the code over here with some minor edits to make it insertable for others. Also it calls the random number generating routine to determine the chance. Did you insert that as well?

If you want to send me your ROM, I can point out what exactly is going downhill for you. Most of the time with these kind of problems it's a simple mistake somewhere or a missing routine.

I know for a fact this routine system works because I've also used it in other places like chain fishing (which I've also tested).

Finally, I found the problem !

It's in the code of the shiny encounter chance :

Code:

.text
.align 2
.thumb
.thumb_func

main:
        push {r0-r3}

normal:
        mov r0, #0x2
        lsl r0, r0, #0x0 @1/2 chance normally

calcChance:
        ldr r1, =(0x20370B8) @ var 8000
        strh r0, [r1] @ var 8000 = r0
        ldr r2, .random
        bl linker @ random between 0 et r0
        cmp r0, #0xFF
        bne end
        @ if equal to 0xFF, the Pokemon is shiny
        ldr r1, =(0x20370BC)
        strb r0, [r1]
        ldr r1, =(0x20370B8)
        mov r0, #0x0
        strh r0, [r1]

end:
        pop {r0-r3}
        sub SP, SP, #0x20
        mov r7, r0
        ldr r4, [SP, #0x40]
        ldr r4, [SP, #0x48]
        mov r5, #0xE
        ldr r6, =(0x803DAD8 +1)
        bx r6

linker:
        bx r2

.align 2

.random:
        .word 0x8C00001


In fact, if I set r0 to 2 (for example), the random value will be 0 or 1. Generally speaking, if I set r0 to a value under 0xFF, r0 will never be equal to 0xFF, so the Pokemon won't be shiny.

I wrote cmp r0, #0x0 instead of. And also, because we must set 8002 to 0xFF to make a Pokemon shiny, I added the line mov r0, #0xFF.

Here is my new code :

Code:

.text
.align 2
.thumb
.thumb_func

main:
        push {r0-r3}

normal:
        mov r0, #0x2
        lsl r0, r0, #0x0 @1/2 chance normally

calcChance:
        ldr r1, =(0x20370B8)
        strh r0, [r1]
        ldr r2, .random
        bl linker
        cmp r0, #0x0
        bne end
        mov r0, #0xFF
        ldr r1, =(0x20370BC)
        strb r0, [r1]
        ldr r1, =(0x20370B8)
        mov r0, #0x0
        strh r0, [r1]

end:
        pop {r0-r3}
        sub SP, SP, #0x20
        mov r7, r0
        ldr r4, [SP, #0x40]
        ldr r4, [SP, #0x48]
        mov r5, #0xE
        ldr r6, =(0x803DAD8 +1)
        bx r6

linker:
        bx r2

.align 2

.random:
        .word 0x8C00001


It works perfectly. Thank you for your work fbi, you're great ! {XD}

Lance32497 January 4th, 2015 3:58 PM

Quote:

Originally Posted by FBI agent (Post 8531480)
Usage:
setvar 0x8002 0xFF 'This line makes it so the next Pokemon you encounter, or are given is a shiny Pokemon with a properly generated PID. I've made it so the code sets 0xFF back to 0x0 so you don't have to disable it after. There's only an enable switch :)

so this code works?
Quote:

...
setvar 0x8002 0xFF
callasm [routine+1]
...
because it doesnt work for me if I just set the var

Quote:

Originally Posted by KDS (Post 8537176)
Wide Lens (Raises wielder's accuracy by 10%)

Spoiler:

At 1E050: 00 4A 10 47 XX+1 XX XX 08
ZZ is the mystery byte of your item.

Code:

.text
.align 2
.thumb
.thumb_func

ldr r0, =0x2023d6b
ldrb r0, [r0, #0x0]
mul r0, r5
add r0, r0, r7
add r0, #0x2e
ldrh r0, [r0, #0x0]
bl geteffect
cmp r0, #0xZZ
bne noboost

mov r0, #0x6E
mul r0, r4
mov r1, #0x64
bl divide
lsl r0, r0, #0x10
lsr r4, r0, #0x10

noboost:
mov r0, #0x0
str r0, [sp, #0x0]
mov r0, #0x13
mov r1, #0x0
ldr r2, return
bx r2

divide:
ldr r2, divider
bx r2

geteffect:
ldr r1, getbyte
bx r1

.align 2
getbyte: .word 0x0809A925
divider: .word 0x081E4019
return: .word 0x0801E059



Hello ^_^
What is the mystery byte?
There's no item wide lens in Gen3 right? then Should I create new item? then what is next?

Trainer 781 January 5th, 2015 1:25 AM

Quote:

Originally Posted by Lance32497 (Post 8565455)

Hello ^_^
What is the mystery byte?
There's no item wide lens in Gen3 right? then Should I create new item? then what is next?

It is actually the Hold Effect Item byte or Special Value 1 byte. You should create a new item for this then assign it hold effect item byte.

DizzyEgg January 5th, 2015 2:11 AM

I have a simple request. Could anyone implement the toxic orb?

Lance32497 January 5th, 2015 3:57 AM

Quote:

Originally Posted by KDS (Post 8566102)
It is actually the Hold Effect Item byte or Special Value 1 byte. You should create a new item for this then assign it hold effect item byte.

There are 42 Mystery bytes(in Hex) in rom, so Does it mean I should use the existing Mystery byte or I can expand it so that Ill be having more than 42 Mystery bytes?

Trainer 781 January 5th, 2015 5:43 AM

Quote:

Originally Posted by Lance32497 (Post 8566210)
There are 42 Mystery bytes(in Hex) in rom, so Does it mean I should use the existing Mystery byte or I can expand it so that Ill be having more than 42 Mystery bytes?

Lol, you should use a new number. Just open up an item editor and select your desired item, then in the special value 1 field enter a number that you kept instead of ZZ in the ASM. ( just make sure that no. is different from the prexisting item's special value numbers, you can check locksmitharmy's hold-item effect thread in the R&D forum for reference).

Lance32497 January 5th, 2015 6:24 AM

Quote:

Originally Posted by KDS (Post 8566296)
Lol, you should use a new number. Just open up an item editor and select your desired item, then in the special value 1 field enter a number that you kept instead of ZZ in the ASM. ( just make sure that no. is different from the prexisting item's special value numbers, you can check locksmitharmy's hold-item effect thread in the R&D forum for reference).

ahhhhm so lets say I used 43, is that right? I read his thread and the rom has 42(in Hex), 43 as my new effect byte.

Trainer 781 January 5th, 2015 6:50 AM

Quote:

Originally Posted by Lance32497 (Post 8566338)
ahhhhm so lets say I used 43, is that right? I read his thread and the rom has 42(in Hex), 43 as my new effect byte.

It is fine. But i prefer keeping larger numbers like 73-76 to be on the safe side

Blah January 5th, 2015 7:42 AM

Quote:

Originally Posted by Mickey` (Post 8562757)
Finally, I found the problem !

It works perfectly. Thank you for your work fbi, you're great ! {XD}

Wow, I'm an idiot, sorry. I forgot completely about that haha. Well, at least hopefully it was a good exercise for you :P

Quote:

Originally Posted by Dark Zeta (Post 8565315)
I was wondering if the battle by turn routine also worked with double battles.

90% sure it does (I haven't tested, but I do believe they use that portion of code in both battle types).

Quote:

Originally Posted by Lance32497 (Post 8565455)
so this code works?

It does work. I've tested that one quite thoroughly :X


Updates:
- Pokemon custom attacks routine has been updated
- Battle by move (and turn) bug fixes + efficiency updates
- some other small bug fixes that I don't feel like listing (EV berries and stuffs)

I'm currently working on having one time/limited quantity buying for marts right now. I expect that to be done sometime this week, lately I've been lazy and busy :P

Mickey` January 5th, 2015 8:58 AM

Quote:

Originally Posted by FBI agent (Post 8566411)
Wow, I'm an idiot, sorry. I forgot completely about that haha. Well, at least hopefully it was a good exercise for you :P

Yes, it was :P

I have another question (because nobody replied to my previous post) : does anyone know the offset of the routine which check the Cave byte (Regular/Dark, Flash usable/Dark, Flash unusable) ?

Thanks !

Blah January 5th, 2015 9:14 AM

Quote:

Originally Posted by Mickey` (Post 8566492)
Yes, it was :P

I have another question (because nobody replied to my previous post) : does anyone know the offset of the routine which check the Cave byte (Regular/Dark, Flash usable/Dark, Flash unusable) ?

Thanks !

The map is a cave if in RAM location 0x2036E11 is 0x1 and the lightING is determined at 0x2036E13 I believe. There are a lot of routines that check the current map header, so there isn't really a particular routine that I can give you which checks this. I can tell you that the routine for flash is at 0x80C9B2C

Mickey` January 5th, 2015 10:09 AM

Quote:

Originally Posted by FBI agent (Post 8566516)
The map is a cave if in RAM location 0x2036E11 is 0x1 and the lightING is determined at 0x2036E13 I believe. There are a lot of routines that check the current map header, so there isn't really a particular routine that I can give you which checks this. I can tell you that the routine for flash is at 0x80C9B2C

Thanks a lot ! I'm going to check if I can use these offsets.

Lance32497 January 5th, 2015 3:34 PM

Quote:

Originally Posted by KDS (Post 8566358)
It is fine. But i prefer keeping larger numbers like 73-76 to be on the safe side

Ahhh, Thanks ^_^
May I ask, When you tested that, what mystery byte did you used?

EDIT: FBI about your Temporary Deleting the EXP GAIN portion, it doesnt share EVs of a Pokemon I battled before

Xencleamas January 7th, 2015 10:26 PM

Quote:

Originally Posted by FBI agent (Post 8547363)

Temporarily disabling EXP gains from battle



It was brought to my attention by some requesters that for their battle/tournament events they wouldn't want their Pokemon leveling up. This routine disables the exp gains in battle. Note that the player can still use stuff like Rare Candy to level. The fix to that is exactly the same as this, but with slight modifications. I hope you don't give the player a chance to rare candy in battle though or I will go to your hack's thread and severly criticize your lack of common sense :c


How to insert:

Compile and insert the following routine into free space:

Spoiler:

Code:

.text
.align 2
.thumb
.thumb_func

main:
        push {r0-r3}
        mov r0, #0xFF
        lsl r0, r0, #0x1
        add r0, r0, #0x4
        ldr r2, =(0x806E6D0 +1) @checkflag 0xFF *0x2 + 4 = 0x202
        bl linker
        cmp r0, #0x1
        beq skip
        pop {r0-r3}
        cmp r0, #0x64
        beq noCrash
        ldr r0, =(0x8021D24 +1)
        bx r0

skip:
        pop {r0-r3}

noCrash:
        ldr r1, [r5]
        add r1, #0x53
        ldrb r0, [r1]
        ldr r2, =(0x8021D04 +1)

linker:
        bx r2

.align 2


Here's a compiled version:
Code:

0F B4 FF 20 40 00 04 30 07 4A 00 F0 0C F8 01 28 04 D0 0F BC 64 28 02 D0 04 48 00 47 0F BC 29 68 53 31 08 78 02 4A 10 47 D1 E6 06 08 25 1D 02 08 05 1D 02 08




Now navigate to 0x21CFA and insert the following byte changes:
Code:

00 00 00 49 08 47 XX XX XX 08


Where XX XX XX is the reverse hex pointer to where you inserted this routine +1.

Usage:

If flag 0x202 is set, the EXP gains will be disabled. Obviously, to re-enable just clear the flag.
Currently the way I'm doing this is by making the game act like the player's party is already max level, so therefore they don't gain exp :)

Hmm... that's one good thing to implement. If someone has a passion to make Black Tower/White Treehollow in any hack, do you have (or will you make) an independent routine to disable the usage of items (holding is still able)?

Joexv January 16th, 2015 6:50 PM

Ok so I hath a request. Both are for Emerald.
1: a routine that allows you to dynamically change the wild pokemon of the route you are in, via variables or such.
this was already done for Fire Red so I would hope it wouldnt be too terrible to port.

2: a routine that only allows flying/dragon type pokemon to be sent out into battle. Pretty much like the sky battles in x/y. But not quite the same.

Lance32497 January 16th, 2015 8:52 PM

Quote:

Originally Posted by joexv (Post 8582761)
Ok so I hath a request. Both are for Emerald.
1: a routine that allows you to dynamically change the wild pokemon of the route you are in, via variables or such.
this was already done for Fire Red so I would hope it wouldnt be too terrible to port.

2: a routine that only allows flying/dragon type pokemon to be sent out into battle. Pretty much like the sky battles in x/y. But not quite the same.

What?
Is that true?
May I have the name who did that?

Joexv January 16th, 2015 8:55 PM

Quote:

Originally Posted by Lance32497 (Post 8582858)
What?
Is that true?
May I have the name who did that?

Yes its true.
Jpan.
Its in his hacked engine.
Spoiler:
Special 0x58 – Wild Pokémon Data Switch

Receives Arguments? Yes.
0x8006 = Pointer location
Key
0x0 = loaded with LoadPointer
0x1 = at variable 0x8008 and 0x8009, like special 0x56
0x2 = insert by hand or already there.
--------------------------------
Variable 0x8005 is the location. Same key as special 0x56 variable 0x8007

Returns values? No

Use this to switch the pokémon that appear in the map with a set of fresh new ones. I will briefly explain how the Wild pokémon data is laid out:

Name Bytes Description
Minimum level 1 The minimum level the pokémon appears at
Maximum Level 1 The maximum level the pokémon might appear at. Oddly enough, if this level is smaller than the previous one, the original game switches them both.
Pokémon species 2 The pokémon in-game number.

Repeat this for as long as you need for each type, that is:
 For grass wild data, place 12 pokémon, in order from least rare to most rare. Even if only one pokémon type appears in the entire route, fill all slots with pokémon, copies of the old ones. Any empty slots will lead to angry ??????? at LV 0, and nobody wants that.
There is a percentage table for the chances of appearance here, but I don’t have one, sorry.
 For Surfing area, place 5 pokémon from least rare to rarest. Fill every slot.
 For Tree Area, do the same as the Surfing area.
 For Fishing area, there are 10 pokemon to fill. The first two are caught by the Old Rod, the next three by the Good Rod and the last five by the Super rod

This will allow you to switch dynamically the Wild data on your map for all of the four, using a separate memory bank for each. That means that you can use all different wild data for all four or, if you wish, fill all with the same data. Just remember, you must fill each individually with the respective slot, on at a time, even if they’re equal.

Red John January 19th, 2015 9:15 PM

Can we still contribute here? I have some "Alpha" abilities to contribute

C me January 20th, 2015 4:24 AM

This is for Pokemon Emerald.

Basically to balance strong moves like hyper beam, those moves have a recharge turn where you can't use any moves. This forces the player to use these moves in a more tactical way like behind a substitute or something. As I am thinking of implementing new moves into my hack, some of them will be op and therefore would be unfair to spam every turn.

The 'recharge' effect would not be optimal for what I want to do though, what would seem more optimal is something similar to the disable feature.

I can't post links yet but im sure you know how it works.

The 'cooldown' mechanic would work like this: after a move has been used the next turn it cannot be used again but other moves can. Just like with disable there is a message box saying 'cooldown'which conveniently has the same number of letters as 'disabled' so no need to repoint. If the move is selected a message box will appear saying 'X is on cooldown', x being the move. Unlike the move disable, the number of turns the move would be disabled for isn't random but is preset somewhere in the ROM in a 'disable table' where each move would have a value for the number of turns to be disabled. Multiple moves can be disabled at the same time and if all the moves are disabled then struggle is used, although this would almost never happen because most moves will be disabled for less than 4 turns. This effect would also have to happen for the AI. If possible the disable timer wouldn't stop through status effects and a move will not be enabled after switching the pokemon out,i.e not a temporary status condition.

I know this will require ASM knowledge which I really don't have but I can work my way around a hex editor if that helps.

So I guess my question is how could this be implemented and how difficult is it to implement?

I understand this is a big ask but it's a core feature to my new battle system and I don't think it is impossible to do.

Thank You

Christos January 20th, 2015 5:57 AM

Quote:

Originally Posted by Lone Knight (Post 8586889)
Can we still contribute here? I have some "Alpha" abilities to contribute

Yeah, anyone can contribute.

hihohilton January 27th, 2015 4:39 PM

if possible could you make a code to give gift pokemon custom/hidden abilities that are carried during evolution and also a code that lets you choose which ability a trainers pokemon has

Blah January 28th, 2015 7:30 AM

Quote:

Originally Posted by hihohilton (Post 8596656)
if possible could you make a code to give gift pokemon custom/hidden abilities that are carried during evolution and also a code that lets you choose which ability a trainers pokemon has

Hi, the Pokemon with custom attack routine covers "gifted" Pokemon's movesets. I'm not sure what you mean by, "carried during evolution". Perhaps you can specify a little more?

I'll work on a routine to edit trainer Pokemon's stuff soon. Btw, I'm personally open to requests again, though I probably don't want to do anything battle related :x

hihohilton January 28th, 2015 10:08 PM

Quote:

Originally Posted by FBI agent (Post 8597445)
Hi, the Pokemon with custom attack routine covers "gifted" Pokemon's movesets. I'm not sure what you mean by, "carried during evolution". Perhaps you can specify a little more?

I'll work on a routine to edit trainer Pokemon's stuff soon. Btw, I'm personally open to requests again, though I probably don't want to do anything battle related :x

What i mean is that say in your hack you had given bulbasaur overgrow and effect spore but you wanted a special gift one with chlorophyll well would it be possible to do that and by carried by evolution i mean if said bulbasaur was to evolve it would still have chlorophyll

Lance32497 January 29th, 2015 2:51 AM

I googled it so I dont know if it has been done, I have watched a youtube vid about changing player OW in FireRed but the uploader didnt give the code, could you find that out?

Kenny1 January 29th, 2015 8:44 AM

Quote:

Originally Posted by Lance32497 (Post 8598475)
I googled it so I dont know if it has been done, I have watched a youtube vid about changing player OW in FireRed but the uploader didnt give the code, could you find that out?

JPAN did it, I think that is what you're looking for.

Lance32497 January 30th, 2015 6:29 AM

hello, can anyone here make an evolution method where when pokemon's holding an specific item(like trade holding item) maxed out its happiness, it will evolve..
I think it will just combine Via Happiness and Trade holding item)

Blah January 30th, 2015 8:58 AM

Quote:

Originally Posted by hihohilton (Post 8598344)
What i mean is that say in your hack you had given bulbasaur overgrow and effect spore but you wanted a special gift one with chlorophyll well would it be possible to do that and by carried by evolution i mean if said bulbasaur was to evolve it would still have chlorophyll

I'm pretty sure that's how it works ingame already. The ability bit doesn't change when a Pokemon evolves in FR. 90% sure.

Quote:

Originally Posted by Lance32497 (Post 8600107)
hello, can anyone here make an evolution method where when pokemon's holding an specific item(like trade holding item) maxed out its happiness, it will evolve..
I think it will just combine Via Happiness and Trade holding item)

Yeah, that's exactly how it would be done. Though these kind of evolutions, which can happen at any time are harder to handle in game. We would have to do the checks kinda frequently. The question becomes, how frequent? Well actually not frequent at all. Just two checks in both scenarios. Pokemon reaches max happiness and Pokemon receives item. So if I was coding this I'd make two different breaks at the Happiness adder, and a second at the give item part.

Was that the information you were looking for? Or did you want me to do one for you?

Lance32497 January 30th, 2015 2:56 PM

Quote:

Originally Posted by FBI agent (Post 8600229)
I'm pretty sure that's how it works ingame already. The ability bit doesn't change when a Pokemon evolves in FR. 90% sure.



Yeah, that's exactly how it would be done. Though these kind of evolutions, which can happen at any time are harder to handle in game. We would have to do the checks kinda frequently. The question becomes, how frequent? Well actually not frequent at all. Just two checks in both scenarios. Pokemon reaches max happiness and Pokemon receives item. So if I was coding this I'd make two different breaks at the Happiness adder, and a second at the give item part.

Was that the information you were looking for? Or did you want me to do one for you?

Since you gave the detailed info, it is both, actually, all I know is to make it happens, we must combine Trade holding item and Happiness, and this is a request lol, since you are now accepting again, but you can use Kearnseyboy6's routines to compare, I think

AkimotoBubble February 8th, 2015 7:32 AM

oh it is great and why not have Emerald ASM code?

daniilS February 8th, 2015 7:39 AM

Quote:

Originally Posted by AkimotoBubble (Post 8611147)
oh it is great and why not have Emerald ASM code?

FBI likes being silly so he hates Emerald :P. I do believe some routines on here are for Em though, and you can always port the others yourself.

RichterSnipes February 13th, 2015 10:04 PM

I'd like to report an issue with the code pertaining to the Infinte TM Usage implementation for FireRed. If you teach a TM to a Pokémon with less than four known moves and watch the entire TM learning animation, the TM will be removed from your TM Case.

I actually would have never noticed that this happened had someone else not pointed it out to me. Everything else works wonders!

Blah February 15th, 2015 6:20 PM

Quote:

Originally Posted by hihohilton (Post 8598344)
What i mean is that say in your hack you had given bulbasaur overgrow and effect spore but you wanted a special gift one with chlorophyll well would it be possible to do that and by carried by evolution i mean if said bulbasaur was to evolve it would still have chlorophyll

I know what you're talking about, but abilities are done wierdly so they don't allow themselves to be easily changed/edited to any arbitrary ability. Abilities in FireRed are derrived from the PID and is represented by a single bit. If that bit is ON then the Pokemon gets it's second ability otherwise it gets it's first ability as defined in the Pokemon table. My ability swapper hack simply just inverses the bit, however you're restricted here. Since the ability is stored as a single bit, there is no way for us to calculate which ability to give, because it simply only has two possible states. You can't really expand this because the bit is stored in the Pokemon data structure in RAM which doesn't have very much free space. While I probably can find a little bit of space inbetween the 0x0 padding of values, these bytes are probably better used for things like a Pokerus feature.

Quote:

Originally Posted by Lance32497 (Post 8598475)
I googled it so I dont know if it has been done, I have watched a youtube vid about changing player OW in FireRed but the uploader didnt give the code, could you find that out?

You'll see my version...soon.

Quote:

Originally Posted by RichterSnipes (Post 8618101)
I'd like to report an issue with the code pertaining to the Infinte TM Usage implementation for FireRed. If you teach a TM to a Pokémon with less than four known moves and watch the entire TM learning animation, the TM will be removed from your TM Case.

I actually would have never noticed that this happened had someone else not pointed it out to me. Everything else works wonders!

Thanks for reporting it, I'll look into the cause!

For everyone using these routines:
If you find any bugs in anything please do report them. Make sure that the bugs are caused by the code and not insertions errors on your part though, ty.

Blah February 15th, 2015 6:45 PM

Changing the Player's Overworld ingame



Intro:

I recently made this routine, it's kind of limited in the sense that you can only be change to 30 different overworlds (excluding the special version of the default characters). While it is limited, I don't really think that that's a problem (you'd probably only be OWs swapping to 2-3 different OWs the entire game anyways, so unless you wanted to player to play as more than 30 characters, this routine will work just fine for you). It's also a little "smaller" in comparison to JPAN's 6 seperate routines which he used (though in his favor, I don't think his limits the amount like mine). I blame the table, it's weird. Actually the whole overworld loading thing is weird..it's done in like 9 places lol.

I should also note that if the OW you're changing to doesn't have a running frame, things are going to look weird when you try to run~

How to insert:

Compile into free space the following routine:
Spoiler:

Code:

.text
.align 2
.thumb
.thumb_func

@hook from 0805CA4C via r0

main:
        @flag check
checkFlag:
        mov r0, #0xFF
        lsl r0, r0, #0x2
        add r0, r0, #0xA @0x3FC + 0xA = @406
        ldr r2, =(0x806E6D0 +1)
        push {r1, r3}
        bl linker
        pop {r1, r3}
        cmp r0, #0x1
        bne noCrash

setOW:
        ldr r0, =(0x20370B8)
        ldrb r0, [r0]
        cmp r0, #0xFF
        beq noCrash
        mov r3, r0

noCrash:
        mov r8, r3
        lsl r4, r4, #0x10
        lsr r4, r4, #0x10
        lsl r5, r5, #0x10
        ldr r0, =(0x805CA54 +1)
        bx r0

linker:
        bx r2

.align 2


Here's a compiled version:
Code:

FF 20 80 00 0A 30 09 4A 0A B4 00 F0 0E F8 0A BC 01 28 04 D1 06 48 00 78 FF 28 00 D0 03 1C 98 46 24 04 24 0C 2D 04 03 48 00 47 10 47 D1 E6 06 08 B8 70 03 02 55 CA 05 08




Now navigate to 0x5CA4C and insert the following byte changes:
Code:

00 48 00 47 XX XX XX 08


Where XX XX XX is where you inserted this routine +1.


Usage:

The routine requires two conditions to toggle.
1) Flag 0x406 is set
2) Var 0x8000 is not 0xFF

As you may have guessed you need to set variable 0x8000 to a value which matches the overworld you want the player to transform into. Please note that for the effect to happen, you need to warp first.
Here's a list of values and their corresponding sprite to the left:
Spoiler:

Code:

0 - male hero
1 - female hero
3 - female hero bike
4 - male hero run
5 - female hero run
6 - male hero vs-seeker
7 - female hero vs-seeker
8 - male hero fishing
9 - female hero fishing
12 - Brendon
13 - May
26 - Male + Female hero Vs seeker on bike
28 - Random guy (A-MAP ID 25)
29 - Little boy
44 - Gem sign thing (buggy)
48 - Spearow
52 - Old man 1 (A-MAP ID 33)
80 - Jogging girl
83 - Blonde dude (A-MAP ID 26)
84 - Fat guy
88 - Old man 2 (A-MAP ID 88)
92 - Scroll backpack thing (buggy)
93 - Team rocket male
104 - Meowth
112 - Chansey
116 - Slowbro
124 - Snorlax
125 - Fisherman
166 - Kid tuber (male)
170 - Old man 3 (A-MAP ID 30)
176 - Green girl (A-MAP ID 40)
213 - Red dress lady
214 - Old lady
228 - Deoxys (I think this one is normal)
245 - Misty
250 - Hey champ in the making guy
251 - Ghost Girl



While no particular value will cause a crash, I've excluded values which are "repeated" OWs. If you experience bugs, use it in conjunction with the backsprite hack I made. If you still have bugs, report them here!

Sounak February 15th, 2015 8:14 PM

Can you please describe how to make my hunger idea possible?

Blah February 15th, 2015 8:55 PM

Quote:

Originally Posted by Sounak (Post 8620386)
Can you please describe how to make my hunger idea possible?

I did, in your thread. It involved using some RAM to keep track of hunger levels and PID. Other than that, there's no real way to do it easily. http://www.pokecommunity.com/showpost.php?p=8619691&postcount=2

Edwearth February 17th, 2015 3:40 PM

Is it possible to make an effect like Absorb, but which the percentage of recover HP can be chosen?
I have a little idea on how to do this but i think the animation will not work.

El Diabeetus February 18th, 2015 1:59 PM

Is it possible to make a different track play for a last Pokémon like the Gym Leaders in Black and White/cut the HP sound off after a few beeps like X/Y? Or if Characteristic / colored text for +/- stats due to ability?

I know I ask a lot of questions, but, these are things I wonder if it's possible to do.

BLAx501! February 19th, 2015 12:21 AM

Hey FBI, it's been a looooooooong time I don't post anything here xD. Well. I've been thinking about something I couldn't solve and since I think it may be ASM-Related, I summon you :P

I was wondering if it is possible to change from one map to another (like a warp or something) and keep the music that you started playing on the previous map.

Mickey` February 19th, 2015 1:43 AM

If the music is the same on both maps, the music won't change.

BLAx501! February 19th, 2015 4:23 AM

Quote:

Originally Posted by Mickey` (Post 8624360)
If the music is the same on both maps, the music won't change.

Of course, what I was meant to say is when the maps have different songs...

metapod23 February 19th, 2015 7:40 AM

I'm interested in inserting a Focus Sash that is reusable in Fire Red. What I mean by that is that the Focus Sash, rather than being consumed like berries, will stay held by the Pokémon, but will only activate if the user has all of its available HP. I don't like that it is a one use item lol. The Focus Band in Fire Red does the same thing, and you can change it so it always activates, but it would need to be changed to check the user's current HP with its current maximum HP.

I don't really care if it replaces Focus Band in the game, because I find it to be relatively useless as an item due to its unreliability.

Thanks in advance for anyone willing to help!

Blah February 19th, 2015 8:17 AM

Quote:

Originally Posted by Edwearth (Post 8622535)
Is it possible to make an effect like Absorb, but which the percentage of recover HP can be chosen?
I have a little idea on how to do this but i think the animation will not work.

Quote:

Originally Posted by SSJ4 Furanki (Post 8623719)
Is it possible to make a different track play for a last Pokémon like the Gym Leaders in Black and White/cut the HP sound off after a few beeps like X/Y? Or if Characteristic / colored text for +/- stats due to ability?

I know I ask a lot of questions, but, these are things I wonder if it's possible to do.

Quote:

Originally Posted by metapod23 (Post 8624589)
I'm interested in inserting a Focus Sash that is reusable in Fire Red. What I mean by that is that the Focus Sash, rather than being consumed like berries, will stay held by the Pokémon, but will only activate if the user has all of its available HP. I don't like that it is a one use item lol. The Focus Band in Fire Red does the same thing, and you can change it so it always activates, but it would need to be changed to check the user's current HP with its current maximum HP.

I don't really care if it replaces Focus Band in the game, because I find it to be relatively useless as an item due to its unreliability.

Thanks in advance for anyone willing to help!

Hi, I specifically don't do graphical ASM or battle related things. Hopefully someone will hop in and help you three out. I can tell you everything you've asked for in indeed doable. You just need to find someone willing :)


Quote:

Originally Posted by BLAxTOISE (Post 8624322)
Hey FBI, it's been a looooooooong time I don't post anything here xD. Well. I've been thinking about something I couldn't solve and since I think it may be ASM-Related, I summon you :P

I was wondering if it is possible to change from one map to another (like a warp or something) and keep the music that you started playing on the previous map.

Hey, it is ASM related, but fairly easy to do if I'm thinking about it right. I'll look into it.

For the bug where the TM gets consumed upon use after the animation:

Insert: 00 00 00 00 at 0x124F78

I'll update my TM post with this information too.

El Diabeetus February 19th, 2015 12:47 PM

Quote:

Originally Posted by FBI agent (Post 8624628)
Hi, I specifically don't do graphical ASM or battle related things. Hopefully someone will hop in and help you three out. I can tell you everything you've asked for in indeed doable. You just need to find someone willing :)




Hey, it is ASM related, but fairly easy to do if I'm thinking about it right. I'll look into it.

For the bug where the TM gets consumed upon use after the animation:

Insert: 00 00 00 00 at 0x124F78

I'll update my TM post with this information too.

Very nice! Is it supposed to be 4 sets of 00 though? I went to that offset and they already were those numbers.

Blah February 19th, 2015 1:17 PM

Quote:

Originally Posted by SSJ4 Furanki (Post 8624958)
Very nice! Is it supposed to be 4 sets of 00 though? I went to that offset and they already were those numbers.

Yup the link to the deletion function takes 4 bytes. We null out the 4 bytes by doing lsl r0, r0, #0x0. I.e the zeros.

El Diabeetus February 19th, 2015 1:29 PM

Quote:

Originally Posted by FBI agent (Post 8625003)
Yup the link to the deletion function takes 4 bytes. We null out the 4 bytes by doing lsl r0, r0, #0x0. I.e the zeros.

Huh, alrighty. Not complaining then.

Lance32497 February 21st, 2015 9:59 PM

How about fixing The "Your foe's weakness" thingy after I send out my desired pokemon?

I always encounter that text string although my Pokemon isn't my foe's weakness

Dionen February 22nd, 2015 11:15 AM

Fire Red gives you one trainer card with 8 gym badges, but some hacks have more than 8 gyms/travels to different regions. Is it possible to create more than one sets of badges? and maybe changing the trainer card backdrop/tileset with it. playing as a different person, stealing badges, there are many possibilities of events with it. It can be easily done with key-items, but come on, it's not the same thing. Well, just an idea. ^_^
All badges are only in one image, so a swapping routine would deal with that, I suppose. The rest of it can be handled via scripts

eMMe97 February 22nd, 2015 2:59 PM

Hello dude! (sorry for my english but i'm italian :S)
For many days (ehm...months xD) I try to create a new pokemon menù (the menù that appeared when you press "start"), to change the classical pokémon menù, and I want to change text with pictures (for example the picture of pokédex, or a ball for pokémon etc), and replace menù in the left of the game (however the upper side is ok, but the menù must be in horizontal in this case).
Can you help me please?

HungLikeATauros February 24th, 2015 9:35 PM

Quote:

Originally Posted by FBI agent (Post 8547374)

Adjusting Shiny encounter chance




How to insert:

Before compiling the routine look at the last line. There is a .word 0x8[RANDOM +1]. Change the content after the 0x8 to be a pointer to where you inserted RANDOM +1.

Once you've done that, look for the line that says "mov r0, #0x1 @item ID". Change 0x1 to the Item ID for your Shiny charm item. If you don't have one implemented, delete these lines:
Code:

        mov r0, #0x1 @item ID
        mov r1, #0x1
        ldr r2, =(0x8099F40 +1)
        bl linker
        cmp r0, #0x0
        beq normal
        mov r0, #0xA
        lsl r0, r0, #0x7
        add r0, r0, #0x55 @1/1365 chance with shiny charm
        b calcChance


After you've done that, compile and insert the following routine into free space:

Spoiler:

Code:

.text
.align 2
.thumb
.thumb_func

main:
        push {r0-r3}
        mov r0, #0x1 @item ID
        mov r1, #0x1
        ldr r2, =(0x8099F40 +1)
        bl linker
        cmp r0, #0x0
        beq normal
        mov r0, #0xA
        lsl r0, r0, #0x7
        add r0, r0, #0x55 @1/1365 chance with shiny charm
        b calcChance

normal:
        mov r0, #0x20
        lsl r0, r0, #0x7 @1/4096 chance normally

calcChance:
        ldr r1, =(0x20370B8)
        strh r0, [r1]
        ldr r2, .random
        bl linker
        cmp r0, #0xFF
        bne end
        ldr r1, =(0x20370BC)
        strh r0, [r1]
        ldr r1, =(0x20370B8)
        mov r0, #0x0
        strh r0, [r1]

end:
        pop {r0-r3}
        sub SP, SP, #0x20
        mov r7, r0
        ldr r4, [SP, #0x40]
        ldr r4, [SP, #0x48]
        mov r5, #0xE
        ldr r6, =(0x803DAD8 +1)
        bx r6

linker:
        bx r2

.align 2

.random:
        .word 0x8[RANDOM +1]




Now navigate to 0x3DACE and insert the following byte changes:
Code:

00 00 00 4F 38 47 XX XX XX 08


Where XX XX XX is the reverse hex pointer +1 to where you inserted this routine.


Usage:

It's Automagic, also happens to give the shiny chance to Pokemon in wild, trainer Pokemon, given Pokemon ect.

Right now encounter chance is 1/4096 without shiny charm, and 1/1356 with it.

Figured I'd ask you in the thread instead of on your profile. I've got the two prerequisites inserted but I can't seem to get this code to compile. I'm getting this error message every time:
Quote:

ShinyCharm.asm: 9 : Error: invalid immediate: 279 is out of range
This is my script:
Spoiler:
.text
.align 2
.thumb
.thumb_func


main:
push {r0-r3}
mov r0, #0x117 @item ID
mov r1, #0x1
ldr r2, =(0x8099F40 +1)
bl linker
cmp r0, #0x0
beq normal
mov r0, #0xA
lsl r0, r0, #0x7
add r0, r0, #0x55 @1/1365 chance with shiny charm
b calcChance

normal:
mov r0, #0x20
lsl r0, r0, #0x7 @1/4096 chance normally

calcChance:
ldr r1, =(0x20370B8)
strh r0, [r1]
ldr r2, .random
bl linker
cmp r0, #0xFF
bne end
ldr r1, =(0x20370BC)
strh r0, [r1]
ldr r1, =(0x20370B8)
mov r0, #0x0
strh r0, [r1]

end:
pop {r0-r3}
sub SP, SP, #0x20
mov r7, r0
ldr r4, [SP, #0x40]
ldr r4, [SP, #0x48]
mov r5, #0xE
ldr r6, =(0x803DAD8 +1)
bx r6

linker:
bx r2


.align 2

.random:
.word 0x874B7A4 +1


Any idea why?

Blah February 24th, 2015 9:56 PM

Quote:

Originally Posted by HungLikeATauros (Post 8632648)
Figured I'd ask you in the thread instead of on your profile. I've got the two prerequisites inserted but I can't seem to get this code to compile. I'm getting this error message every time:


This is my script:
Spoiler:
.text
.align 2
.thumb
.thumb_func


main:
push {r0-r3}
mov r0, #0x117 @item ID
mov r1, #0x1
ldr r2, =(0x8099F40 +1)
bl linker
cmp r0, #0x0
beq normal
mov r0, #0xA
lsl r0, r0, #0x7
add r0, r0, #0x55 @1/1365 chance with shiny charm
b calcChance

normal:
mov r0, #0x20
lsl r0, r0, #0x7 @1/4096 chance normally

calcChance:
ldr r1, =(0x20370B8)
strh r0, [r1]
ldr r2, .random
bl linker
cmp r0, #0xFF
bne end
ldr r1, =(0x20370BC)
strh r0, [r1]
ldr r1, =(0x20370B8)
mov r0, #0x0
strh r0, [r1]

end:
pop {r0-r3}
sub SP, SP, #0x20
mov r7, r0
ldr r4, [SP, #0x40]
ldr r4, [SP, #0x48]
mov r5, #0xE
ldr r6, =(0x803DAD8 +1)
bx r6

linker:
bx r2


.align 2

.random:
.word 0x874B7A4 +1


Any idea why?

mov r0, #0x117 @item ID

Mov can only load upto 0xFF. From there you need to derrive the number. Take a look at my second beginner tutorial to see how that problem is fixed. Here's the solution:

Code:

mov r0, #0xFF
add r0, #0x18



HungLikeATauros February 24th, 2015 11:46 PM

Quote:

Originally Posted by FBI agent (Post 8632657)
mov r0, #0x117 @item ID

Mov can only load upto 0xFF. From there you need to derrive the number. Take a look at my second beginner tutorial to see how that problem is fixed. Here's the solution:

Code:

mov r0, #0xFF
add r0, #0x18



So replace the item ID line with those two lines, correct? I did that and I'm not encountering any shinys after running around for over an hour with the item. For testing purposes I changed it to a 1/1 chance and I'm still not finding any.

Blah February 25th, 2015 5:37 AM

Quote:

Originally Posted by HungLikeATauros (Post 8632736)
So replace the item ID line with those two lines, correct? I did that and I'm not encountering any shinys after running around for over an hour with the item. For testing purposes I changed it to a 1/1 chance and I'm still not finding any.

You need the random number routine and the shiny generator routine I made. The three of them work in conjunction to make this effect happen. I know it works, because my test ROM is only shinies :x

HungLikeATauros February 25th, 2015 7:47 AM

Quote:

Originally Posted by FBI agent (Post 8632913)
You need the random number routine and the shiny generator routine I made. The three of them work in conjunction to make this effect happen. I know it works, because my test ROM is only shinies :x

That's the thing though, I have those inserted.

I compiled the RNG code and put it at 74B7A4.

Then I compile this shiny generator code and put it at 74B7E4:
Spoiler:
.text
.align 2
.thumb
.thumb_func

main:
ldr r0, =(0x20370BC) @0x8002 is shiny flag
ldrb r0, [r0]
cmp r0, #0xFF
bne noCrash
push {r4-r7}
ldr r0, =(0x20370BC) @set back to 0x0 because users tend to be retarded
mov r1, #0x0
strb r1, [r0]
bl generatePID
mov r4, r0
@c = A xor B; 0<= C <8; use random to determine C
ldr r0, =(0x20370B8)
mov r1, #0x8
strb r1, [r0]
ldr r4, =(0x874B7A4 +1)
bl linker
mov r3, r0
@(TID xor SID)
ldr r0, =(0x300500C)
ldr r0, [r0]
mov r1, #0xA
add r1, r1, [email protected]
ldrh r1,[r1]
mov r2, #0xC
add r0, r0, r2 @SID
ldrh r0, [r0]
eor r0, r0, r1 @(TID XOR SID) = A
eor r3, r3, r0 @(C XOR A) = B
@B = (PID[half-word] xor PID2[half-word])
lsl r4, r4, #0x10
lsr r4, r4, #0x10
eor r3, r3, r4 @(PID[half-word] XOR B) = PID2
@concatinate r4 + r3
lsl r3, #0x10
orr r3,r3, r4 @PID for shiny
pop {r4-r7}
str r3, [SP, #0x14]
b end


noCrash:
bl generatePID
mov r4, r0
b old

generatePID:
push {r4, lr}
ldr r4, =(0x8044EC8 +1)
bl linker
mov r4, r0
ldr r3, =(0x8044EC8 +1)
bl linkerThree
lsl r4, r4, #0x10
lsr r4, r4, #0x10
lsl r0, r0, #0x10
orr r4, r0
mov r0, r4
pop {r4, pc}

old:
str r4, [SP, #0x14]

end:
ldr r0, =(0x803DB14 +1)
bx r0

linker:
bx r4

linkerThree:
bx r3

.align 2


I then change the bytes at 3DB00 to 00 48 00 47 E5 B7 74 and at 3DAF6 to 00 00 02 E0

Then I compile this shiny charm code and put it at 9F83A4:
Spoiler:
.text
.align 2
.thumb
.thumb_func


main:
push {r0-r3}
mov r0, #0xFF
add r0, #0x18
mov r1, #0x1
ldr r2, =(0x8099F40 +1)
bl linker
cmp r0, #0x0
beq normal
mov r0, #0x1
b calcChance

normal:
mov r0, #0x20
lsl r0, r0, #0x7 @1/4096 chance normally

calcChance:
ldr r1, =(0x20370B8)
strh r0, [r1]
ldr r2, .random
bl linker
cmp r0, #0xFF
bne end
ldr r1, =(0x20370BC)
strh r0, [r1]
ldr r1, =(0x20370B8)
mov r0, #0x0
strh r0, [r1]

end:
pop {r0-r3}
sub SP, SP, #0x20
mov r7, r0
ldr r4, [SP, #0x40]
ldr r4, [SP, #0x48]
mov r5, #0xE
ldr r6, =(0x803DAD8 +1)
bx r6

linker:
bx r2


.align 2

.random:
.word 0x874B7A4 +1


And I change the bytes at 3DACE 00 00 00 4F 38 47 A5 83 9F 08


Anything stupid that I'm doing that's jumping out at you? I know I'm compiling them correctly...

Blah February 25th, 2015 8:32 AM

Quote:

Originally Posted by HungLikeATauros (Post 8633009)
That's the thing though, I have those inserted.

I compiled the RNG code and put it at 74B7A4.

Then I compile this shiny generator code and put it at 74B7E4:
Spoiler:
.text
.align 2
.thumb
.thumb_func

main:
ldr r0, =(0x20370BC) @0x8002 is shiny flag
ldrb r0, [r0]
cmp r0, #0xFF
bne noCrash
push {r4-r7}
ldr r0, =(0x20370BC) @set back to 0x0 because users tend to be retarded
mov r1, #0x0
strb r1, [r0]
bl generatePID
mov r4, r0
@c = A xor B; 0<= C <8; use random to determine C
ldr r0, =(0x20370B8)
mov r1, #0x8
strb r1, [r0]
ldr r4, =(0x874B7A4 +1)
bl linker
mov r3, r0
@(TID xor SID)
ldr r0, =(0x300500C)
ldr r0, [r0]
mov r1, #0xA
add r1, r1, [email protected]
ldrh r1,[r1]
mov r2, #0xC
add r0, r0, r2 @SID
ldrh r0, [r0]
eor r0, r0, r1 @(TID XOR SID) = A
eor r3, r3, r0 @(C XOR A) = B
@B = (PID[half-word] xor PID2[half-word])
lsl r4, r4, #0x10
lsr r4, r4, #0x10
eor r3, r3, r4 @(PID[half-word] XOR B) = PID2
@concatinate r4 + r3
lsl r3, #0x10
orr r3,r3, r4 @PID for shiny
pop {r4-r7}
str r3, [SP, #0x14]
b end


noCrash:
bl generatePID
mov r4, r0
b old

generatePID:
push {r4, lr}
ldr r4, =(0x8044EC8 +1)
bl linker
mov r4, r0
ldr r3, =(0x8044EC8 +1)
bl linkerThree
lsl r4, r4, #0x10
lsr r4, r4, #0x10
lsl r0, r0, #0x10
orr r4, r0
mov r0, r4
pop {r4, pc}

old:
str r4, [SP, #0x14]

end:
ldr r0, =(0x803DB14 +1)
bx r0

linker:
bx r4

linkerThree:
bx r3

.align 2


I then change the bytes at 3DB00 to 00 48 00 47 E5 B7 74 and at 3DAF6 to 00 00 02 E0

Then I compile this shiny charm code and put it at 9F83A4:
Spoiler:
.text
.align 2
.thumb
.thumb_func


main:
push {r0-r3}
mov r0, #0xFF
add r0, #0x18
mov r1, #0x1
ldr r2, =(0x8099F40 +1)
bl linker
cmp r0, #0x0
beq normal
mov r0, #0x1
b calcChance

normal:
mov r0, #0x20
lsl r0, r0, #0x7 @1/4096 chance normally

calcChance:
ldr r1, =(0x20370B8)
strh r0, [r1]
ldr r2, .random
bl linker
cmp r0, #0xFF
bne end
ldr r1, =(0x20370BC)
strh r0, [r1]
ldr r1, =(0x20370B8)
mov r0, #0x0
strh r0, [r1]

end:
pop {r0-r3}
sub SP, SP, #0x20
mov r7, r0
ldr r4, [SP, #0x40]
ldr r4, [SP, #0x48]
mov r5, #0xE
ldr r6, =(0x803DAD8 +1)
bx r6

linker:
bx r2


.align 2

.random:
.word 0x874B7A4 +1


And I change the bytes at 3DACE 00 00 00 4F 38 47 A5 83 9F 08


Anything stupid that I'm doing that's jumping out at you? I know I'm compiling them correctly...

Try setting 0x8002 to 0xFF. See if it turns shiny. Lets continue this discussion in the ASM help thread or something. We're kind of de-railing on this thread's purpose. At any rate, this is a problem with something in your ROM/execution rather than the routines. I have this routine setup in my ROM, and I've used similar for chain fishing which as worked fine.

Teh Blazer February 27th, 2015 2:16 PM

Does the party stat checker just check the stats of pokemon or can it actually alter them? Because I think something that can change the base stats of a pokemon (like add or subtract from the original value) would be pretty neat. :P

Percy February 28th, 2015 1:45 AM

I can't get the Change OW thing to work. It always crashes after the intro. Btw, I tried it out several times.

leyn09 March 1st, 2015 6:06 AM

Quote:

Originally Posted by FBI agent (Post 8525633)
You would use the party checker routine to check if Mewtwo is holding the item. Then, depending on the return you would call silent evolution. It's just simply combining two routines I've already done.


Thanks.

Get Pokemon Type



Recently, someone commented on the limitations of my special 0x12b edit. Honestly speaking it is very limited, and only really has a use for checking if you have a certain type of Pokemon. If you had multiple pokemon of the same type it would only return the first one..ect.ect. Well I decided to customize it a little more. It's less powerful now, but more useful (hopefully). All it does is return the type of a Pokemon in a certain slot.

How to insert:

Compile and insert into free space the following routine:
Spoiler:

Code:

.text
.align 2
.thumb
.thumb_func

main:
        push {r0-r2, lr}
        ldr r1, =(0x20370B8) @var 0x8000 is slot (0x0 to 0x5)
        ldrb r1, [r1]
        mov r0, #0x64
        mul r1, r1, r0 @slot to check
        ldr r0, =(0x2024284)
        add r0, r0, r1
        mov r1, #0xB
        ldr r2, =(0x803FBE8 +1)
        bl linker
        lsl r0, r0, #0x10
        lsr r0, r0, #0x10
        lsl r1, r0, #0x3
        sub r1, r1, r0
        lsl r1, r1, #0x2
        ldr r2, =(0x8254784)
        add r1, r1, r2
        ldrb r0, [r1, #0x6]
        ldr r1, =(0x20370B8)
        strb r0, [r1]
        pop {r0-r2, pc}

linker:
        bx r2       

.align 2


Sorry, too lazy to fetch compiled version :D


Usage:
setvar 0x8000 0x[pokemon slot from 0 to 5]
callasm 0x[routine +1]

It will store the Pokemon's type in variable 0x8000 in the form of an integer. The values in decimal follow this table (it will be stored in hex of course):
Code:

0x0 - Normal
0x1 - Fighting
0x2 - Flying
0x3 - Poison
0x4 - Ground
0x5 - Rock
0x6 - Bug
0x7 - Ghost
0x8 - Steel
0x9 - ???
0xA - Fire
0xB - Water
0xC - Grass
0xD - Electric
0xE - Psychic
0xF - Ice
0x10 - Dragon
0x11 - Dark



I have a question regarding this routine. If the pokemon has two types, how or what will the game store it to 0x8000? I'm sorry, I'm new to this asm thing. :(

Blah March 2nd, 2015 8:00 AM

Quote:

Originally Posted by Teh Blazer (Post 8635786)
Does the party stat checker just check the stats of pokemon or can it actually alter them? Because I think something that can change the base stats of a pokemon (like add or subtract from the original value) would be pretty neat. :P

It just retrieves. There's a function in the game already at 0804037C which does what you want.

Quote:

Originally Posted by Percy (Post 8636343)
I can't get the Change OW thing to work. It always crashes after the intro. Btw, I tried it out several times.

I'll do some more testing regarding this routine. I don't get the crashing on my end though, I think I may have forgotten about something in my post.

Quote:

Originally Posted by leyn09 (Post 8637807)
I have a question regarding this routine. If the pokemon has two types, how or what will the game store it to 0x8000? I'm sorry, I'm new to this asm thing. :(

This one looks like it just returns the first type, which is actually kinda bad. I've edited it below to give the first type in 0x8000 and the second one in 0x8001. If the Pokemon is single typed, the value in 0x8001 will match 0x8000.

Spoiler:

Code:

.text
.align 2
.thumb
.thumb_func

main:
        push {r0-r2, lr}
        ldr r1, =(0x20370B8) @var 0x8000 is slot (0x0 to 0x5)
        ldrb r1, [r1]
        mov r0, #0x64
        mul r1, r1, r0 @slot to check
        ldr r0, =(0x2024284)
        add r0, r0, r1
        mov r1, #0xB
        ldr r2, =(0x803FBE8 +1)
        bl linker
        lsl r0, r0, #0x10
        lsr r0, r0, #0x10
        lsl r1, r0, #0x3
        sub r1, r1, r0
        lsl r1, r1, #0x2
        ldr r2, =(0x8254784)
        add r1, r1, r2
        ldrb r0, [r1, #0x6]
        ldr r2, =(0x20370B8) @Type 1 in 0x8000
        strb r0, [r2]
        ldrb r0, [r1, #0x7]
        strb r0, [r2, #0x2] @Type 2 in 0x8001
        pop {r0-r2, pc}

linker:
        bx r2       

.align 2





TM deletion fix (another one):
This one is for if you try and teach a Pokemon with less than 4 moves a TM. Apparently it does the deletion else where. To fix this insert the following byte changes:
@ 0x124EAC: 00 00 00 00

kearnseyboy6 March 2nd, 2015 10:12 PM

Since TM's are re usable with this hack, is there a way to not reset the PP back to maximum? Otherwise this makes PP easy to restore in game.

BLAx501! March 7th, 2015 3:48 AM

I don't know if you have got anything new with the routine I suggested you about keeping the previous track along different maps that have associated different tracks, but I have a new suggestion ;)

I was wondering if it is possible to have two working textboxes. Like for a dialogue or something ;)

Kenny1 March 11th, 2015 7:56 PM

Quote:

Originally Posted by Dionen (Post 8628855)
Fire Red gives you one trainer card with 8 gym badges, but some hacks have more than 8 gyms/travels to different regions. Is it possible to create more than one sets of badges? and maybe changing the trainer card backdrop/tileset with it. playing as a different person, stealing badges, there are many possibilities of events with it. It can be easily done with key-items, but come on, it's not the same thing. Well, just an idea. ^_^
All badges are only in one image, so a swapping routine would deal with that, I suppose. The rest of it can be handled via scripts

This is actually not that difficult to swap the images, idk if anyone's made it for you yet, so let me know, I might just make one more routine.

Chronosplit March 12th, 2015 11:58 AM

Question: would it be possible to enable the Delete Fainted Pokemon mode throughout the entire game? Not just in trainer battles I mean, wilds too.

Joexv March 12th, 2015 1:28 PM

Quote:

Originally Posted by Projectwolfie (Post 8652641)
Question: would it be possible to enable the Delete Fainted Pokemon mode throughout the entire game? Not just in trainer battles I mean, wilds too.

Yea, thats how Fbi agent set it up. Just use the routines hes posted on battle by move and deleting pokemon upon faint. It doesnt only do trainers.(or at least the older versions didnt idk if they were changed)

InfiniteZero March 12th, 2015 4:40 PM

Small request that I haven't seen around:

One of the newer features in Gen VI is the add-on to Pokemon in the Undiscovered Egg Group: All members of this egg group will have 3 31 IVs upon being captured or what have you.

Would be nice to see someone whip this feature up!

Chronosplit March 12th, 2015 5:33 PM

Quote:

Originally Posted by joexv (Post 8652747)
Yea, thats how Fbi agent set it up. Just use the routines hes posted on battle by move and deleting pokemon upon faint. It doesnt only do trainers.(or at least the older versions didnt idk if they were changed)

Thanks for that notion. It's working perfectly.

robinjea March 13th, 2015 8:20 PM

Hello guys! :D We can request here, right? I'm here to request something that I'm pretty sure is a work for ASM. A routine that makes all Pokemon automatically regenerate 5HP every other turn in a battle AND a routine for making all Pokemon regenerate 3HP for every step in the overworld. Is that even possible? And if it is, can you make it both in one routine? Anyways, I'm requesting this for Fire Red (BPRE). :D Thank you!

P.S. I love everyone's routine here! Keep it up!

Dionen March 14th, 2015 9:42 AM

Quote:

Originally Posted by Kenny1 (Post 8651909)
This is actually not that difficult to swap the images, idk if anyone's made it for you yet, so let me know, I might just make one more routine.

Please do it! If possible, swapping graphics in general, not only badges

Joexv March 14th, 2015 8:29 PM

Well I'm gonna try my request here again, I would like a dynamic wild battle asm script for Emerald please.
Pretty much the same as jpans where you set some variables and it allows you to switch around the wild pokemon.

Kenny1 March 17th, 2015 8:02 AM

Quote:

Originally Posted by Dionen (Post 8655293)
Please do it! If possible, swapping graphics in general, not only badges

Swapping images isn't normally hard, or the palette's, its just it has to be hooked differently each time.

So you want me to switch the badge images? Or the Trainer case thing?
Or both?

Also, I'm not to active in hacking any more, but I can try this because it is quite easy.

Dionen March 17th, 2015 5:27 PM

Quote:

Originally Posted by Kenny1 (Post 8659619)
Swapping images isn't normally hard, or the palette's, its just it has to be hooked differently each time.
So you want me to switch the badge images? Or the Trainer case thing?
Or both?
Also, I'm not to active in hacking any more, but I can try this because it is quite easy.

Badge images are priority, but both would be awesome!

PokéMew March 17th, 2015 7:59 PM

One thing I would REALLY love, that I very much need for my hack, would be making the FireRed bicycle go the same speed as your overworld. I would think that ASM could achieve this.

Thanks :)

-PokéMew

Chronosplit March 18th, 2015 12:07 PM

Request, I'm hoping this isn't too much trouble.

The Light Ball Update, how possible is this to port over to Emerald?

Blah March 18th, 2015 5:20 PM

Quote:

Originally Posted by kearnseyboy6 (Post 8640092)
Since TM's are re usable with this hack, is there a way to not reset the PP back to maximum? Otherwise this makes PP easy to restore in game.

Hmm, this is actually hard because of the nature of how the PP exploit works. We would need to know the PP of the TM Move he had 2 TM moves ago. Picture this:

Have 10/20 Shockwave -> Learn TM Hyperbeam 5/5 (iirc) --> Learn Shockwave 20/20

How do we know to store the initial TM's PP? Also a 50% move losing 5 PP to learn Hyper beam is also a little weird. If you can come up with a solution for this problem, or tell me what GameFreak's solution is, I can help implement. In my eyes you'd store every Pokemon in party's moves learned. To achieve this, you would need 48 bytes of Save-block RAM space, and to update the values when Pokemon are swapped around, moves are learned via lvl/TM/Tutor. I'm curious about GF's solution to this problem.


Quote:

Originally Posted by BLAxTOISE (Post 8645512)
I don't know if you have got anything new with the routine I suggested you about keeping the previous track along different maps that have associated different tracks, but I have a new suggestion ;)

I was wondering if it is possible to have two working textboxes. Like for a dialogue or something ;)

Sorry, I haven't worked on anything on this thread recently. I've unfortunately been caught by surprise at the workload the community hack off has put on me. Once that's out of the way I'll more clearly solve the music one. As for the textbox one, you can use a showmsg (the one that doesn't close on A-B press) and change it's coordinates (Shinyquagsire found some coordinates in RAM to do this) then open a normal text box. It should hopefully make 2 text boxes on the screen at once.

Quote:

Originally Posted by Kenny1 (Post 8651909)
This is actually not that difficult to swap the images, idk if anyone's made it for you yet, so let me know, I might just make one more routine.

This is very dependent on what you're swapping. The solution is probably going to be a rewrite using the same skeleton. Also iirc, the badges are OAMs, not tile/bg graphics. You will need to generate/hide/show these extra OAMs on top of the BG overlay depending on the extra badge flags that have been implemented.

Quote:

Originally Posted by InfiniteZero (Post 8652924)
Small request that I haven't seen around:

One of the newer features in Gen VI is the add-on to Pokemon in the Undiscovered Egg Group: All members of this egg group will have 3 31 IVs upon being captured or what have you.

Would be nice to see someone whip this feature up!

I actually already did this for someone, but haven't released the code it would seem! Let me find it/redo it and then I can post back with a resource.

Quote:

Originally Posted by robin22gongon (Post 8654521)
Hello guys! :D We can request here, right? I'm here to request something that I'm pretty sure is a work for ASM. A routine that makes all Pokemon automatically regenerate 5HP every other turn in a battle AND a routine for making all Pokemon regenerate 3HP for every step in the overworld. Is that even possible? And if it is, can you make it both in one routine? Anyways, I'm requesting this for Fire Red (BPRE). :D Thank you!

P.S. I love everyone's routine here! Keep it up!

Wow. I'm genuinely happy someone requested this. Believe it or not, this exact routine was my first ever routine. Darthatron held my hand through the process, and it's been years since I've done it. I'd be happy to redo it just for the nostalgia :)

However, I should warn you that fitting it all into one routine is not possible.

Quote:

Originally Posted by PokéMew (Post 8660582)
One thing I would REALLY love, that I very much need for my hack, would be making the FireRed bicycle go the same speed as your overworld. I would think that ASM could achieve this.

Thanks :)

-PokéMew

If I'm understanding correctly, you want to make the FR Bike the same speed as the walking overworld? Why is that? That would defeat the whole purpose of the bike. I hope you're not requesting this because you wanted an easy way of swapping the player's OW between two sets. If that's the case, you mustn't forget running shoes on/off. While I doubt something that stupid is your motive, I'm very curious what you'd use it for. Perhaps it's something I'm just not seeing.

Quote:

Originally Posted by Projectwolfie (Post 8661403)
Request, I'm hoping this isn't too much trouble.

The Light Ball Update, how possible is this to port over to Emerald?

As a FR hacker, I have no clue. I do think it's just a matter of pointer changing.



Small update
You may have noticed that I'm not very much frequenting around this thread anymore. It's because I'm busy with the community hack-off. Once that's done, I have a few pretty useful routines which most people will probably appreciate.

Currently I have done, and have yet to release:
- Frontier Battle Routines
- Party/Opponent randomizer
- Automatic level curve/difficulty setting
- Field Moves
- OAM generation/manipulation routines
- Naming routines
- Button detection routines (for mini games!)

My main issue is my lack of motivation to write out explanation posts. I'm a little lazy to write out the specifications needed :x

PokéMew March 18th, 2015 5:34 PM

Quote:

Originally Posted by FBI agent (Post 8661666)
If I'm understanding correctly, you want to make the FR Bike the same speed as the walking overworld? Why is that? That would defeat the whole purpose of the bike. I hope you're not requesting this because you wanted an easy way of swapping the player's OW between two sets. If that's the case, you mustn't forget running shoes on/off. While I doubt something that stupid is your motive, I'm very curious what you'd use it for. Perhaps it's something I'm just not seeing.

Well, my intent was to use the bike as, well, a key item called the dive suit. Its an item needed to access a certain place in the game (underwater as you may guess). The bicycle has a number of features that the running shoes do not to make things a hell of a ton simpler. For one, it is an actual item, rather than a flag. Also, the bike has its own soundtrack, where as the running shoes simply stick with the current sound track playing. That was one thing I felt this suit must need, a custom track (which I already inserted in sappy.) Now, if these things could be done to the running shoes using ASM (But I'd imagine that making the shoes an actual item and have its own sound track would be awfully complicated) thats another story, but for now I've just decided to use the bicycle as the thing to replace, I didn't find myself using the bike in the games anyways, mainly the shoes. It only has a tiny bit of a speed difference anyway.

That was my motive :)

So, possible?

destinedjagold March 18th, 2015 11:47 PM

Quote:

Originally Posted by FBI agent (Post 8661666)
Hmm, this is actually hard because of the nature of how the PP exploit works. We would need to know the PP of the TM Move he had 2 TM moves ago. Picture this:

Have 10/20 Shockwave -> Learn TM Hyperbeam 5/5 (iirc) --> Learn Shockwave 20/20

How do we know to store the initial TM's PP? Also a 50% move losing 5 PP to learn Hyper beam is also a little weird. If you can come up with a solution for this problem, or tell me what GameFreak's solution is, I can help implement. In my eyes you'd store every Pokemon in party's moves learned. To achieve this, you would need 48 bytes of Save-block RAM space, and to update the values when Pokemon are swapped around, moves are learned via lvl/TM/Tutor. I'm curious about GF's solution to this problem.

Hm... How about a lazy method of doing this?
Like this...

Have 10/20 Shockwave -> Learn TM Hyperbeam 5/5 --> Learn Shockwave 5/20

Simply keep the numerator and only run a check if it's greater than the denominator. If the numerator's greater than the denominator, then make both values equal. :3

Percy March 19th, 2015 1:45 AM

Quote:

Originally Posted by FBI agent (Post 8661666)

Small update
You may have noticed that I'm not very much frequenting around this thread anymore. It's because I'm busy with the community hack-off. Once that's done, I have a few pretty useful routines which most people will probably appreciate.

Currently I have done, and have yet to release:
- Frontier Battle Routines
- Party/Opponent randomizer
- Automatic level curve/difficulty setting
- Field Moves
- OAM generation/manipulation routines
- Naming routines
- Button detection routines (for mini games!)

My main issue is my lack of motivation to write out explanation posts. I'm a little lazy to write out the specifications needed :x

Can you be a more specific with the naming routines? Seems interesting :D

Xencleamas March 19th, 2015 2:47 AM

Can I request to have this thread to have examples of scripts (I mean the scripts which are XSE based)? Since a lot of people ask those here while checking ASMs. I think this should be started in the future posts of new ASMs (well, if you have effort enough to edit every single ASMs posted, then do so).


All times are GMT -8. The time now is 8:46 AM.


Like our Facebook Page Follow us on Twitter © 2002 - 2018 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.

Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.