Re-visiting the swap all coats Grease Monkey script

Previously I wrote a Grease Monkey script that swapped all the coats back to the v3 default coats for all of the breeds in the game, and it’s on v11 now, I think.  At the same time I was working on other scripts to swap only a single breed archetypes default coat, but that is problematic in that if you use that method you create an unnecessary amount of overhead if you don’t want to swap all of the coats, but only a few as they all run when the page loads because they all run on the same pages.  To prevent this from happening and clean the mess up I created a variant of the swap all script and called it the swap select script.  What this does is set up a set of variables that are either set to 1 or 0.  If the variable is set to 1, the script will swap that breed archetype’s coat otherwise it won’t.

Due to certain restrictions on Grease Monkey and JavaScript the variables that determine which breeds to swap and which to not swap have to be manually edited by the user.  The default for the variables sets them to 1, and anytime the script gets updated, any changes to the variables will be reset from what the user set them to.  To prevent the script from being updated automatically, you can go to the Add-ons manager in Firefox >> User Scripts tab, and go to the script titled “Howrse_Swap_Select_v4_v3_Default_Coats”, right-click and select the “Automatically check for updates” option at the bottom if there is a check-mark next to it.

I mentioned the swap is based on breed archetypes not specific breeds.  A breed archetype is how Owlient has categorized each breed to determine what coat directory to use.  For example, the Arabian Horse breed archetype is arabe.  The two breeds that use this archetype are the Arabian Horse and the Shagya Arabian breeds.  Another example would be the iberique archetype which is used by the Lusitano, Canadian, Peruvian Paso, Purebred Spanish Horse and Barb breeds.  It’s why some breeds look the same.  When they updated the coats to v4 they gave Tennessee Walkers their own directory, so they no longer use the trotteur archetype.

In the script each breed archetype variable is followed by a comment that specifies what breeds fall under that archetype.  If the breed whose coat you want to change back to the v3 coats falls under a specific breed archetype, the associated variable needs to be a 1.  If the variable associated with a breed archetype is 0 then all breeds that use that coat will not be swapped.  The default for the script is to swap all coat files.  If you don’t want all of the coats to be swapped, the script should be edited so that the breeds you don’t want swapped are set to 0.

The following is the only part the user needs to modify if they don’t want all of the coats for all of the breeds to be swapped.  Changing something elsewhere is likely to break the script.

//	Breed coat archetypes
	akhalTeke = 1;	//	Akhal-Teke
	americain = 1;	//	Appaloosa, Argentinean Criollo, Paint Horse, Quarter Horse
	arabe = 1;	//	Arabian Horse, Shagya Arabian
	curly = 1;	//	Curly
	fjord = 1;	//	Fjord
	frison = 1;	//	Friesian
	highlandPony = 1;	//	Highland Pony
	iberique = 1;	//	Barb, Canadian horse, Lusitano, Peruvian Paso, Purebred Spanish Horse
	knabstrup = 1;	//	Knabstrupper
	marwari = 1;	//	Marwari
	mustang = 1;	//	Mustang
	nokota = 1;	//	Nokota
	poneyLeger = 1;	//	Connemara
	poneyLourd = 1;	//	Chincoteague Pony
	poneyPrimitif = 1;	//	Newfoundland Pony
	poneySport = 1;	//	Australian Pony, Welsh
	primitif = 1;	//	Brumby, Icelandic horse
	shetland = 1;	//	Shetland
	sportLeger = 1;	//	Quarter Pony, Trakehner
	sportMassif = 1;	//	Hanoverian, Holsteiner, Irish Hunter, KWPN, Russian Don Horse
	thoroughbred = 1;	//	Thoroughbred
	tinker = 1;	//	Gypsy Vanner
	trotteur = 1;	//	Hackney, Morgan, Standardbred
	tenWalker = 1;	//	Tennessee Walker

If the script gets updated, the values in the section above in the script will be set back to 1.

MonkeyGuts:  Howrse Default Coat Swap Select

Greasy Fork:  Howrse Default Coat Swap Select

Since I only use the script on Firefox I cannot guarantee it will work on any browser other than Firefox, but it might.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s