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
  #351    
Old October 1st, 2017 (7:13 PM). Edited October 1st, 2017 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 pikachux2 View Post
    One more thing, this line of code I've found at the end of each ability script,
    Spoiler:
    #insert 01 49 08 47 00 00 xx xx xx 08 at 026192

    I assume I'm supposed to change those x's to something meaningful like a pointer, is that the case?
    Pointer to your asm routine +1.
    __________________
    Pokemon Unbound

    Reply With Quote
      #352    
    Old October 2nd, 2017 (11:47 AM).
    pikachux2's Avatar
    pikachux2 pikachux2 is offline
    Never Evolve
       
      Join Date: Mar 2010
      Location: USA
      Gender: Male
      Nature: Jolly
      Posts: 115
      Quote:
      Originally Posted by Skeli Unbound View Post
      Pointer to your asm routine +1.
      Thanks again :)
      Reply With Quote
        #353    
      Old April 7th, 2018 (9:48 AM).
      YourFavoriteEgyptian YourFavoriteEgyptian is offline
         
        Join Date: May 2013
        Gender: Male
        Posts: 12
        Hey everyone, I'm new around here and would love to learn how write my own abilities. I've been reading up on ASM and battle scripts for the past couple days, but I am still not confident enough to begin to write anything of my own. I really want to implement a special type Fur Coat ability into my game. Could anyone supply me with the code and possibly explain how it works so that I can better learn how to do this myself?
        Thanks in advance!
        Reply With Quote
          #354    
        Old May 12th, 2018 (7:28 PM).
        Petuuuhhh's Avatar
        Petuuuhhh Petuuuhhh is offline
         
        Join Date: Apr 2017
        Location: Georgia
        Age: 25
        Gender: Male
        Posts: 564
        Can anyone code Beast Boost?

        Thank you!
        Reply With Quote
          #355    
        Old May 13th, 2018 (9:15 AM). Edited May 16th, 2018 by Lance Koijer 2.0.
        Lance Koijer 2.0 Lance Koijer 2.0 is offline
        Lance Koijer
           
          Join Date: Apr 2018
          Location: Criscanto Town
          Gender: Male
          Nature: Adamant
          Posts: 66
          Hello guys the code of normalize and pixilate is still broken.

          Quote:
          Originally Posted by Petuuuhhh View Post
          Can anyone code Beast Boost?

          Thank you!
          I have replicated soul-heart already, the only problem when I was creating the ability is that the checking of the highest stat.. I'd tried to make an ASM that will compare each stats so whatver stat got the highest will increase. If someone can just make an ASM that will get the highest stat of a pokémon and store it somewhere, the ability would be possible.
          Reply With Quote
            #356    
          Old July 7th, 2018 (5:21 PM). Edited July 7th, 2018 by Le pug.
          Le pug's Avatar
          Le pug Le pug is offline
          Creator of Pokémon: Discovery / Fat Kid
           
          Join Date: Aug 2013
          Location: Le bed
          Age: 26
          Gender: Male
          Nature: Bold
          Posts: 870
          Quote:
          Originally Posted by MrDollSteak View Post
          Spoiler:
          The byte changes actually re-insert the routine for you. The implementation was broken, so the byte changes make it reflect this new routine.



          Fur Coat and Multiscale definitely work 100% as intended, no breaking at all.
          I fixed No Guard, basically I put a ldr, instead of ldrb, for the bank check, it definitely works now.

          Mold Breaker, Teravolt and Turboblaze

          Spoiler:
          Emerald (credits to KDS for the original Fire Red routines)
          Spoiler:
          Step 1
          Spoiler:
          Mold Breaker Table
          Spoiler:
          00 00 00 00 01 01 00 01 01 00 01 01 01 00 00 01
          00 02 01 01 01 01 00 00 00 01 02 00 00 01 00 00
          00 00 00 00 00 00 00 01 01 01 00 01 00 00 00 01
          00 00 00 01 01 00 00 00 00 00 00 00 01 00 00 01
          00 00 00 00 00 00 00 00 01 01 00 01 00 00 01 01
          00 00 01 00 00 00 01 01 01 00 00 00 00 00 00 00
          00 00 00 00 00 00 00 02 00 00 00 00 00 00 01 00
          01 00 00 00 00 01 00 00 00 00 00 01 00 00 00 01
          00 00 00 00 00 00 00 01 01 01 00 00 00 01 00 01
          00 00 01 00 01 00 00 00 00 00 00 00 00 01 01 00
          00 00 00 00 00 00 00 00 00 00 01 00 01 00 00 00
          00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
          00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
          00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
          00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
          00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

          Insert this table if your ROM has the abilities in the same order that is mentioned in the OP (otherwise you will have to modify according to the format.
          There are 256 entries in this table which equal to the maximum No. of abilities that can be accomodated in a GBA rom.

          An entry for each ability takes one byte of space and there are entries for every ability. The entry is set to 00 if Mold Breaker does not negate the ability, 01 (or a non-zero value) if Mold Breaker is able to negate it and 02 if the the ability is negated to simulate the Gen V hazard effect.

          For e.g, the first entry is for Ability ID 0x0 and does not need to be negated by mold breaker so its entry is set to 00. The second entry is for Stench (ID = 0x1) so set to 00. The 6th entry is set to 01 because MB negates Sturdy (ID = 0x5).

          There are some abilities that do not work with this method and require special explicit checks and there entry is set to 00 to avoid wastage of time.
          Spoiler:
          1. Damp (it checks in the whole battle field rather than a single target, so the 'faintifnotdamp' battlescript command needs to be edited for this. I'm leaving this for now)

          2. Lightning and Storm Drain (mold breaker should allow redirection of move).

          3. Friend Guard, Aroma Veil, Sweet Veil, Flower Veil (the target's boosts are sometimes by virtue of its ally's ability).

          Modify the table accordingly if there is a need to.

          Step 2
          1a. Replace x8TTTTTT in the routines with the offset of the Mold breaker table.
          1b. Insert these routines with byte changes in the respective code comments.
          Spoiler:
          Routine 1 (Checks for user's Mold Breaker prior to move execution and then disables abilities that negate, also probably the best place to insert Stance Change)
          Spoiler:
          Code:
          .text
          .align 2
          .thumb
          .thumb_func
          .global moldbreaker
               
          AbilityBufferUser:
               	push {r2-r4}
          	ldr r0, .Bank
          	ldrb r0, [r0]
          	mov r1, #0x58
          	ldr r2, .BattleData
          	mul r0, r1
          	add r0, r0, r2
          	ldrb r0, [r0]
          MoldBreakerCheck:
          	cmp r0, #0x69
             	beq MoldBreaker
              	cmp r0, #0xA4
              	beq MoldBreaker
              	cmp r0, #0xA5
              	bne Return
          MoldBreaker:
          AbilityBufferTarget:
               	ldr r0, .Bank
          	add r0, #0x1
               	ldrb r4, [r0]
          	mul r1, r4 
          	add r1, r1, r2 
               	ldrb r3, [r1]
          LoadTable:
               	ldr r0, .MoldBreakerTable
             	add r2, r0, r3
               	ldrb r0, [r2]
          CheckIfAffected:
              	cmp r0, #0x0
               	beq Return
          Affected:
               	mov r0, #0xFF
               	strb r0, [r1]
               	ldr r0, .DisabledAbilityLoc
               	add r0, r4
               	strb r3, [r0]
          Return:
              	pop {r2-r4}
               	bl Canceler
               	lsl r0, r0, #0x18
               	lsr r2, r0, #0x18
               	cmp r2, #0x0
               	beq Continue
               	ldr r0, .Return
               	bx r0
          Continue:
               	ldr r0, .Return2
               	bx r0
          
          Canceler:
               	ldr r0, .Return3
               	bx r0
          
          .align 2
          
          .Bank: .word 0x0202420B
          .BattleData: .word 0x020240A4
          .MoldBreakerTable: .word 0x08TTTTTT
          .DisabledAbilityLoc: .word 0x0203E32C
          .Return: .word 0x08046399
          .Return2: .word 0x08046073
          .Return3: .word 0x08041A6D
          
          #insert 00 48 00 47 xx xx xx 08 at 046064

          Routine II (Checks for user's Mold Breaker in target iterating moves like Earthquake and then disables abilities that negate damage)
          Spoiler:
          Code:
          .text
          .align 2
          .thumb
          .thumb_func
          .global moldbreakermultipletargets
               
          AbilityBufferUser:
               	push {r1-r4}
          	ldr r0, .Bank
          	ldrb r0, [r0]
          	mov r1, #0x58
          	ldr r2, .BattleData
          	mul r0, r1
          	add r0, r0, r2
          	ldrb r0, [r0]
          MoldBreakerCheck:
          	cmp r0, #0x69
             	beq MoldBreaker
              	cmp r0, #0xA4
              	beq MoldBreaker
              	cmp r0, #0xA5
              	bne Return
          MoldBreaker:
          AbilityBufferTarget:
               	ldr r0, .Bank
          	add r0, #0x1
               	ldrb r4, [r0]
          	mul r1, r4 
          	add r1, r1, r2 
               	ldrb r3, [r1]
          LoadTable:
               	ldr r0, .MoldBreakerTable
             	add r2, r0, r3
               	ldrb r0, [r2]
          CheckIfAffected:
              	cmp r0, #0x0
               	beq Return
          Affected:
               	mov r0, #0xFF
               	strb r0, [r1]
               	ldr r0, .DisabledAbilityLoc
               	add r0, r4
               	strb r3, [r0]
          Return:
              	pop {r1-r4}
               	ldr r0, [r1]
          	add r0, #0x1
          	str r0, [r1]
          	pop {r0}
          	bx r0
          
          .align 2
          
          .Bank: .word 0x0202420B
          .BattleData: .word 0x020240A4
          .MoldBreakerTable: .word 0x08TTTTTT
          .DisabledAbilityLoc: .word 0x0203E32C
          
          #insert 00 48 00 47 xx xx xx 08 at 04AF78

          Routine III (Generation V effect. Makes the foe affected by entry hazards even if it has an ability to negate the hazards effect (except Magic Guard))
          Spoiler:
          At 028308 insert a pointer to free space XX XX XX 08.

          Battle Script at XX XX XX
          Code:
          09 0A E2 00 58 00 3A 
          2B 04 EC 2F 02 02
          08 00 00 00
          YY YY YY 08
          2E 3A 43 02 02
          05 F6
          Battle Script at YY YY YY
          Code:
          4C 00
          4D 00
          4E 00
          00 3A 10 54 01
          F9 XX+1 XX XX 08 
          52 00 28 4E 8A 2D 08
          Routine at XX XX XX
          Code:
          .text
          .align 2
          .thumb
          .thumb_func
          .global moldbreakermultipletargets
               
          AbilityBufferUser:
               	push {lr}
          	ldr r0, .Bank
          	ldrb r0, [r0]
          	mov r1, #0x58
          	ldr r2, .BattleData
          	mul r0, r1
          	add r0, r0, r2
          	ldrb r0, [r0]
          MoldBreakerCheck:
          	cmp r0, #0x69
             	beq MoldBreaker
              	cmp r0, #0xA4
              	beq MoldBreaker
              	cmp r0, #0xA5
              	bne Return
          MoldBreaker:
          AbilityBufferTarget:
               	ldr r0, .Bank
          	add r0, #0x1
               	ldrb r4, [r0]
          	mul r1, r4 
          	add r1, r1, r2 
               	ldrb r3, [r1]
          LoadTable:
               	ldr r0, .MoldBreakerTable
             	add r2, r0, r3
               	ldrb r0, [r2]
          CheckIfAffected:
              	cmp r0, #0x0
               	beq Return
          Affected:
               	mov r0, #0xFF
               	strb r0, [r1]
               	ldr r0, .DisabledAbilityLoc
               	add r0, r4
               	strb r3, [r0]
          Return:
          	pop {r0}
          	bx r0
          
          .align 2
          
          .Bank: .word 0x0202420B
          .BattleData: .word 0x020240A4
          .MoldBreakerTable: .word 0x08TTTTTT
          .DisabledAbilityLoc: .word 0x0203E32C

          Routine IV (Restores disabled abilities at the end of move execution)
          Spoiler:
          Code:
          .text
          .align 2
          .thumb
          .thumb_func
          .global restoreabilities
               
          EndTurn:
               	ldr r0, .Outcome
          	mov r1, #0x0
          	strb r1, [r0]
          	ldr r0, .Index
          	strb r1, [r0]
          RestoreAbilities:
          	push {r2-r6}
          	ldr r4, .Battlers
          	ldrb r4, [r4]
          	mov r3, #0x0
          	ldr r5, .DisabledAbilityLoc
          	ldr r6, .BattleData
          Loop:
          	ldrb r2, [r5, #0x0]
          	cmp r2, #0x0
          	beq EndLoop
          	strb r2, [r6]
          	strb r1, [r5]
          EndLoop:
          	add r3, r3, #0x1
          	cmp r3, r4
          	bge Exit
          	add r5, r5, #0x1
          	add r6, r6, #0x58
          	b Loop
          Exit:
          	pop {r2-r6}
          	ldr r1, .EndLoc
          	mov r0, #0xB
          	strb r0, [r1]
          	pop {r0}
          	bx r0
          
          .align 2
          
          .Outcome: .word 0x0202427C
          .Index: .word 0x02024064
          .Battlers: .word 0x0202406C
          .DisabledAbilityLoc: .word 0x0203E32C
          .BattleData: .word 0x020240A4
          .EndLoc: .word 0x02024083
          
          #insert 00 48 00 47 xx xx xx 08 at 04B67C
          For anyone who uses this, just remember that you HAVE to place Mold Breaker in Ability slot #2 for whatever Pokemon you are editing or it WON'T work. (i.e. Pangoro would be Ability 1: Iron Fist Ability 2: Mold Breaker)
          __________________
          Retired. Thank you guys for a wonderful five years.
          Reply With Quote
            #357    
          Old August 14th, 2018 (9:09 AM).
          Super Versekr Dark Super Versekr Dark is offline
             
            Join Date: Jan 2017
            Gender: Male
            Posts: 21
            Quote:
            Originally Posted by Xencleamas View Post

            Expanding Ability Names Data and Ability Descriptions Pointer Table


            I think this should be here so I don't need to make a new thread with a very simple tutorial. Alright! I'm going to tell you how to expand Ability tables (the Names and the Descriptions). I'm using HxD here as a HEX Editor.

            Legend:
            • Green bolded text are for Emerald.
            • Red bolded text are for FireRed.

            Step 1: Ability Names

            • Go to a new free space names (example: 0x720000). Select 3328 (0xD00 in HEX) bytes. Fill the bytes with AE AE AE AE AE AE AE FF 00 00 00 00 00.
            • Go to 31B6DB or 24FC40. Select and copy 1014 (0x3F6 in HEX) bytes.
            • Go to the offset of your names data (which the example is 0x720000) and paste the data there.
            • Replace all DB B6 31 08 or 40 FC 24 08 with the "reversed hex in little indian of your new names data offset with 08 at the end" (example: 00 00 72 08)

            Step 2: Ability Descriptions

            • Go to a new free space descriptions (example: 0x720D00). Select 1024 (0x400 in HEX) bytes. Fill the bytes with 98 AF 31 08 or C4 F3 24 08.
            • Go to 31BAD4 or 24FB08. Select and copy 312 (0x138 in HEX) bytes.
            • Go to the offset of your description table (which the example is 0x720D00) and paste the data there.
            • Replace all D4 BA 31 08 or 08 FB 24 08 with the "reversed hex in little indian of your new description data offset with 08 at the end" (example: 00 0D 72 08)

            Then, change your .ini-s. Replace the old offsets in the .ini with your new data (they should be at where the Ability Names and Ability Descriptions are). Luckily, these don't have limiter stuff at all.

            With the expanded data, the new data should be working. I have made this tutorial to have maximized the slots to 256 abilities (255 usable abilities plus one for the none "-----" slot). Now you have 178 new slots for Generation IV+ abilities. Noted that the game can only support up to 256 abilities. The rest of the tutorial on how to insert ability routines are on the first post of this thread since inserting ability routines are now complicated. I hope this post is to be linked up in the Extra Information of this thread so everyone can expand stuff too.
            Table Ruby in:

            Spoiler:
            AbilityNames=1FA248
            AbilityDescriptionTable=1FA110


            Skill Link:

            Spoiler:
            Search for the pointer ED 72 1D 08 in your rom, and replace it with a pointer to free space XX XX XX 08.

            Battle Script at XX XX XX
            Code:

            1E 01 5D YY YY YY 08
            28 ED 72 1D 08


            Battle Script at YY YY YY

            Code:
            00
            01
            72 6F 1D 08
            00 00 02 03
            8D 05
            8E 2E
            2E 8A 44 02 02 00
            28
            00 73 1D 08
            Reply With Quote
              #358    
            Old August 25th, 2018 (9:32 PM).
            AtecainCorp.'s Avatar
            AtecainCorp. AtecainCorp. is offline
            Rejishan awake...
               
              Join Date: Jun 2008
              Location: Takoabe Town (Region Thonsu)
              Age: 25
              Gender: Male
              Nature: Hardy
              Posts: 1,297
              How Later i can set that ability into right place?
              __________________
              - My new Project comming Soon
              Reply With Quote
                #359    
              Old August 25th, 2018 (9:34 PM).
              AtecainCorp.'s Avatar
              AtecainCorp. AtecainCorp. is offline
              Rejishan awake...
                 
                Join Date: Jun 2008
                Location: Takoabe Town (Region Thonsu)
                Age: 25
                Gender: Male
                Nature: Hardy
                Posts: 1,297
                I mean how set ability to current spot (Slot in Ability Index)
                __________________
                - My new Project comming Soon
                Reply With Quote
                  #360    
                Old September 11th, 2018 (11:05 AM).
                Umbrelava's Avatar
                Umbrelava Umbrelava is offline
                   
                  Join Date: Dec 2007
                  Posts: 1
                  Quote:
                  Originally Posted by PufferJumps View Post
                  False Swipe no longer works after I put Sturdy {D:}
                  To fix that, just do this:
                  Emerald: at 0x479E2, replace 65 28 with CE 29
                  Fire Red: at 0x1F1F2, replace 65 28 with CE 29
                  Reply With Quote
                    #361    
                  Old November 1st, 2018 (3:36 PM). Edited November 1st, 2018 by Super Versekr Dark.
                  Super Versekr Dark Super Versekr Dark is offline
                     
                    Join Date: Jan 2017
                    Gender: Male
                    Posts: 21
                    Quote:
                    Originally Posted by MrDollSteak View Post
                    To start off here are a few damage-calc related abilities as well as an update Sturdy effect!

                    These abilities require Doesnt's PSS Split, because of a few shifting bytes.

                    Sniper, Technician, Defeatist and the Slow Start Attack Drop
                    Spoiler:
                    Fire Red
                    Spoiler:
                    Code:
                    .text
                    .align 2
                    .thumb
                    .thumb_func
                    .global snipertechnicianandslowstartattackdrop
                     
                    Main:
                    	cmp r4, #0x37
                    	bne Sniper
                    HustleBoost:
                    	lsr r0, r7, #0x1
                    	add r7, r0, r7
                    Sniper:
                    	cmp r4, #0x62
                    	bne Technician
                    CheckCrit:
                    	ldr r0, .CritLoc
                    	ldrb r0, [r0]
                    	cmp r0, #0x2
                    	bne Return
                    	b Boost
                    Technician:
                    	cmp r4, #066
                    	bne Defeatist
                    CheckBasePower:
                    	ldr r0, .BasePower
                    	ldrb r0, [r0]
                    	cmp r0, #0x3D
                    	bge Return
                    Boost:
                    	lsr r0, r7, #0x1
                    	add r7, r0, r7
                    	mov r2, r8
                    	lsr r0, r2, #0x1
                    	add r0, r0, r2
                    	mov r8, r0
                    Defeatist:
                    	cmp r4, #066
                    	bne SlowStart
                    CheckHP:
                    	ldrh r2, [r0, #0xC]
                    	lsr r2, r2, #0x1
                    	ldrh r0, [r0, #0x8]
                    	cmp r0, r2
                    	bgt Return
                    	mov r2, r8
                    	lsr r0, r2, #0x1
                    	mov r8, r0
                    	b AttackDrop
                    SlowStart:
                    	cmp r4, #0x71
                    	bne Return
                    CheckCounter:
                    	ldr r0, .SlowStartLoc
                    	ldr r2, [sp, #0xC]
                    	add r0, r0, r2
                    	ldrb r0, [r0]
                    	cmp r0, #0x0
                    	beq Return
                    AttackDrop:
                    	lsr r7, r7, #0x1
                    Return:
                    	ldr r0, .Return
                    	bx r0
                    
                    .align 2
                    .CritLoc: .word 0x02023D71
                    .BasePower: .word 0x02024020
                    .SlowStartLoc: .word 0x0203C024
                    .Return: .word 0x0803F065
                    
                    #Insert 00 48 00 47 xx xx xx 08 at 03F05C
                    .SlowStartLoc is a free ram location that you can use to have the counter for slow start.

                    It has come to my attention that Technician can apply some unwanted boosts to Revenge and a few other moves, so the code will be amended in the future.

                    Emerald
                    Spoiler:
                    Code:
                    .text
                    .align 2
                    .thumb
                    .thumb_func
                    .global damagecalchalve
                     
                    Main:
                    	cmp r4, #0x37
                    	bne Sniper
                    HustleBoost:
                    	lsr r0, r7, #0x1
                    	add r7, r0, r7
                    Sniper:
                    	cmp r4, #0x62
                    	bne Technician
                    CheckCrit:
                    	ldr r0, .CritLoc
                    	ldrb r0, [r0]
                    	cmp r0, #0x2
                    	bne Return
                    	b Boost
                    Technician:
                    	cmp r4, #066
                    	bne Defeatist
                    CheckBasePower:
                    	ldr r0, .BasePower
                    	ldrb r0, [r0]
                    	cmp r0, #0x3D
                    	bge Return
                    Boost:
                    	lsr r0, r7, #0x1
                    	add r7, r0, r7
                    	mov r2, r8
                    	lsr r0, r2, #0x1
                    	add r0, r0, r2
                    	mov r8, r0
                    Defeatist:
                    	cmp r4, #066
                    	bne SlowStart
                    CheckHP:
                    	ldrh r2, [r0, #0xC]
                    	lsr r2, r2, #0x1
                    	ldrh r0, [r0, #0x8]
                    	cmp r0, r2
                    	bgt Return
                    	mov r2, r8
                    	lsr r0, r2, #0x1
                    	mov r8, r0
                    	b AttackDrop
                    SlowStart:
                    	cmp r4, #0x71
                    	bne Return
                    CheckCounter:
                    	ldr r0, .SlowStartLoc
                    	ldr r2, [sp, #0x10]
                    	add r0, r0, r2
                    	ldrb r0, [r0]
                    	cmp r0, #0x0
                    	beq Return
                    AttackDrop:
                    	lsr r7, r7, #0x1
                    Return:
                    	ldr r0, .Return
                    	bx r0
                    
                    .align 2
                    .CritLoc: .word 0x02024211
                    .BasePower: .word 0x020244E0
                    .SlowStartLoc: .word 0x0203E324
                    .Return: .word 0x0806989B
                    
                    #Insert 00 48 00 47 xx xx xx 08 at 069888
                    .SlowStartLoc is a free ram location that you can use to have the counter for slow start.

                    It has come to my attention that Technician can apply some unwanted boosts to Revenge and a few other moves, so the code will be amended in the future.

                    Toxic Boost and Flare Boost
                    Spoiler:
                    Fire Red
                    Spoiler:
                    Code:
                    .text
                    .align 2
                    .thumb
                    .thumb_func
                    .global statusboostabilities
                     
                    Main:
                      	ldr r1, [sp, #0x24]
                    	ldrb r0, [r1]
                    	cmp r0, #0x8A
                    	beq ToxicBoost
                    	cmp r0, #0x8B
                    	beq FlareBoost
                    	cmp r0, #0x3E
                    	bne MarvelScaleCheck
                    GutsReturn:
                    	ldr r0, .Return
                    	bx r0
                    ToxicBoost:
                    	ldr r0, [r6, #0x4C]
                    CheckPoison:
                    	cmp r0, #0x8
                    	beq AttackBoost
                    	cmp r0, #0x80
                    	bne MarvelScaleCheck
                    AttackBoost:
                    	lsr r0, r7, #0x1
                    	add r7, r0, r7
                    	b MarvelScaleCheck
                    FlareBoost:
                    	ldr r0, [r6, #0x4C]
                    CheckBurn:
                    	cmp r0, #0x10
                    	bne MarvelScaleCheck
                    SpAtkBoost:
                    	mov r2, r8
                    	lsr r0, r2, #0x1
                    	add r2, r0, r2
                    	mov r8, r2
                    MarvelScaleCheck:
                    	ldr r0, .Return2
                    	bx r0
                     
                    .align 2
                    .Return: .word 0x0803F0CD
                    .Return2: .word 0x0803F0E1
                    
                    #insert 00 48 00 47 xx xx xx 08 at 03F0C4

                    Emerald
                    Spoiler:
                    Code:
                    .text
                    .align 2
                    .thumb
                    .thumb_func
                    .global statusboostabilities
                     
                    Main:
                    	ldrb r0, [r1]
                    	cmp r0, #0x8A
                    	beq ToxicBoost
                    	cmp r0, #0x8B
                    	beq FlareBoost
                    	cmp r0, #0x3E
                    	bne MarvelScaleCheck
                    Guts:
                    CheckStatus:
                    	ldr r0, [r6, #0x4C]
                    	cmp r0, #0x0
                    	beq MarvelScaleCheck
                    GutsReturn:
                    	ldr r0, .Return
                    	bx r0
                    ToxicBoost:
                    	ldr r0, [r6, #0x4C]
                    CheckPoison:
                    	cmp r0, #0x8
                    	beq AttackBoost
                    	cmp r0, #0x80
                    	bne MarvelScaleCheck
                    AttackBoost:
                    	lsr r0, r7, #0x1
                    	add r7, r0, r7
                    	b MarvelScaleCheck
                    FlareBoost:
                    	ldr r0, [r6, #0x4C]
                    CheckBurn:
                    	cmp r0, #0x10
                    	bne MarvelScaleCheck
                    SpAtkBoost:
                    	mov r2, r8
                    	lsr r0, r2, #0x1
                    	add r2, r0, r2
                    	mov r8, r2
                    MarvelScaleCheck:
                    	ldr r0, .Return2
                    	bx r0
                     
                    .align 2
                    .Return: .word 0x08069909
                    .Return2: .word 0x08069917
                    
                    #insert 00 48 00 47 xx xx xx 08 at 0698FC

                    Multiscale and Fur Coat
                    Spoiler:
                    Fire Red
                    Spoiler:
                    Code:
                    .text
                    .align 2
                    .thumb
                    .thumb_func
                    .global multiscaleandfurcoat
                     
                    Main:
                    	ldr r2, [sp, #0x28]
                    	ldrb r0, [r2]
                    	cmp r0, #0x3F
                    	bne Multiscale
                    	ldr r0, .Return
                    	bx r0
                    Multiscale:
                    	cmp r0, #0x89
                    	bne FurCoat
                    CheckHP:
                    	ldr r1, [sp, #0x4]
                    	ldrh r0, [r1, #0x28]
                    	ldrh r1, [r1, #0x2C]
                    	cmp r1, r0
                    	bne Return
                    HalveDamage:
                    	lsr r7, r7, #0x1
                    	mov r0, r8
                    	lsr r0, r0, #0x1
                    	mov r8, r0
                    FurCoat:
                    	ldrb r0, [r2]
                    	cmp r0, #0xAA
                    	bne Return
                    DefenseBoost:
                    	ldr r1, [sp, #0x14]
                    	mov r0, r1
                    	add r1, r0, r0
                    	str r1, [sp, #0x14]
                    Return:
                    	ldr r2, .Return2
                    	bx r2
                    
                    .align 2
                    .Return: .word 0x0803F0E9
                    .Return2: .word 0x0803F103
                    
                    #insert 00 48 00 47 xx xx xx 08 at 03F0E0

                    Emerald
                    Spoiler:
                    Code:
                    .text
                    .align 2
                    .thumb
                    .thumb_func
                    .global multiscaleandfurcoat
                     
                    Main:
                    	ldrb r0, [r2]
                    	cmp r0, #0x3F
                    	bne Multiscale
                    	ldr r3, [sp, #0x4]
                    	ldr r0, .Return
                    	bx r0
                    Multiscale:
                    	cmp r0, #0x89
                    	bne FurCoat
                    CheckHP:
                    	ldr r1, [sp, #0x4]
                    	ldrh r0, [r1, #0x28]
                    	ldrh r1, [r1, #0x2C]
                    	cmp r1, r0
                    	bne Return
                    HalveDamage:
                    	lsr r7, r7, #0x1
                    	mov r0, r8
                    	lsr r0, r0, #0x1
                    	mov r8, r0
                    FurCoat:
                    	ldrb r0, [r2]
                    	cmp r0, #0xAA
                    	bne Return
                    DefenseBoost:
                    	ldr r1, [sp, #0x18]
                    	mov r0, r1
                    	add r1, r0, r0
                    	str r1, [sp, #0x18]
                    Return:
                    	ldr r2, .Return2
                    	bx r2
                    
                    .align 2
                    .Return: .word 0x08069921
                    .Return2: .word 0x08069939
                    
                    #insert 00 48 00 47 xx xx xx 08 at 069918

                    Sturdy
                    Spoiler:
                    Fire Red
                    Spoiler:
                    Code:
                    .text
                    .align 2
                    .thumb
                    .thumb_func
                    .global sturdyupdate
                     
                    Sturdy:
                    	ldrb r0, [r3]
                    	mov r1, #0x58
                    	mul r0, r1
                    	add r0, r0, r2
                    	add r0, #0x20
                    	ldrb r1, [r0]
                    	cmp r1, #0x5
                    	bne FalseSwipeCheck
                    CheckHP:
                    	ldrh r1, [r0, #0xC]
                    	ldrh r0, [r0, #0x8]
                    	cmp r0, r1
                    	beq SturdySuccess
                    FalseSwipeCheck:
                    	ldr r0, .MoveLoc
                    	ldrh r1, [r0]
                    	lsl r0, r1, #0x1
                    	add r0, r0, r1
                    	ldr r2, .Return
                    	bx r2
                    SturdySuccess:
                    DisplayEndureMessage:
                    	mov r0, #0x56
                    	ldr r1, .Index
                    	ldrb r2, [r3]
                    	lsl r0, r2, #0x4
                    	add r0, r0, r1
                    	mov r1, #0x2
                    	strb r1, [r0]
                    Return:
                    	ldr r0, .Return2
                    	bx r0
                    
                    .align 2
                    
                    .MoveLoc: .word 0x02023D4A
                    .Return: .word 0x0801F1ED
                    .Index: .word 0x02023E8C
                    .Return2: .word 0x0801F217
                    
                    #insert 01 48 00 47 00 00 xx xx xx 08 1A 4A at 01F1E2
                    It should be noted that this doesn't work fully with Multi-hit moves, in that they do not break Sturdy. I am planning on rewriting the entire Multi-hit system to make Parental Bond.

                    Emerald
                    Spoiler:
                    Code:
                    .text
                    .align 2
                    .thumb
                    .thumb_func
                    .global sturdyupdate
                     
                    Sturdy:
                    	ldrb r0, [r3]
                    	mov r1, #0x58
                    	mul r0, r1
                    	add r0, r0, r2
                    	add r0, #0x20
                    	ldrb r1, [r0]
                    	cmp r1, #0x5
                    	bne FalseSwipeCheck
                    CheckHP:
                    	ldrh r1, [r0, #0xC]
                    	ldrh r0, [r0, #0x8]
                    	cmp r0, r1
                    	beq SturdySuccess
                    FalseSwipeCheck:
                    	ldr r0, .MoveLoc
                    	ldrh r1, [r0]
                    	lsl r0, r1, #0x1
                    	add r0, r0, r1
                    	ldr r2, .Return
                    	bx r2
                    SturdySuccess:
                    DisplayEndureMessage:
                    	mov r0, #0x56
                    	ldr r1, .Index
                    	ldrb r2, [r3]
                    	lsl r0, r2, #0x4
                    	add r0, r0, r1
                    	mov r1, #0x2
                    	strb r1, [r0]
                    Return:
                    	ldr r0, .Return2
                    	bx r0
                    
                    .align 2
                    
                    .MoveLoc: .word 0x020241EA
                    .Return: .word 0x080479DD
                    .Index: .word 0x0202433C
                    .Return2: .word 0x08047A07
                    
                    #insert 01 48 00 47 00 00 xx xx xx 08 1A 4A at 0479D2
                    It should be noted that this doesn't work fully with Multi-hit moves, in that they do not break Sturdy. I am planning on rewriting the entire Multi-hit system to make Parental Bond.
                    Pokémon Ruby:

                    Sturdy:

                    Spoiler:
                    .text
                    .align 2
                    .thumb
                    .thumb_func
                    .global sturdyupdate

                    Sturdy:
                    ldrb r0, [r3]
                    mov r1, #0x58
                    mul r0, r1
                    add r0, r0, r2
                    add r0, #0x20
                    ldrb r1, [r0]
                    cmp r1, #0x5
                    bne FalseSwipeCheck
                    CheckHP:
                    ldrh r1, [r0, #0xC]
                    ldrh r0, [r0, #0x8]
                    cmp r0, r1
                    beq SturdySuccess
                    FalseSwipeCheck:
                    ldr r0, .MoveLoc
                    ldrh r1, [r0]
                    lsl r0, r1, #0x1
                    add r0, r0, r1
                    ldr r2, .Return
                    bx r2
                    SturdySuccess:
                    DisplayEndureMessage:
                    mov r0, #0x56
                    ldr r1, .Index
                    ldrb r2, [r3]
                    lsl r0, r2, #0x4
                    add r0, r0, r1
                    mov r1, #0x2
                    strb r1, [r0]
                    Return:
                    ldr r0, .Return2
                    bx r0

                    .align 2

                    .MoveLoc: .word 0x020223EE
                    .Return: .word 0x0802478D
                    .Index: .word 0x02022530
                    .Return2: .word 0x080247B7

                    #insert 01 48 00 47 00 00 xx xx xx 08 1A 4A at 024782 - 1D68E



                    Ruby: at 0x1D69E - replace 65 28 with CE 29
                    Reply With Quote
                      #362    
                    Old November 1st, 2018 (3:45 PM).
                    Super Versekr Dark Super Versekr Dark is offline
                       
                      Join Date: Jan 2017
                      Gender: Male
                      Posts: 21
                      Quote:
                      Originally Posted by Umbrelava View Post
                      To fix that, just do this:
                      Emerald: at 0x479E2, replace 65 28 with CE 29
                      Fire Red: at 0x1F1F2, replace 65 28 with CE 29
                      Ruby: at 0x1D69E - replace 65 28 with CE 29
                      Reply With Quote
                        #363    
                      Old November 1st, 2018 (4:46 PM). Edited November 1st, 2018 by JonesTheTrainer.
                      JonesTheTrainer JonesTheTrainer is offline
                         
                        Join Date: Jun 2018
                        Posts: 5
                        Would anyone mind teach me how to use Pokemon Essentials
                        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 5:38 AM.