Go Back   The PokéCommunity Forums > ROM Hacking > Research & Development
Reload this Page Development 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
  #26    
Old August 24th, 2013 (08:38 PM).
Aruaruu Aruaruu is offline
 
Join Date: Sep 2011
Gender: Male
Posts: 189
Wait. What game are you trying to apply this to?
Reply With Quote
  #27    
Old August 24th, 2013 (11:13 PM). Edited August 25th, 2013 by pawell6.
pawell6's Avatar
pawell6 pawell6 is offline
The truthseeker
 
Join Date: Feb 2010
Location: Poland
Age: 27
Gender: Male
Posts: 48
Quote originally posted by Aruaruu:
Wait. What game are you trying to apply this to?
Pokemon Fire Red. Well it's been modified version with physical/special split patch.

Edit: The same thing happens when applying to clean rom.
__________________
Most of new moves is done. Fixing timing of some animations and updating learnsets in progress.
Reply With Quote
  #28    
Old August 25th, 2013 (12:54 AM). Edited August 25th, 2013 by Aruaruu.
Aruaruu Aruaruu is offline
 
Join Date: Sep 2011
Gender: Male
Posts: 189
Quote originally posted by pawell6:
Pokemon Fire Red. Well it's been modified version with physical/special split patch.
I don't know then..I am using Emerald.

----

I think I found a bug.
After the credits you select what colo(u)r pokemon was seen on TV to choose what Lati twin you want. Choosing either of them "freezes" the game. Music continues to play though. I made sure this wasn't just something else I did to the ROM. I tested it on previous backups and finally a clean ROM. Still freezes if this asm is applied to it.

Any ideas?

EDIT: I recall reading that the Pokemon's(Latios/Latias) IVs and such are created when you select either RED/BLUE. Could the 33rd slot be affecting this or is that out of the question now?
Reply With Quote
  #29    
Old August 25th, 2013 (06:58 PM).
DoesntKnowHowToPlay's Avatar
DoesntKnowHowToPlay DoesntKnowHowToPlay is offline
some loser
 
Join Date: Jan 2012
Posts: 225
Updated the method. It now is inserted during code that is used only when loading trainers- this means wild pokemon and event mons should be unaffected. It also means you don't have to worry about the 33rd slot- it can be treated like any other. This should also fix the issue with the Latis.

Note that the adjustment means that the method now only works for trainers with custom movesets and items.

Pawell6, I honestly don't know what's going on with your ROM- try the new method and see if it works? It sounds like the initial loading of the IV values didn't get changed properly, as that would explain why you have fewer spreads, but if you did what you said you did it should probably work.
__________________

Yet Another Fire Red Hack

Physical/Special Split
Reply With Quote
  #30    
Old August 25th, 2013 (09:15 PM). Edited August 25th, 2013 by Aruaruu.
Aruaruu Aruaruu is offline
 
Join Date: Sep 2011
Gender: Male
Posts: 189
Quote originally posted by DoesntKnowHowToPlay:
Updated the method. It now is inserted during code that is used only when loading trainers- this means wild pokemon and event mons should be unaffected. It also means you don't have to worry about the 33rd slot- it can be treated like any other. This should also fix the issue with the Latis.

Note that the adjustment means that the method now only works for trainers with custom movesets and items.
That is great. Thanks for this.
EDIT: It has indeed fixed the lati issue.
Reply With Quote
  #31    
Old August 26th, 2013 (01:59 AM).
pawell6's Avatar
pawell6 pawell6 is offline
The truthseeker
 
Join Date: Feb 2010
Location: Poland
Age: 27
Gender: Male
Posts: 48
I tested with the new method and everything works fine now . Thanks for help.
__________________
Most of new moves is done. Fixing timing of some animations and updating learnsets in progress.
Reply With Quote
  #32    
Old August 26th, 2013 (07:53 AM). Edited August 26th, 2013 by Agastya.
Agastya's Avatar
Agastya Agastya is offline
Grinding failed. Item Grind level dropped by 3.
 
Join Date: Feb 2010
Nature: Quiet
Posts: 68
I made a Nightmare table to make it easier to edit EV spreads.

You may need to edit EV Hack Module.nmm depending on where you dumped the EV spread table.
Just open it in a text editor of your choice and at the start where it says..

