1. New to the forums? Check out our Mentorship Program!
    Our mentors will answer your questions and help you become a part of the community!
  2. Welcome to Smogon Forums! Please take a minute to read the rules.

Programming Smogon Sprite Generator

Discussion in 'Technical Projects' started by sandshrewz, May 25, 2013.

  1. sandshrewz

    sandshrewz
    is a Site Staff Alumnusis an Artist Alumnusis a Forum Moderator Alumnusis a Contributor Alumnusis a Smogon Media Contributor Alumnusis a Battle Server Moderator Alumnus

    Joined:
    Oct 18, 2010
    Messages:
    2,439
    itt sandshrewz creates not very important but useful stuff

    For many HTMLers, it is annoying when the article do not use Smogon sprites and they'll have to dig them up from going to the analyses etc and c/p the image url to use. Article writers themselves have to do the same thing to obtain the sprites. So I went to make a small script that lets you pick the sprites, including from different generations. It also provides you the full URL, the HTML of the image (with the shortened URL so it doesn't have the 'http://www.smogon.com' thing), and also in BBCode. I haven't tried to figure out how to use Flash to make the thing auto c/p when you click the text, but it will automatically highlight the text when you click on it for faster c/p. It's written in JavaScript so make sure you have it on! Who turns it off anyway >_>

    LINK

    The arrangement of the Pokemon under the option form follows the order in this thread. Just type in the Pokemon name and you can find it :) Anyway I intend to expand this to include sprites from Pokemon Showdown in future as well~ But that's all for now! :) It's not a major project but I hope it'll save time for HTMLers and writers alike! Let me know if you find any bugs or anything wrong with it. Suggestions are welcome too! Thanks! :)

    Credits
    sirndpt and Ray Jay for compiling all the Smogon sprites in order here :D

    [Updates]

    It now works fully with XY Sprites hosted on Smogon :D
    Last edited: Oct 24, 2013
    Antar likes this.
  2. Calm Pokemaster

    Calm Pokemaster
    is a member of the Site Staffis a Forum Moderatoris a Contributor to Smogonis a Smogon Media Contributor
    Moderator

    Joined:
    Dec 18, 2009
    Messages:
    1,721
    zomg this script is fucking incredible

    Now I don't have to go hunting for sprites again when I do HTML ^__^

    /me luvdisc
  3. Jukain

    Jukain .leaf
    is a member of the Site Staffis a Forum Moderatoris a Community Contributoris a Tiering Contributoris a Contributor to Smogonis a Smogon Media Contributor
    Moderator

    Joined:
    Feb 25, 2011
    Messages:
    4,011
    omfg ty so much!
  4. The Unlucky one

    The Unlucky one

    Joined:
    Jun 5, 2012
    Messages:
    963
    Luvdisc! Don't do much HTML but will definitely help
  5. NixHex

    NixHex No excuses
    is a member of the Site Staffis a Forum Moderatoris a Pokemon Researcheris a Contributor to Smogonis a Battle Server Moderator
    Moderator

    Joined:
    Oct 6, 2009
    Messages:
    2,632
    You may want to output the [pimg] bbcode too since no one wants to memorize Pokemon numbers ;)

    Awesome contribution as usual shrewz.
  6. sandshrewz

    sandshrewz
    is a Site Staff Alumnusis an Artist Alumnusis a Forum Moderator Alumnusis a Contributor Alumnusis a Smogon Media Contributor Alumnusis a Battle Server Moderator Alumnus

    Joined:
    Oct 18, 2010
    Messages:
    2,439
    Wow thanks for the positive comments guys! :D

    Haha idg the memorizing part ?_? There's already an output for the usual [​IMG]
  7. Spaniard10

    Spaniard10

    Joined:
    May 26, 2013
    Messages:
    5
    This is great!
  8. GCSChris

    GCSChris

    Joined:
    Dec 25, 2012
    Messages:
    434
    Although I do not HTML that much, you are a great person for making this. So helpful!
  9. Sopan

    Sopan

    Joined:
    Apr 2, 2012
    Messages:
    12
    Very helpful app! Gratz on making it, sandshrewz! :D
  10. Pikachuun

    Pikachuun

    Joined:
    Dec 27, 2012
    Messages:
    1,367
    Finally, something that I can use to plop Pokemon Sprites into discussions without searching for days!

    [​IMG]
  11. Furai

    Furai wellfare
    is a Site Staff Alumnusis a Team Rater Alumnusis a Forum Moderator Alumnusis a Community Contributor Alumnusis a Contributor Alumnusis a Smogon Media Contributor Alumnusis a Past SPL Winner

    Joined:
    May 4, 2010
    Messages:
    2,844
    could you add a reverse search btw? as in you put in the smog # and it gives you the pkmn :)
  12. Layell

    Layell Alas poor Yorick, I knew him, Peter Gabriel too!
    is an Artistis a Forum Moderatoris a Pokemon Researcheris a Smogon Media Contributoris a Community Contributor Alumnus
    Sprite Leader

    Joined:
    Nov 5, 2006
    Messages:
    3,260
  13. sandshrewz

    sandshrewz
    is a Site Staff Alumnusis an Artist Alumnusis a Forum Moderator Alumnusis a Contributor Alumnusis a Smogon Media Contributor Alumnusis a Battle Server Moderator Alumnus

    Joined:
    Oct 18, 2010
    Messages:
    2,439
    Lmao. Layell do you want me to update now or when everything is completed? With names for sprites that won't be too hard to update I think.

    Edit: actually I think I'll update the script and put it on SCMS so it'll automatically update update without me having to edit it every time.
    Last edited: Oct 10, 2013
  14. Layell

    Layell Alas poor Yorick, I knew him, Peter Gabriel too!
    is an Artistis a Forum Moderatoris a Pokemon Researcheris a Smogon Media Contributoris a Community Contributor Alumnus
    Sprite Leader

    Joined:
    Nov 5, 2006
    Messages:
    3,260
    however works well for you, we can wait until my entries are stable. But that will take a while so I leave it to you.
  15. sandshrewz

    sandshrewz
    is a Site Staff Alumnusis an Artist Alumnusis a Forum Moderator Alumnusis a Contributor Alumnusis a Smogon Media Contributor Alumnusis a Battle Server Moderator Alumnus

    Joined:
    Oct 18, 2010
    Messages:
    2,439
    http://www.smogon.com/teambuilder/sprite_generator

    !_! It's not complete but it lets you grab the XY front sprites real quick and has an output for BBCode and HTML for easy use. I'll make it work for back/shiny/animated sprites etc sometime.

    (gosh capitalizing names using regex can be a pain...)
  16. sandshrewz

    sandshrewz
    is a Site Staff Alumnusis an Artist Alumnusis a Forum Moderator Alumnusis a Contributor Alumnusis a Smogon Media Contributor Alumnusis a Battle Server Moderator Alumnus

    Joined:
    Oct 18, 2010
    Messages:
    2,439
    You can now swap between fron and back sprites. If the current Pokemon you're viewing has the front / back sprite, it'll automatically go to the respective sprite. For example, if you're viewing Absol-Mega front and you changed it to back, it'll go to Absol-Mega back.

    ALSO. The cool thing that isn't noticeable is that once you load either the front or back sprites, it doesn't need to reload the data / sprites from smogon until you refresh / close the page. It makes stuff faster when you swap around between front / back sprites :D

    more to come in future. Animated and Shiny is still unimplemented for now.
  17. sandshrewz

    sandshrewz
    is a Site Staff Alumnusis an Artist Alumnusis a Forum Moderator Alumnusis a Contributor Alumnusis a Smogon Media Contributor Alumnusis a Battle Server Moderator Alumnus

    Joined:
    Oct 18, 2010
    Messages:
    2,439
    Animated option now works. I did it in a jiffy so lemme know if there's any bug.

    Will work on Shiny option tmr since I gotta sleep now~ :)
  18. sandshrewz

    sandshrewz
    is a Site Staff Alumnusis an Artist Alumnusis a Forum Moderator Alumnusis a Contributor Alumnusis a Smogon Media Contributor Alumnusis a Battle Server Moderator Alumnus

    Joined:
    Oct 18, 2010
    Messages:
    2,439
    Quadruple post ?_?

    Implemented Shiny option. Note that there are currently no Animated AND Shiny sprites so far. Hence, if you check both Animated and Shiny, it'll just ignore the Shiny one and give you the Animated one, for now at least till shiny animated are on-site. Also tidied up about and it looks nicer now.

    It's done now :D till when shiny animated mons come in haha. Have fun! :)
  19. Layell

    Layell Alas poor Yorick, I knew him, Peter Gabriel too!
    is an Artistis a Forum Moderatoris a Pokemon Researcheris a Smogon Media Contributoris a Community Contributor Alumnus
    Sprite Leader

    Joined:
    Nov 5, 2006
    Messages:
    3,260
    In stopping sandz from this awful consecutive posting here are the latest changes.

    -Animated shiny is now an option, click both animated and shiny. More will be added in time, right now there is a grand total of two mons

    -A credit page to the XY sprite thread is part of the page
  20. sandshrewz

    sandshrewz
    is a Site Staff Alumnusis an Artist Alumnusis a Forum Moderator Alumnusis a Contributor Alumnusis a Smogon Media Contributor Alumnusis a Battle Server Moderator Alumnus

    Joined:
    Oct 18, 2010
    Messages:
    2,439
    /me smack Layell x)

    Also ya the credit thing is Layell's idea~
  21. apt-get

    apt-get platinum happy
    is a Community Contributoris a Tiering Contributor

    Joined:
    Aug 19, 2012
    Messages:
    604
    BBcode is buggy for gen VI pokémon: the second img tag doesn't have slash. [ img ] → [ / img ]
  22. sandshrewz

    sandshrewz
    is a Site Staff Alumnusis an Artist Alumnusis a Forum Moderator Alumnusis a Contributor Alumnusis a Smogon Media Contributor Alumnusis a Battle Server Moderator Alumnus

    Joined:
    Oct 18, 2010
    Messages:
    2,439
    LOL OOPS typoed that. Thanks! This is fixed :)

Users Viewing Thread (Users: 0, Guests: 0)