Go Back   The PokéCommunity Forums > ROM Hacking > Research & Development
Reload this Page Trainers with EVs

Notices
For all updates, view the main page.

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!
Research & Development programs in this forum are subject to moderator approval before they are displayed.



Reply
 
Thread Tools
  #51    
Old July 3rd, 2014 (09:12 AM).
Phenom2122's Avatar
Phenom2122
 
Join Date: Jun 2014
Gender: Male
Nature: Quiet
Quote originally posted by Aruaruu:
It will only take 36 slots or so for the brains spreads, maybe even less because of using other spreads you already made. That is minus the Factory Head's team since it cannot be changed.

It is not that concerning. It is just a nitpick.
Yeah actually I just thought carefully about what I said there. If this works with the IV value then of course that will happen, makes sense. It's a small price to pay for something so awesome. However, it would be nice if the battle frontier was exempt from this because as far as I understand there are already EV spreads for the battle frontier. I suppose if I translated all those entries to this new ev spread then I could theoretically free up the original spread as free space?
Reply With Quote
  #52    
Old November 26th, 2014 (03:59 AM).
Lance32497's Avatar
Lance32497
LanceKoijer of Pokemon_Addicts
 
Join Date: Aug 2014
Location: Criscanto town-Ginoa Region xD
Gender: Male
Nature: Adamant
aahhhm?? What makes this hack unique? No! Its very unique, just wondering, how the Trainer EV's affect the entire game? Does it share his Pokemons EV stat?
__________________
My Threads

Reply With Quote
  #53    
Old December 29th, 2014 (04:28 PM).
DizzyEgg's Avatar
DizzyEgg
 
Join Date: Feb 2014
Age: 17
Gender: Male
Nature: Timid
Quick question.
"First you will need to insert this ASM."
What exactly is ASM? I looked it up, but only found out it's connected to Assembly.
And where exactly am I supposed to insert this?
__________________
Please excuse my poor English. I'm still learning
Reply With Quote
  #54    
Old December 29th, 2014 (05:07 PM).
jAvAcOlA
Banned
 
Join Date: Sep 2008
Gender:
Quote originally posted by DizzyEgg:
Quick question.
"First you will need to insert this ASM."
What exactly is ASM? I looked it up, but only found out it's connected to Assembly.
And where exactly am I supposed to insert this?
Check out this tutorial under the "Having fun with ASM" section: http://www.pokecommunity.com/showthread.php?t=117917#ASM1

This is how I first learned. Inserting ASM seems insanely complex when you first come across it, but you'll realize it's really straight forward.

You're gonna need to know how to hex edit as well, which is also very easy once you understand the basics.
Reply With Quote
  #55    
Old December 30th, 2014 (10:02 AM). Edited January 4th, 2015 by DizzyEgg.
DizzyEgg's Avatar
DizzyEgg
 
Join Date: Feb 2014
Age: 17
Gender: Male
Nature: Timid
Quote:
You will also need to find x1000 bytes of space, and change the .EV_Table variable in the method to point to it (I used xF00000). This is where the spreads will go. The method gives you 256 spreads to use- this is not full control, but it is more than you are likely to need (the Emerald Battle Frontier only uses around 36 IIRC). The EV Spread table format is:
So...I don't quite understand this. What bytes are we talking about? Those before where I inserted the routine? Also how do I change the EV_Table variable? Am I supposed to do it in XSE or some other editor? If so, how is it done?
Sorry for the nooby question. I'd be very grateful if someone could help me.

Edit: I've finally made this work. Thank you Doesn'tKnowHowToPlay for your routine!
Reply With Quote
  #56    
Old 1 Week Ago (07:59 AM). Edited 1 Week Ago by Chaotix.
Chaotix
Good at Maps, Bad at Scripts
 
Join Date: Feb 2007
Nature: Adamant
I'm having trouble getting this to work.

I'm not quite sure where the code I'm supposed to replace begins and stops. With what I just tried if I get into a trainer battle that has Custom Moves and Items the game restarts.

This is on Fire Red.
Reply With Quote
  #57    
Old 1 Week Ago (11:40 AM).
Suwandi
Banned
 
