View Single Post
Old 25th December 2015, 08:36 PM   #13
Versekr Dark
Newbie
 
Join Date: Dec 2015
Posts: 2
Versekr Dark
Default

Quote:
Originally Posted by funkyjamesbrown View Post
Doesntknowhowtoplay, you are a beast - this is an amazing bit of code. Because I was pretty confused at first I thought I would help if anybody still is having trouble adding this to their game.

Tools Needed:

HackMew's thumb.bat
Nameless Sprite Editor
WindHex

- download the image provided.
- open up NSE, then load your rom and hit "open sprite".
- load the image you saved then go to File - Insert - Image Data.
- type in the 6 digit offset to store the image in - any free space (FF in your Hex editor) is fine. I just used 720000.
- at the bottom of the provided code change the xxxxxx to 720000 or whatever offset you used.
- copy op's code into notepad (hit enter after the last line to add a blank line) then save it with a .asm extension.
- compile using thumb.bat. Somebody else wrote a great ASM tutorial on this site you can google, but it's pretty easy. Using the command prompt navigate to whatever folder has both thumb.bat and your .asm routine then just type thumb nameofyourroutine.asm
- if successful a .bin file should appear in that same folder.
- load WindHex, load your rom, then go to some free space to insert your new .bin file. I used 720800 which fits perfectly. Whatever you do the last digit needs to be divisible by 4 in hex (0, 4, 8, C). Anyway it's just Edit - Insert Binary Data.
- follow the op's instructions about inserting the byte changes - overwriting the bytes that were there before. The pointer is just the offset where you stored the bin file with bytes reversed + 1. So 720800 would be 01 08 72 08. The 08 at the end is universal.

Hopefully this helps somebody, because really this should be in all pokemon games. Any way this can be done in Emerald?
Quote:
Originally Posted by DoesntKnowHowToPlay View Post


First, insert the following image using NSE or TileMolester. Doesn't matter where you put it:



It uses the same palette as the type chart, which is at xe95dbc in vanilla. If you changed that palette you'll have to change the image. (You'll probably want to change the image anyway since it's frankly rather minimalist)

Next you will need to insert the following ASM. It doesn't matter where, but do remember where you put it.

Code:
cmp r0, #0x0
beq Abort
cmp r0, #0x3
bgt Abort
cmp r0, #0x1
bne StandardAbort
b Start

Abort:
ldr r1, .AbortAddr
bx r1

StandardAbort:
ldr r1, .StandardAbortAddr
bx r1

.align 2
.AbortAddr: .word 0x08137bfd
.StandardAbortAddr: .word 0x08137bf9

