• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Help With Changing Pokedex Info Placement

Ookiiushidesu

Lead Mapper/Eventer at Gen0
56
Posts
12
Years
    • Age 33
    • Seen May 27, 2016
    Hi all. I am doing some stuff different with the pokedex, and I would like to make the setup when you view the pokemon a bit differently.... I am not very good at coding, and don't really know how to work this out. I have an extremely small understanding of code. I can't provide a pic because I need to do 15+ posts, but I can send you a message with the picture for reference.

    If you can give me an alteration of the code to make this work out I would greatly appreciate it.

    Thanks!
     
    10,673
    Posts
    15
    Years
    • Seen Dec 30, 2023
    Alright, this may not be really straight forward if you're new to this, but I'm gonna try help you here. I'm assuming you have the newest essentials kit. This is actually simple enough in terms of scripting and so on, so if you take your time and follow these instructions you should be okay!

    So, all you'll really be doing is changing some x & y co-ordinates to achieve results here. I guess you know how they work. If you open up your script editor and find the script called PokemonPokedex and at line 598 you'll find this:

    [_ISPRINTF("No. {1:03d}{2:s}",indexNumber,PBSpecies.getName(species)),96*2,24*2,0,basecolor,shadowcolor]

    The numbers I bolded and underlined are the x & y co-ordinates for the pokemon number and the name of that species. So for example, #4 Charmander.

    Next at line 603 you'll find

    textpos.push([_ISPRINTF("{1:s} POKéMON",kind),100*2,40*2,0,basecolor,shadowcolor])


    Again I have bolded the x & y co-ordinates. This is for the Pokemon kind. Such as Lizard Pokemon.

    Next, lines 605 to 609 you'll see

    textpos.push([_ISPRINTF("{1:d}'{2:02d}\"",inches/12,inches%12),146*2,56*2,0,basecolor,shadowcolor])
    textpos.push([_ISPRINTF("{1:4.1f} lbs.",pounds/10.0),184*2,72*2,1,basecolor,shadowcolor])
    else
    textpos.push([_ISPRINTF("{1:.1f} m",height/10.0),184*2,56*2,1,basecolor,shadowcolor])
    textpos.push([_ISPRINTF("{1:.1f} kg",weight/10.0),184*2,72*2,1,basecolor,shadowcolor])


    Basically, the top two lines are for people living in the US, who use different measurement systems, and the bottom two are for everyone else. This defines the areas where width & height of the pokemon is displayed.
    At line 612:

    8*2,96*2,230*2,4,dexentry,basecolor,shadowcolor)


    The above are the values you must change to move the main information of the page. The pokemon's description if you will.

    At line 615:

    @sprites["overlay"].bitmap.blt(400,128,footprint,footprint.rect)


    This is what to change when you wish to move the footprint.

    At line 619:
    textpos.push([_INTL("????? POKéMON"),100*2,40*2,0,basecolor,shadowcolor])

    This is the co-ordinates for the pokemon kind, this should have the same co-ordinates that you set for line 603. It defines unknown pokemon kinds, ie. ones you have not caught.

    Lines 621 to 625:

    textpos.push([_INTL("??'??\""),146*2,56*2,0,basecolor,shadowcolor])
    textpos.push([_INTL("???.? lbs."),184*2,72*2,1,basecolor,shadowcolor])
    else
    textpos.push([_INTL("???.? m"),184*2,56*2,1,basecolor,shadowcolor])
    textpos.push([_INTL("???.? kg"),184*2,72*2,1,basecolor,shadowcolor])


    This defines unknown weight and height functions. This like the previous, should have the same co-ordinates as lines 605 to 609. Again, this will appear when you have seen but not captured a pokemon.

    This should be all the things you would need to reposition in the pokemon information screen in the pokedex. Depending on what you're trying to change, you may not need to move everything. But remember I have bolded and underlined the only parts of the code you need to worry about.

    At a glance this may seem complicated, but try do one bit at a time, and if you need help or anything feel free to ask more questions. Good luck!
     

    Ookiiushidesu

    Lead Mapper/Eventer at Gen0
    56
    Posts
    12
    Years
    • Age 33
    • Seen May 27, 2016
    Thank you very much! Most of this seems pretty understandable to me. I just have one qualm with it.

    At line 612:

    8*2,96*2,230*2,4,dexentry,basecolor,shadowcolor)

    The above are the values you must change to move the main information of the page. The pokemon's description if you will.

    This is for the flavor text of the pokemon, right? How do I make sure that it doesn't go off-screen? Like if I wanna make sure to confine it to the right half of the screen.

    ------------------------------
    |....poke..|.............|
    |....info...|....flavor...|
    |....here..|....text....|
    |............|....only....|
    |............|....here....|
    ------------------------------

    Or does it automatically go to the next line when it reaches the edge of the screen?
     
    10,673
    Posts
    15
    Years
    • Seen Dec 30, 2023
    Yes it is indeed. Well try moving the text first, and see if it does confine itself, if it does not show me a screenshot and the code you used and I'll see what I can do.
     

    Ookiiushidesu

    Lead Mapper/Eventer at Gen0
    56
    Posts
    12
    Years
    • Age 33
    • Seen May 27, 2016
    Alrighty!!! Thanks :) It will prolly be a little later tonight or tomorrow when I next get back to ya. Thanks again :)
     

    Maruno

    Lead Dev of Pokémon Essentials
    5,286
    Posts
    16
    Years
    • Seen May 3, 2024
    At line 612:

    8*2,96*2,230*2,4,dexentry,basecolor,shadowcolor)


    The above are the values you must change to move the main information of the page. The pokemon's description if you will.
    The 8 and 96 are the coordinates of the top left of the box in which the flavour text is written. 230 is the width of that box, and 4 is the number of lines in it.

    You'll need to reduce 230 to a smaller number (try 115 for starters), and perhaps increase the number of lines.
     
    10,673
    Posts
    15
    Years
    • Seen Dec 30, 2023
    Yeah Maruno is right, that'll help you choose how the text performs so that it does not spill out of the area you wish it to be in. Thought I'd mentioned it before, which is why I didn't in my most recent post. Regardless, just to clarify that that will help your issue on wanting to keep it to the right half of the screen.
     

    Ookiiushidesu

    Lead Mapper/Eventer at Gen0
    56
    Posts
    12
    Years
    • Age 33
    • Seen May 27, 2016
    Thank you for clarifying, Maruno!!!!!

    You didn't Abnegation :p But that's fine :) You still are a tremendous help with this :)

    Thanks again guys. I'm gonna try it out today.




    Forget it I found it guys!!!! Thanks :)
     
    Last edited:
    Back
    Top