PHO - Pokémon Hackers Online
Go Back   PHO - Pokémon Hackers Online > Other Generations Hacking > Tools, Utilities & Resources

Tools, Utilities & Resources Get tools that help you create and ease the process of creating and modifying. Share resources for people to use in their hack.

Reply
 
Thread Tools Display Modes
Old 8th August 2014, 12:28 AM   #1
DoesntKnowHowToPlay
n00b
 
DoesntKnowHowToPlay's Avatar
 
Join Date: Jul 2014
Posts: 6
DoesntKnowHowToPlay
Default [FR] Displaying IVs on the stat screen



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.

Last edited by DoesntKnowHowToPlay; 8th August 2014 at 01:37 AM.
DoesntKnowHowToPlay is offline   Reply With Quote
Sponsored Links
Old 11th August 2014, 04:48 PM   #2
Hopeless Masquerade
山の新人神様
Ex-Staff
 
Hopeless Masquerade's Avatar
 
Join Date: Oct 2012
Location: 守矢神社
Age: 19
Posts: 87
Hopeless Masquerade
Default

This is pretty cool!

I'm assuming that the letters you use for the IVs are a grade of some sort?
Hopeless Masquerade is offline   Reply With Quote
Old 12th August 2014, 03:16 AM   #3
DoesntKnowHowToPlay
n00b
 
DoesntKnowHowToPlay's Avatar
 
Join Date: Jul 2014
Posts: 6
DoesntKnowHowToPlay
Default

Yeah. It's a fabricated scaling based on the screenshots of the new Touhoumon game in development (which is also what inspired this hack in the first place); personally I prefer it to having the actual numbers shown as you don't need to know that the values go up to 31 to interpret this system. It's also simple to figure out how the letter grades map to actual values once you've got a handful of mons, so savvy players who do want the numbers can find out (with a margin of error, but that accounts for literally one stat point at level 100 so eh).
DoesntKnowHowToPlay is offline   Reply With Quote
Likes awipe1 liked this post
Old 27th October 2014, 05:57 AM   #4
awipe1
Neophyte
 
Join Date: Oct 2014
Posts: 13
awipe1
Default

I really want this in my Rom but I have no clue how to use ASM. Anyone have a tutorial to inserting this ASM code?

Or if someone can post this ASM code in hex that would be great as well!

EDIT: So I think I figured out how to add ASM, however can you go into more detail abou the bytes thing? Also adding the sprite? I'm not sure if I did it correctly :S

Last edited by awipe1; 27th October 2014 at 11:58 PM.
awipe1 is offline   Reply With Quote
Old 14th November 2014, 05:11 AM   #5
funkyjamesbrown
n00b
 
Join Date: Nov 2014
Posts: 3
funkyjamesbrown
Default

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?
funkyjamesbrown is offline   Reply With Quote
Old 18th November 2014, 12:46 AM   #6
MisterEightySix
Neophyte
 
Join Date: Nov 2014
Posts: 9
MisterEightySix
Default

I'm running into some trouble here. For one, I can't find HackMew's thumb.bat anywhere because nobody's willing to link to it and Google is no help. Second, there's no "open sprite" or "insert image data" commands in the version of NSE I'm using. Hopefully somebody can help me out, I'm totally confused.

EDIT: For the record, the version I'm using is 1.7.2.1, so if that's outdated, it'd be great if someone could let me know.
MisterEightySix is offline   Reply With Quote
Old 18th November 2014, 02:06 AM   #7
funkyjamesbrown
n00b
 
Join Date: Nov 2014
Posts: 3
funkyjamesbrown
Default

Yeah I had difficulty finding thumb.bat as well, but I think I ended up finding it on either here or pokecommunity somewhere. Not sure where anymore - but if you google "hackmews thumb.bat download" you will find it a couple hits down in the first post of a foreign message board. I used version 2.1 for Nameless Sprite Editor so I'd try looking for that.

Hopefully that helps, I could maybe release a patch or post a version of the asm in hex that stores the data in free space nobody is likely to use. Anyway good luck!
funkyjamesbrown is offline   Reply With Quote
Old 19th November 2014, 06:32 PM   #8
MisterEightySix
Neophyte
 
Join Date: Nov 2014
Posts: 9
MisterEightySix
Default

Something's gone wrong. When I try to view a Pokemon's summary, the rom resets.

Yes, I'm asking a lot of questions, but I really want this in my game.

EDIT: Never mind, I got it working. Turns out I'd mistyped a digit in the pointer. Thanks a bundle!

Last edited by MisterEightySix; 19th November 2014 at 06:41 PM.
MisterEightySix is offline   Reply With Quote
Old 17th December 2014, 04:07 AM   #9
TheRabbit
n00b
 
Join Date: Oct 2014
Posts: 6
TheRabbit
Default

So I know how to do the ASM stuff, but have no clue how to insert that image with NSE. Do I overwrite an unused sprite or something?
TheRabbit is offline   Reply With Quote
Old 24th February 2015, 03:46 PM   #10
funkyjamesbrown
n00b
 
Join Date: Nov 2014
Posts: 3
funkyjamesbrown
Default

("dest and source1 one must be the same register"

in regard to the line:

mul r5, r0, r5

under each IV.)

Edit: Solved by downloading thumb.bat from pokecommunity.

Last edited by funkyjamesbrown; 25th February 2015 at 02:11 PM.
funkyjamesbrown is offline   Reply With Quote
Reply

Tags
displaying, ivs, screen, stat, [Enhancement]

Thread Tools
Display Modes

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. The time now is 12:55 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc. User Alert System provided by Advanced User Tagging (Lite) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Lite) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Pokémon characters and images belong to Pokémon USA, Inc. and Nintendo.
Pokémon Hackers Online (PHO) is in no way affiliated with or endorsed by Nintendo LLC, Creatures, GAMEFREAK inc,
The Pokémon Company, Pokémon USA, Inc., The Pokémon Company International, or Wizards of the Coast.
All forum/site content (unless noted otherwise) and site designs are © 2006-2013 Pokémon Hackers Online (PHO).
Green Charizard Christos TreeckoLv100

"Black 2" by ARTPOP. Kyurem artwork by XOUS.

no new posts