Join Date: Mar 2015
Gender: Male
Quote originally posted by Lance32497:
aahhhm?? What makes this hack unique? No! Its very unique, just wondering, how the Trainer EV's affect the entire game? Does it share his Pokemons EV stat?
what the heck are you talking about? it gives EVs to opposing pokemon.
Reply With Quote
  #58    
Old 6 Days Ago (08:33 PM).
Cruztown's Avatar
Cruztown
Squirtle Squirt.
 
Join Date: Jul 2012
Gender: Male
Nature: Rash
Yo, I can't quite seem to get this to work for me. It doesn't cause any errors, the game seems to just ignore it. This is what I've tried compiling
Spoiler:
.align 2
.thumb
.thumb_func

.org 0x115f6
mov r0, r1
mov r6, r0
b 0x11604

.org 0x1162c
ldr r0, .Method_Addr
bx r0

.Method_Addr: .word 0x08F90001

.org 0x3dc70
b 0x3dcd0


.org 0xF90000

LoadItem:
add r5, #0x6
add r0, r4, #0x0
mov r1, #0xc
add r2, r5, #0x0
bl Insert_Element

LoadHPEV:
lsl r0, r6, #0x4
ldr r2, .EV_Table
add r2, r0
add r2, #0x5
mov r1, #0x1A
mov r0, r4
bl Insert_Element

LoadAtkEV:
lsl r0, r6, #0x4
ldr r2, .EV_Table
add r2, r0
add r2, #0x6
mov r1, #0x1B
mov r0, r4
bl Insert_Element

LoadDefEV:
lsl r0, r6, #0x4
ldr r2, .EV_Table
add r2, r0
add r2, #0x7
mov r1, #0x1C
mov r0, r4
bl Insert_Element

LoadSpeedEV:
lsl r0, r6, #0x4
ldr r2, .EV_Table
add r2, r0
add r2, #0x8
mov r1, #0x1D
mov r0, r4
bl Insert_Element

LoadSAtkEV:
lsl r0, r6, #0x4
ldr r2, .EV_Table
add r2, r0
add r2, #0x9
mov r1, #0x1E
mov r0, r4
bl Insert_Element

LoadSDefEV:
lsl r0, r6, #0x4
ldr r2, .EV_Table
add r2, r0
add r2, #0xA
mov r1, #0x1F
mov r0, r4
bl Insert_Element

LoadBall:
lsl r0, r6, #0x4
ldr r2, .EV_Table
add r2, r0
add r2, #0xB
mov r1, #0x26
mov r0, r4
bl Insert_Element

LoadAbility:
lsl r0, r6, #0x4
ldr r2, .EV_Table
add r2, r0
add r2, #0xC
mov r1, #0x2E
mov r0, r4
bl Insert_Element

