• Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • 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.

VPP DCC ☆ Ask questions & chat! *OLD*

Status
Not open for further replies.
I mean, if you code and have pictures that have sensible names (or have your own server) you can cut a lot of boilerplate.

That's more or less how I'm doing my stats nowadays: the styling is all machine generated.

But yeah, doing it by hand can be very tedious, specially if you post a lot. (And from what little I remember way back from PE2K, a lot of people didn't really care even back then. Which I guess is part of the reason we stopped tracking this?)
 
I mean, if you code and have pictures that have sensible names (or have your own server) you can cut a lot of boilerplate.

That's more or less how I'm doing my stats nowadays: the styling is all machine generated.

But yeah, doing it by hand can be very tedious, specially if you post a lot. (And from what little I remember way back from PE2K, a lot of people didn't really care even back then. Which I guess is part of the reason we stopped tracking this?)
I'd love to see how it works and how you do it Pikaboo. I've been doing everything manually since the beginning because I can't code to save my life.
 
I could show the code, but it's a bit messy and not really that interesting.

The main takeway is: write your stats in a structured way so a computer can read it more easily. JSON is easy to read, easy to parse and most languages can deal with it out of the box nowadays.

So you'd have something like this:
Code:
{
    "medals": [
        {"type": "dragon",  "metal": "bronze"},
        // rest of medals here
    ],
    "ribbons": [
        "best friend",
        // rest of ribbon here
    ],
    "items": [
        "mega ring"
        // this is where i'd put the other items ... if I had any
    ],
    "points": [
        {"number": 70, "link": "https://www.pokecommunity.com/showthread.php?p=10250147#post10250147"},
        // rest of points here
    ],
   "challenges": [
        "gone mental",
        // other challenges here
    ],
    "pokemon": [
        {
            "species": "beheeyem",  "numbers": [12, 27, 187],
            "types": ["psychic"], "legends": ["psychic"],
            "challenge": "Gone Mental",
            "link": "https://www.pokecommunity.com/showthread.php?p=10250147#post10250147"
        },
       // other pokemon here
    ]
}

Then the insight here is that while the stats take a lot of BBCode, a lot of it doesn't carry information because everybody has the same BBCode.

So the code will just go and follow a basic checklist so to say, here's more or less a very simple version for Pokemon in pseudo-code.
Code:
for every pokemon in json.pokemon:
    // using float_begin instead of the beginning of the float tag because apparently bbcode is parsed within code tags
    write float_begin
    write pokemon.species
    
    for every type in pokemon.types:
       // stealing the type images from serebii
       write img_begin + "https://www.serebii.net/pokedex-bw/type/" + type + ".gif" + img_end
    
    write "]" + img_begin + "https://img.pokemondb.net/sprites/home/normal/" + pokemon.species + ".png" + img_end + float_end

Now, it can get a bit complicated-ish at times because things aren't perfectly structured. Some Pokemon were used in challenges, some Pokemon were used for legends, some were used for pairs / sets (and this is still something I need to fix on my own stats).

Some Pokemon don't have an image on pokemondb (like Crystal onix) so you need to start adding ifs all over the place. But the core idea is:
  1. Find a basic template
  2. Write your stats in a structured format that only has the blank information (e.g.: stuff like types, points, links, etc. Not stuff like images or bbcode)
  3. Write the code that will read in the stats, fill in the blanks and write the output to a file somewher

And then when you need to edit something, you edit the structured version, rerun the code and just copy paste whathever the code spits out. It'll also be easier because there's less chance you'll have a weird CSS error because you forgot to close a ']' somewhere in the middle of a giant table of images-in-links-in-floats-in-cds.
 
Ok so this is a lot to take in. You lost me at trying to run the whole thing so it outputs as your VPP stats thread. Do you just paste that whole code in the post editor and let it do it's thing? Or does it need to be run first in an IDE or something?

for context of how much I know about coding, I struggle to follow even basic w3 schools tutorials
 
Ok so this is a lot to take in. You lost me at trying to run the whole thing so it outputs as your VPP stats thread. Do you just paste that whole code in the post editor and let it do it's thing? Or does it need to be run first in an IDE or something?

for context of how much I know about coding, I struggle to follow even basic w3 schools tutorials

You write a code in some language.

This code will read a file the computer can understand - in my example there, it was JSON. But really, it could be any format you want as long as its not ambiguous and it's easy for you to muck around later.

Then the code will use the information from the file to fill a template. It will do so by being executed, this may be done via an IDE, via an interpreter, be compiled and then run, etc.

After the code runs, it will have printed the BBCode to a file. The contents of this file is what you copy and paste on the post editor here in PC.

Because this file format the computer understands will only have the bare essentials, editing it will be easier than editing your stats via the PC editor (no CSS to get in the way, nothing that will break with an extra line break, etc.

It also means it's harder for you to forget to add styling or stuff like that. (depending on how you do your code, you can even make it tell you if you forgot to add stuff like the post numbers or the link or etc.)
 
You write a code in some language.

This code will read a file the computer can understand - in my example there, it was JSON. But really, it could be any format you want as long as its not ambiguous and it's easy for you to muck around later.

Then the code will use the information from the file to fill a template. It will do so by being executed, this may be done via an IDE, via an interpreter, be compiled and then run, etc.

After the code runs, it will have printed the BBCode to a file. The contents of this file is what you copy and paste on the post editor here in PC.

Because this file format the computer understands will only have the bare essentials, editing it will be easier than editing your stats via the PC editor (no CSS to get in the way, nothing that will break with an extra line break, etc.

It also means it's harder for you to forget to add styling or stuff like that. (depending on how you do your code, you can even make it tell you if you forgot to add stuff like the post numbers or the link or etc.)

Ok it's starting to get a bit clearer. I like the sound of not needing to deal with CSS and possibly automating points calculations. I impulsively wanna invest some time learning a language now and then redoing my whole stats down the line lmao. But yeah thanks a bunch for these insights Pikaboo!
 
Ok it's starting to get a bit clearer. I like the sound of not needing to deal with CSS and possibly automating points calculations. I impulsively wanna invest some time learning a language now and then redoing my whole stats down the line lmao. But yeah thanks a bunch for these insights Pikaboo!

Just to be clear, you will have to deal with some CSS, if only when setting things up. But it will be a lot less work down the line.
If you do decide to do this I'd recommend languages like Python or Ruby since they're usually more beginner friendly.
 
This reminds me that I had a bunch of ideas for my own programming projects both on the user end as well as on the staff end that were supposed to make things a little bit easier. Though, being somewhat of a perfectionist while also having to deal with programming as my main job and some personal things going on certainly removed any sort of motivation I had. ^^"
 
Quick question regarding Furfrou btw, the different forms give it a different typing right, so are they all just that one type, or is it paired with its Normal typing? e.g. Star Furfrou, is it pure Ice type or Ice/Normal?
 
This reminds me that I had a bunch of ideas for my own programming projects both on the user end as well as on the staff end that were supposed to make things a little bit easier. Though, being somewhat of a perfectionist while also having to deal with programming as my main job and some personal things going on certainly removed any sort of motivation I had. ^^"

Yeah, originally I was going to do a way bigger scope and do a lot more things like also check for challenges and stuff.

I gave that up and settled for the bare minimum really quickly, lol.
 
Quick question regarding Furfrou btw, the different forms give it a different typing right, so are they all just that one type, or is it paired with its Normal typing? e.g. Star Furfrou, is it pure Ice type or Ice/Normal?

Furfrou (Natural) - Normal
Furfrou (Star) - Ice
Furfrou (Diamond) - Fire
Furfrou (Heart) - Psychic
Furfrou (Pharaoh) - Ghost
Furfrou (Kabuki) - Fighting
Furfrou (La Reine) - Steel
Furfrou (Matron) - Fairy
Furfrou (Dandy) - Grass
Furfrou (Debutante) - Electric

They all represent the single type.
 
Furfrou (Natural) - Normal
Furfrou (Star) - Ice
Furfrou (Diamond) - Fire
Furfrou (Heart) - Psychic
Furfrou (Pharaoh) - Ghost
Furfrou (Kabuki) - Fighting
Furfrou (La Reine) - Steel
Furfrou (Matron) - Fairy
Furfrou (Dandy) - Grass
Furfrou (Debutante) - Electric

They all represent the single type.
That's all I needed to hear. Catch me in the Mart real soon.
 
I think I mentioned it before in the feedback thread but Link Cables just don't seem kinda worth it, really.

I guess they're really endgame kinda stuff and a lot of the regulars I see in VPP nowadays aren't quite there like Fairy and Caite-chan.

And just to double check: does the End of Year giveaway include Alolan / Galarian formes?
 
I finished my half of Relicanth ^.^
 
Congrats you two!

I seem to be managing to lose posts somehow lmao.
 
Status
Not open for further replies.
Back
Top