Requesting a Tool to Generate Pokémon Stats ("Params") for Classes.json

● ARCHIVED · READ-ONLY
Started by OrphieBaby 20 posts View original ↗
  1. Resource Type: Database file for Classes.json, or software to generate one according to specifications

    Maker Format: MV

    Description:

    Hiya. First of all I would like to say that I am not sure where this topic belongs, so I put it here. Move it if it belongs somewhere else. ^^

    We are making a custom Gen VII Pokémon engine for RPG Maker MV that doesn't necessarily implement Trainers and which uses as few plugins as possible in order to make it more stable and to make it easier for others to use and to modify. As such, the Classes (which are Pokémon species) will each have their Parameter Curves for each level baked right into the Classes database page in the normal RPG Maker way (instead of using an external table called by a plugin, which is the way the Crystal Engine works).

    So all I am requesting is a practically default Classes.json but with completely filled Parameter Curves for the first 802 Pokémon in order of National Dex (ID 1 = Bulbasaur, ID 2 = Ivysaur, etc.). It actually should be pretty easy to automatically generate this Classes.json with software as long as we can extract the base stats, such as those from the Bulbapedia page (https://bulbapedia.bulbagarden.net/wiki/List_of_Pokémon_by_base_stats_(Generation_VII-present). Then all we need to do to fill out the database is a simple calculation:

    For each level gained (ignoring Nature), stats will increase by 1/50 the base stat value. The stat is rounded down if the result is a decimal. Shedinja's HP is always 1.

    Here is a sample of Classes.json with ID 1's (Bulbasaur's) HP already filled out by hand:

    {"id":1, ... "name":"Bulbasaur","note":"","params":[[0,12,14,16,18,21,23,25,27,29,32,34,36,38,40,43,45,47,49,51,54,56,58,60,63,65,67,69,71,74,76,78,80,82,85,87,89,91,93,96,98,100,102,105,107,109,111,113,116,118,120,124,126,129,131,133,135,138,140,142,144,147,149,151,153,156,158,160,162,164,167,169,171,173,176,178,180,182,185,187,189,191,194,196,198,200,202,205,207,209,211,214,216,218,220,223,225,227,229,231] ...

    So just seeing the Classes.json file should show you how the rest of it should look.

    Lastly, in our Parameter Curves, stats for Max MP and Luck will be 9999 and 1 respectively. The Classes.json can be "default", outside of that-- you don't even need to list the Class names (which will be the Pokémon species) if you don't want to. Also, ignore Nature, EVs, and IVs if you know about them. Natures will be handled by States.

    Thanks a bunch!
  2. I understand what you're looking for and may be able to craft a command line tool that generates this sort of information for you. However, do you want to pull this kind of stat information from something like Bulbapedia for example?

    That way it's more of an autogeneration of all the 802 Pokemon. If you have some more ideas on this.
    Like
    Where can I pull base stats from?
    Are we going to pull every possible stat and name them in the JSON?
    Are there any required calculations for the tool to autogenerate the stats?
  3. So when we pull this info, we're going to want to syntax it so that it will become a working Classes.json file usable by MV.

    I think Bulbapedia would be a great place to pull the stats from if it will work. If we create a tool that does that right from the page, it's possible we could use it for future Pokemon additions as well, for expandibility. But we could hypothetically pull from anywhere.

    We do want to pull the main six stats for sure: HP, Attack, Defense, Sp. Attack, Sp. Defense, and Speed. Other than that I don't know if there's anything to worry about for now. Things like EVs can be handled at a later date when we figure out if we can do this stuff plugin-free or not.

    It looks like I found a list of formulas on Bulbapedia used to calculate any Pokémon's stats if we know the Base Stat. I simplified them as shown below-- removing EVs, IVs, and Natures. They should be correct, but feel free to double-check:

    HP = ((2 x Base x Level)/100) + Level + 10

    Other Stats = ((2 x Base x Level)/100) + 5

    Obviously Sp. Attack will be M.Attack and Sp. Defense will be M.Defense. Max MP will be 9999 and Luck will be 1.

    Did I give you the information you were asking for?

    UPDATE: I also found this CSV: https://github.com/veekun/pokedex/blob/master/pokedex/data/csv/pokemon_stats.csv
  4. That CSV will be very useful I can write a small program to turn that into a JSON file. I'll probably use Python for this over JavaScript unless you want to do it internally in your rpgmakermv, then I'll use JavaScript.
  5. You can use either as long as in the end I can throw a working Classes.json made from your data into MV. That will mean it will show up on the parameter curves in the Database:

    Capture.PNG

    (For Max MP, you can use 9999 for everything and for Luck you can use 1.)

    Sorry if I'm repeating myself a little. I just want to make sure I understand what you are saying. :)

    Also, that CSV only has up to Gen VI Pokémon. I don't know whether to ask for the rest (the Gen VII ones) or not-- I don't know how hard it would be for you to do those too without the CSV.

    Also also, below is the default Classes.json (with the extension changed to ".txt").
  6. Well I converted all of them to a JSON file now instead of a csv file if there was another csv with the other gens could convert it to or combine the two.

    I'll need to run some filters for converting the stats into actual parameters.
  7. Yeah, it looked fairly easy for somebody to do with Notepad++ or something once you got all the stats calculated. Though I don't personally know how to RegEx or do other complicated things.
  8. Yea I have all the base stats in a file now; I have to go forward and look at how to map this to the classes.json way of showing stats.
    If anything, tell me which stats you want to correlate to what in your game. I think all the maxes are based off IDs rather than actual names; I'll see.
  9. http://prntscr.com/ftcuaw Here's some things that are present in a prettified version.
    My bad on the double post.
  10. Alright, so here is a screenshot of what we will be converting this to. The value for "base_stat" is all we care about:

    Capture.PNG

    We just do the calculation for each level (rounding down to the nearest integer).
  11. Since this is dealing with a json file, I'm moving this to Plugin Requests.
  12. Here's a temporary JSON file that has all the Pokemon stats compiled into a single readable format excluding the weird IDs near the end of the list in the original CSV format in text format that's easily convertable to JSON. About halfway there now.
  13. So I am a little confused, and I don't know if you understood what I was saying; but I'll clarify the best I can just in case there was a misunderstanding. Those stats you listed are called "base stats", but they are not the final stats used. They are just used to calculate the actual stats.

    For each level:
    HP = ((2 x Base Stat x Level)/100) + Level + 10

    Other Stats = ((2 x Base Stat x Level)/100) + 5

    Bulbasaur's base stat for HP as stated in the CSV is 45.

    So Max HP for ID 1 (Bulbasaur) at level 1 is: (2 x 45 x 1)/100 + 1 + 10 rounded down.
    = 11.9 rounded down = 11.

    And Max HP for ID 1 at level 100 is: (2 x 45 x 100)/100 + 100 + 10 rounded down.
    = 200.

    According to http://www.psypokes.com/dex/stats.php, when putting 0 for "DVs" and "EVs", that math is correct. So basically we need to use a program that will calculate all six values at each of the 100 levels and syntax them properly. To do it by hand would mean to list over 360,000 values by hand, which is why I was looking for help getting software to do it.
  14. It's not the finished product; It's only part of the work.

    Calculating the stats based on the information provided won't be so hard, but putting the stats in a format that's closer to MV's was necessary.

    The original csv file seperated each stat into one stat per object.

    MV stores classes and stat information in a single object.

    As you showed me:
    With a parameter array(each index refers to an MV stat by ID),
    ClassName,
    Traits,
    SP params, and anything else you may add to the editor.

    And each object refers to a single class.
    Using the formula, you mentioned above, I could generate the params array using base stats.

    I had to squash the stats into a workable object from two different sources. There's more work to be done before it's a complete classes.json. This is an intermediary step to make it easier to convert to MV.

    Also, you said you needed software to generate this sort of classes.json correct? You'll definitely need a base structure to work from, because unstructured data is harder to pull from.

    Dunno if this will work, but it should be in the right format: @SolemnDream

    You can check it out here:

    You can right click save as on the view raw link and turn it into a json file.
    The real file would lag out my browser ~ ~
  15. It looks like the file functions and the stats are right! Alright, so it looks like we have a couple other things to take care of. I wanted to make all Max MP 9999 and it isn't that for earlier levels. I wanted to make all Luck 1. Those are nitpicky, but I like consistency. Helps me solve problems better.

    Also, it appears levels only go up to 99. I'm going to look up whether or not I can change that...

    Thanks a ton! :D
  16. Oh okay, yea I can fix that if necessary and glad it works for you; that was a pretty fun little project to work on. ~
  17. Any updates on the Classes.json? Only reason I'm asking is because I previously missed when you said you did work, so maybe I missed it again. :p
  18. Ahh you want the version with MAX mp and Luck set to 9999 for all Pokemon yes? That's the only change?
  19. Max MP and minimum Luck (which is 1). That's the only change. Thanks! :D
  20. You can get the updated version from the same link; now both luck and max mp are set to 1 and 9999 respectively. :kaopride: