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
  #1326    
Old October 6th, 2018 (5:28 AM). Edited October 7th, 2018 by hjk321.
hjk321's Avatar
hjk321 hjk321 is offline
     
    Join Date: Sep 2017
    Posts: 186
    Quote:
    Originally Posted by Koople View Post
    Side Quest Menu [FR]

    This hack converts the PC item storage menu into a side quest menu, or task list, etc.

    Here is the repository, the compilation instructions are included in the readme. You will need to define your own parameters/ram in src/headers/defs.asm and create your own tables of string pointers for all of the quest names, descriptions, item images, and quest details. I kept the item image part to allow hackers to include items that might be symbolic of their quest, eg. a scroll or key or pokeball.

    To use in a script (XSE)
    Code:
    writebytetooffset 0x1 <your questflag ram in src/headers/defs.asm>
    fadescreen 0x1
    callasm 0x80EBCD9
    waitstate
    Here is a slightly outdated example GIF (it is just missing the item images in the box), but it gets the point across.

    Enjoy! And please let me know of any bugs.
    Hello,

    I'm having a hard time understanding an aspect of your system, mainly the flags. So if you have 256 quests (the max, still kinda a small number), does that mean you need 512 flags? Consecutive flags, at that? So quest #1 would be flag 0x200, and that would go all the 0x2FF, leaving me with literally no other safe flags for the entire game, or to complete the other 256 flags eaten by the routine? Looks like I might have to dabble in expanding safe flags, unless I'm missing something obvious here.

    Edit: Couldn't I just set the "flag" offsets to some unused RAM? Probably not, since it wouldn't be covered by the save block. And how do I convert the flag number to a RAM location?

    Thanks, hjk321

    Nice routine though!
    __________________
    Sorry guys, I mod the Goldsrc engine now, it doesn't have so many technical limitations...
    Reply With Quote
      #1327    
    Old October 7th, 2018 (10:32 AM).
    Koople's Avatar
    Koople Koople is offline
       
      Join Date: Nov 2016
      Nature: Relaxed
      Posts: 80
      Quote:
      Originally Posted by hjk321 View Post
      Hello,

      I'm having a hard time understanding an aspect of your system, mainly the flags. So if you have 256 quests (the max, still kinda a small number), does that mean you need 512 flags? Consecutive flags, at that? So quest #1 would be flag 0x200, and that would go all the 0x2FF, leaving me with literally no other safe flags for the entire game, or to complete the other 256 flags eaten by the routine? Looks like I might have to dabble in expanding safe flags, unless I'm missing something obvious here.

      Edit: Couldn't I just set the "flag" offsets to some unused RAM? Probably not, since it wouldn't be covered by the save block. And how do I convert the flag number to a RAM location?

      Thanks, hjk321

      Nice routine though!
      I kept the instructions somewhat vague to allow different users to utilize the system the way they like, though you're right that I could have been a bit more verbose.

      The system is set up so that you will need two flags for each quest: one to 'activate' the quest, which just means you have unlocked it and the quest name will show up in the menu and you can activate it and whatnot. The second will indicate that the quest is completed, in which case the 'Done' text will appear next to the quest name.

      It is currently written so that the activation flags (to show the quest names) are in order, and the completion flags are also in order, but can start from a different initial flag. This was done to prevent the use of two separate tables, but can easily be changed.

      256 quests seems like a pretty high number of quests for a rom hack though. And that is not necessarily the limit, the active quest ram can easily be expanded to a halfword value.

      I would recommend expanding the safe number of flags with JPANs save block hack; this way you can unlock thousands more safe flags and this system won't be as limiting.

      I'm not entirely sure why you would want to use RAM instead of flags; that would end up just taking up much more space unless you edit the routine to check for specific bits in the ram, which is then the same functionality as a flag.

      I hope this helps.
      Reply With Quote
        #1328    
      Old October 8th, 2018 (11:38 AM). Edited October 8th, 2018 by hjk321.
      hjk321's Avatar
      hjk321 hjk321 is offline
         
        Join Date: Sep 2017
        Posts: 186
        Quote:
        Originally Posted by Koople View Post
        It is currently written so that the activation flags (to show the quest names) are in order, and the completion flags are also in order, but can start from a different initial flag. This was done to prevent the use of two separate tables, but can easily be changed.
        I hope this helps.
        Literally everything about your routine is great... except every quest is ???????? whether the flags are set or not! in the defs file I've tried RAM pointers (0x0203C001) I've tried repointed flag numbers (0x909) and I've tried raw flag numbers (0x2109) and no matter what the quests do not show up!

        As an experiment I have 15 quests and I set some flags At the index. Index starts at 0203C001, have also tried 0x909 and 0x2109 in defs.asm. Here is proof I have flags set in that area...

        and yet all 15 quests are unshowable. What am I doing wrong?

        I only made minor edits to some text variables, as well as linking to external tables rather than making a table in the actual asm. I didn't edit anything significant.
        __________________
        Sorry guys, I mod the Goldsrc engine now, it doesn't have so many technical limitations...
        Reply With Quote
          #1329    
        Old October 13th, 2018 (8:38 AM).
        ghoulslash's Avatar
        ghoulslash ghoulslash is offline
           
          Join Date: Mar 2016
          Gender: Male
          Posts: 101
          Quote:
          Originally Posted by Koople View Post
          Evolution Moves [FR]
          I found a bug in this code where a pokemon learning a move from any other way would be asked to learn moves it already knows and will be asked to learn a move even when their movesets are not full.

          I rewrote the moveset loop by just calling a custom function rather than editing the main learn_move function at 0803ea88, and it appears to work fine.

          Spoiler:

          Code:
          .text
          .align 2
          .thumb
          .thumb_func
          .global LearnMove_Evolution
          /*
          insert 00 48 00 47 (xx+1) xx xx 08 at cedd4
          */
          
          Main:
          	ldrb r1, [r5, #0x10]
          	mov r0, r9
          	bl MoveChecks
          	ldr r6, =(0x080ceddc +1)
          	bx r6
          	
          MoveChecks:
          	push {r4-r7, lr}
          	mov r7, r10
          	mov r6, r9
          	mov r5, r8
          	push {r5-r7}
          	sub sp, #0x4
          	mov r8, r0		@ r8 = start of poke data (02024284 + 64*ind)
          	lsl r4, r1, #0x18
          	lsr r4, r4, #0x18
          	mov r0, #0x0
          	str r0, [sp]
          	mov r0, r8
          	mov r1, #0xb
          	mov r2, #0x0
          	bl GetAttr
          	lsl r0, r0, #0x10
          	lsr r0, r0, #0x10
          	mov r9, r0		@ r9 = species
          	mov r0, r8
          	mov r1, #0x38
          	mov r2, #0x0
          	bl GetAttr
          	lsl r0, r0, #0x10
          	lsr r0, r0, #0x10
          	mov r10, r0		@ r10 = poke level
          	ldr r0, =(0x0000ffff)
          	mov r12, r0
          	cmp r4, #0x0
          	beq GetLearnset
          	mov r1, sp
          	ldrb r1, [r1]
          	ldr r4, =(0x02024028)
          	strb r1, [r4]
          	
          GetLearnset:
          	ldr r3, .MovesetTable
          	mov r1, r9
          	lsl r4, r1, #0x2
          	add r5, r4, r3
          	ldr r5, [r5]	@ species learnset offset start
          	ldr r6, =(0x02024028)
          	mov r4, r10
          
          LearnsetLoop:
          	ldrb r0, [r6]
          	lsl r1, r0, #0x1
          	add r0, r0, r1
          	add r3, r0, r5
          	ldrb r1, [r3, #0x2]
          	cmp r1, #0xFF
          	beq EndofLearnset
          	cmp r1, #0x0
          	bne CompareLevels
          	
          CheckEvolved:
          	ldr r0, .EvolveFlag
          	ldrb r0, [r0]
          	cmp r0, #0x0
          	bne LearnMove	@ pokemon has evolved & found evo move
          	
          CompareLevels:
          	ldrb r0, [r6]
          	add r0, #0x1
          	strb r0, [r6]	@ pos += 1
          	cmp r1, r4
          	bne LearnsetLoop
          	
          LearnMove:
          	ldrb r0, [r6]
          	add r0, #0x1
          	strb r0, [r6]	@ pos += 1
          	ldrb r0, [r3, #0x1]
          	lsl r0, r0, #0x8
          	ldrb r1, [r3]
          	orr r0, r1
          	ldr r2, =(0x02024022)
          	strh r0, [r2]
          	mov r0, r8	@ poke data struct in ram
          	ldrh r1, [r2]	@ move to learn
          	bl MovesetPad
          	lsl r0, r0, #0x10
          	lsr r0, r0, #0x10
          	str r0, [sp]
          	
          EndofLearnset:	
          	ldr r0, [sp]
          	add sp, #0x4
          	pop {r3-r5}
          	mov r8, r3
          	mov r9, r4
          	mov r10, r5
          	pop {r4-r7}
          	pop {r1}
          	bx r1
          
          GetAttr:
          	ldr r3, =(0x0803fbe8 +1)
          	bx r3
          	
          MovesetPad:
          	ldr r2, =(0x0803e89c +1)
          	bx r2
          
          .align 2
          .EvolveFlag:	.word 0x02xxxxxx   @ from the config.ini
          .MovesetTable:	.word 0x0825d7b4


          If you implemented the original routines, be sure to replace the bytes at 3eaa4.
          __________________
          TM/HM Expansion
          Critical Capture
          Reply With Quote
            #1330    
          Old October 13th, 2018 (10:12 PM).
          Skeli-'s Avatar
          Skeli- Skeli- is offline
          Lord of the Rings
             
            Join Date: Apr 2014
            Location: Canada
            Age: 20
            Gender: Male
            Nature: Adamant
            Posts: 192
            Only Buy 1 TM From Shops [FR]

            If you've decided to make your TMs reusable in Fire Red, this routine will remove the option to buy more than one of each from shops. Credits to azurile13 for the first part (Main) of the code.The only thing that needs changing is the line ".equ offset".
            Code:
            .thumb
            .global AlreadyOwnTM
            
            .equ rom, 0x8000000
            .equ offset, 0x893960 @CHANGE THIS LINE
            
            .org 0x9BC3C, 0xFF
            	ldr r1, .Pointer1
            	bx r1
            .Pointer1: .word Main + rom + 1
            
            .org 0x9BC7C, 0xFF
            	ldr r0, .Pointer2
            	bx r0
            .Pointer2: .word OnlyBuyOne + rom + 1
            
            .org 0x9BEBC, 0xFF
            	ldr r1, .Pointer3
            	bx r1
            .Pointer3: .word AddItem + rom + 1
            
            @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
            
            .org offset, 0xFF
            Main:
            	lsr r4, r0, #0x10
            	mov r0, r4
            	ldr r2, .GetItemPocket
            	bl Jump
            	cmp r0, #0x4
            	bne Return
            	mov r0, r4
            	mov r1, #0x1
            	ldr r2, .CheckItem
            	bl Jump
            	cmp r0, #0x0
            	bne AlreadyOwn
            
            Return:
            	mov r0, r4
            	ldr r1, =0x809BC45
            	bx r1
            
            AlreadyOwn:
            	ldr r1, .AlreadyHaveTMString
            	ldr r2, =0x809BC67
            	bx r2
            
            @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
            
            OnlyBuyOne:
            	ldr r1, .FCodeBuffer2
            	mov r0, r4
            	ldr r2, .ItemID_Copy_Name
            	bl Jump
            	mov r0, r4
            	ldr r2, .GetItemPocket
            	bl Jump
            	cmp r0, #0x4
            	bne Return2
            
            GetPrice:
            	mov r0, r4
            	ldr r2, .GetMarketPrice
            	bl Jump
            	mov r1, r0
            	ldr r0, .FCodeBuffer2
            	add r0, #0x20
            	mov r2, #0x3
            	mov r3, #0x8
            	bl Hex2Dec
            	ldr r1, .NewYouWantString
            	ldr r2, =0x809BE91
            	ldr r3, =0x809BC89
            	bx r3
            
            Return2:
            	ldr r1, =0x809BC85
            	bx r1
            
            Hex2Dec:
            	ldr r4, =0x8008E79
            	bx r4
            
            @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
            
            AddItem:
            	ldr r2, .GetItemPocket
            	bl Jump
            	cmp r0, #0x4
            	bne Return3
            	mov r0, #0x1
            	strh r1, [r4, #0x2]
            
            Return3:
            	ldrh r0, [r4, #0xA]
            	ldrh r1, [r4, #0x2]
            	ldr r2, .Bag_Add_Item
            	bl Jump
            	lsl r0, #0x18
            	ldr r2, =0x809BEC5
            Jump:
            	bx r2
            
            .align 2
            .FCodeBuffer2: .word 0x2021CD0
            .GetItemPocket: .word 0x809A9D9
            .CheckItem: .word 0x8099F41
            .ItemID_Copy_Name: .word 0x8099E91
            .GetMarketPrice: .word 0x809A901
            .Bag_Add_Item: .word 0x809A085
            .AlreadyHaveTMString: .word STRING1 + rom
            .NewYouWantString: .word STRING2 + rom
            
            STRING1: .byte 0xD3, 0xE3, 0xE9, 0x00, 0xD5, 0xE0, 0xE6, 0xD9, 0xD5, 0xD8, 0xED, 0x00, 0xE3, 0xEB, 0xE2, 0x00, 0xE8, 0xDC, 0xD5, 0xE8, 0x00, 0xCE, 0xC7, 0xAD, 0xFC, 0x09, 0xFF
            STRING2: .byte 0xFD, 0x02, 0xB8, 0xFE, 0xCE, 0xDC, 0xD5, 0xE8, 0x00, 0xEB, 0xDD, 0xE0, 0xE0, 0x00, 0xD6, 0xD9, 0x00, 0xB7, 0xFD, 0x03, 0xAD, 0x00, 0xC9, 0xDF, 0xD5, 0xED, 0xAC, 0xFF
            __________________
            Pokemon Unbound

            Reply With Quote
              #1331    
            Old October 19th, 2018 (7:49 AM). Edited October 22nd, 2018 by pokemontutorialTV.
            pokemontutorialTV's Avatar
            pokemontutorialTV pokemontutorialTV is offline
               
              Join Date: Feb 2014
              Location: Germany, Kaiserslautern
              Gender: Male
              Nature: Calm
              Posts: 77
              If I use the above routine, the price isnt calculated for non-TM shops correctly anymore. Do I something wrong?
              Ok, I know know your routine does some mistakes with the registers. If you want a working soulution, also shorter than this, DM me.
              __________________
              Making Youtube Videos about Pokémon.
              _______________________________________________
              Pokémon Zoisit:

              _______________________________________________
              My Youtube Channel with over 1000 videos to Pokémon: http://www.youtube.com/user/pokemontutorialTV
              Reply With Quote
                #1332    
              Old October 28th, 2018 (6:52 PM).
              Lunos's Avatar
              Lunos Lunos is offline
              Random Uruguayan User
                 
                Join Date: Oct 2008
                Location: Montevideo (Uruguay)
                Gender: Male
                Nature: Lonely
                Posts: 1,672
                Quote:
                Originally Posted by pokemontutorialTV View Post
                If I use the above routine, the price isnt calculated for non-TM shops correctly anymore. Do I something wrong?
                Ok, I know know your routine does some mistakes with the registers. If you want a working soulution, also shorter than this, DM me.
                Consider just sharing it here directly for everyone's benefit. Thank you.
                __________________
                Reply With Quote
                  #1333    
                Old November 6th, 2018 (2:42 PM).
                ghoulslash's Avatar
                ghoulslash ghoulslash is offline
                   
                  Join Date: Mar 2016
                  Gender: Male
                  Posts: 101
                  [FR] Fully Flag-Dependent Start Menu

                  It's nothing fancy, but this code expands on FBI's routine to swap between start menus, shown here. It also keeps the safari zone start menu intact.

                  Every single start menu option (except Exit) is flag-dependent, so you can add or remove start menu options with simple flag setting/clearing.

                  Spoiler:

                  Code:
                  .text
                  .align 2
                  .thumb
                  .thumb_func
                  .global start_menu
                  /*
                  insert 00 48 00 47 (xx+1) xx xx 08 at 6ed5c
                  
                  */
                  
                  .equ offset, 0x08xxxxxx		@ insert location
                  
                  /* change these */
                  .equ DEX_FLAG, 0x250
                  .equ POKE_FLAG, 0x251
                  .equ BAG_FLAG, 0x252
                  .equ PLAYER_FLAG, 0x253
                  .equ SAVE_FLAG, 0x254
                  .equ OPT_FLAG, 0x255
                  .equ EXIT_FLAG, 0x0   @ currently unused, so at least 1 option is shown
                  
                  Main:
                  	bl check_safari_zone
                  	cmp r0, #0x1
                  	bne regular_menu
                  	ldr r0, =(0x0806ed86 +1)
                  	bx r0
                  	
                  regular_menu:
                  	push {r4-r5}
                  	mov r1, #0x0
                  	ldr r4, =(offset+table)
                  	
                  loop:
                  	lsl r0, r1, #0x2
                  	add r0, r0, r4
                  	mov r5, r0
                  	cmp r1, #0x6
                  	beq add_option	@ auto-add last option (exit)	
                  	ldrh r0, [r5]	@ flag to check
                  	push {r1}
                  	bl check_flag
                  	pop {r1}
                  	cmp r0, #0x1
                  	bne loop_incr
                  	
                  add_option:
                  	ldrb r0, [r5, #0x2]		@ menu index
                  	lsl r0, r0, #0x18
                  	lsr r0, r0, #0x18
                  	push {r1}
                  	bl add_opt
                  	pop {r1}
                  	
                  loop_incr:
                  	cmp r1, #0x6	@ num opts
                  	beq exit
                  	add r1, #0x1
                  	b loop
                  	
                  exit:
                  	pop {r4-r5}
                  	pop {r0}
                  	bx r0
                  	
                  .align 2
                  table:
                  .hword DEX_FLAG
                  .byte 0
                  .byte 0
                  .hword POKE_FLAG
                  .byte 1
                  .byte 0
                  .hword BAG_FLAG
                  .byte 2
                  .byte 0
                  .hword PLAYER_FLAG
                  .byte 3
                  .byte 0
                  .hword SAVE_FLAG
                  .byte 4
                  .byte 0
                  .hword OPT_FLAG
                  .byte 5
                  .byte 0
                  .hword EXIT_FLAG
                  .byte 6
                  .byte 0
                  	
                  	
                  check_flag:
                  	ldr r2, =(0x0806e6d0 +1)
                  	bx r2
                  	
                  add_opt:
                  	ldr r2, =(0x0806ed94 +1)
                  	bx r2
                  
                  check_safari_zone:
                  	ldr r0, =(0x080a0e90 +1)
                  	bx r0


                  for example, with the current definitions, setting flags 0x251, 0x253 would make the start menu be composed of only "Pokemon","[player]", and "Exit".
                  __________________
                  TM/HM Expansion
                  Critical Capture
                  Reply With Quote
                    #1334    
                  Old November 8th, 2018 (8:07 AM).
                  Petuuuhhh's Avatar
                  Petuuuhhh Petuuuhhh is offline
                   
                  Join Date: Apr 2017
                  Location: Georgia
                  Age: 25
                  Gender: Male
                  Posts: 566
                  Quote:
                  Originally Posted by Skeli- View Post
                  Expanding the Bag Entirely [FR]

                  -Big Edit: The routines have been completely rewritten from scratch to work properly now.

                  This has been done in bits and pieces over the years (I believe it's actually been done completely for Emerald), so I decided to rewrite the bag storage routine for Fire Red.

                  Pre-Requisites
                  • JPAN's Save Block Recycle
                    Spoiler:
                    Code:
                    .thumb
                    .global JPAN_Save_Block_Recycle
                    .equ rom, 0x8000000
                    .equ offset, 0xA00000 @YOUR INSERT OFFSET HERE
                    
                    .org 0xD991E, 0xFF
                    	bx r7
                    
                    .org 0xD995C, 0xFF
                    .word Recycle_2 + rom + 1
                    
                    .org 0xD9EDC, 0xFF
                    	ldr r0, .Pointer1
                    	bx r0
                    .align 2
                    .Pointer1: .word Recycle_1 + rom + 1
                    
                    .org 0x3FEC9A, 0xFF
                    .byte 0xF0, 0x0F, 0xF0, 0x0F, 0xF0, 0x0F, 0xE0, 0x1F, 0xF0, 0x0F, 0xD0, 0x2F, 0x98, 0xD, 0x0, 0x0, 0xF0, 0x0F, 0xF0, 0xF, 0xF0, 0xF, 0xE0, 0x1F, 0xF0, 0xF, 0xD0, 0x2F, 0xF0, 0xF, 0xC0, 0x3F, 0xF0, 0xF, 0xB0, 0x4F, 0xF0, 0xF, 0xA0, 0x5F, 0xF0, 0xF, 0x90, 0x6F, 0xF0, 0xF, 0x80, 0x7F, 0x50, 0x4
                    
                    .org offset, 0xFF
                    Recycle_1:
                    	ldr r1, [r4]
                    	mov r3, #0xFF
                    	lsl r3, #0x4
                    	add r3, r1
                    	ldrh r0, [r3, #0x4]
                    	cmp r0, #0x0
                    	beq Size1
                    	cmp r0, #0x4
                    	beq Size2
                    	cmp r0, #0xD
                    	beq Size3
                    
                    BigLoop:
                    	cmp r5, #0xD
                    	ble Return
                    	mov r0, #0x1
                    	pop {r3}
                    	mov r8, r3
                    	pop {r4-r7,pc}
                    
                    Size1:
                    	mov r1, #0xCC
                    	ldr r2, .Loc1
                    	b SmallLoop
                    
                    Size2:
                    	mov r1, #0x96
                    	lsl r1, #0x2
                    	ldr r2, .Loc2
                    	b SmallLoop
                    
                    Size3:
                    	mov r1, #0xBA
                    	lsl r1, #0x4
                    	ldr r2, .Loc3
                    
                    SmallLoop:
                    	sub r3, #0x4
                    	ldr r0, [r3]
                    	str r0, [r2]
                    	sub r2, #0x4
                    	sub r1, #0x4
                    	cmp r1, #0x0
                    	bne SmallLoop
                    	b BigLoop
                    
                    .align 2
                    .Loc1: .word 0x203C1C8
                    .Loc2: .word 0x203C420
                    .Loc3: .word 0x203CFC0
                    
                    Return:
                    	ldr r0, .Return
                    	bx r0
                    
                    .align 2
                    .Return: .word 0x80D9E71
                    .word 0xFFFFFFFF
                    
                    Recycle_2:
                    	mov r7, #0xFF
                    	lsl r7, #0x4
                    	add r7, r1, r7
                    	strh r0, [r7, #0x6]
                    	ldrh r6, [r7, #0x4]
                    	cmp r6, #0x0
                    	beq Size1_2
                    	cmp r6, #0x4
                    	beq Size2_2
                    	cmp r6, #0xD
                    	beq Size3_2
                    	lsl r0, #0x0
                    
                    Return_2:
                    	ldr r0, .Return2
                    	bx r0
                    
                    .align 2
                    .Return2: .word 0x80D9923
                    
                    Size1_2:
                    	mov r3, #0xCC
                    	ldr r2, .Loc1_2
                    	b SmallLoop_2
                    
                    Size2_2:
                    	mov r3, #0x96
                    	lsl r3, #0x2
                    	ldr r2, .Loc2_2
                    	b SmallLoop_2
                    
                    Size3_2:
                    	mov r3, #0xBA
                    	lsl r3, #0x4
                    	ldr r2, .Loc3_2
                    
                    SmallLoop_2:
                    	sub r7, #0x4
                    	ldr r0, [r2]
                    	str r0, [r7]
                    	sub r2, #0x4
                    	sub r3, #0x4
                    	cmp r3, #0x0
                    	bne SmallLoop_2
                    	b Return_2
                    
                    .align 2
                    .Loc1_2: .word 0x203C1C8
                    .Loc2_2: .word 0x203C420
                    .Loc3_2: .word 0x203CFC0
                    Insertion Instructions:
                    1. Change the .equ offset, 0xA00000 to the offset where you plan on inserting the routine.
                    2. Compile the asm file.
                    3. Open the .bin file and copy all the data from 0xD991E, 0xD995C, 0xD9EDC 0x3FEC9A, and your insert offset to those same offsets in your rom.
                  • An updated Conversion attack routine:
                    Spoiler:

                    In the following routine, change the location of your attack data at the top if necessary (if you haven't added new moves to your game it probably isn't). Assemble the routine, copy the data from the .bin file, and then do a paste-write at 0x28604 in your rom.

                    Or if you don't understand ASM, copy and paste the compiled version to 0x28604 in your rom:
                    Code:
                    F0 B5 1B 4F 18 48 19 49 09 78 58 22 51 43 40 18 03 1C 44 7D 85 7D 00 88 12 49 0C 22 50 43 09 18 08 78 A0 42 10 D0 A8 42 0E D0 58 75 98 75 04 1C 10 48 FD 21 01 70 03 21 41 70 84 70 FF 21 C1 70 39 68 05 31 39 60 F0 BD 3A 68 51 78 90 78 00 02 01 43 D0 78 00 04 01 43 10 79 00 06 01 43 39 60 F0 BD C0 46 06 0C 25 08 F0 3B 02 02 6B 3D 02 02 74 3D 02 02 B8 2A 02 02
                    (This compiled version assumes you haven't added any new moves)

                    Routine:
                    Code:
                    .thumb
                    .global atk90_changetypestoenemyattacktype
                    
                    .equ Attack_Data, 0x250C04 @0x900000 for Mr. DS
                    .equ rom, 0x8000000
                    
                    @Conversion: Insert at 0x28604
                    CheckMove:
                    	push {r4-r7, lr}
                    	ldr r7, .ScriptLoc
                    	ldr r0, .BattleData
                    	ldr r1, .UserBank
                    	ldrb r1, [r1]
                    	mov r2, #0x58
                    	mul r1, r2
                    	add r0, r1
                    	mov r3, r0
                    	ldrb r4, [r0, #0x15] @first type
                    	ldrb r5, [r0, #0x16] @second type
                    	ldrh r0, [r0] @First Move
                    
                    GetMoveType:
                    	ldr r1, .MoveData
                    	mov r2, #0xC
                    	mul r0, r2
                    	add r1, r0
                    	ldrb r0, [r1]
                    
                    CheckTypeMatch:
                    	cmp r0, r4
                    	beq Failed
                    	cmp r0, r5
                    	beq Failed
                    
                    Store:
                    	strb r0, [r3, #0x15]
                    	strb r0, [r3, #0x16]
                    
                    Return:
                    	mov r4, r0
                    	ldr r0, =0x2022AB8
                    	mov r1, #0xFD
                    	strb r1, [r0]
                    	mov r1, #0x3
                    	strb r1, [r0, #0x1]
                    	strb r4, [r0, #0x2]
                    	mov r1, #0xFF
                    	strb r1, [r0, #0x3]
                    	ldr r1, [r7]
                    	add r1, #0x5
                    	str r1, [r7]
                    	pop {r4-r7, pc}
                    
                    Failed:
                    	ldr r2, [r7]
                    	ldrb r1, [r2,#1]
                    	ldrb r0, [r2,#2]
                    	lsl r0, #8
                    	orr r1, r0
                    	ldrb r0, [r2,#3]
                    	lsl r0, #0x10
                    	orr r1, R0
                    	ldrb r0, [r2,#4]
                    	lsl r0, #0x18
                    	orr r1, r0
                    	str r1, [r7]
                    	pop {r4-r7, pc}
                    
                    .align 2
                    .MoveData: .word Attack_Data + 0x2  + rom
                    .BattleData: .word 0x2023BE4 + 0xC
                    .UserBank: .word 0x2023D6B
                    .ScriptLoc: .word 0x2023D74


                    Why Conversion?
                    Spoiler:
                    Some of the space from the old Conversion routine is used for the bag expansion. To free up this space, Conversion was rewritten to match its Gen 6+ effect.

                  The Code
                  Spoiler:
                  Code:
                  @Bag Cursor: 203AD0A
                  .equ Total_Item_Amount, 700 @Change to largest item index number
                  
                  .equ Regular_Item_Num, 200 @Change to number of items in main bag pocket divided by 2
                  .equ Key_Item_Num, 30 @Change to number of items in key item pocket divided by 2
                  .equ Poke_Ball_Num, 14 @Change to number of items in Poke Ball pocket divided by 2
                  .equ TM_Num, 128 @Change to number of TMs + HMs
                  .equ Berry_Num, 67 @Change to number of berries
                  
                  .equ TM_Ram, 0x202583C @Change to your TM Case RAM address
                  .equ Berry_Ram, 0x2025A3C @Change to your Berry Pouch RAM address
                  .equ Key_Item_Ram, 0x203C7D0 @Change to your Key Item pocket RAM address
                  .equ Poke_Ball_Ram, 0x203C8C0 @Change to your main Poke Ball Pocket RAM address
                  .equ Item_Ram, 0x203C930 @Change to your main bag pocket RAM address
                  
                  .equ Free_Ram, 0x203D850 @Don't change unless you don't like this free ram
                  .equ offset, 0x8B3030 @Change to Free Space Offset
                  
                  .equ largest_pocket_size, Regular_Item_Num * 2
                  .equ largest_pocket_size_plus_one, largest_pocket_size + 1
                  .equ strings_size, largest_pocket_size_plus_one * 19
                  
                  .equ rom, 0x8000000
                  
                  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@HelperRoutine
                  
                  .org 0x28760, 0xFF
                  GetItemAmount:
                  	push {r1,lr}
                  	ldr r0, .CurrentPocket
                  	ldrb r0, [r0]
                  	lsl r0, #0x1
                  	ldr r1, .ItemStorage
                  	add r0, r1
                  	ldrh r0, [r0]
                  	pop {r1,pc}
                  
                  .align 2
                  .CurrentPocket: .word 0x203AD02
                  .ItemStorage: .word Free_Ram
                  
                  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@Bag Decryption and DMA Negation
                  .org 0x4C064, 0xFF
                  mov r1, #0x0
                  
                  .org 0x4C13C, 0xFF
                  mov r4, #0x0
                  
                  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@Routines Related to Obtaining Items
                  
                  .org 0x99DFC, 0xFF
                  ldrh r0, [r0, #0x4]
                  
                  .org 0x99E1A, 0xFF
                  ldrh r4, [r4, #0x4]
                  
                  .org 0x99E44, 0xFF
                  ldr r1, .BagPocket0
                  
                  @Regular items
                  ldr r0, ram_FREE_item
                  str r0, [r1]
                  mov r0, #Regular_Item_Num
                  lsl r0, #0x1 @400 regular items
                  strh r0, [r1, #0x4]
                  
                  @Key items
                  ldr r0, ram_FREE_keyitem
                  str r0, [r1, #0x8]
                  mov r0, #(Key_Item_Num * 2) @60 key items
                  strh r0, [r1, #0xC]
                  
                  @Poke balls
                  ldr r0, ball_ram
                  str r0, [r1, #0x10]
                  mov r0, #(Poke_Ball_Num * 2) @28 balls
                  strh r0, [r1, #0x14]
                  
                  @Tms
                  ldr r0, tm_ram
                  str r0, [r1, #0x18]
                  mov r0, #TM_Num @128 TMs
                  strh r0, [r1, #0x1C]
                  
                  @Berries
                  ldr r0, berry_ram
                  str r0, [r1, #0x20]
                  add r1, #0x24
                  mov r0, #Berry_Num @67 berries
                  strh r0, [r1]
                  bx lr
                  
                  .align 2
                  .BagPocket0:		.word 0x203988C
                  tm_ram:			.word TM_Ram
                  berry_ram:		.word Berry_Ram
                  ram_FREE_keyitem:	.word Key_Item_Ram
                  ball_ram:		.word Poke_Ball_Ram
                  ram_FREE_item:		.word Item_Ram
                  
                  .org 0x99ED8, 0xFF
                  ldrh r1, [r0, #0x4]
                  
                  .org 0x99EEA, 0xFF
                  lsl r0, r2, #0x10
                  lsr r0, r0, #0x10
                  
                  .org 0x99F16, 0xFF
                  ldrh r1, [r0, #0x4]
                  
                  .org 0x99F32, 0xFF
                  lsl r0, r0, #0x10
                  lsl r2, r0, #0x10
                  
                  .org 0x99F6E, 0xFF
                  ldrh r1, [r0, #0x4]
                  
                  .org 0x99F9A, 0xFF
                  lsl r0, r0, #0x10
                  lsr r2, r0, #0x10
                  ldrh r0, [r3, #0x4]
                  
                  .org 0x9A02A, 0xFF
                  ldrh r1, [r0, #0x4]
                  
                  .org 0x9A05E, 0xFF
                  lsl r0, r0, #0x10
                  lsr r2, r0, #0x10
                  ldrh r0, [r3, #0x4]
                  
                  .org 0x9A06E, 0xFF
                  lsl r0, r0, #0x10
                  lsr r0, r0, #0x10
                  
                  .org 0x9A0B6, 0xFF
                  ldrh r1, [r0, #0x4]
                  
                  .org 0x9A0EA, 0xFF
                  lsl r0, r0, #0x10
                  lsr r2, r0, #0x10
                  ldrh r0, [r5, #0x4]
                  
                  .org 0x9A110, 0xFF
                  lsl r0, r0, #0x10
                  lsr r1, r0, #0x10
                  
                  .org 0x9A14C, 0xFF
                  lsl r0, r0, #0x10
                  lsr r1, r0, #0x10
                  
                  .org 0x9A186, 0xFF
                  lsl r0, r0, #0x10
                  lsr r2, r0, #0x10
                  
                  .org 0x9A204, 0xFF
                  ldrh r1, [r0, #0x4]
                  
                  .org 0x9A24E, 0xFF
                  lsl r0, r0, #0x10
                  lsr r2, r0, #0x10
                  ldrh r0, [r6, #0x4]
                  
                  .org 0x9A2E8, 0xFF
                  ldrh r1, [r1, #0x4]
                  
                  .org 0x9A58E, 0xFF @Shifting Items Up
                  lsl r1, #0x10
                  lsr r1, #0x10
                  
                  .org 0x09A8A4, 0xFF
                  	lsl r0, #0x10
                  	lsr r0, #0x10
                  	ldr r1, .ItemLimit
                  	cmp r1, r0
                  	bge Return
                  	mov r0, #0x0
                  Return:
                  	bx lr
                  
                  .align 2
                  .ItemLimit: .word Total_Item_Amount
                  
                  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@Routines Related to Viewing Items in Bag
                  
                  Bag_Allocate_Stuff: @Credits to azurile13
                  .org 0x1083F4, 0xFF
                  	push {r4,lr}
                  	ldr r4, .AllocationPointer
                  	ldr r0, .LargestSize
                  	lsl r0, #0x3
                  	bl 0x2B9C @malloc
                  	str r0, [r4]
                  	cmp r0, #0x0
                  	beq No
                  	ldr r0, .strings_size
                  	bl 0x2B9C @malloc
                  	str r0, [r4, #0x4]
                  	cmp r0, #0x0
                  	beq No
                  	mov r0, #0x1
                  	b End
                  
                  No:
                  	mov r0, #0x0
                  
                  End:
                  	pop {r4,pc}
                  
                  .align 2
                  .LargestSize: .word largest_pocket_size_plus_one
                  .AllocationPointer: .word 0x0203AD18
                  .strings_size: .word strings_size
                  
                  .org 0x108440, 0xFF
                  bl 0x28760 @GetItemAmount
                  b 0x10844A
                  
                  .org 0x10847E, 0xFF @Shop is dis one
                  bl 0x28760 @GetItemAmount
                  b 0x108488
                  
                  .org 0x1084C2, 0xFF
                  bl 0x28760 @GetItemAmount
                  b 0x1084CA
                  
                  .org 0x1085D8, 0xFF
                  push {r1}
                  bl 0x28760 @GetItemAmount
                  pop {r1}
                  cmp r0, r5
                  
                  .org 0x108698, 0xFF
                  ldr r5, .Thing
                  ldrh r1, [r5, #0x6]
                  push {r1}
                  bl 0x28760 @GetItemAmount
                  pop {r1}
                  .hword 0x0
                  cmp r0, r4
                  
                  .org 0x10871C, 0xFF
                  .Thing: .word 0x203ACFC
                  
                  .org 0x10881E, 0xFF
                  ldr r1, .Thing2
                  ldrh r1, [r1, #0x6]
                  push {r1}
                  bl 0x28760 @GetItemAmount
                  pop {r1}
                  .hword 0x0
                  cmp r2, r0
                  
                  .org 0x108850, 0xFF
                  .Thing2: .word 0x203ACFC
                  
                  .org 0x108894, 0xFF
                  push {r1}
                  bl 0x28760 @GetItemAmount
                  pop {r1}
                  add r1, #0xD
                  
                  .org 0x108A1C, 0xFF @Up Cursor Bug 1
                  ldr r1, .OpenBagBugFix1Pointer
                  bx r1
                  .align 2
                  .OpenBagBugFix1Pointer: .word OpenBagBugFix1 + rom + 1
                  
                  .org 0x108A40, 0xFF @Up Cursor Bug 2
                  ldr r0, .OpenBagBugFix2Pointer
                  bx r0
                  .align 2
                  .OpenBagBugFix2Pointer: .word OpenBagBugFix2 + rom + 1
                  .hword 0x0
                  
                  .org 0x108AC0, 0xFF @Up Cursor Bug 3
                  ldr r0, .OpenBagBugFix3Pointer
                  bx r0
                  .align 2
                  .OpenBagBugFix3Pointer: .word OpenBagBugFix3 + rom + 1
                  
                  .org 0x108DC8, 0xFF
                  ldr r1, .StoreItemPointer
                  bx r1
                  .align 2
                  .StoreItemPointer: .word StoreItem + rom + 1
                  
                  ldr r0, .Bag_Pocket_0_2
                  add r4, r1, r0
                  ldr r0, [r4]
                  ldrh r1, [r4, #0x4]
                  
                  .org 0x108DEA, 0xFF
                  ldrh r0, [r4, #0x4]
                  
                  .org 0x108E0A, 0xFF
                  ldrh r0, [r4, #0x4]
                  
                  .org 0x108E20, 0xFF
                  ldr r0, .GetSmallestItemAmountPointer
                  bx r0
                  .align 2
                  .GetSmallestItemAmountPointer: .word GetSmallestItemAmount + rom + 1
                  
                  .org 0x108E3C, 0xFF
                  .Bag_Pocket_0_2: .word 0x203988C
                  
                  .org 0x108E4C, 0xFF
                  pop {r4-r6,pc}
                  
                  .org 0x108FB6, 0xFF
                  ldrh r5, [r5, #0x6]
                  push {r1}
                  bl 0x28760 @GetItemAmount
                  pop {r1}
                  .hword 0x0
                  cmp r1, r0
                  
                  .org 0x10904A, 0xFF
                  ldrh r1, [r5, #0x6]
                  push {r1}
                  bl 0x28760 @GetItemAmount
                  pop {r1}
                  .hword 0x0
                  cmp r4, r0
                  
                  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@Remove Help System
                  .org 0x13B8C2, 0xFF
                  b 0x13B900
                  
                  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@New Routine
                  
                  .org offset, 0xFF
                  StoreItem:
                  	push {r4-r6,lr}
                  	lsl r0, r0, #0x18
                  	lsr r5, r0, #0x18
                  	mov r4, #0x0
                  
                  GetItemInBagCount:
                  	mov r6, #0x0
                  	lsl r0, r4, #0x3
                  	ldr r1, .Table
                  	add r0, r1
                  	ldrh r3, [r0, #0x4]
                  	lsl r3, #0x1
                  	ldr r0, [r0]
                  	mov r1, #0x0
                  
                  Loop:
                  	cmp r1, r3
                  	beq StoreAmount
                  	ldrh r2, [r0]
                  	cmp r2, #0x0
                  	beq CheckNextItemJustInCase
                  	add r0, #0x4
                  	add r1, #0x1
                  	b Loop
                  
                  CheckNextItemJustInCase:
                  	ldrh r2, [r0, #0x4]
                  	cmp r2, #0x0
                  	beq StoreAmount
                  	add r0, #0x4
                  	add r1, #0x1
                  	mov r6, #0x1
                  	b Loop	
                  
                  StoreAmount:
                  	cmp r6, #0x0
                  	beq NotShopSkip
                  	sub r1, #0x1
                  NotShopSkip:
                  	ldr r0, .ItemStorage2
                  	lsl r2, r4, #0x1
                  	add r0, r2
                  	strh r1, [r0]
                  	add r4, #0x1
                  	cmp r4, #0x3
                  	beq ReturnToThing
                  	b GetItemInBagCount
                  
                  ReturnToThing:
                  	lsl r1, r5, #0x3
                  	ldr r0, =0x8108DD1
                  	bx r0
                  
                  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
                  
                  GetSmallestItemAmount:
                  	push {r1}
                  	ldr r0, .ItemStorage2
                  	lsl r1, r5, #0x1
                  	add r0, r1
                  	pop {r1}
                  	ldrh r0, [r0]
                  	ldr r3, =0x8108E29
                  	bx r3
                  
                  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
                  
                  OpenBagBugFix1:
                  	push {r0}
                  	lsl r0, r4, #0x1
                  	ldr r1, .ItemStorage2
                  	add r1, r0
                  	ldrh r1, [r1]
                  	pop {r0}
                  	add r0, r1, #0x1
                  	cmp r2, r0
                  	ldr r0, =0x8108A27
                  	bx r0
                  
                  OpenBagBugFix2:
                  	lsl r3, r4, #0x1
                  	ldr r0, .ItemStorage2
                  	add r0, r3
                  	ldrh r0, [r0]
                  	add r3, r0, #0x1
                  	ldr r4, =0x8108A4D
                  	bx r4
                  
                  OpenBagBugFix3:
                  	lsl r1, r6, #0x1
                  	ldr r0, .ItemStorage2
                  	add r0, r1
                  	ldrh r0, [r0]
                  	add r0, #0x1
                  	ldr r1, =0x8108AC9
                  	bx r1
                  
                  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
                  
                  .align 2
                  .ItemStorage2: .word Free_Ram
                  .Table: .word TABLE + rom
                  
                  TABLE:
                  .word Item_Ram
                  .hword Regular_Item_Num, 0x0
                  
                  .word Key_Item_Ram
                  .hword Key_Item_Num, 0x0
                  
                  .word Poke_Ball_Ram
                  .hword Poke_Ball_Num, 0x0
                  The above code is written in such a way that if you were to insert it as is, you would have support for:
                  • 400 Regular Items
                  • 60 Key Items
                  • 28 Poke Balls
                  • 128 TMs/HMs
                  • 67 Berries

                  Obviously if you don't need this many items, you're free to change the ram locations and item amounts by modifying the lines at the top of the routine.

                  Insertion Instructions:
                  1. Customize to your liking
                  2. Assemble the routine
                  3. Copy the output file and fill this copy with FFs
                  4. Create a patch using your blank (filled with FFs) file as the unmodified file, and the output file as the modified file
                  5. Patch your rom

                  This has been confirmed to work with a vanilla Fire Red. However, I can't guarantee it will work with all roms in progress.


                  Credits
                  Potions go into the Key Item slot when I use this? What am I doing wrong?
                  Reply With Quote
                    #1335    
                  Old November 9th, 2018 (1:00 PM). Edited November 9th, 2018 by Skeli-.
                  Skeli-'s Avatar
                  Skeli- Skeli- is offline
                  Lord of the Rings
                     
                    Join Date: Apr 2014
                    Location: Canada
                    Age: 20
                    Gender: Male
                    Nature: Adamant
                    Posts: 192
                    Quote:
                    Originally Posted by Petuuuhhh View Post
                    Potions go into the Key Item slot when I use this? What am I doing wrong?
                    You need to delete your save file and start a new game. Or, implement this routine by Sagiri, and then you can just start a new game normally. If you used the saveblock routine from this post and you do implement Sagiri's routine, make sure that you change the first line in constants.s (from Sagiri's routine) to
                    Code:
                    .definelabel jpan_block, 0x0203C100
                    as that is where I started the saveblock in JPAN's routine.
                    __________________
                    Pokemon Unbound

                    Reply With Quote
                      #1336    
                    Old November 9th, 2018 (5:07 PM).
                    Sagiri's Avatar
                    Sagiri Sagiri is offline
                       
                      Join Date: Mar 2007
                      Posts: 759
                      Since it got mentioned above, I figured I'd post this here.

                      It's been tweaked slightly so that it only uses armips, rather than the build system I use for my C stuff. All it really did for it was find free space automatically, and, while that's kind of useful, I feel it unnecessarily overcomplicated it.

                      In any case:

                      Clear JPAN Save Block During New Game [FR]

                      Fixes an oddity with JPAN's Save Block Recycle where the saved memory doesn't get zeroed upon starting a new game. Instead, it'll retain whatever it happened to be in the previous save file.

                      To be clear, this does not actually include JPAN's Save Block Recycle itself.
                      Reply With Quote
                        #1337    
                      Old 4 Weeks Ago (1:14 AM).
                      Sagiri's Avatar
                      Sagiri Sagiri is offline
                         
                        Join Date: Mar 2007
                        Posts: 759
                        Summary Screen Wraps Around [FR]

                        Allows you to hit Up on the summary screen of the first Pokémon in the party to move to the last Pokémon in your party, and likewise hit Down on the last to move to the first. This change originated in XY and has become standard in all later games.
                        Reply With Quote
                          #1338    
                        Old 4 Weeks Ago (8:39 AM).
                        eMMe97 eMMe97 is offline
                           
                          Join Date: Jan 2015
                          Posts: 31
                          Are there news about this feature? (Trainer's Interrupting battles)
                          I see that Chacha Dinosaur imported it in Emerald, but for Fire Red?
                          Reply With Quote
                            #1339    
                          Old 4 Weeks Ago (4:43 PM).
                          Petuuuhhh's Avatar
                          Petuuuhhh Petuuuhhh is offline
                           
                          Join Date: Apr 2017
                          Location: Georgia
                          Age: 25
                          Gender: Male
                          Posts: 566
                          Gen 7 Soul Dew Update by Skeli Unbound [FR]

                          Code:
                          .thumb
                          .global SoulDewNerf
                          
                          .equ Psychic, 0xE
                          .equ Dragon, 0x10
                          
                          .org 0x3EF58, 0xFF
                          Main:
                          	ldrh r0, [r6] @Current Species
                          	ldr r1, .Latios
                          	cmp r0, r1
                          	ldr r1, .Latias
                          	cmp r0, r1
                          	bne 0x3EFC8 @DeepSea Items Check
                          
                          CheckType:
                          	mov r0, r9
                          	cmp r0, #Dragon
                          	beq TwentyBoost
                          	cmp r0, #Psychic
                          	bne 0x3EFC8 @DeepSea Items Check
                          
                          TwentyBoost:
                          	mov r0, r7 @Attack
                          	mov r1, #0x5
                          	bl 0x1E4018 @Divide
                          	add r7, r0
                          
                          	mov r0, r8 @Sp. Atk
                          	mov r1, #0x5
                          	bl 0x1E4018 @Divide
                          	mov r1, r8
                          	add r0, r1
                          	mov r8, r0
                          	b 0x3EFC8 @DeepSea Items Check
                          
                          .align 2
                          .Latias: .word 0x197
                          .Latios: .word 0x198
                          Reply With Quote
                            #1340    
                          Old 4 Weeks Ago (6:45 AM).
                          Megax Rocker's Avatar
                          Megax Rocker Megax Rocker is offline
                             
                            Join Date: Jan 2016
                            Posts: 130
                            Did someone ever make a Pixie plate item effect?
                            Reply With Quote
                              #1341    
                            Old 3 Weeks Ago (4:27 PM).
                            Sagiri's Avatar
                            Sagiri Sagiri is offline
                               
                              Join Date: Mar 2007
                              Posts: 759
                              Hall of Fame Expanded Pokémon Fix [FR]

                              Fixes an issue where expanded Pokémon above index 0x1FF do not show up correctly in the Hall of Fame.

                              For example, 0x201 would normally show up as 0x1 (Bulbasaur). This is because the Hall of Fame data only allocated 9 bits to the species number, and 0x1FF is the largest number that can be stored in that space; larger numbers only have their lowest 9 bits stored.
                              Reply With Quote
                                #1342    
                              Old 3 Weeks Ago (1:55 PM).
                              pikachux2's Avatar
                              pikachux2 pikachux2 is offline
                              Never Evolve
                                 
                                Join Date: Mar 2010
                                Location: USA
                                Gender: Male
                                Nature: Jolly
                                Posts: 115
                                I literally no nothing about Assembly in fire red, but is the limited number of flags in fire red really a problem? Is it not possible to make an ASM routine that can check the value of some offset after 800000 and return a pseudo Boolean value to the last result variable 0x800D (or any other for that matter)? This will probably be an easy yes or no for a lot of you, I was just curious.
                                Reply With Quote
                                  #1343    
                                Old 2 Weeks Ago (3:48 PM).
                                hacanoc hacanoc is offline
                                   
                                  Join Date: Mar 2018
                                  Posts: 1
                                  Quote:
                                  Originally Posted by FBI View Post

                                  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!
                                  Hi
                                  I tried to apply this rutine but i got errors:
                                  The change of the OW is lost after the player enter in a menu or enter in a battle.
                                  I also inserted the rutine of swap BS, in that i get a problem with the change of the OW after a warp (the OW change to the Hero surfing or the hero in bike)



                                  What can I do?
                                  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 3:58 AM.