• The moderator of this forum is Austin.
  • Welcome to Smogon! Take a moment to read the Introduction to Smogon for a run-down on everything Smogon, and make sure you take some time to read the global rules.

Other Tampermonkey script for Gen 1 RB/RG/SW97 Sprites on Showdown

May

Need a cuppa...
is a Site Content Manager Alumnusis a Forum Moderator Alumnusis a Community Contributor Alumnusis a Researcher Alumnusis a Top Contributor Alumnus
1639153904847.png
What's that? You're tired of the same old RBY sprites on Pokemon Showdown? Or perhaps you grew up without Yellow and want to use the older sprite revisions. Well, have I got just the thing you need! With Tampermonkey installed in your browser and a little elbow grease, you can quite easily change the sprites to whatever you want! Or, in our case, sprites from other games. An anon sent me a script, which seems to have originated from here, which was edited a bit to suit PS. All in all, the real work I did here was a sprite stash, as well as some link replacement.

This wasn't difficult to sort out, as PS actually has the RB and RG sprites in its index, they just go (mostly) unused with the intention of adding features relating to them at a later date. I did, however, produce a Spaceworld 1997 package myself on GitHub, making the front and back sprites transparent while putting them on a PS canvas. This took...quite a long time to do, as I had to make a few assumptions as to what areas of the sprites are transparent or not. Regardless, this resulted in some new and improved back sprites that you can use for general enhancements as well, which I have made separate scripts for.

The steps to using this are quite simple;
  1. Install Tampermonkey in your browser. I use Firefox, but there's versions for most of them. It's just an extension for most, so it takes like 5 seconds.​
  2. Click the new icon that should be on your hotbar, and click "Create new Script...". A window should open with some scary code-lookin things.​
  3. From the options below, copy-paste the script in and save.​
  4. If you install multiple, go to "Installed Userscripts" and enable/disable according to what you want. Disable all of them to return to normality!​
And that's it! Simple as that, once enabled the scripts will do everything for you. You should be up and running within a minute. There is probably something for mobile, but if there is, I'm not aware of it.

If you want an easy place to get RBY sprites, use my RBY Sprites Project archive. Open an image in a new tab, and copy the link up to where the image itself is stored.

Here are the relevant scripts, install them all if you want to!
JavaScript:
// ==UserScript==
// @name         RB sprites
// @version      1.1
// @description  a
// @match        https://replay.pokemonshowdown.com/*
// @match        https://play.pokemonshowdown.com/*
// @grant        none
// ==/UserScript==


var interval = 0.3;


function imgReplace() {
    var images = document.getElementsByTagName('img'),
        len = images.length, img, i;
    for (i = 0; i < len; i += 1) {
        img = images[i];
        img.src = img.src.replace('https://play.pokemonshowdown.com/sprites/gen1/', 'https://raw.githubusercontent.com/PlagueVonKarma/rby-sprites-project/main/rb/gen1rb/');
        img.src = img.src.replace('https://play.pokemonshowdown.com/sprites/gen1-back/', 'https://raw.githubusercontent.com/PlagueVonKarma/rby-sprites-project/main/rg/gen1rgb-back/');
    }
}

setInterval(imgReplace, interval * 1000);
JavaScript:
// ==UserScript==
// @name         RG sprites
// @version      1.1
// @description  a
// @match        https://replay.pokemonshowdown.com/*
// @match        https://play.pokemonshowdown.com/*
// @grant        none
// ==/UserScript==


var interval = 0.3;


function imgReplace() {
    var images = document.getElementsByTagName('img'),
        len = images.length, img, i;
    for (i = 0; i < len; i += 1) {
        img = images[i];
        img.src = img.src.replace('https://play.pokemonshowdown.com/sprites/gen1/', 'https://raw.githubusercontent.com/PlagueVonKarma/rby-sprites-project/main/rg/gen1rg/BW-Fix/');
        img.src = img.src.replace('https://play.pokemonshowdown.com/sprites/gen1-back/', 'https://raw.githubusercontent.com/PlagueVonKarma/rby-sprites-project/main/rg/gen1rgb-back/BW-Fix/');
    }
}

setInterval(imgReplace, interval * 1000);
JavaScript:
// ==UserScript==
// @name         SW97 sprites
// @version      1.2
// @description  a
// @match        https://replay.pokemonshowdown.com/*
// @match        https://play.pokemonshowdown.com/*
// @grant        none
// ==/UserScript==


var interval = 0.3;


function imgReplace() {
    var images = document.getElementsByTagName('img'),
        len = images.length, img, i;
    for (i = 0; i < len; i += 1) {
        img = images[i];
        img.src = img.src.replace('https://play.pokemonshowdown.com/sprites/gen1/', 'https://raw.githubusercontent.com/PlagueVonKarma/rby-sprites-project/main/sw97/front/BW-Fix/');
        img.src = img.src.replace('https://play.pokemonshowdown.com/sprites/gen1-back/', 'https://raw.githubusercontent.com/PlagueVonKarma/rby-sprites-project/main/sw97/back/BW-Fix/');
    }
}

