Research & Development Got a well-founded knack with ROM hacking? Love reverse-engineering the Pokémon games? Or perhaps you love your assembly language. This is the spot for polling and gathering your ideas, and then implementing them! Share your hypothesis, get ideas from others, and collaborate to create!

Reply
 
Thread Tools
  #101    
Old December 2nd, 2014 (9:23 PM). Edited December 5th, 2014 by FBI.
FBI's Avatar
FBI FBI is offline
Free supporter
 
Join Date: Jan 2013
Location: Unknown Island
Gender: Male
Posts: 1,867
Quote:
Originally Posted by joexv View Post
I have a request. I am working on a *cough, cough*secret Christmas hack.*cough, cough* And the main character is a pokemon. So obviously I would like to be able to use him in fight but something that is pushing me away from that is when you send out a pokemon the trainer flys off the edge throwing a pokeball. Hopefully this sint too much graphical since its not adding any graphics. But could you make a routine that if a certain pokemon is in the front of your party and not fainted it doesnt slide the backsprite out, and doesnt say soandso sent out Arceus?
This is actually the same problem as trainer sliding. From what I've investigated, the slide in routine for the player sprite is recycled by the Pokemon sprites you send out as well. It's a dual purpose bit of code, if you will. So it's not as simple as just removing it, I'll try to find where the player part is actually generated later.

Party Stat Checker



I promised someone that I'd post this once I found it. Well, I found it :P

How to insert:
Compile the following routine into free space:

Spoiler:

Code:
.text
.align 2
.thumb
.thumb_func

main:
	push {r0-r6, lr}
	ldr r6, =(0x2024029)
	ldrb r6, [r6]
	mov r5, #0x0

PokeLoop:
	cmp r6, r5
	beq none
	mov r0, #0x64
	mul r0, r0, r5
	mov r1, r0
	ldr r0, =(0x2024284)
	add r0, r0, r1
	ldr r1, .INDEX
	ldrb r1, [r1]
	ldr r2, =(0x803FBE8 +1)
	bl linker
	ldr r3, .ARG
	ldrb r3, [r3]
	cmp r0, r3
	bge PokeMatch

next:
	add r5, r5, #0x1
	b PokeLoop
	

PokeMatch:
	ldr r3, .ARG
	strb r5, [r3]
	pop {r0-r6, pc}

none:
	ldr r3, .ARG
	mov r5, #0x6
	strb r5, [r3]
	pop {r0-r6, pc}
	
linker:
	bx r2
	
.align 2


.ARG:
	.word 0x020270B8 + (0x8000 *2) 

.INDEX:
	.word 0x020270B8 + (0x8001 *2)
Here's a compiled version:
Code:
7F B5 10 4E 36 78 00 25 AE 42 12 D0 64 20 68 43 01 1C 0D 48 40 18 0A 49 09 78 0C 4A 00 F0 0D F8 06 4B 1B 78 98 42 01 DA 01 35 ED E7 03 4B 1D 70 7F BD 02 4B 06 25 1D 70 7F BD 10 47 B8 70 03 02 BA 70 03 02 29 40 02 02 84 42 02 02 E9 FB 03 08


Usage:
setvar 0x8001 0x[stat you want to retreive]
setvar 0x8000 0x[value you want stat to match]
callasm 0x[routine +1]

The return value will be stored in var 0x8000

Here's a brief list of useful stats you may be interested in checking:
Spoiler:

Code:
0x0B - Species
0x0C - Held Item
0x0D - Attack 1
0x0E - Attack 2
0x0F - Attack 3
0x10 - Attack 4
0x11 - PP 1
0x12 - PP 2
0x13 - PP 3
0x14 - PP 4
0x37 - Status Ailment
0x38 - Level
0x39 - Current HP
0x3A - Total HP
0x3B - Attack
0x3C - Defence
0x3D - Speed
0x3E - Sp. Attack
0x3F - Sp. Defence
__________________
...
Reply With Quote
  #102    
Old December 2nd, 2014 (9:53 PM).
Akiba's Avatar
Akiba Akiba is offline
 
Join Date: Mar 2011
Location: in a gap
Age: 19
Gender: Female
Nature: Brave
Posts: 4,263
Just a warning. I'm going to use the snot out of this thread once rhdp is ready.
__________________
Reply With Quote
  #103    
