Sprite Archive Location

Hello there! I recently posted on the Pokémon Showdown forums about this matter and I was directed here.

Recently, I've created a Pokémon Showdown server for my friends and I and got around to modifying it. I was looking to add some sprites, but couldn't find either the sprites nor references to a package containing the sprites in either the client package (where it would normally be found) nor the server (for whatever reason it might be there). I checked virtually everywhere, including inside the package contents and under the Pokémon Showdown Application Support folder (I'm on a Mac). If you guys would be able to help me find the location of the sprites folder so that I could add to it, I would appreciate it greatly.

For those who it helps, I am running Pokémon Showdown on a Macintosh computer (though I have access to both Windows and nogui Ubuntu Linux, where the server is hosted).

Thanks in advance!
 

Zarel

Not a Yuyuko fan
is a Site Content Manageris a Battle Simulator Administratoris a Programmeris a Pokemon Researcheris an Administrator
Creator of PS
Hello there! I recently posted on the Pokémon Showdown forums about this matter and I was directed here.

Recently, I've created a Pokémon Showdown server for my friends and I and got around to modifying it. I was looking to add some sprites, but couldn't find either the sprites nor references to a package containing the sprites in either the client package (where it would normally be found) nor the server (for whatever reason it might be there). I checked virtually everywhere, including inside the package contents and under the Pokémon Showdown Application Support folder (I'm on a Mac). If you guys would be able to help me find the location of the sprites folder so that I could add to it, I would appreciate it greatly.

For those who it helps, I am running Pokémon Showdown on a Macintosh computer (though I have access to both Windows and nogui Ubuntu Linux, where the server is hosted).
The client is just an embedded web browser that displays the actual client web site, and the sprites are stored on the web client.

For instance: http://play.pokemonshowdown.com/sprites/bwani/bulbasaur.gif

There's a lot that isn't currently modifiable that I plan on making modifiable later on.
 
Thanks For the Help!

Awesome. Is there a kludge you could put in place so that I could modify it soon? Even just a place in the config to relink it?

By the way, Zarel, as a fellow programmer, I look up to you as a role model. Thanks for replying and I wish you luck with your current project.

EDIT: I suppose you'd have to add a config, as the client itself doesn't have a config file yet. That or have the server send the sprite archive location to the client, which would then download the archive (or view directly from it).
 

Zarel

Not a Yuyuko fan
is a Site Content Manageris a Battle Simulator Administratoris a Programmeris a Pokemon Researcheris an Administrator
Creator of PS
I'm sorry, that would take a ton of work. It's work that I do plan on doing eventually, but right now there are a lot of things higher-priority on the to-do list, you know?

Having the server send a location for sprites to the client is indeed how I'd probably do it when I do get around to it, though, yes.
 

Zarel

Not a Yuyuko fan
is a Site Content Manageris a Battle Simulator Administratoris a Programmeris a Pokemon Researcheris an Administrator
Creator of PS
Heyyy, let's not be hasty. I don't want to overuse locking. What if someone else has a follow-up question?

Plus, having too many locked threads in a forum has always given me a sort of "draconian moderators" feel. :/
 
Okay, I'm sorry. In previous forums I've been on, it's been common practice to lock after one's done.

If you weren't going to change the client from now until then, I'd take a look at its source and try to help you with the modification. However, I have a feeling by the time I get it done, you'll be on to the next thing.
 
So I had some extra time and decided to try to take a look at the js you have on the webclient. I saw the getIcon function and wanted to check something.

Code:
	getIcon: function(pokemon,replacementURL) {
		var num = 0;
		if (pokemon === 'pokeball') {
			if (replacementURL != nil) {
				return 'background:transparent url(/sprites/bwicons-pokeball-sheet.png) no-repeat scroll -0px -8px';
			} else {
				return 'background:transparent url(replacementURL+"/sprites/bwicons-pokeball-sheet.png) no-repeat scroll -0px -8px';
			}
		}
	}
Could that work as a replacement URL function (I just took a snippet, obviously there's more)? It's a kludge, but with more time I could try implementing a better version for you if you don't have the time.
 

Zarel

Not a Yuyuko fan
is a Site Content Manageris a Battle Simulator Administratoris a Programmeris a Pokemon Researcheris an Administrator
Creator of PS
Well, if you do it that way, now you'll need to replace the getIcon call everywhere it appears. It'd be much easier for the replacement URL to be some sort of global.

Oh, and, that's just the icons. The sprites themselves are more complicated.
 
As I said, the way I did it was really shitty (thanks for being diplomatic about it, though). It was just a kludge to make sure I understood it. May I ask how the sprites are generated, or shall I just look through the code?

EDIT: I'll just take a look.
 

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

Top