Code:
1
EV Hack EV Spread Table Module
0xF00000
256
16
Table Values.txt
NULL
.. change 0xF00000 to wherever you dropped your EV spread table.

The values in Table Values.txt are based off the AI values displayed in A-Trainer. You may add text after the numbers shown if you want to leave a note on what ball to use or what kind of EV spread you put there.

You will obviously need Nightmare to use this. If you don't have Nightmare 1, you'll have to settle for Nightmare 2.
__________________
Reply With Quote
  #33    
Old August 26th, 2013 (08:59 AM).
DoesntKnowHowToPlay's Avatar
DoesntKnowHowToPlay DoesntKnowHowToPlay is offline
some loser
 
Join Date: Jan 2012
Posts: 225
I updated the method again. It now allows for custom natures. Because this works by changing the personality value and trainer ID, it is very likely to disagree with shiny hacks- you should be able to get around this by not using spreads with defined natures for shiny trainer pokemon though.
__________________

Yet Another Fire Red Hack

Physical/Special Split
Reply With Quote
  #34    
Old August 27th, 2013 (06:46 PM).
MrDollSteak's Avatar
MrDollSteak MrDollSteak is offline
Formerly known as 11bayerf1
 
Join Date: Dec 2008
Location: Hong Kong
Age: 20
Gender: Male
Posts: 574
Quote originally posted by DoesntKnowHowToPlay:
Note that the adjustment means that the method now only works for trainers with custom movesets and items.
So does this mean, without custom movesets and items, trainers will just have the normal IV spread? or do trainers now have to use custom movesets and items? To be honest it's not a big deal, because you can even make the trainer hold useless items and give them their default level moves.

Great hack! Keeps getting better and better.
__________________
Reply With Quote
  #35    
Old August 27th, 2013 (07:46 PM).
DoesntKnowHowToPlay's Avatar
DoesntKnowHowToPlay DoesntKnowHowToPlay is offline
some loser
 
Join Date: Jan 2012
Posts: 225
Quote originally posted by 11bayerf1:
So does this mean, without custom movesets and items, trainers will just have the normal IV spread? or do trainers now have to use custom movesets and items?
The former. And as you mentioned, you can just manually plug in default or bad sets and let them hold nothing, they just have to use the custom moves+custom items data type. I think I know how to fix this though- I'll see if I can squeeze some time in tomorrow to take a look at it.
__________________

Yet Another Fire Red Hack

Physical/Special Split
Reply With Quote
  #36    
Old August 28th, 2013 (01:06 AM). Edited September 1st, 2013 by MrDollSteak.
MrDollSteak's Avatar
MrDollSteak MrDollSteak is offline
Formerly known as 11bayerf1
 
Join Date: Dec 2008
Location: Hong Kong
Age: 20
Gender: Male
Posts: 574
Quote originally posted by DoesntKnowHowToPlay:
The former. And as you mentioned, you can just manually plug in default or bad sets and let them hold nothing, they just have to use the custom moves+custom items data type. I think I know how to fix this though- I'll see if I can squeeze some time in tomorrow to take a look at it.
Awesome this is really great. One of the most exciting hacks I've seen/used recently. I honestly
havent been psyched about a new thing since a) the PSS b) Day/Night Wild Pokemon Switching.

Great job! Had you already had this in YAFRH? Or are you adding it now for Lunatic Mode?
__________________
Reply With Quote
  #37    
Old August 30th, 2013 (11:18 PM).
SBird SBird is offline
 
Join Date: Aug 2009
Gender: Male
Posts: 70
One more thing i dear to ask: May it be possible to determine a custom ability for a pokémon?

~SBird
Reply With Quote
  #38    
Old September 13th, 2013 (01:15 AM).
saintdraco's Avatar
saintdraco saintdraco is offline
 
Join Date: Jan 2009
Gender:
Posts: 1
Can anyone confirm that the custom natures work? I haven't been able to notice much of a difference, but it seems that the gender of the trainers pokemon change according to the nature value. I'm not sure if I did something wrong or not, the IVs and EVs seem to be working though.
Reply With Quote
  #39    
Old September 13th, 2013 (04:53 AM).
Aruaruu Aruaruu is offline
 