Start:
ldr r0, .ActiveMonPtr
ldr r1, .ActiveOffset
ldr r0, [r0, #0x0]
add r6, r0, r1

add sp, #-0x18

HPIV:
mov r0, r6
mov r1, #0x27
bl Decrypter

mov r5, r0
lsr r5, r5, #0x1
mov r0, #0x40
mul r5, r0, r5

mov r1, #0x80
str r1, [sp, #0x0]
str r1, [sp, #0x4]

#x, y position
mov r2, #0xC
str r2, [sp, #0x8]
mov r1, #0x6
str r1, [sp, #0xc]

#x, y size
mov r2, #0x10
str r2, [sp, #0x10]
mov r1, #0x8
str r1, [sp, #0x14]

mov r0, #0x3
ldr r1, .GraphicAddr
add r1, r5
mov r2, #0x0
mov r3, #0x0
bl GraphicHandler



AtkIV:
mov r0, r6
mov r1, #0x28
bl Decrypter

mov r5, r0
lsr r5, r5, #0x1
mov r0, #0x40
mul r5, r0, r5

mov r1, #0x80
str r1, [sp, #0x0]
str r1, [sp, #0x4]

#x, y position
mov r2, #0xC
str r2, [sp, #0x8]
mov r1, #0x17
str r1, [sp, #0xc]

#x, y size
mov r2, #0x10
str r2, [sp, #0x10]
mov r1, #0x8
str r1, [sp, #0x14]

mov r0, #0x3
ldr r1, .GraphicAddr
add r1, r5
mov r2, #0x0
mov r3, #0x0
bl GraphicHandler



DefIV:
mov r0, r6
mov r1, #0x29
bl Decrypter

mov r5, r0
lsr r5, r5, #0x1
mov r0, #0x40
mul r5, r0, r5

mov r1, #0x80
str r1, [sp, #0x0]
str r1, [sp, #0x4]

#x, y position
mov r2, #0xC
str r2, [sp, #0x8]
mov r1, #0x24
str r1, [sp, #0xc]

#x, y size
mov r2, #0x10
str r2, [sp, #0x10]
mov r1, #0x8
str r1, [sp, #0x14]

mov r0, #0x3
ldr r1, .GraphicAddr
add r1, r5
mov r2, #0x0
mov r3, #0x0
bl GraphicHandler


SAtkIV:
mov r0, r6
mov r1, #0x2B
bl Decrypter

mov r5, r0
lsr r5, r5, #0x1
mov r0, #0x40
mul r5, r0, r5

mov r1, #0x80
str r1, [sp, #0x0]
str r1, [sp, #0x4]

#x, y position
mov r2, #0xC
str r2, [sp, #0x8]
mov r1, #0x31
str r1, [sp, #0xc]

#x, y size
mov r2, #0x10
str r2, [sp, #0x10]
mov r1, #0x8
str r1, [sp, #0x14]

mov r0, #0x3
ldr r1, .GraphicAddr
add r1, r5
mov r2, #0x0
mov r3, #0x0
bl GraphicHandler



SDefIV:
mov r0, r6
mov r1, #0x2C
bl Decrypter

mov r5, r0
lsr r5, r5, #0x1
mov r0, #0x40
mul r5, r0, r5

mov r1, #0x80
str r1, [sp, #0x0]
str r1, [sp, #0x4]

#x, y position
mov r2, #0xC
str r2, [sp, #0x8]
mov r1, #0x3E
str r1, [sp, #0xc]

#x, y size
mov r2, #0x10
str r2, [sp, #0x10]
mov r1, #0x8
str r1, [sp, #0x14]

mov r0, #0x3
ldr r1, .GraphicAddr
add r1, r5
mov r2, #0x0
mov r3, #0x0
bl GraphicHandler



SpeedIV:
mov r0, r6
mov r1, #0x2A
bl Decrypter

mov r5, r0
lsr r5, r5, #0x1
mov r0, #0x40
mul r5, r0, r5

mov r1, #0x80
str r1, [sp, #0x0]
str r1, [sp, #0x4]

#x, y position
mov r2, #0xC
str r2, [sp, #0x8]
mov r1, #0x4B
str r1, [sp, #0xc]

#x, y size
mov r2, #0x10
str r2, [sp, #0x10]
mov r1, #0x8
str r1, [sp, #0x14]

mov r0, #0x3
ldr r1, .GraphicAddr
add r1, r5
mov r2, #0x0
mov r3, #0x0
bl GraphicHandler



add sp, #0x18
b Abort


GraphicHandler:
ldr r4, .HandlerAddr
bx r4

Decrypter:
ldr r2, .DecrypterAddr
bx r2

.align 2
.GraphicAddr: .word 0x08XXXXXX 
.HandlerAddr: .word 0x080041f1
.ActiveMonPtr: .word 0x0203b140
.ActiveOffset: .word 0x00003290
.MonIndex: .word 0x0203b16c
.DecrypterAddr: .word 0x0803FBE9
Replace the 0x08XXXXXX with the address of the image you just inserted.

Make the following byte changes:

At x137bf0, place 00 49 08 47 followed by a pointer to the code you just inserted plus one.

At x137be4, place 01 20 03 E0.

With that, you should be good to go. In typical Pokemon fashion this code does not give you the specific values; it instead gives you a unique two-value range. If you want to change that it's rather easy; cut every line starting with lsr in the code and reassemble it, then adjust the image so it has 32 meaningful values instead of 16.


Disculpe pero he hecho todo y se me montan las imagenes no sabe que podria ser, o tal vez tengo que recortar la imagen, por cierto tengo el parche de mrdollsteak.
Versekr Dark is offline   Reply With Quote