• 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.

VPP DCC ☆ Ask questions & chat! *OLD*

Status
Not open for further replies.

Duck

🦆 quack quack
  • 5,750
    Posts
    3
    Years
    • he, they
    • Seen Feb 23, 2023
    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?)
     
  • 19,142
    Posts
    11
    Years
    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.
     

    Duck

    🦆 quack quack
  • 5,750
    Posts
    3
    Years
    • he, they
    • Seen Feb 23, 2023
    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.
     
  • 19,142
    Posts
    11
    Years
    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
     
  • 11,780
    Posts
    20
    Years
    • Seen Feb 9, 2024
    To me it sounds like you have this code and once you're done putting everything in it you smash it all together so it's hell to find something later...lol. That's the best way I can describe it. Pull it all apart, put in what you need to and then smash it back together again.
     

    Duck

    🦆 quack quack
  • 5,750
    Posts
    3
    Years
    • he, they
    • Seen Feb 23, 2023
    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.)
     
  • 19,142
    Posts
    11
    Years
    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!
     

    Duck

    🦆 quack quack
  • 5,750
    Posts
    3
    Years
    • he, they
    • Seen Feb 23, 2023
    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.
     
  • 23,695
    Posts
    11
    Years
    • She/Her, It/Its
    • Seen today
    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. ^^"
     
  • 19,142
    Posts
    11
    Years
    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?
     

    Duck

    🦆 quack quack
  • 5,750
    Posts
    3
    Years
    • he, they
    • Seen Feb 23, 2023
    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.
     
  • 11,780
    Posts
    20
    Years
    • Seen Feb 9, 2024
    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.
     
  • 19,142
    Posts
    11
    Years
    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.
     

    Duck

    🦆 quack quack
  • 5,750
    Posts
    3
    Years
    • he, they
    • Seen Feb 23, 2023
    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?
     
  • 23,695
    Posts
    11
    Years
    • She/Her, It/Its
    • Seen today
    And just to double check: does the End of Year giveaway include Alolan / Galarian formes?
    Regional Variant Pokemon have special requirements and therefor are not included in the giveaway, sorry! :(
     
  • 17,133
    Posts
    13
    Years
    • she / they
    • Seen Jan 12, 2024
    Congrats you two!

    I seem to be managing to lose posts somehow lmao.
     

    Duck

    🦆 quack quack
  • 5,750
    Posts
    3
    Years
    • he, they
    • Seen Feb 23, 2023
    Anybody wants to do a Tag Team? I'm mostly trying to work on Steel or Psychic types but I'm willing to do whatever I don't have, really
     
    Status
    Not open for further replies.
    Back
    Top