Join Date: Sep 2011
Gender: Male
Posts: 189
Quote originally posted by saintdraco:
Can anyone confirm that the custom natures work? I haven't been able to notice much of a difference, but it seems that the gender of the trainers pokemon change according to the nature value. I'm not sure if I did something wrong or not, the IVs and EVs seem to be working though.
Dunno about natures but genders of pokemon have changed.
Reply With Quote
  #40    
Old February 3rd, 2014 (09:46 PM).
The Zororoaster The Zororoaster is offline
 
Join Date: May 2012
Gender: Male
Posts: 29
T"o assign an EV spread to a trainer's pokemon, set the value that was formerly their IVs to which slot in the table you want that pokemon to use. If you are using A-Trainer, this value is erroneously marked as AI Value."

So are you saying that increasing AI Value in A-Trainer doesn't actually improve the AI? It only affects IVs? Is there any way to improve AI then?
Reply With Quote
  #41    
Old February 3rd, 2014 (10:44 PM).
Aruaruu Aruaruu is offline
 
Join Date: Sep 2011
Gender: Male
Posts: 189
Quote originally posted by The Zororoaster:
T"o assign an EV spread to a trainer's pokemon, set the value that was formerly their IVs to which slot in the table you want that pokemon to use. If you are using A-Trainer, this value is erroneously marked as AI Value."

So are you saying that increasing AI Value in A-Trainer doesn't actually improve the AI? It only affects IVs? Is there any way to improve AI then?
I think this controls the AI.
worst = 0 best = 7 or something like that.
Spoiler:
Reply With Quote
  #42    
Old February 5th, 2014 (08:33 PM).
The Zororoaster The Zororoaster is offline
 
Join Date: May 2012
Gender: Male
Posts: 29
Quote originally posted by Aruaruu:
I think this controls the AI.
worst = 0 best = 7 or something like that.
Spoiler:
Thanks! That is actually really, really important information. There should be some sort of announcement made about that. You just saved me a lot of time.

Also, this script is really cool, simple, and useful. It can easily change the gameplay of any hack. Thank you for making and sharing, Doesn't.
Reply With Quote
  #43    
Old April 14th, 2014 (10:48 PM). Edited April 17th, 2014 by SinisterHoodedFigure.
SinisterHoodedFigure's Avatar
SinisterHoodedFigure SinisterHoodedFigure is offline
 
Join Date: Mar 2011
Gender: Male
Posts: 61
Would an ev asm that works for emerald also work for Ruby? I am planning to make a simple Ruby difficulty hack with only 202 pokemon found in hoenn available, as opposed to the 386 emerald and firered/leafgreen hacks out there, and I wanted to give this a try.


I also noticed something about the level 7 AI in ruby, they never uses moves like encore or mud sport no matter how much I try, is that specific to the lower AIs? First time actually trying to hack third gen.

EDIT: yea, its level 5 that allows their pokemon to use encore sometimes, as well as certain pokemon using pain split, while at the same time, the enemies will use stronger moves like the level 7 AIs. Though the level 5 AI won't use status moves or protect as much.

But yeah, I'm really bad at asm, and the trainer ev spread asm routine is a work of genius when making a more difficult pokemon hack, which I commend you for it. (I was curious a long time ago in how to implement that in my first gen hacks myself, until I was told that that was impossible.)
Reply With Quote
  #44    
Old May 9th, 2014 (12:58 AM).
mamamama mamamama is offline
 
Join Date: Feb 2014
Posts: 169
Suggestion:

If you are still working on this Doesn't, it would be really nice to use those filler bytes to be able to shift between abilities of the AI's Pokemon. Currently, the AI always gets Ability 1.

I was also going to suggest to use them to control the happiness of the AI's Pokemon, but I'm not sure how the AI handles the BP of Return and Frustration.
Reply With Quote
  #45    
Old May 9th, 2014 (06:44 AM). Edited May 9th, 2014 by DoesntKnowHowToPlay.
DoesntKnowHowToPlay's Avatar
DoesntKnowHowToPlay DoesntKnowHowToPlay is offline
some loser
 
Join Date: Jan 2012
Posts: 225
That's actually really easy to add and I thought I put it in here earlier- just put the following in the middle of the other loads:

