• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
  • Eevee Expo's webhost has been having technical issues since Nov. 20th and you might be unable to connect to our site. Staff are also facing issues connecting, so please send a DM to Cat on-site or through Discord directly for faster service!
Resource icon

Display IV/EVs in Summary Screen 17.2

Please note! This tutorial is super out-of-date and honestly wasn't put together that well when it was first made, haha. If you're looking for displaying IVs and EVs, I highly recommend Sir Weibrot's Stat Screen+!

In script section PScreen_Summary, find def drawPageThree. This is what defines what appears when the player looks at the third page of the summary section. The textpos = [part of it defines what text will be drawn.

Replace the existing text with this code:
Ruby:
Expand Collapse Copy
       [_INTL("HP"),292,76,2,base,shadow],
       [sprintf("%d/%d",@pokemon.hp,@pokemon.totalhp),420,76,1,Color.new(64,64,64),Color.new(176,176,176)],
       [sprintf("%d/%d",@pokemon.iv[0],@pokemon.ev[0]),475,76,1,Color.new(64,64,64),Color.new(176,176,176)],
       [_INTL("Attack"),248,120,0,base,statshadows[0]],
       [sprintf("%d",@pokemon.attack),400,120,1,Color.new(64,64,64),Color.new(176,176,176)],
       [sprintf("%d/%d",@pokemon.iv[1],@pokemon.ev[1]),475,120,1,Color.new(64,64,64),Color.new(176,176,176)],
       [_INTL("Defense"),248,152,0,base,statshadows[1]],
       [sprintf("%d",@pokemon.defense),400,152,1,Color.new(64,64,64),Color.new(176,176,176)],
       [sprintf("%d/%d",@pokemon.iv[2],@pokemon.ev[2]),475,152,1,Color.new(64,64,64),Color.new(176,176,176)],
       [_INTL("Sp. Atk"),248,184,0,base,statshadows[3]],
       [sprintf("%d",@pokemon.spatk),400,184,1,Color.new(64,64,64),Color.new(176,176,176)],
       [sprintf("%d/%d",@pokemon.iv[4],@pokemon.ev[4]),475,184,1,Color.new(64,64,64),Color.new(176,176,176)],
       [_INTL("Sp. Def"),248,216,0,base,statshadows[4]],
       [sprintf("%d",@pokemon.spdef),400,216,1,Color.new(64,64,64),Color.new(176,176,176)],
       [sprintf("%d/%d",@pokemon.iv[5],@pokemon.ev[5]),475,216,1,Color.new(64,64,64),Color.new(176,176,176)],
       [_INTL("Speed"),248,248,0,base,statshadows[2]],
       [sprintf("%d",@pokemon.speed),400,248,1,Color.new(64,64,64),Color.new(176,176,176)],
       [sprintf("%d/%d",@pokemon.iv[3],@pokemon.ev[3]),475,248,1,Color.new(64,64,64),Color.new(176,176,176)],
       [_INTL("Ability"),224,284,0,base,shadow],
       [PBAbilities.getName(@pokemon.ability),362,284,0,Color.new(64,64,64),Color.new(176,176,176)],

The result will look like this:
tumblr_pkl9qnDuWD1w5miaho1_1280.png




How could we edit this code? Let's look at a line and what its components are.

[sprintf("%d",@pokemon.defense),400,152,1,Color.new(64,64,64),Color.new(176,176,176)],

  • [sprintf is the code used to start a line where you draw a variable. ("%d" decides how it will be written, with %d being the variable pulled. If you use multiple variables, you will need more %d included in the quotation marks. Some defined characters may be used, such as the / shown here.
  • Before the ), you will put where you want the variables to be pulled from. They will be substituted for the %d in the same order-the first variable will go in the first %d, the second in the second, and so on.
  • If you want to draw text that doesn't vary, like the word "Defense" that comes before this, then you would instead use [_INTL. All you would need in your (" ") is the text you want to write.
  • The two variables after the ) are the X and Y of your text's position. X is its position horizontally-0 is the farthest left, and as the numbers climb up, the text is moved farther right. Y is its position vertically-0 is the farthest up, and as the numbers climb up, the text is moved farther down.
  • Hey, I'm very dumb and thought the third value here was a Z-value. It is not! The third value is about what this coordinate will be. If this third value is 0, your XY coordinates will be the left side of the text, it it's 1, it'll be the right side, If it's 2, it will be the center of the text. (This is useful if your text has varying lengths)
  • Color.new(64,64,64) determines the first color that will be used to draw the text. It's written in RGB format. Essentials has some default colors that function the same as this, like the base and shadow used in Defense, but they're usually defined in the script section.
  • Color.new(176,176,176), because it comes after the previous Color.new, determines the color used to write the text's shadow. It works exactly the same, it just writes slightly down and to the right, to give the shadow effect. (You can only draw one base and one shadow in a line, though- adding a third color won't give you a shadow to the shadow, it'll just give you an error)
  • ], ,close our [ and get it ready for the next-it's very important not to forget them!

What could we do with this information? Pretty much anything! We can change the color scheme to suit a new background, rearrange the text for different borders, or even ditch the list format altogether! Try messing around and see what designs you can come up with!
tumblr_pklc1s0Iie1w5miaho1_640.png

I really like Bulbapedia's stat colors, though they don't translate well to the default background. (And I also overwrote the colors indicating stats affected by natures here)
Credits
If you plugged in my code directly, I'd appreciate credits to TechSkylander1518. If you made any kind of edits, no credit needed!
  • Like
Reactions: azuwazuzone
Author
TechSkylander1518
Views
1,651
First release
Last update

Ratings

0.00 star(s) 0 ratings

More resources from TechSkylander1518

Back
Top