StartNatureLoop:
lsl r0, r6, #0x4
ldr r2, .EV_Table
add r2, r0
ldrb r5, [r2, #0x0]
cmp r5, #0x0
beq LoadIVs
ldr r0, [r4, #0x0]
ldr r1, [r4, #0x4]
eor r1, r0, r1
str r1, [r4, #0x4]

NatureLoop:
ldr r0, [r4, #0x0]
add r0, r0, #0x18
str r0, [r4, #0x0]
mov r1, #0x19
bl Mod
cmp r0, r5
bne NatureLoop

EndNatureLoop:
ldr r0, [r4, #0x0]
ldr r1, [r4, #0x4]
eor r1, r0, r1
str r1, [r4, #0x4]

LoadIVs:
lsl r0, r6, #0x4
ldr r2, .EV_Table
add r2, r0
ldrb r6, [r2, #0x4]
push {r6}

StartIVLoop:
mov r5, #0x27

IVLoop:
mov r0, r4
mov r1, r5
mov r2, sp
bl Insert_Element
add r5, r5, #0x1
cmp r5, #0x2D
bne IVLoop

End:
pop {r6}
bl Recalculate_Stats
ldr r1, .Return_Addr
bx r1

Insert_Element:
ldr r3, .Insert_Addr
bx r3

Recalculate_Stats:
mov r0, r4
ldr r1, .Recalc_Addr
bx r1

Mod:
ldr r3, .Mod_Addr
bx r3

.align 2
.Return_Addr: .word 0x08011639
.EV_Table: .word 0x08F00000
.Insert_Addr: .word 0x0804037d
.Recalc_Addr: .word 0x0803e47d
.Mod_Addr: .word 0x081e4685
with the resulting Hex
Spoiler:
06 35 20 1C 0C 21 2A 1C 00 F0 69 F8 30 01 38 4A 12 18 05 32 1A 21 20 1C 00 F0 61 F8 30 01 34 4A 12 18 06 32 1B 21 20 1C 00 F0 59 F8 30 01 30 4A 12 18 07 32 1C 21 20 1C 00 F0 51 F8 30 01 2C 4A 12 18 08 32 1D 21 20 1C 00 F0 49 F8 30 01 28 4A 12 18 09 32 1E 21 20 1C 00 F0 41 F8 30 01 24 4A 12 18 0A 32 1F 21 20 1C 00 F0 39 F8 30 01 20 4A 12 18 0B 32 26 21 20 1C 00 F0 31 F8 30 01 1C 4A 12 18 0C 32 2E 21 20 1C 00 F0 29 F8 30 01 18 4A 12 18 15 78 00 2D 0F D0 20 68 61 68 41 40 61 60 20 68 18 30 20 60 19 21 00 F0 1E F8 A8 42 F7 D1 20 68 61 68 41 40 61 60 30 01 0D 4A 12 18 16 79 40 B4 27 25 20 1C 29 1C 6A 46 00 F0 08 F8 01 35 2D 2D F7 D1 40 BC 00 F0 04 F8 04 49 08 47 05 4B 18 47 20 1C 04 49 08 47 04 4B 18 47 39 16 01 08 00 00 F0 08 7D 03 04 08 7D E4 03 08 85 46 1E 08
Reply With Quote
  #59    
Old 5 Days Ago (04:32 AM).
Chaotix
Good at Maps, Bad at Scripts
 
Join Date: Feb 2007
Nature: Adamant
Quote originally posted by Cruztown:
Yo, I can't quite seem to get this to work for me. It doesn't cause any errors, the game seems to just ignore it. This is what I've tried compiling
Spoiler:
.align 2
.thumb
.thumb_func

.org 0x115f6
mov r0, r1
mov r6, r0
b 0x11604

.org 0x1162c
ldr r0, .Method_Addr
bx r0

.Method_Addr: .word 0x08F90001

.org 0x3dc70
b 0x3dcd0


.org 0xF90000

LoadItem:
add r5, #0x6
add r0, r4, #0x0
mov r1, #0xc
add r2, r5, #0x0
bl Insert_Element

LoadHPEV:
lsl r0, r6, #0x4
ldr r2, .EV_Table
add r2, r0
add r2, #0x5
mov r1, #0x1A
mov r0, r4
bl Insert_Element

LoadAtkEV:
lsl r0, r6, #0x4
ldr r2, .EV_Table
add r2, r0
add r2, #0x6
mov r1, #0x1B
mov r0, r4
bl Insert_Element

LoadDefEV:
lsl r0, r6, #0x4
ldr r2, .EV_Table
add r2, r0
add r2, #0x7
mov r1, #0x1C
mov r0, r4
bl Insert_Element

LoadSpeedEV:
lsl r0, r6, #0x4
ldr r2, .EV_Table
add r2, r0
add r2, #0x8
mov r1, #0x1D
mov r0, r4
bl Insert_Element

LoadSAtkEV:
lsl r0, r6, #0x4
ldr r2, .EV_Table
add r2, r0
add r2, #0x9
mov r1, #0x1E
mov r0, r4
bl Insert_Element

LoadSDefEV:
lsl r0, r6, #0x4
ldr r2, .EV_Table
add r2, r0
add r2, #0xA
mov r1, #0x1F
mov r0, r4
bl Insert_Element

LoadBall:
lsl r0, r6, #0x4
ldr r2, .EV_Table
add r2, r0
add r2, #0xB
mov r1, #0x26
mov r0, r4
bl Insert_Element

LoadAbility:
lsl r0, r6, #0x4
ldr r2, .EV_Table
add r2, r0
add r2, #0xC
mov r1, #0x2E
mov r0, r4
bl Insert_Element

StartNatureLoop:
lsl r0, r6, #0x4
ldr r2, .EV_Table
add r2, r0
ldrb r5, [r2, #0x0]
cmp r5, #0x0
beq LoadIVs
ldr r0, [r4, #0x0]
ldr r1, [r4, #0x4]
eor r1, r0, r1
str r1, [r4, #0x4]

NatureLoop:
ldr r0, [r4, #0x0]
add r0, r0, #0x18
str r0, [r4, #0x0]
mov r1, #0x19
bl Mod
cmp r0, r5
bne NatureLoop

EndNatureLoop:
ldr r0, [r4, #0x0]
ldr r1, [r4, #0x4]
eor r1, r0, r1
str r1, [r4, #0x4]

LoadIVs:
lsl r0, r6, #0x4
ldr r2, .EV_Table
add r2, r0
ldrb r6, [r2, #0x4]
push {r6}

StartIVLoop:
mov r5, #0x27

IVLoop:
mov r0, r4
mov r1, r5
mov r2, sp
bl Insert_Element
add r5, r5, #0x1
cmp r5, #0x2D
bne IVLoop

End:
pop {r6}
bl Recalculate_Stats
ldr r1, .Return_Addr
bx r1

Insert_Element:
ldr r3, .Insert_Addr
bx r3

Recalculate_Stats:
mov r0, r4
ldr r1, .Recalc_Addr
bx r1

Mod:
ldr r3, .Mod_Addr
bx r3

.align 2
.Return_Addr: .word 0x08011639
.EV_Table: .word 0x08F00000
.Insert_Addr: .word 0x0804037d
.Recalc_Addr: .word 0x0803e47d
.Mod_Addr: .word 0x081e4685
with the resulting Hex
Spoiler:
06 35 20 1C 0C 21 2A 1C 00 F0 69 F8 30 01 38 4A 12 18 05 32 1A 21 20 1C 00 F0 61 F8 30 01 34 4A 12 18 06 32 1B 21 20 1C 00 F0 59 F8 30 01 30 4A 12 18 07 32 1C 21 20 1C 00 F0 51 F8 30 01 2C 4A 12 18 08 32 1D 21 20 1C 00 F0 49 F8 30 01 28 4A 12 18 09 32 1E 21 20 1C 00 F0 41 F8 30 01 24 4A 12 18 0A 32 1F 21 20 1C 00 F0 39 F8 30 01 20 4A 12 18 0B 32 26 21 20 1C 00 F0 31 F8 30 01 1C 4A 12 18 0C 32 2E 21 20 1C 00 F0 29 F8 30 01 18 4A 12 18 15 78 00 2D 0F D0 20 68 61 68 41 40 61 60 20 68 18 30 20 60 19 21 00 F0 1E F8 A8 42 F7 D1 20 68 61 68 41 40 61 60 30 01 0D 4A 12 18 16 79 40 B4 27 25 20 1C 29 1C 6A 46 00 F0 08 F8 01 35 2D 2D F7 D1 40 BC 00 F0 04 F8 04 49 08 47 05 4B 18 47 20 1C 04 49 08 47 04 4B 18 47 39 16 01 08 00 00 F0 08 7D 03 04 08 7D E4 03 08 85 46 1E 08
There is also hex you have to replace at 0x115f6 and 0x3dc70. Go to those offsets in the bin and replace whats in your rom with them.
Reply With Quote
  #60    
Old 4 Days Ago (07:47 PM). Edited 4 Days Ago by Cruztown.
Cruztown's Avatar
Cruztown
Squirtle Squirt.
 
Join Date: Jul 2012
Gender: Male
Nature: Rash
Quote originally posted by Chaotix:
There is also hex you have to replace at 0x115f6 and 0x3dc70. Go to those offsets in the bin and replace whats in your rom with them.
I completely over looked that, thanks a bunch! That said, it just begins freezing. I looked around and nothing else seems to be altered, not even 0x011624 (that's still 20 1C 33 1C 2C F0 14 FA like Mystery Man suggested in the ASM Help thread). Any other iceas
Reply With Quote
  #61    
Old 3 Days Ago (01:41 PM).
Mystery Man's Avatar
Mystery Man
Don't be like me!
 
Join Date: Dec 2011
Location: CA
Age: 19
Gender: Male
Nature: Quirky
Quote originally posted by Cruztown:
I completely over looked that, thanks a bunch! That said, it just begins freezing. I looked around and nothing else seems to be altered, not even 0x011624 (that's still 20 1C 33 1C 2C F0 14 FA like Mystery Man suggested in the ASM Help thread). Any other iceas
Just to be sure, have you made the changes at 0x115F6, 0x1162C, 0x3DC70, and 0xF90000 to your ROM? If not, go to those offsets in the bin file, copy the bytes before the sea of zeros, and paste them onto the EXACT same location in your ROM. Also, make sure that at 0xF00000 is not FF. This is where the game will read the EVs and such. If it is FF, the game will freeze.
Reply With Quote
  #62    
Old 2 Days Ago (05:01 PM).
kearnseyboy6's Avatar
kearnseyboy6
Aussie's Toughest Mudder
 
Join Date: Dec 2008
Quote originally posted by Mystery Man:
Just to be sure, have you made the changes at 0x115F6, 0x1162C, 0x3DC70, and 0xF90000 to your ROM? If not, go to those offsets in the bin file, copy the bytes before the sea of zeros, and paste them onto the EXACT same location in your ROM. Also, make sure that at 0xF00000 is not FF. This is where the game will read the EVs and such. If it is FF, the game will freeze.
Further to this, make sure you copy bytes aligned. It's explained in the thread but one of the 00's need to be copied.

Also the ROM will only crash if the nature is above 0x20 or something. And keep the IV's between 0x0 and 0x1F
__________________
HOLIDAYING CURRENTLY!!
Reply With Quote
  #63    
Old 2 Days Ago (08:48 AM). Edited 2 Days Ago by Cruztown.
Cruztown's Avatar
Cruztown
Squirtle Squirt.
 
Join Date: Jul 2012
Gender: Male
Nature: Rash
Quote originally posted by Mystery Man:
Just to be sure, have you made the changes at 0x115F6, 0x1162C, 0x3DC70, and 0xF90000 to your ROM? If not, go to those offsets in the bin file, copy the bytes before the sea of zeros, and paste them onto the EXACT same location in your ROM. Also, make sure that at 0xF00000 is not FF. This is where the game will read the EVs and such. If it is FF, the game will freeze.
Thank you for the response. I have copied all of the altered bytes at those four locations. At xF00000, the exact first spread I put down was as follows
Quote:
0F 00 00 00 1F FC 00 00 06 FC 00 07 01 00 00 00
Quote:
Further to this, make sure you copy bytes aligned. It's explained in the thread but one of the 00's need to be copied.

Also the ROM will only crash if the nature is above 0x20 or something. And keep the IV's between 0x0 and 0x1F
Thank you, as well, for a reply. I haven't tried using any nature values above 0x20. The only one I've actually tried was modest, which seems to be 0x0F.
Reply With Quote
  #64    
Old 9 Hours Ago (06:44 AM). Edited 9 Hours Ago by leyn09.
leyn09's Avatar
leyn09
Truant Trainer
 
Join Date: May 2011
Location: Philippines
Gender: Male
Nature: Careful
Hello. I have some questions.

It's confusing on what should I copy and paste-write from the assembled bin to the rom. Am I getting the correct bytes in the screenshot below (0x1162c,0x115f6,0x3dc70) ?
Spoiler:


I've put my EV spread table at 0x860510 and put the EV Trainer routine at 0x850000
screenshot of EV spread table:
Spoiler:


I tried testing it (Trainer with custom held item and moves, 2 pokemon set using unnamed editor with IV 0 and latter, 1) and fortunately, it doesn't restart or hang. Tho, the ev spread and the ball modification (default pokeball still shows) doesn't work. My ROM is supported by MrDollSteak Rombase and JPAN FR Hacked Engine. Here is my EV trainer routine:
Spoiler:

#EV spread table format
#Each spread is 16 bytes
#0x0 = Nature
#0x4 = IVs (from 0-31, not 0-255, used for all IVs)
# (if you want hidden powers, recall the ai can't handle -- bp moves)
#0x5 = HP EVs
#0x6 = Atk EVs
#0x7 = Def EVs
#0x8 = Speed EVs
#0x9 = SAtk EVs
#0xA = SDef EVs
#0xB = Pokeball
#last four bytes are filler

.align 2
.thumb
.thumb_func

.org 0x115f6
mov r0, r1
mov r6, r0
b 0x11604

.org 0x1162c
ldr r0, .Method_Addr
bx r0

.Method_Addr: .word 0x08850001

.org 0x3dc70
b 0x3dcd0


.org 0x850000

LoadItem:
add r5, #0x6
add r0, r4, #0x0
mov r1, #0xc
add r2, r5, #0x0
bl Insert_Element

LoadHPEV:
lsl r0, r6, #0x4
ldr r2, .EV_Table
add r2, r0
add r2, #0x5
mov r1, #0x1A
mov r0, r4
bl Insert_Element

LoadAtkEV:
lsl r0, r6, #0x4
ldr r2, .EV_Table
add r2, r0
add r2, #0x6
mov r1, #0x1B
mov r0, r4
bl Insert_Element

LoadDefEV:
lsl r0, r6, #0x4
ldr r2, .EV_Table
add r2, r0
add r2, #0x7
mov r1, #0x1C
mov r0, r4
bl Insert_Element

LoadSpeedEV:
lsl r0, r6, #0x4
ldr r2, .EV_Table
add r2, r0
add r2, #0x8
mov r1, #0x1D
mov r0, r4
bl Insert_Element

LoadSAtkEV:
lsl r0, r6, #0x4
ldr r2, .EV_Table
add r2, r0
add r2, #0x9
mov r1, #0x1E
mov r0, r4
bl Insert_Element

LoadSDefEV:
lsl r0, r6, #0x4
ldr r2, .EV_Table
add r2, r0
add r2, #0xA
mov r1, #0x1F
mov r0, r4
bl Insert_Element

LoadAbility:
lsl r0, r6, #0x4
ldr r2, .EV_Table
add r2, r0
add r2, #0xC
mov r1, #0x2E
mov r0, r4
bl Insert_Element

LoadBall:
lsl r0, r6, #0x4
ldr r2, .EV_Table
add r2, r0
add r2, #0xB
mov r1, #0x26
mov r0, r4
bl Insert_Element

StartNatureLoop:
lsl r0, r6, #0x4
ldr r2, .EV_Table
add r2, r0
ldrb r5, [r2, #0x0]
cmp r5, #0x0
beq LoadIVs
ldr r0, [r4, #0x0]
ldr r1, [r4, #0x4]
eor r1, r0, r1
str r1, [r4, #0x4]

NatureLoop:
ldr r0, [r4, #0x0]
add r0, r0, #0x18
str r0, [r4, #0x0]
mov r1, #0x19
bl Mod
cmp r0, r5
bne NatureLoop

EndNatureLoop:
ldr r0, [r4, #0x0]
ldr r1, [r4, #0x4]
eor r1, r0, r1
str r1, [r4, #0x4]

LoadIVs:
lsl r0, r6, #0x4
ldr r2, .EV_Table
add r2, r0
ldrb r6, [r2, #0x4]
push {r6}

StartIVLoop:
mov r5, #0x27

IVLoop:
mov r0, r4
mov r1, r5
mov r2, sp
bl Insert_Element
add r5, r5, #0x1
cmp r5, #0x2D
bne IVLoop

End:
pop {r6}
bl Recalculate_Stats
ldr r1, .Return_Addr
bx r1

Insert_Element:
ldr r3, .Insert_Addr
bx r3

Recalculate_Stats:
mov r0, r4
ldr r1, .Recalc_Addr
bx r1

Mod:
ldr r3, .Mod_Addr
bx r3

.align 2
.Return_Addr: .word 0x08011639
.EV_Table: .word 0x08860510
.Insert_Addr: .word 0x0804037d
.Recalc_Addr: .word 0x0803e47d
.Mod_Addr: .word 0x081e4685


Is there any problem? Thanks in advance!
Reply With Quote
Reply
Quick Reply

Sponsored Links
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 UTC -8. The time now is 03:56 PM.