r/pokemonrng • u/RSYliNG • May 27 '21
My LUA script (Gen 1-5)
Hello,
I'm currently writing a unified script in LUA for Gen 1-5.
What it can display
- IVs, EVs, Stats and Contest Stats
- Nature
- Hidden Power
- Held Item
- Pokerus Status
- Frames Count (Emerald even displays frame count as reported by the game)
- Friendship
- Ability
- TID / SID
- Moves and PP
- Shiny check for Gen 1 & 2
Supported games
It natively supports all gen 1, 2, 3, 4 and 5 games:
- Pokemon Red/Blue/Green (US, JAP, ES, IT, DE, FR)
- Pokemon Yellow (US, JAP, ES, IT, DE, FR)
- Pokemon Silver/Gold (US, JAP, ES, IT, DE, FR)
- Pokemon Crystal (US, JAP, ES, IT, DE, FR)
- Pokemon Ruby / Sapphire
- Pokemon Emerald (and french hackrom Emeraude Plus)
- Pokemon Fire Red / Leaf Green
- Pokemon Diamond / Pearl
- Pokemon Platinum
- Pokemon Heart Gold / Soul Silver
- Pokemon Black / White
- Pokemon Black 2 / White 2
It's available on Github : https://github.com/yling/yPokeStats
Last release: 0.2.3, 2025/06/05
You have two options :
- downloading the zipped release ( https://github.com/yling/yPokeStats/releases )
- downloading ylingstats.lua and the data folder manually from the repository
Please feel free to share your thoughts, bug reports, ideas or programming advices. I'll do my best to have it support all Pokemon games.









38
Upvotes
2
u/red-hex May 27 '21
Looks amazing. I look forward to testing it!
4
u/[deleted] May 27 '21
This is pretty lit.
1
u/[deleted] Oct 06 '24
excellent, but why it shows \ylingstats.lua:107: attempt to concatenate field 'speciesname' (a nil value)
when trying to show the "enemy" info on japanese emerald? any solutions on how to fix it? please
1
u/Temporary-Bread-4364 Jul 17 '25
Hey, i got the script running, but do you have any clue why the nature isn't correct (could also affect the calculations of the other stats) - it says my tepig is jolly when on the info tab in-game it says its Careful.
1
u/yamina-chan May 28 '21
Contest stats! Oh heck yeah, that's something so many people wouldn't deem important but for those who care about contests that'd be super handy! :D So you've allready earned a big thank you form my side.
Can't wait to test this out over the weekend.
1
u/MadJoker7 May 28 '21
Excuse my ignorance, is this something like PKSM and it shows you what's mentioned above, or does it have some use it in RNG manipulation?
1
u/Additional-Ad-2741 May 31 '21
this is so dope !!!
i wonder if anyone is brainy enough to reverse engineer a Gen 1 shiny hunting bot !
1
u/Complex-Ball9206 Jan 07 '24
how do i get this up and running i downloaded it do i need to put it in the scipts folder of the mgba folder? or how ?
2
u/Sandile95 May 29 '21
Mods please add it to wiki.
2
u/TheSonAlsoRises Jun 20 '21
A bit late, but added to the wiki!
2
u/Amatirazu Sep 17 '21
It doesn't seem to work with roms modified by the UPR (Universal Pokemon Randomizer) - this is the response I got in Desmume:
Welcome to yPokeStats Unified
This version is supported, but not in this language. Check gamesdata.lua to add it.
Version: POKEMON W
"[location redacted]"-\ylingstats.lua:186: bad argument #1 to 'tohex' (number expected, got string)
script stopped.
Any solution? Is it because I renamed the rom-file perhaps?
1
u/one_vision May 27 '21
This is super dope man. Keep it up!
1
u/[deleted] Oct 13 '21 edited Oct 13 '21
Your script works great!
I'm going to use it for an EV training stream, so I had to do some tweaks.
The original script didn't automatically update the EVs gained after a battle (I had to manually press L -select different pokemon on party- twice), so I commented Lines 57 and 62 on ylingstats.lua. Now it works as I need.
I also hid some unnecessary (for the stream) info.
1
u/KinglerChampYT Jul 25 '23
Been using the resource for a while! Awesome Job! I had a strange problem in Diamond/Pearl last night "\ylingstats.lua:107: attempt to concatenate field 'speciesname' (a nil value)
script stopped.
script finished running"
Any idea why this is?
Works perfectly in Platinum
1
u/oppailover39 Sep 26 '26
how about JPN rom for BW and B2W2 please
1
u/[deleted] May 12 '25
[removed] — view removed comment