Code:
LoadAbility:
lsl r0, r6, #0x4
ldr r2, .EV_Table
add r2, r0
add r2, #0xC
mov r1, #0x2E
mov r0, r4
bl Insert_Element
This maps ability to the byte 0xC, the first of the last four unused bytes.

Happiness requires passing InsertElement x20 in r1, and should be easy enough for you to add yourself, but I don't advise it as the AI isn't very smart about using Return and Frustration anyway.
__________________

Yet Another Fire Red Hack

Physical/Special Split
Reply With Quote
  #46    
Old May 9th, 2014 (08:09 AM).
Aruaruu Aruaruu is offline
 
Join Date: Sep 2011
Gender: Male
Posts: 189
I once read that pokemon in the battle frontier all have zero happiness so maybe it applies to the main game too? Or perhaps they have base values of the pokemon used?
Reply With Quote
  #47    
Old May 10th, 2014 (01:50 AM).
Agastya's Avatar
Agastya Agastya is offline
Grinding failed. Item Grind level dropped by 3.
 
Join Date: Feb 2010
Nature: Quiet
Posts: 68
they default to 0 happiness, yes. if something needs stab return, you should opt to use frustration unless you hate it for flavor reasons.
__________________
Reply With Quote
  #48    
Old June 22nd, 2014 (04:44 AM). Edited June 23rd, 2014 by Aruaruu.
Aruaruu Aruaruu is offline
 
Join Date: Sep 2011
Gender: Male
Posts: 189
Sorry to bump this thread, but I think I found another problem.

I have recently been playing through the battle pyramid to test some new team I gave the brain there. The opponents first pokemon had slightly higher speed than my one, and without any speed related items or +/- priority moves, it moved last always.
It turns out that it was due to the IVs of this pokemon being 31, which was also the slot number that had a speed reducing nature assigned to it. I tried removing the EV hack and it worked as it should. Would it be possible to make it not conflict with the battle frontier and other battle facilities?

EDIT:
Alright well I didn't think of just using some EV spreads I already made before and giving them to the frontier brains to get around this little issue, but I guess it may be able to affect the random trainers in the frontier still.
EDIT2:
It also appear to mess with the stats of Steven's pokemon during the double battle event at Mossdeep. Even though the changes it causes are minor (1-3 points,) thought I should note it anyway.
Guess I should try to test some more things too.
Reply With Quote
  #49    
Old July 3rd, 2014 (05:54 AM).
Phenom2122's Avatar
Phenom2122 Phenom2122 is offline
 
Join Date: Jun 2014
Gender: Male
Nature: Quiet
Posts: 42
Quote originally posted by Aruaruu:
Sorry to bump this thread, but I think I found another problem.

I have recently been playing through the battle pyramid to test some new team I gave the brain there. The opponents first pokemon had slightly higher speed than my one, and without any speed related items or +/- priority moves, it moved last always.
It turns out that it was due to the IVs of this pokemon being 31, which was also the slot number that had a speed reducing nature assigned to it. I tried removing the EV hack and it worked as it should. Would it be possible to make it not conflict with the battle frontier and other battle facilities?

EDIT:
Alright well I didn't think of just using some EV spreads I already made before and giving them to the frontier brains to get around this little issue, but I guess it may be able to affect the random trainers in the frontier still.
EDIT2:
It also appear to mess with the stats of Steven's pokemon during the double battle event at Mossdeep. Even though the changes it causes are minor (1-3 points,) thought I should note it anyway.
Guess I should try to test some more things too.
Is this not a fairly concerning issue? If I get this correctly, it means that any trainer in the game that has pokemon with IVs will be affected? So half of these EV spreads will be used up redoing all the battle frontier teams and some others with IVs?
Reply With Quote
  #50    
Old July 3rd, 2014 (08:40 AM).
Aruaruu Aruaruu is offline
 
Join Date: Sep 2011
Gender: Male
Posts: 189
Quote originally posted by Phenom2122:
Is this not a fairly concerning issue? If I get this correctly, it means that any trainer in the game that has pokemon with IVs will be affected? So half of these EV spreads will be used up redoing all the battle frontier teams and some others with IVs?
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.
Reply With Quote
Reply
Quick Reply

Sponsored Links

You may also like.. (Beta)
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 10:16 PM.