setInterval(imgReplace, interval * 1000);
JavaScript:
// ==UserScript==
// @name         May 1998 sprites
// @version      1.2
// @description  a
// @match        https://replay.pokemonshowdown.com/*
// @match        https://play.pokemonshowdown.com/*
// @grant        none
// ==/UserScript==


var interval = 0.3;


function imgReplace() {
    var images = document.getElementsByTagName('img'),
        len = images.length, img, i;
    for (i = 0; i < len; i += 1) {
        img = images[i];
        img.src = img.src.replace('https://play.pokemonshowdown.com/sprites/gen1/', 'https://raw.githubusercontent.com/PlagueVonKarma/rby-sprites-project/main/sw97/may98/front/BW-Fix/');
        img.src = img.src.replace('https://play.pokemonshowdown.com/sprites/gen1-back/', 'https://raw.githubusercontent.com/PlagueVonKarma/rby-sprites-project/main/sw97/may98/back/BW-Fix/');
    }
}

setInterval(imgReplace, interval * 1000);
JavaScript:
// ==UserScript==
// @name Yellow w/ Prototype Sprites
// @version 1.1
// @description a
// @match https://replay.pokemonshowdown.com/*
// @match https://play.pokemonshowdown.com/*
// @grant none
// ==/UserScript==

var interval = 0.3;

function imgReplace() {
    var images = document.getElementsByTagName('img'),
        len = images.length, img, i;
    for (i = 0; i < len; i += 1) {
        img = images[i];
        img.src = img.src.replace('https://play.pokemonshowdown.com/sprites/gen1/', 'https://raw.githubusercontent.com/PlagueVonKarma/rby-sprites-project/main/rb/gen1yellow-proto/');
    }
}

setInterval(imgReplace, interval * 1000);

JavaScript:
// ==UserScript==
// @name         RB + SW97 Back Sprites
// @version      1.1
// @description  a
// @match        https://replay.pokemonshowdown.com/*
// @match        https://play.pokemonshowdown.com/*
// @grant        none
// ==/UserScript==


var interval = 0.3;


function imgReplace() {
    var images = document.getElementsByTagName('img'),
        len = images.length, img, i;
    for (i = 0; i < len; i += 1) {
        img = images[i];
        img.src = img.src.replace('https://play.pokemonshowdown.com/sprites/gen1/', 'https://play.pokemonshowdown.com/sprites/gen1rb/BW-Fix/');
        img.src = img.src.replace('https://play.pokemonshowdown.com/sprites/gen1-back/', 'https://raw.githubusercontent.com/rby2k20/rby2k20/master/images/sprites/sw97-back/BW-Fix/');
    }
}

setInterval(imgReplace, interval * 1000);
JavaScript:
// ==UserScript==
// @name         RG + SW97 Back Sprites
// @version      1.1
// @description  a
// @match        https://replay.pokemonshowdown.com/*
// @match        https://play.pokemonshowdown.com/*
// @grant        none
// ==/UserScript==


var interval = 0.3;


function imgReplace() {
    var images = document.getElementsByTagName('img'),
        len = images.length, img, i;
    for (i = 0; i < len; i += 1) {
        img = images[i];
        img.src = img.src.replace('https://play.pokemonshowdown.com/sprites/gen1/', 'https://play.pokemonshowdown.com/sprites/gen1rg/BW-Fix/');
        img.src = img.src.replace('https://play.pokemonshowdown.com/sprites/gen1-back/', 'https://raw.githubusercontent.com/rby2k20/rby2k20/master/images/sprites/sw97-back/BW-Fix/');
    }
}

setInterval(imgReplace, interval * 1000);
JavaScript:
// ==UserScript==
// @name         SW97 Back Sprites
// @version      1.1
// @description  a
// @match        https://replay.pokemonshowdown.com/*
// @match        https://play.pokemonshowdown.com/*
// @grant        none
// ==/UserScript==


var interval = 0.3;


function imgReplace() {
    var images = document.getElementsByTagName('img'),
        len = images.length, img, i;
    for (i = 0; i < len; i += 1) {
        img = images[i];
        img.src = img.src.replace('https://play.pokemonshowdown.com/sprites/gen1-back/', 'https://raw.githubusercontent.com/rby2k20/rby2k20/master/images/sprites/sw97-back/BW-Fix/');
    }
}

setInterval(imgReplace, interval * 1000);

Relevant Notes;
  • If you install while PS is on an open tab, refresh it once you enable or disable a script for it to take effect if it doesn't already.
  • If you skip animations, you may see the Yellow sprites for a split second which breaks immersion; there's a helpful solution to other situations below.
  • Spaceworld 1997 / SW97 refers to the Gold & Silver prototype that was shown off at the Spaceworld 1997 event. The sprites here have an art style reminiscent of Red and Blue, featuring many unique sprites in the process, which is why I'm including them here.
    • Nidoking's SW97 back sprite is unfinished in the prototype, being placed higher than others. I simply moved it down in line with everything else, so nothing should come up.
    • SW97's back sprites sometimes have Pokemon positioned in full in various places, most notably with Psyduck. Thus, some positions may seem odd.
  • Technically, Yellow palettes could be applied to the back sprites, but it took forever just to make all of these sprites transparent, and I'm not feeling the motivation to go through all that palette replacement for what may not even look good.