Old December 2nd, 2014 (11:59 PM).
Turtl3Skulll's Avatar
Turtl3Skulll Turtl3Skulll is offline
Blue Turtl3
     
    Join Date: Jun 2013
    Location: Utah, U.S.A.
    Age: 23
    Gender: Male
    Nature: Bold
    Posts: 75
    Quote:
    Originally Posted by FBI agent View Post

    Pokemon Storage Addon: Full Party Swap



    So last time I did just a quick swap one Pokemon at a time. Here I made some code basically "mass-swap" the storage and the current Player's party all at the same time

    Usage:
    Just callasm to the routine +1. Be careful though, always check that the storage isn't empy. You can swap out your entire party for no Pokemon and create a nice little bugged questionmark when you open the Pokemon menu (the one in my avatar :3).
    So is there a way you can trade back the pokemon, for example in your video would you be able to get the ditto back from the same guy or would a new script or routine need to be added to do this??

    Also when they are in "storage" are you referring to the pokemon storage system or your storage??

    How do you select the pokemon that will be traded in??
    Reply With Quote
      #104    
    Old December 3rd, 2014 (1:14 AM).
    Lance32497's Avatar
    Lance32497 Lance32497 is offline
    LanceKoijer of Pokemon_Addicts
       
      Join Date: Aug 2014
      Location: Criscanto town-Ginoa Region xD
      Gender: Male
      Nature: Adamant
      Posts: 793
      Quote:
      Originally Posted by FBI agent View Post
      You had the right thread before, lol. It goes in the ASM help thread. This is my resource thread :P
      1. A registers data depends on what's been put into it, and how the things inside it have been manipulated. There's a lot of ways to manipulate the contents of registers too. Pushing doesn't set value to a register, no.
      2. .VAR is a label. Normally, you use it as a replacement for typing out the entire address. Technically you can just do ldr rx =(address), it's the same as ldr rx, .VAR
      3. An ASM routine can do that, but ASM is mainly used to manipulate game mechanics via game code. You can manipulate the RAM in scripts, though much less efficiently and much slower.
      4. Once the data is popped, the routine goes back to the pointer in the link register. Though for scripts and such, once the routine which you call via callasm pops the pc (program counter) it's generally done (unless you pushed it again prior).



      Pokemon Storage Addon: Full Party Swap



      So last time I did just a quick swap one Pokemon at a time. Here I made some code basically "mass-swap" the storage and the current Player's party all at the same time.

      How to insert:

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

      Code:
      .text
      .align 2
      .thumb
      .thumb_func
      
      main:
      	push {r0-r5, lr}
      	mov r3, #0x0
      
      loop:
      	cmp r3, #0x6
      	beq StorageToParty
      	ldr r0, .UNUSED
      	mov r1, #0x50
      	mul r1, r1, r3
      	add r0, r0, r1  @dest
      	ldr r2, .PARTY
      	mov r1, #0x64
      	mul r1, r1, r3
      	add r1, r1, r2 @src
      	mov r2, #0x50 @size
      	push {r3}
      	ldr r4, =(0x8040B08 +1)
      	bl linker
      	pop {r3}
      	add r3, r3, #0x1
      	b loop
      
      StorageToParty:
      	mov r3, #0x0
      
      loop2:
      	cmp r3, #0x6
      	beq UnusedToStorage
      	ldr r0, .PARTY
      	mov r1, #0x64
      	mul r1, r1, r3
      	add r0, r0, r1  @dest
      	ldr r2, .STORAGE
      	mov r1, #0x50
      	mul r1, r1, r3
      	add r1, r1, r2 @src
      	mov r2, #0x50 @size
      	push {r3}
      	ldr r4, =(0x8040B08 +1)
      	bl linker
      	pop {r3}
      	ldr r0, .PARTY
      	mov r1, #0x64
      	mul r1, r1, r3
      	add r0, r0, r1  @dest
      	push {r3}
      	ldr r4, =(0x803E47C +1) @calc stats
      	bl linker
      	pop {r3}
      	add r3, r3, #0x1
      	b loop2
      
      UnusedToStorage:
      	ldr r0, .STORAGE @dest
      	ldr r1, .UNUSED @src
      	mov r2, #0xF0@size
      	lsl r2, r2, #0x1
      	ldr r4, =(0x8040B08 +1)
      	bl linker
      
      updateCounters:
      	ldr r0, .STORAGE
      	sub r0, r0, #0x1
      	ldrb r0, [r0]
      	ldr r1, = (0x20370B8)
      	strb r0, [r1]
      	ldr r0, =(0x2024029)
      	ldrb r0, [r0]
      	ldr r2, .STORAGE
      	sub r2, r2, #0x1
      	strb r0, [r2]
      	ldr r0, =(0x2024029)
      	ldrb r1, [r1]
      	strb r1, [r0]
      	pop {r0-r5, pc}
      		
      
      linker:
      	bx r4
      	
      .align 2
      
      .UNUSED:
      	.word 0x202402C  @this is exactly 600 bytes of space
      
      .STORAGE:
      	.word 0x203C001 @storage location; use JPAN's save block hack if you want
      
      .PARTY:
      	.word 0x2024284 @player's party


      Here is a compiled version:
      Code:
      3F B5 00 23 06 2B 0F D0 20 48 50 21 59 43 40 18 20 4A 64 21 59 43 89 18 50 22 08 B4 1E 4C 00 F0 34 F8 08 BC 01 33 ED E7 00 23 06 2B 18 D0 19 48 64 21 59 43 40 18 16 4A 50 21 59 43 89 18 50 22 08 B4 15 4C 00 F0 21 F8 08 BC 12 48 64 21 59 43 40 18 08 B4 11 4C 00 F0 18 F8 08 BC 01 33 E4 E7 0B 48 0A 49 F0 22 52 00 0B 4C 00 F0 0E F8 08 48 01 38 00 78 0A 49 08 70 0A 48 00 78 04 4A 01 3A 10 70 08 48 09 78 01 70 3F BD 20 47 2C 40 02 02 01 C0 03 02 84 42 02 02 09 0B 04 08 7D E4 03 08 B8 70 03 02 29 40 02 02
      Usage:
      Just callasm to the routine +1. Be careful though, always check that the storage isn't empy. You can swap out your entire party for no Pokemon and create a nice little bugged questionmark when you open the Pokemon menu (the one in my avatar :3).

      This time instead of a script I present to you a video :D

      Link in case embedded fails: https://www.youtube.com/watch?v=haPE6iohJMY
      OH! MY! GOD!
      So this routine will work like PC Boxes? The limitation is six Pokemon,
      Does the script you gave in your previous work of POKEMON STORAGE?
      Reply With Quote
        #105    
      Old December 3rd, 2014 (2:47 AM). Edited December 3rd, 2014 by Lance32497.
      Lance32497's Avatar
      Lance32497 Lance32497 is offline
      LanceKoijer of Pokemon_Addicts
         
        Join Date: Aug 2014
        Location: Criscanto town-Ginoa Region xD
        Gender: Male
        Nature: Adamant
        Posts: 793
        My Suggestions
        SetFlag Evolution Item effect
        So this kind of routine is not similar in Evolutionary stones...
        It will check if Flag/Var is set,
        if it has been set, it will go to evoultion method.
        My aim for this routine is, this item will be used once, so that it will not be abused because the item was really special, by the way, You linked somewhere in this thread about the thread that calls a script in an item effect, but it will be done only in JPAN hacked engine, Im not using JPAN hacked engine, in Darthartron thread, Instead of generating script, the game restarts, have you tried his code? or do you have an alternate routine that really works?
        I also saw your post in Karatekid ASM tool, do you have that tool? In his thread, the download link is broken.

        Naming the Player from the overworld
        Well, this is an optional request, but Ill try, After Oaks Welcome message, instead of asking if you are Boy or Girl, it will automatically warp in the players room, when pressing "Start" either ????? will appear instead your name or Your name will not appear until you set a var.

        Routine for Kanto Dex Limiter
        You will just overwrite some data's, afaik, so that we are able to add more than 255 Pokemon in Kanto Dex.

        Expanding Pokemon Habitat pages
        Forgive me if this involves Graphics, I really dont know if it requires graphic editing. In Mountain, there are 16 Pages, since every habitat composed of 4 pokemon entries, we are limited to put in habitat pages are newly expanded pokemon. So my request is to let it or other pages to expand its maximum. or...

        Deleting the habitat portion
        Instead of Expanding, youll delete this feature so that it will now look like RSE. Because I dont even know why the game inserted that feature.

        My Question
        About your Pokemon Storage routine, Is it possible to swap pokemon although that is not yours? or you didnt caught it?
        Reply With Quote
          #106    
        Old December 3rd, 2014 (3:01 AM).
        MrDollSteak's Avatar
        MrDollSteak MrDollSteak is online now
        Formerly known as 11bayerf1
           
          Join Date: Dec 2008
          Location: Hong Kong
          Age: 23
          Gender: Male
          Posts: 844
          Quote:
          Originally Posted by FBI agent View Post

          Pokemon Storage Addon: Full Party Swap



          So last time I did just a quick swap one Pokemon at a time. Here I made some code basically "mass-swap" the storage and the current Player's party all at the same time.
          This along with the other code is a great addition. A sort of Battle Box if you will!

          So when you put a Pokemon that evolves by trade in there, when it comes out it will evolve?
          Is that done through using your other unseen evolution hack, or is it treated as a trade?
          __________________
          Reply With Quote
            #107    
          Old December 3rd, 2014 (3:05 AM).
          kearnseyboy6's Avatar
          kearnseyboy6 kearnseyboy6 is offline
          Aussie's Toughest Mudder
             
            Join Date: Dec 2008
            Posts: 300
            Quote:
            Originally Posted by Lance32497 View Post
            My Suggestions
            SetFlag Evolution Item effect
            So this kind of routine is not similar in Evolutionary stones...
            It will check if Flag/Var is set,
            if it has been set, it will go to evoultion method.
            My aim for this routine is, this item will be used once, so that it will not be abused because the item was really special, by the way, You linked somewhere in this thread about the thread that calls a script in an item effect, but it will be done only in JPAN hacked engine, Im not using JPAN hacked engine, in Darthartron thread, Instead of generating script, the game restarts, have you tried his code? or do you have an alternate routine that really works?
            I also saw your post in Karatekid ASM tool, do you have that tool? In his thread, the download link is broken.

            Naming the Player from the overworld
            Well, this is an optional request, but Ill try, After Oaks Welcome message, instead of asking if you are Boy or Girl, it will automatically warp in the players room, when pressing "Start" either ????? will appear instead your name or Your name will not appear until you set a var.

            [B]Routine for Kanto Dex Limiter[B]
            You will just overwrite some data's, afaik, so that we are able to add more than 255 Pokemon in Kanto Dex.

            Expanding Pokemon Habitat pages
            Forgive me if this involves Graphics, I really dont know if it requires graphic editing. In Mountain, there are 16 Pages, since every habitat composed of 4 pokemon entries, we are limited to put in habitat pages are newly expanded pokemon. So my request is to let it or other pages to expand its maximum. or...

            Deleting the habitat portion
            Instead of Expanding, youll delete this feature so that it will now look like RSE. Because I dont even know why the game inserted that feature.

            My Question
            About your Pokemon Storage routine, Is it possible to swap pokemon although that is not yours? or you didnt caught it?
            2 - http://www.romhack.me/database/12/pok%C3%A9mon-firered-v1-0-player-rival-name-data/

            3 & 4 - http://www.pokecommunity.com/showthread.php?t=205158&page=3

            Please do some research yourself before requesting hacks.
            __________________
            HOLIDAYING CURRENTLY!!
            Reply With Quote
              #108    
            Old December 3rd, 2014 (4:07 AM).
            Gorrioncillo Gorrioncillo is offline
               
              Join Date: Nov 2013
              Gender: Male
              Posts: 35
              Quote:
              Originally Posted by MrDollSteak View Post
              This along with the other code is a great addition. A sort of Battle Box if you will!

              So when you put a Pokemon that evolves by trade in there, when it comes out it will evolve?
              Is that done through using your other unseen evolution hack, or is it treated as a trade?

              i guess is using his silent evolution metod.
              Reply With Quote
                #109    
              Old December 3rd, 2014 (6:15 AM).
              Lance32497's Avatar
              Lance32497 Lance32497 is offline
              LanceKoijer of Pokemon_Addicts
                 
                Join Date: Aug 2014
                Location: Criscanto town-Ginoa Region xD
                Gender: Male
                Nature: Adamant
                Posts: 793
                Quote:
                Originally Posted by kearnseyboy6 View Post
                In your link in my Question 1..
                I dont find any answer on my question, It just state what are the default names and possibilities...
                In my Question 3, thanks it helps, but I bet Question 4 where Habitats will not be featured with that routine...
                Reply With Quote
                  #110    
                Old December 3rd, 2014 (6:34 AM).
                FBI's Avatar
                FBI FBI is offline
                Free supporter
                 
                Join Date: Jan 2013
                Location: Unknown Island
                Gender: Male
                Posts: 1,867
                Quote:
                Originally Posted by Turtl3Skulll View Post
                So is there a way you can trade back the pokemon, for example in your video would you be able to get the ditto back from the same guy or would a new script or routine need to be added to do this??

                Also when they are in "storage" are you referring to the pokemon storage system or your storage??

                How do you select the pokemon that will be traded in??
                Hi, it's a party swap. I'm able to take, trade back as many times as I want. This is an add-on if you will to the Pokemon storage routine from before (this one swaps the entire party). The last one is used to swap 1 at a time :)

                I'm in the works of making a "switch" routine for this, which will allow you to do the common "PC-Party" swap for when both the storage and your party are full. That should allow you to swap x amount of Pokemon at a time.


                Quote:
                Originally Posted by Lance32497 View Post
                OH! MY! GOD!
                So this routine will work like PC Boxes? The limitation is six Pokemon,
                Does the script you gave in your previous work of POKEMON STORAGE?
                As I stated before the limitations are actually just over 48. If you don't use JPAN's FR engine you can get 65 slots (which I really don't recommend using THAT much space for just Pokemon storage).

                The script from last time is a means to swap 1 Pokemon at a time.

                Quote:
                Originally Posted by Lance32497 View Post
                My Suggestions
                SetFlag Evolution Item effect
                So this kind of routine is not similar in Evolutionary stones...
                It will check if Flag/Var is set,
                if it has been set, it will go to evoultion method.
                My aim for this routine is, this item will be used once, so that it will not be abused because the item was really special, by the way, You linked somewhere in this thread about the thread that calls a script in an item effect, but it will be done only in JPAN hacked engine, Im not using JPAN hacked engine, in Darthartron thread, Instead of generating script, the game restarts, have you tried his code? or do you have an alternate routine that really works?
                I also saw your post in Karatekid ASM tool, do you have that tool? In his thread, the download link is broken.
                No, I don't have his tool. If you're having troubles with assembling routines, ask in the Assembly help thread. Most of these things I don't know. What I do know, is that you can just activate the evolution routine in the same script you set the flag, and it will create that effect, lol.

                Quote:
                Naming the Player from the overworld
                Well, this is an optional request, but Ill try, After Oaks Welcome message, instead of asking if you are Boy or Girl, it will automatically warp in the players room, when pressing "Start" either ????? will appear instead your name or Your name will not appear until you set a var.

                Routine for Kanto Dex Limiter
                You will just overwrite some data's, afaik, so that we are able to add more than 255 Pokemon in Kanto Dex.

                Expanding Pokemon Habitat pages
                Forgive me if this involves Graphics, I really dont know if it requires graphic editing. In Mountain, there are 16 Pages, since every habitat composed of 4 pokemon entries, we are limited to put in habitat pages are newly expanded pokemon. So my request is to let it or other pages to expand its maximum. or...

                Deleting the habitat portion
                Instead of Expanding, youll delete this feature so that it will now look like RSE. Because I dont even know why the game inserted that feature.
                All of these have been done before. Look around in the quick research thread. However, I'm not sure about the habitat deletion. I don't see the harm in keeping it :x

                Quote:
                My Question
                About your Pokemon Storage routine, Is it possible to swap pokemon although that is not yours? or you didnt caught it?
                Hi, yes it is, with cleaver use. The algorithm is this:
                1) Call routine to swap party and storage.
                2) Use the addpokemon script command to add pokemon to the party (without buffering to chat - keep it silent)
                3) Once the party you want is formed, call the swap party routine again.
                That will put into the party a team the player hasn't caught before.

                Quote:
                Originally Posted by MrDollSteak View Post
                This along with the other code is a great addition. A sort of Battle Box if you will!

                So when you put a Pokemon that evolves by trade in there, when it comes out it will evolve?
                Is that done through using your other unseen evolution hack, or is it treated as a trade?
                You will need to have a script that calls a routine to read species. Depending on the return you'll want to call the evolution routine the specific slot of the Pokemon you're evolving (I made a party stat checker routine above that can give you the slot of a particular species.)
                The potential is definitely there. You can use this for other things like, Pokemon renting for either battling events or perhaps other events.


                Quote:
                Originally Posted by kearnseyboy6 View Post
                lol. Thanks.

                Quote:
                Originally Posted by Gorrioncillo View Post
                i guess is using his silent evolution metod.
                Yup, thanks.

                PPS Addon: Slot purger



                PPS = Pokemon Storage System. I made a routine to purge a slot, maybe if you wanted to wipe previous storage contents and fill it in with your custom content, this will help.

                How to insert:

                Spoiler:

                Code:
                .text
                .align 2
                .thumb
                .thumb_func
                
                main:
                	push {r0-r3, lr}
                	ldr r0, =(0x20370C0) @this is var 0x8004
                	ldrb r0, [r0]
                	cmp r0, #0x5 @storage limit minus 1
                	beq writeZero
                	cmp r0, #0x5
                	bhi PurgeAll
                	mov r2, #0x5
                	sub r2, r2, r0
                	mov r3, #0x50
                	mul r2, r2, r3 @size
                	ldr r1, .STORAGE
                	mul r0, r0, r3
                	add r0, r0, r1 @dest
                	add r3, r3, r0
                	mov r1, r3      @src
                	ldr r3, =(0x8040B08 +1) @func
                	bl linker
                
                writeZero:
                	ldr r0, .STORAGE
                	mov r1, #0xC8
                	lsl r1, r1, #0x1
                	add r0, r0, r1
                	mov r1, #0x0
                	mov r2, #0x50
                	ldr r3, =(0x81E5ED8 +1)
                	bl linker
                
                updateCounters:
                	ldr r0, .STORAGE
                	sub r0, r0, #0x1
                	ldrb r2, [r0]
                	sub r2, r2, #0x1
                	strb r2, [r0]
                	pop {r0-r3, pc}
                
                PurgeAll:
                	ldr r0, .STORAGE
                	mov r2, #0xF0
                	lsl r2, #0x1
                	mov r1, #0x0
                	ldr r3, =(0x81E5ED8 +1)
                	bl linker
                
                SetCounterZero:
                	ldr r0, .STORAGE
                	sub r0, r0, #0x1
                	mov r1, #0x0
                	strb r1, [r0]
                	pop {r0-r3, pc}
                	
                
                linker:
                	bx r3	
                	
                .align 2
                
                .STORAGE:
                	.word 0x203C001 @storage location


                Here is a compiled version.
                Code:
                0F B5 18 48 00 78 05 28 0D D0 05 28 1A D8 05 22 12 1A 50 23 5A 43 12 49 58 43 40 18 1B 18 19 1C 11 4B 00 F0 1B F8 0E 48 C8 21 49 00 40 18 00 21 50 22 0E 4B 00 F0 12 F8 09 48 01 38 02 78 01 3A 02 70 0F BD 06 48 F0 22 52 00 00 21 07 4B 00 F0 05 F8 03 48 01 38 00 21 01 70 0F BD 18 47 C0 46 01 C0 03 02 C0 70 03 02 09 0B 04 08 D9 5E 1E 08
                Usage:
                setvar 0x8004 0x[slot you want to purge]
                To purge the whole storage set it higher than 0x5.

                That's it :D
                __________________
                ...
                Reply With Quote
                  #111    
                Old December 3rd, 2014 (6:49 AM).
                Lance32497's Avatar
                Lance32497 Lance32497 is offline
                LanceKoijer of Pokemon_Addicts
                   
                  Join Date: Aug 2014
                  Location: Criscanto town-Ginoa Region xD
                  Gender: Male
                  Nature: Adamant
                  Posts: 793
                  Quote:
                  Originally Posted by FBI agent View Post
                  Hi, it's a party swap. I'm able to take, trade back as many times as I want. This is an add-on if you will to the Pokemon storage routine from before (this one swaps the entire party). The last one is used to swap 1 at a time :)

                  I'm in the works of making a "switch" routine for this, which will allow you to do the common "PC-Party" swap for when both the storage and your party are full. That should allow you to swap x amount of Pokemon at a time.




                  As I stated before the limitations are actually just over 48. If you don't use JPAN's FR engine you can get 65 slots (which I really don't recommend using THAT much space for just Pokemon storage).

                  The script from last time is a means to swap 1 Pokemon at a time.


                  No, I don't have his tool. If you're having troubles with assembling routines, ask in the Assembly help thread. Most of these things I don't know. What I do know, is that you can just activate the evolution routine in the same script you set the flag, and it will create that effect, lol.


                  All of these have been done before. Look around in the quick research thread. However, I'm not sure about the habitat deletion. I don't see the harm in keeping it :x


                  Hi, yes it is, with cleaver use. The algorithm is this:
                  1) Call routine to swap party and storage.
                  2) Use the addpokemon script command to add pokemon to the party (without buffering to chat - keep it silent)
                  3) Once the party you want is formed, call the swap party routine again.
                  That will put into the party a team the player hasn't caught before.


                  You will need to have a script that calls a routine to read species. Depending on the return you'll want to call the evolution routine the specific slot of the Pokemon you're evolving (I made a party stat checker routine above that can give you the slot of a particular species.)
                  The potential is definitely there. You can use this for other things like, Pokemon renting for either battling events or perhaps other events.



                  lol. Thanks.


                  Yup, thanks.

                  PPS Addon: Slot purger



                  PPS = Pokemon Storage System. I made a routine to purge a slot, maybe if you wanted to wipe previous storage contents and fill it in with your custom content, this will help.

                  How to insert:

                  Spoiler:

                  Code:
                  .text
                  .align 2
                  .thumb
                  .thumb_func
                  
                  main:
                  	push {r0-r3, lr}
                  	ldr r0, =(0x20370C0) @this is var 0x8004
                  	ldrb r0, [r0]
                  	cmp r0, #0x5 @storage limit minus 1
                  	beq writeZero
                  	cmp r0, #0x5
                  	bhi PurgeAll
                  	mov r2, #0x5
                  	sub r2, r2, r0
                  	mov r3, #0x50
                  	mul r2, r2, r3 @size
                  	ldr r1, .STORAGE
                  	mul r0, r0, r3
                  	add r0, r0, r1 @dest
                  	add r3, r3, r0
                  	mov r1, r3      @src
                  	ldr r3, =(0x8040B08 +1) @func
                  	bl linker
                  
                  writeZero:
                  	ldr r0, .STORAGE
                  	mov r1, #0xC8
                  	lsl r1, r1, #0x1
                  	add r0, r0, r1
                  	mov r1, #0x0
                  	mov r2, #0x50
                  	ldr r3, =(0x81E5ED8 +1)
                  	bl linker
                  
                  updateCounters:
                  	ldr r0, .STORAGE
                  	sub r0, r0, #0x1
                  	ldrb r2, [r0]
                  	sub r2, r2, #0x1
                  	strb r2, [r0]
                  	pop {r0-r3, pc}
                  
                  PurgeAll:
                  	ldr r0, .STORAGE
                  	mov r2, #0xF0
                  	lsl r2, #0x1
                  	mov r1, #0x0
                  	ldr r3, =(0x81E5ED8 +1)
                  	bl linker
                  
                  SetCounterZero:
                  	ldr r0, .STORAGE
                  	sub r0, r0, #0x1
                  	mov r1, #0x0
                  	strb r1, [r0]
                  	pop {r0-r3, pc}
                  	
                  
                  linker:
                  	bx r3	
                  	
                  .align 2
                  
                  .STORAGE:
                  	.word 0x203C001 @storage location


                  Here is a compiled version.
                  Code:
                  0F B5 18 48 00 78 05 28 0D D0 05 28 1A D8 05 22 12 1A 50 23 5A 43 12 49 58 43 40 18 1B 18 19 1C 11 4B 00 F0 1B F8 0E 48 C8 21 49 00 40 18 00 21 50 22 0E 4B 00 F0 12 F8 09 48 01 38 02 78 01 3A 02 70 0F BD 06 48 F0 22 52 00 00 21 07 4B 00 F0 05 F8 03 48 01 38 00 21 01 70 0F BD 18 47 C0 46 01 C0 03 02 C0 70 03 02 09 0B 04 08 D9 5E 1E 08
                  Usage:
                  setvar 0x8004 0x[slot you want to purge]
                  To purge the whole storage set it higher than 0x5.

                  That's it :D
                  Hi FBI, sorry uhh, What will be the entire script?
                  When Im trying to implement your Pokemon Pc routine I stucked, I dont know how to make it start..

                  and my Request #1
                  Is that acceptable?
                  Reply With Quote
                    #112    
                  Old December 3rd, 2014 (8:51 AM). Edited December 3rd, 2014 by FBI.
                  FBI's Avatar
                  FBI FBI is offline
                  Free supporter
                   
                  Join Date: Jan 2013
                  Location: Unknown Island
                  Gender: Male
                  Posts: 1,867
                  Quote:
                  Originally Posted by Lance32497 View Post
                  Hi FBI, sorry uhh, What will be the entire script?
                  When Im trying to implement your Pokemon Pc routine I stucked, I dont know how to make it start..

                  and my Request #1
                  Is that acceptable?
                  You would need to edit the item script to have the evolution routine call. Checking a flag often enough to evolve in realtime for a possible evolution would be painful on the system. Just edit the item's use like in Darth's thread. Also, I'm not sure why it doesn't work, ask in the assembly help thread (this is a resource thread).


                  PSS Experience gains:


                  (Pokemon storage system =PSS - it's a thing now)
                  So it's quite possible that you want to somehow implement experience gains to these stored Pokemon. Maybe for a daycare-like feature or something similar. Well this routine is for you :P

                  How to insert:
                  This is actually a little complicated to insert in comparison to the recent routines I've been pumping out. The reason is because it works exactly the same as FR's daycare, step based experience.

                  Part 1)
                  First of all compile into free space the following routine:
                  Spoiler:

                  Code:
                  .text
                  .align 2
                  .thumb
                  .thumb_func
                  
                  main:
                  	push {r0-r2}
                  	ldr r0, .Counters
                  	ldrb r1, [r0]
                  	cmp r1, #0xFF
                  	beq increment
                  	add r1, r1, #0x1
                  	strb r1, [r0]
                  	b end
                  
                  increment:
                  	mov r1, r0
                  	add r1, #0x1
                  	ldrh r2, [r1]
                  	add r2, #0x1
                  	strh r2, [r1]
                  	mov r2, #0x0
                  	strb r2, [r0]
                  
                  end:
                  	pop {r0-r2}
                  	lsl r0, r0, #0x18
                  	lsr r0, r0, #0x18
                  	cmp r0, #0x1
                  	beq linker
                  	mov r0, r5
                  	ldr r1, =(0x806D600 +1)
                  	bx r1
                  
                  linker:
                  	ldr r0, =(0x806D650 +1)
                  	bx r0
                  	
                  	
                  .align 2
                  
                  .Counters:
                  	.word 0x203BFFD @location to store exp counters
                  Here's a compiled version:
                  Code:
                  07 B4 0C 48 01 78 FF 29 02 D0 01 31 01 70 06 E0 01 1C 01 31 0A 88 01 32 0A 80 00 22 02 70 07 BC 00 06 00 0E 01 28 02 D0 28 1C 03 49 08 47 03 48 00 47 C0 46 FD BF 03 02 01 D6 06 08 51 D6 06 08


                  Now in a hex editor navigate to 0x6D5F6. There you will need to insert the following byte changes:
                  Code:
                   01 4A 10 47 00 00 XX XX XX 08
                  Where XX XX XX is the pointer to where you inserted the above routine +1.

                  The above was to implement the experience counter. Now we need to implement a routine which will convert the counter into exp, reset the counter, and add the exp to our party Pokemon.

                  Part 2)
                  Compile the following routine and insert into free space
                  Spoiler:

                  Code:
                  .text
                  .align 2
                  .thumb
                  .thumb_func
                  
                  main:
                  	push {r0-r7, lr}
                  	ldr r6, =(0x2024029)
                  	ldrb r6, [r6]
                  	mov r5, #0x0
                  
                  PokeLoop:
                  	cmp r6, r5
                  	beq end
                  	mov r0, #0x64
                  	mul r0, r0, r5
                  	mov r1, r0
                  	ldr r0, =(0x2024284)
                  	add r0, r0, r1
                  	mov r7, r0 @save pointer in r7
                  	mov r1, #0x19
                  	ldr r3, =(0x803FBE8 +1)
                  	bl linker
                  	ldr r2, .EXP
                  	ldrb r4, [r2] @add 
                  	add r2, r2, #0x1
                  	ldrh r1, [r2]
                  	mov r3, #0xFF
                  	mul r3, r3, r1
                  	add r3, r3, r4
                  	add r3, r3, r0
                  	mov r0, r7
                  	ldr r2, =(0x20370B8)
                  	str r3, [r2] @put data at pointer
                  	mov r1, #0x19
                  	ldr r3, =(0x804037C +1)
                  	bl linker
                  	mov r0, r7
                  	ldr r3, =(0x803E47C +1)
                  	bl linker
                  	add r5, r5, #0x1
                  	b PokeLoop
                  	
                  end:
                  	ldr r0, .EXP
                  	mov r1, #0x0
                  	strb r1, [r0]
                  	add r0, r0, #0x1
                  	strb r1, [r0]
                  	add r0, r0, #0x1
                  	strb r1, [r0]
                  	pop {r0-r7, pc}
                  	
                  linker:
                  	bx r3
                  	
                  .align 2
                  
                  .EXP:
                  	.word 0x203BFFD
                  Here is a compiled version:
                  Code:
                  FF B5 17 4E 36 78 00 25 AE 42 1E D0 64 20 68 43 01 1C 14 48 40 18 07 1C 19 21 13 4B 00 F0 1D F8 0E 4A 14 78 01 32 11 88 FF 23 4B 43 1B 19 1B 18 38 1C 0E 4A 13 60 19 21 0D 4B 00 F0 0E F8 38 1C 0C 4B 00 F0 0A F8 01 35 DE E7 04 48 00 21 01 70 01 30 01 70 01 30 01 70 FF BD 18 47 FD BF 03 02 29 40 02 02 84 42 02 02 E9 FB 03 08 B8 70 03 02 7D 03 04 08 7D E4 03 08


                  Usage:
                  The usage for this is derived from clever use of the full party swap routine.
                  You need to use partyswap to put into your party the storage pokemon. Then you need to callasm to the second routine in this post (Part 2) to apply the exp changes to the stored Pokemon, and finally end off without another partyswap call to revert the earlier swap.

                  You should only apply this routine when the player is attempting to retrieve their Pokemon. Otherwise the counter is designed to store 0xFF + 0xFFFF * 0xFF experience points.
                  That's 16, 711, 680, which is enough to level a Pokemon almost from 1-100.
                  __________________
                  ...
                  Reply With Quote
                    #113    
                  Old December 3rd, 2014 (1:01 PM).
                  Volt-Ikazuchi's Avatar
                  Volt-Ikazuchi Volt-Ikazuchi is offline
                     
                    Join Date: Dec 2013
                    Gender: Male
                    Posts: 32
                    Quote:
                    Originally Posted by FBI agent View Post

                    I'll start by answering your last question. Read HackMew's tutorial on ASM, he explains how to compile and the execution for this first tutorial is quite easy. I personally wouldn't bother with his part two, that was a rather large step between part one and two. If you have questions, there's an Assembly help thread in the beginner's lounge.

                    For your suggestions:
                    - Make gym leader decline if you have less/more Pokemon. Use "countpokemon" it's a scripting command and checks how many Pokemon you have returning 0-6 in variable 0x800D (Lastresult)

                    - Level checker. I made a more powerful version of a "party checker" it's lying around in my research folders. I'll post it as soon as I find it!

                    - I will do your optional request as well, simply because I already have code that's of similar structure :D

                    -Experience share, I took a look at it now and, this is quite the request. I will try to give it a shot, but I'm not sure if I can do it easily without a lot of time.

                    daniilS has not made a thread, as far as I know. I think he's going to complete it first, you can talk to him about that I suppose.
                    1 - Thanks, I'll definitely take a look at it.

                    2 - Is that basic scripting? Never thought it would be that simple.

                    3 and 4 - Great job, that's perfect, can't wait to see that in action.

                    5 - Sorry, I thought it would be simpler.
                    I'm actually surprised no one even mentioned it before, it was something that easily changed Gen VI grinding so I expected people to already have reverse engineered that before.
                    No rush though, I know that trying to bite off a lot at once always winds up badly for everyone.

                    6 - I see, thanks for the heads-up.
                    Reply With Quote
                      #114    
                    Old December 3rd, 2014 (1:57 PM).
                    Lance32497's Avatar
                    Lance32497 Lance32497 is offline
                    LanceKoijer of Pokemon_Addicts
                       
                      Join Date: Aug 2014
                      Location: Criscanto town-Ginoa Region xD
                      Gender: Male
                      Nature: Adamant
                      Posts: 793
                      Quote:
                      Originally Posted by FBI agent View Post
                      usage for this is derived from clever use of the full party swap routine.
                      You need to use partyswap to put into your party the storage pokemon. Then you need to callasm to the second routine in this post (Part 2) to apply the exp changes to the stored Pokemon, and finally end off without another partyswap call to revert the earlier swap.

                      You should only apply this routine when the player is attempting to retrieve their Pokemon. Otherwise the counter is designed to store 0xFF + 0xFFFF * 0xFF experience points.
                      That's 16, 711, 680, which is enough to level a Pokemon almost from 1-100.
                      So this routine works like Day Care routine but more than 2 Pokemon? They will get also Experience...
                      Then the entire script I was asking for is your 2nd and 3rd(now) implementation of Pokemon PC boxes
                      and how to swap party athough the Pokemon in the party are not yours..
                      and another one, do you have karatekids tool? the ASM THUMB COMPILER?
                      Reply With Quote
                        #115    
                      Old December 3rd, 2014 (3:02 PM). Edited December 9th, 2014 by FBI.
                      FBI's Avatar
                      FBI FBI is offline
                      Free supporter
                       
                      Join Date: Jan 2013
                      Location: Unknown Island
                      Gender: Male
                      Posts: 1,867
                      Quote:
                      Originally Posted by Volt-Ikazuchi View Post
                      1 - Thanks, I'll definitely take a look at it.

                      2 - Is that basic scripting? Never thought it would be that simple.

                      3 and 4 - Great job, that's perfect, can't wait to see that in action.

                      5 - Sorry, I thought it would be simpler.
                      I'm actually surprised no one even mentioned it before, it was something that easily changed Gen VI grinding so I expected people to already have reverse engineered that before.
                      No rush though, I know that trying to bite off a lot at once always winds up badly for everyone.

                      6 - I see, thanks for the heads-up.
                      I posted the party checker a few posts back, look for it! (or see first post)
                      The Average level checker is at the end of this post.

                      Quote:
                      Originally Posted by Lance32497 View Post
                      So this routine works like Day Care routine but more than 2 Pokemon? They will get also Experience...
                      Then the entire script I was asking for is your 2nd and 3rd(now) implementation of Pokemon PC boxes
                      and how to swap party athough the Pokemon in the party are not yours..
                      and another one, do you have karatekids tool? the ASM THUMB COMPILER?
                      Yes, the routine will give exp to all the Pokemon you put into the storage system. You want the scripts that I used for the routines? Umm, ok...they're very rough and pretty unusable though.
                      Spoiler:

                      #dyn 0x740000
                      #org @start
                      '
                      'to swap between storage and party
                      '
                      lock
                      faceplayer
                      copybyte 0x20370D0 0x203C000 ' storage count into last result
                      compare LASTRESULT 0x0
                      if == jump @putOnly
                      msgbox @add
                      callstd MSG_YESNO 'want to take?
                      compare LASTRESULT 0x1
                      if == jump @addParty
                      jump @putOnly

                      #org @putOnly
                      countpokemon
                      copyvar 0x8000 0x800D
                      compare 0x8000 0x1
                      if <= jump @greetings
                      msgbox @put
                      callstd MSG_YESNO 'want to put?
                      compare LASTRESULT 0x1
                      if == jump @addStorage
                      msgbox @exit
                      callstd MSG_NORMAL
                      release
                      end

                      #org @addStorage
                      setvar 0x8000 0x1
                      special 0x9F
                      waitspecial
                      countpokemon
                      compare LASTRESULT 0x8004
                      if < jump @noSelection
                      callasm 0x[swap party]
                      msgbox @gave
                      callstd MSG_NORMAL
                      release
                      end


                      #org @addParty
                      setvar 0x8000 0x0
                      countpokemon
                      compare LASTRESULT 0x6
                      if == jump @fullP
                      msgbox @store
                      callstd MSG_NORMAL
                      setvar 0x8004 0x0 'gotta rework this to work a better way
                      callasm 0x[swap party]'Takes Pokemon from slot specified
                      fanfare 0x101
                      msgbox @complete
                      callstd MSG_NORMAL
                      release
                      end

                      #org @greetings
                      msgbox @hello
                      callstd MSG_NORMAL
                      release
                      end

                      #org @fullP
                      msgbox @full
                      callstd MSG_NORMAL
                      release
                      end

                      #org @noSelection
                      msgbox @exit
                      callstd MSG_NORMAL
                      release
                      end

                      #org @full
                      = You're full!

                      #org @hello
                      = Hi, I can't do anything\nyour slots are full[.]

                      #org @complete
                      = I gave it back

                      #org @store
                      = Alright I'll give one.

                      #org @gave
                      = Thanks for giving me this.

                      #org @exit
                      = Alright, next time then.

                      #org @add
                      = want a Pokemon?

                      #org @put
                      = want to give me a pokemon?


                      Spoiler:

                      #dyn 0x740000
                      #org @start
                      lock
                      faceplayer
                      callasm0x[swap party]
                      callasm 0x[set Exp]
                      callasm 0x[swap party]
                      msgbox @text
                      callstd MSG_NORMAL
                      release
                      end

                      #org @text
                      = Experience has been set.


                      Spoiler:

                      #dyn 0x740000
                      #org @start
                      lock
                      faceplayer
                      callasm0x[swap party]
                      addpokemon 0x1 0x5 NONE 0x0 0x0 0x0
                      callasm 0x[swap party]
                      msgbox @text
                      callstd MSG_NORMAL
                      release
                      end

                      #org @text
                      = Bulbasaur added to storage.

                      No more script requests. This is not a script thread, and as such I won't be posting more scripts unless I feel it's essential to understanding the routines. These recent routines have been rather simple in the sense of how to use them, I don't think they require further instruction. If you're having troubles using/assembling them you are welcome to ask at the appropriate threads. However, unless it's directly relevant to functionality I don't want to answer simple questions here (even though I'm nice, so I end up answering).

                      Average level of party



                      Quite like the title, all it does it retrieve the average level of the Pokemon in your party.

                      How to insert:

                      Compile into free space the following routine:
                      Spoiler:

                      Code:
                      .text
                      .align 2
                      .thumb
                      .thumb_func
                      
                      main:
                      	push {r0-r5, lr}
                      	ldr r3, =(0x2024029)
                      	ldrb r3, [r3]
                      	mov r4, #0x0
                      	mov r5, #0x0
                      
                      Loop:
                      	cmp r3, r4
                      	beq end
                      	mov r0, #0x64
                      	mul r0, r0, r4
                      	mov r1, r0
                      	ldr r0, =(0x2024284)
                      	add r0, r0, r1 @pkmn
                      	mov r1, #0x38
                      	push {r3-r5}
                      	ldr r2, =(0x803FBE8 +1)
                      	bl linker
                      	pop {r3-r5}
                      	add r5, r5, r0
                      	add r4, r4, #0x1
                      	b Loop
                      	
                      
                      end:
                      	mov r0, r5
                      	mov r1, r4
                      	ldr r2, =(0x81E4018 +1)
                      	bl linker
                      	ldr r1, =(0x20370D0)
                      	strb r0, [r1]
                      	pop {r0-r5, pc}
                      	
                      linker:
                      	bx r2
                      	
                      .align 2
                      Here's a compiled version:
                      Code:
                      3F B5 0E 4B 1B 78 00 24 00 25 A3 42 0D D0 64 20 60 43 01 1C 0A 48 40 18 38 21 38 B4 09 4A 00 F0 0C F8 38 BC 2D 18 01 34 EF E7 28 1C 21 1C 06 4A 00 F0 03 F8 05 49 08 70 3F BD 10 47 29 40 02 02 84 42 02 02 E9 FB 03 08 19 40 1E 08 D0 70 03 02


                      Usage:
                      callasm 0x[this routine +1]

                      Lastresult holds the average level of your team.

                      I haven't tested but should work. If you find bugs ask me.
                      __________________
                      ...
                      Reply With Quote
                        #116    
                      Old December 3rd, 2014 (3:22 PM).
                      Xela's Avatar
                      Xela Xela is offline
                      Do you believe in yourself?
                       
                      Join Date: Feb 2008
                      Posts: 349
                      I just wanted to pop in and say that you're doing amazing work, FBI. I'm glad we've got somebody as talented as you to share your knowledge and routines with us. I'm certain this will help a lot of the hackers out.

                      Now if you would only learn to deal with the graphics.
                      __________________
                      Reply With Quote
                        #117    
                      Old December 3rd, 2014 (6:44 PM). Edited December 4th, 2014 by Christos.
                      Lance32497's Avatar
                      Lance32497 Lance32497 is offline
                      LanceKoijer of Pokemon_Addicts
                         
                        Join Date: Aug 2014
                        Location: Criscanto town-Ginoa Region xD
                        Gender: Male
                        Nature: Adamant
                        Posts: 793
                        Quote:
                        Originally Posted by FBI agent View Post
                        Yes, the routine will give exp to all the Pokemon you put into the storage system. You want the scripts that I used for the routines? Umm, ok...they're very rough and pretty unusable though.
                        Spoiler:

                        #dyn 0x740000
                        #org @start
                        '
                        'to swap between storage and party
                        '
                        lock
                        faceplayer
                        copybyte 0x20370D0 0x203C000 ' storage count into last result
                        compare LASTRESULT 0x0
                        if == jump @putOnly
                        msgbox @add
                        callstd MSG_YESNO 'want to take?
                        compare LASTRESULT 0x1
                        if == jump @addParty
                        jump @putOnly

                        #org @putOnly
                        countpokemon
                        copyvar 0x8000 0x800D
                        compare 0x8000 0x1
                        if <= jump @greetings
                        msgbox @put
                        callstd MSG_YESNO 'want to put?
                        compare LASTRESULT 0x1
                        if == jump @addStorage
                        msgbox @exit
                        callstd MSG_NORMAL
                        release
                        end

                        #org @addStorage
                        setvar 0x8000 0x1
                        special 0x9F
                        waitspecial
                        countpokemon
                        compare LASTRESULT 0x8004
                        if < jump @noSelection
                        callasm 0x[swap party]
                        msgbox @gave
                        callstd MSG_NORMAL
                        release
                        end


                        #org @addParty
                        setvar 0x8000 0x0
                        countpokemon
                        compare LASTRESULT 0x6
                        if == jump @fullP
                        msgbox @store
                        callstd MSG_NORMAL
                        setvar 0x8004 0x0 'gotta rework this to work a better way
                        callasm 0x[swap party]'Takes Pokemon from slot specified
                        fanfare 0x101
                        msgbox @complete
                        callstd MSG_NORMAL
                        release
                        end

                        #org @greetings
                        msgbox @hello
                        callstd MSG_NORMAL
                        release
                        end

                        #org @fullP
                        msgbox @full
                        callstd MSG_NORMAL
                        release
                        end

                        #org @noSelection
                        msgbox @exit
                        callstd MSG_NORMAL
                        release
                        end

                        #org @full
                        = You're full!

                        #org @hello
                        = Hi, I can't do anything\nyour slots are full[.]

                        #org @complete
                        = I gave it back

                        #org @store
                        = Alright I'll give one.

                        #org @gave
                        = Thanks for giving me this.

                        #org @exit
                        = Alright, next time then.

                        #org @add
                        = want a Pokemon?

                        #org @put
                        = want to give me a pokemon?

                        The highlighted Commands are the same? What I mean, Ill use the same routine for that?
                        lets say I compiled it in 0x800000 so all the callasm offsets are "0x800001"?
                        Sorry, I am just confused.
                        Quote:
                        Originally Posted by FBI agent View Post
                        Spoiler:

                        #dyn 0x740000
                        #org @start
                        lock
                        faceplayer
                        callasm0x[swap party]
                        callasm 0x[set Exp]
                        callasm 0x[swap party]
                        msgbox @text
                        callstd MSG_NORMAL
                        release
                        end

                        #org @text
                        = Experience has been set.


                        Spoiler:

                        #dyn 0x740000
                        #org @start
                        lock
                        faceplayer
                        callasm0x[swap party]
                        addpokemon 0x1 0x5 NONE 0x0 0x0 0x0
                        callasm 0x[swap party]
                        msgbox @text
                        callstd MSG_NORMAL
                        release
                        end

                        #org @text
                        = Bulbasaur added to storage.
                        Why did you created 3 scripts for that hack?
                        Quote:
                        Originally Posted by FBI agent View Post
                        No more script requests. This is not a script thread, and as such I won't be posting more scripts unless I feel it's essential to understanding the routines. These recent routines have been rather simple in the sense of how to use them, I don't think they require further instruction. If you're having troubles using/assembling them you are welcome to ask at the appropriate threads. However, unless it's directly relevant to functionality I don't want to answer simple questions here (even though I'm nice, so I end up answering).
                        Sorry, It wont happen again, I just dont know what will be the entire script...

                        Quote:
                        Originally Posted by FBI agent View Post

                        Average level of party



                        Quite like the title, all it does it retrieve the average level of the Pokemon in your party.

                        How to insert:

                        Compile into free space the following routine:
                        Spoiler:

                        Code:
                        .text
                        .align 2
                        .thumb
                        .thumb_func
                        
                        main:
                        	push {r0-r5, lr}
                        	ldr r3, =(0x2024029)
                        	ldrb r3, [r3]
                        	mov r4, #0x0
                        	mov r5, #0x0
                        
                        Loop:
                        	cmp r3, r4
                        	beq end
                        	mov r0, #0x64
                        	mul r0, r0, r4
                        	mov r1, r0
                        	ldr r0, =(0x2024284)
                        	add r0, r0, r1 @pkmn
                        	mov r1, #0x38
                        	ldr r2, =(0x803FBE8 +1)
                        	bl linker
                        	add r5, r5, r0
                        	add r4, r4, #0x1
                        	b Loop
                        	
                        
                        end:
                        	mov r0, r5
                        	mov r1, r4
                        	ldr r2, =(0x81E4018 +1)
                        	bl linker
                        	ldr r1, =(0x20370D0)
                        	ldrb r0, [r1]
                        	pop {r0-r5, pc}
                        	
                        linker:
                        	bx r2
                        	
                        .align 2
                        Quote:
                        Originally Posted by FBI agent View Post

                        PSS Experience gains:


                        (Pokemon storage system =PSS - it's a thing now)
                        So it's quite possible that you want to somehow implement experience gains to these stored Pokemon. Maybe for a daycare-like feature or something similar. Well this routine is for you :P


                        Part 1)
                        First of all compile into free space the following routine:
                        Spoiler:

                        Code:
                        .text
                        .align 2
                        .thumb
                        .thumb_func
                        
                        main:
                        	push {r0-r2}
                        	ldr r0, .Counters
                        	ldrb r1, [r0]
                        	cmp r1, #0xFF
                        	beq increment
                        	add r1, r1, #0x1
                        	strb r1, [r0]
                        	b end
                        
                        increment:
                        	mov r1, r0
                        	add r1, #0x1
                        	ldrh r2, [r1]
                        	add r2, #0x1
                        	strh r2, [r1]
                        	mov r2, #0x0
                        	strb r2, [r0]
                        
                        end:
                        	pop {r0-r2}
                        	lsl r0, r0, #0x18
                        	lsr r0, r0, #0x18
                        	cmp r0, #0x1
                        	beq linker
                        	mov r0, r5
                        	ldr r1, =(0x806D600 +1)
                        	bx r1
                        
                        linker:
                        	ldr r0, =(0x806D650 +1)
                        	bx r0
                        	
                        	
                        .align 2
                        
                        .Counters:
                        	.word 0x203BFFD @location to store exp counters


                        Part 2)
                        Compile the following routine and insert into free space
                        Spoiler:

                        Code:
                        .text
                        .align 2
                        .thumb
                        .thumb_func
                        
                        main:
                        	push {r0-r7, lr}
                        	ldr r6, =(0x2024029)
                        	ldrb r6, [r6]
                        	mov r5, #0x0
                        
                        PokeLoop:
                        	cmp r6, r5
                        	beq end
                        	mov r0, #0x64
                        	mul r0, r0, r5
                        	mov r1, r0
                        	ldr r0, =(0x2024284)
                        	add r0, r0, r1
                        	mov r7, r0 @save pointer in r7
                        	mov r1, #0x19
                        	ldr r3, =(0x803FBE8 +1)
                        	bl linker
                        	ldr r2, .EXP
                        	ldrb r4, [r2] @add 
                        	add r2, r2, #0x1
                        	ldrh r1, [r2]
                        	mov r3, #0xFF
                        	mul r3, r3, r1
                        	add r3, r3, r4
                        	add r3, r3, r0
                        	mov r0, r7
                        	ldr r2, =(0x20370B8)
                        	str r3, [r2] @put data at pointer
                        	mov r1, #0x19
                        	ldr r3, =(0x804037C +1)
                        	bl linker
                        	mov r0, r7
                        	ldr r3, =(0x803E47C +1)
                        	bl linker
                        	add r5, r5, #0x1
                        	b PokeLoop
                        	
                        end:
                        	ldr r0, .EXP
                        	mov r1, #0x0
                        	strb r1, [r0]
                        	add r0, r0, #0x1
                        	strb r1, [r0]
                        	add r0, r0, #0x1
                        	strb r1, [r0]
                        	pop {r0-r7, pc}
                        	
                        linker:
                        	bx r3
                        	
                        .align 2
                        
                        .EXP:
                        	.word 0x203BFFD


                        Usage:
                        Im hoping for a compiled version of these ahahahaha

                        My REQUESTS:

                        Advancing your Pokemon PC Routine
                        It would be great if the 2 Pokemon in party slot you handed over to the NPC that has the routine will be able to produce eggs if they are capable of.

                        Trainers Pokemon with custom Stats
                        This routine will let you, hacker, customize the opponents Stats, such as HP, ATK and all other stats, It would be great that the player will be surprised for the stats of the opponents pokemon.
                        __________________
                        This signature has been disabled.
                        Scrollbar appears
                        Please review and fix the issues by reading the signature rules.

                        You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

                        Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
                        Reply With Quote
                          #118    
                        Old December 3rd, 2014 (7:32 PM). Edited December 3rd, 2014 by FBI.
                        FBI's Avatar
                        FBI FBI is offline
                        Free supporter
                         
                        Join Date: Jan 2013
                        Location: Unknown Island
                        Gender: Male
                        Posts: 1,867
                        Quote:
                        Originally Posted by AlexAhnon View Post
                        I just wanted to pop in and say that you're doing amazing work, FBI. I'm glad we've got somebody as talented as you to share your knowledge and routines with us. I'm certain this will help a lot of the hackers out.

                        Now if you would only learn to deal with the graphics.
                        I love you Alex :3

                        Quote:
                        Originally Posted by Lance32497 View Post
                        Why did you created 3 scripts for that hack?

                        Sorry, It wont happen again, I just dont know what will be the entire script...
                        No, those three scripts do different things.
                        1) The script in the first PSS post does 1 Pokemon at a time storage and withdrawing from storage
                        2) the first script from 3 I posted does the stuff from the video
                        3) the second one from the 3 I posted adjusts EXP
                        4) The fourth one adds a Pokemon not owned by the player into storage (in that case bulbasaur)

                        Quote:
                        Originally Posted by Lance32497 View Post
                        Im hoping for a compiled version of these ahahahaha
                        Sorry, soon I will make compilations of all the routines in the thread. A lot of people have been requesting this, so I'll get to it next time I have some time on my hands

                        Quote:
                        Originally Posted by Lance32497 View Post
                        My REQUESTS:

                        Advancing your Pokemon PC Routine
                        It would be great if the 2 Pokemon in party slot you handed over to the NPC that has the routine will be able to produce eggs if they are capable of.

                        Trainers Pokemon with custom Stats
                        This routine will let you, hacker, customize the opponents Stats, such as HP, ATK and all other stats, It would be great that the player will be surprised for the stats of the opponents pokemon.
                        I'm already working on breeding inside storage, and trainers with custom stats have been done by Doesntknowhowtoplay iirc. Ask him about it :P

                        EDIT: Updating my routine posts with compiled versions. Take a look at the first post for a poorly organised index
                        __________________
                        ...
                        Reply With Quote
                          #119    
                        Old December 4th, 2014 (6:54 AM).
                        Red John's Avatar
                        Red John Red John is offline
                        Progressing Assembly hacker
                           
                          Join Date: May 2014
                          Location: Where ever there is peace and darkness
                          Gender: Male
                          Nature: Lonely
                          Posts: 137
                          Can you create a routine to search for a pokemon and then place its party position in the var 8001
                          __________________
                          Reply With Quote
                            #120    
                          Old December 4th, 2014 (7:18 AM).
                          FBI's Avatar
                          FBI FBI is offline
                          Free supporter
                           
                          Join Date: Jan 2013
                          Location: Unknown Island
                          Gender: Male
                          Posts: 1,867
                          Quote:
                          Originally Posted by Team Fail View Post

                          Reset game after loss of a battle


                          So, wanting to do something similar to older Final Fantasy games, in which the game goes back to the title screen after your party falls, I dove into knizz's IDB and used a lot of trial and error to create this little feature. Let it be my first contribution to ASM hacking.

                          Use the following ASM:
                          Code:
                          .text
                          .align 2
                          .thumb
                          .thumb_func
                          
                          main:
                          	SWI 0;
                          
                          .align 2
                          Compiled for your pleasure:
                          Code:
                          00 DF 00 00
                          at offsets 0x7F5B6 and 0x7F5D0 to reset the game after displaying the "...player scurried <home/PC>" text.

                          Credits to FBI for the ASM, shinyquagsire for explaining what this is to me in layman's terms, as well as an improvement, and to knizz for his amazing IDB that helped me find these offsets.

                          This can be useful for nuzlocke hackers that wish to implement a Savegame delete function when a battle is lost, by simply making a different function, namely, a delete savefile function, and putting a pointer at those offsets instead of my reset code. It can also be useful as a way to create a "GAME OVER" screen of sorts (Just edit the text as necessary). I put those offsets as is because there's enough room for either a very small ASM routine, or a pointer to a location for a different routine in case you want to do more things.

                          Also, the reason there's two pointers for this is because there's two different cases I have to handle: One for heading back home after losing, and one for heading to the Pokémon Center. That should cover virtually all cases of loss, but I might have missed a few. If I did, let me know, and I'll find and edit in the additional offsets to modify.
                          Credits to FBI? I didn't do anything, lol. Anyways, I'm glad to see you were able to finish it :)
                          At least you put up a compiled version :3

                          Quote:
                          Originally Posted by Knight of Duty View Post
                          Can you create a routine to search for a pokemon and then place its party position in the var 8001
                          I already made something more powerful than this, it was called "party checker". Check the first post!
                          __________________
                          ...
                          Reply With Quote
                            #121    
                          Old December 4th, 2014 (9:20 AM).
                          anonyboy's Avatar
                          anonyboy anonyboy is offline
                          Pokemon Aerial Emerald Creator&Pokemon Hybrid Co-Creator
                             
                            Join Date: Sep 2013
                            Location: Israel
                            Gender: Male
                            Nature: Adamant
                            Posts: 277
                            hi, i have problems with the EV berries script.... always reboots the ROM even when i set the asm offset to +1 since it's thumb.... please help..
                            __________________
                            Pokemon....

                            A new Dawn of ROM Hacking.....
                            Reply With Quote
                              #122    
                            Old December 4th, 2014 (10:36 AM).
                            FBI's Avatar
                            FBI FBI is offline
                            Free supporter
                             
                            Join Date: Jan 2013
                            Location: Unknown Island
                            Gender: Male
                            Posts: 1,867
                            Quote:
                            Originally Posted by anonyboy View Post
                            hi, i have problems with the EV berries script.... always reboots the ROM even when i set the asm offset to +1 since it's thumb.... please help..
                            My apologies, the code I posted before would crash on the case that the player's Pokemon's EVs would go negative. I've changed it now, if the berry doesn't effect the Pokemon it's used on, it will return 0xFF to lastresult.
                            __________________
                            ...
                            Reply With Quote
                              #123    
                            Old December 4th, 2014 (1:01 PM).
                            longlostsoldier's Avatar
                            longlostsoldier longlostsoldier is offline
                               
                              Join Date: Oct 2013
                              Gender: Other
                              Nature: Quiet
                              Posts: 152
                              Oooh, your storage system was exactly what I wanted for making a 'leader of a team' (like Rocket/Magma) hack / any hack where you have a team larger than 6 / any hack where you play as more than one person. However, I have just one question.

                              Can I manually set the experience gained in the counter variable so I can alter the pokemon stored to the levels I want? It would be a pain, but I could do a check for instance to see what level the rest of your party is, what level the stored pokemon are, and then alter the EXP variable accordingly, and it would be like they were genuinely part of your party, sorta. I mean, it would be a little clumsy - the best version would be to check the EXP and set that to exactly the parties' (I didn't check your stat checker program yet; if that does EXP checking then epic! and with a little math would solve that neatly)- but it would be pretty dang cool.

                              Also, if I made said script (I prolly will), would you like me to post it here as an example for other people?
                              __________________
                              Evo-Yellow: 151 Evolve Raichu Hack, uses the Yellow Disassembly. Play as girl, ride a pokemon, special/physical, dark/fairy/steel types, new pokemon, gen 2 sprites, evolve Pikachu into Raichu and have them still follow you with new Raichu emotion sprites!
                              Yellow Hack Tutorial
                              Fire Yellow - A FireRed Hack & Yellow Remake with Following Pikachu
                              Reply With Quote
                                #124    
                              Old December 4th, 2014 (1:31 PM).
                              FBI's Avatar
                              FBI FBI is offline
                              Free supporter
                               
                              Join Date: Jan 2013
                              Location: Unknown Island
                              Gender: Male
                              Posts: 1,867
                              Quote:
                              Originally Posted by longlostsoldier View Post
                              Oooh, your storage system was exactly what I wanted for making a 'leader of a team' (like Rocket/Magma) hack / any hack where you have a team larger than 6 / any hack where you play as more than one person. However, I have just one question.

                              Can I manually set the experience gained in the counter variable so I can alter the pokemon stored to the levels I want? It would be a pain, but I could do a check for instance to see what level the rest of your party is, what level the stored pokemon are, and then alter the EXP variable accordingly, and it would be like they were genuinely part of your party, sorta. I mean, it would be a little clumsy - the best version would be to check the EXP and set that to exactly the parties' (I didn't check your stat checker program yet; if that does EXP checking then epic! and with a little math would solve that neatly)- but it would be pretty dang cool.

                              Also, if I made said script (I prolly will), would you like me to post it here as an example for other people?
                              The experience gained is based on a step counter. Like the current daycare system, it's represents 1 exp per step.
                              It is located at : 0x203BFFD
                              Format: [(1 byte) # of steps] [(2 bytes) number of times first byte hit 0xFF]
                              The second portion is incremented when the first portion is at 0xFF. So if you wanted to set your own amount of experience, setting the value at 0x203BFFE would be the best way to do it.

                              Luckily for you, my EXP adding routine adds to exp rather than setting, so you can just modify the amount it adds to the exp to achieve that goal.

                              In a script that would be:
                              setvar LASTRESULT 0x[exp to give] 'remember this value is multiplied by 0xFF in calculation
                              copybyte 0x203BFFE 0x20370D0' this copies 1 byte at a time, length of variables are 2 and so it this counter
                              copybyte 0x203BFFF 0x20370D1
                              callasm 0x[Exp setting routine]

                              If you can create a completed script, yeah, that would be awesome.
                              __________________
                              ...
                              Reply With Quote
                                #125    
                              Old December 4th, 2014 (1:39 PM).
                              LocksmithArmy's Avatar
                              LocksmithArmy LocksmithArmy is offline
                              Mew!
                                 
                                Join Date: Feb 2013
                                Age: 29
                                Gender: Male
                                Posts: 415
                                How bout an item that can capture a trainers pokemon, like a "Team Rocket Ball"... but no other balls will do it...

                                I was thinking use the capture trainers pokemon hack, then hack the trainers routine so it always sets var 0x8000 to 0x1, then during the capture script of this specific item, itll change 0x8000 to 0x0...

                                and of course at the end of any trainer battle, 0x8000 goes back to 0x0 so wild pokemon can still be caught...

                                problem is, i dont know where the trainer battle script it, or how to write pokeball scripts...
                                __________________
                                Reply With Quote
                                Reply

                                Quick Reply

                                Join the conversation!

                                Create an account to post a reply in this thread, participate in other discussions, and more!

                                Create a PokéCommunity Account
                                Thread Tools

                                Posting Rules
                                You may not post new threads
                                You may not post replies
                                You may not post attachments
                                You may not edit your posts

                                BB code is On
                                Smilies are On
                                [IMG] code is On
                                HTML code is Off

                                Forum Jump


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