If your PC chugs or you see the Yellow sprites momentarily for some reason, change the number on the following code line;
Code:
var interval = 0.3
If you're running slowly, go up to 0.5 or something. If you're already doing fine, you could go down to like 0.1 like a god. This whole thing is scuffed as hell but since the sprites can change at any time it kinda has to be here. Breaks immersion sometimes, but it is what it is. Works fine enough.

"Hey PvK, can I do this for other gens???"
Absolutely, just a bit of link editing can work so long as it's in the index of sprites. Edit off the RB sprites one and you'll have it sorted in no time.

Anyway, I shall now flee to the safety of my dark room, this took way too long.
 
Last edited:

May

Need a cuppa...
is a Site Content Manager Alumnusis a Forum Moderator Alumnusis a Community Contributor Alumnusis a Researcher Alumnusis a Top Contributor Alumnus
Updated the OP with an extra script for May '98 sprites, as well as new links to where the images are stored. The new storage area? My big stupid RBY Sprite Project. Hope it helps anyone who uses this sort of thing.

Here's Moltres, with the May '98 sprite script active. This was the first time it ever reached the design we know in modern. Interesting, eh?
1655169296817.png


EDIT: Prototype Yellow script added too!
 
Last edited:

May

Need a cuppa...
is a Site Content Manager Alumnusis a Forum Moderator Alumnusis a Community Contributor Alumnusis a Researcher Alumnusis a Top Contributor Alumnus
A new update, folks!

The RBY Sprites Project has been updated with more sprites, but nothing necessarily new. Instead, with Frrf's tremendous assistance, we now have colour-corrected versions of RG, RB, SW97, and May 98 sprites. These change your grey/pink-ish sprites to a pristine white that showcases how the sprites were meant to look when not imprisoned by the Game Boy's odd screen.

It's difficult to tell the difference at a glance, but compare these images...
1660163123557.png

1660163118942.png

See how much clearer the Chansey is when its grey isn't blending in? No? Just me? Oh well, I know I can see the difference and it has me make happy noises.

You can upgrade your scripts by adding BW-Fix/ to the end of your current scripts. The ones I put in my OP have this appended as well!
 
Hey, I edited your script to play with FRLG sprites in ADV, and it works like a charm, thanks a lot for this !! However there one downsight I cannot seem to solve unless I deactivate the script while not playing ADV:

If I play a gen with animated sprites (5 6 7 8) with the script on, the animations will be messed up, like looping over and over way too early and not getting the full animation going on, I suppose it has to do with the var interval but I tried some different values and nothing really worked for me
 

May

Need a cuppa...
is a Site Content Manager Alumnusis a Forum Moderator Alumnusis a Community Contributor Alumnusis a Researcher Alumnusis a Top Contributor Alumnus
Hey, I edited your script to work with FRLG sprites, and it works like a charm, thanks a lot for this !! However there one downsight I cannot seem to solve unless I deactivate the script while not playing ADV:

If I play a gen with animated sprites (5 6 7 8) with the script on, the animations will be messed up, like looping over and over way too early and not getting the full animation going on, I suppose it has to do with the var interval but I tried some different values and nothing really worked for me
Oh yeah, you'll need to turn it off when working with any gen past 4, as they use static images. What the script does is just repeatedly change the image to the new one, essentially, even if it's already done. It's inconvenient but the best way I could find. There may be a better way out there, but right now, I don't know.
 
Oh yeah, you'll need to turn it off when working with any gen past 4, as they use static images. What the script does is just repeatedly change the image to the new one, essentially, even if it's already done. It's inconvenient but the best way I could find. There may be a better way out there, but right now, I don't know.
oh okay, well I'll just deal with it, I wanted to use FRLG sprites for so long I don't mind that slight inconvenience haha
Thanks again for that great tool, here's the script edited to use FRLG sprites in ADV if anyone wants it:


Code:
// ==UserScript==
// @name         FRLG Sprites
// @version      1.1
// @description  a
// @match        https://replay.pokemonshowdown.com/*
// @match        https://play.pokemonshowdown.com/*
// @grant        none
// ==/UserScript==


var interval = 1;


function imgReplace() {
    var images = document.getElementsByTagName('img'),
        len = images.length, img, i;
    for (i = 0; i < len; i += 1) {
        img = images[i];
        img.src = img.src.replace('https://play.pokemonshowdown.com/sprites/gen3/', 'https://play.pokemonshowdown.com/sprites/gen3frlg/');
    }
}

setInterval(imgReplace, interval * 1000);

(Sadly shinies will still appear in RSE sprites cuz the FRLG shinies are not in the sprite index)
 

Users Who Are Viewing This Thread (Users: 1, Guests: 0)

Top