Adding Sire and Dam links

Something players have wanted is a link to the Mare from the foal’s page so they can find the mare easier.  To this end I started work on a new script to add that link to the foal’s page.  However, after playing around with it, it seemed it would be even more useful to have the ability to go to the private page for either the sire and the dam of the foal, so I added a link to the sire as well.  Then, since I was adding links to the horse’s page I thought, wouldn’t it be great if the player had easy access to the public page link from the private page, and added a link for that as well.  This culminated in the following GreaseMonkey script: Add Sire/Dam/Public links

Here’s a public howrse page:

 photo publicHowrsePage.jpg

And a private howrse page:
 photo privateHowrsePage.jpg


Modifying Howrse with Greasemonkey

I use Adblock Plus which blocks all the ads which is great.  The issue on Howrse then becomes the 2 pixel wide border around the ad that doesn’t get blocked because it’s part of the HTML.  I could use the add-on to block the element the ad is in, but that messes up how the page displays because the background on the horse’s page is positioned so the horse is slightly below the center of the background by default when the horse’s page is in reduced landscape mode.  So I looked into using Greasemonkey to create a script to either move it or remove the border of the banner ad.  I’ve been able to both move the banner ad and remove the border for the banner ad.   Moving the banner ad requires modifying the named <div> tag (“banner”) the banner ad was displayed in to push the banner ad far enough off to the right you couldn’t see it.  This does, however, put a scroll bar on the bottom of the page due to the page width being increased, but there isn’t an unsightly empty border sitting in the middle of the page anymore.  Removing the banner ad’s border requires finding the div that has the border and setting the border to 0px wide.  The problem I had initially in doing this was I was searching for the tag that had the code the style-sheet used when I should have been lo0king for the style the browser was using since it converted the RGB color code to hex.  All in all, I call this a Win!

The script, as far as I know, only works on Firefox with the Greasemonkey add-on.  It might not seem like much, but it helps to not have the white rectangle sitting there.

The script is available here:  Howrse BannerAd mover

EDIT:  I did manage to write a script that can remove the border entirely which negates the need to move the box the banner ad is displayed in.

That script is available here: Howrse BannerAd Border remover

Without the Greasemonkey script moving the Banner Ad or, alternately, removing the border for the banner ad:

With the Greasemonkey Script moving the Banner Ad and/or removing the border of the banner ad:

Due to the impending changes to the default horse coats I’m working on a script that changes what image is displayed for the horse based on breed and coat color or simply what url is being used for the coat.

Howrse Background Template

With the change from the old background size to the new background size there is an issue with backgrounds conflicting with the game’s UI, parts of the background being chopped off by the browser’s UI and problems reading the text at the top of the page.  To this end I’ve created a .PNG template that highlights where certain elements of the game UI are and where the background gets cut-off by the top of the browser’s UI, at least in Firefox and Opera, and likely other browsers, and where the horse can actually be positioned.  The template itself should only be used as a general reference due to the background being centered on the page and moving left and right as the browser window/tab is widened or narrowed which will shift the game’s UI elements left and right over the background.

What I hope this does is allow the artists creating backgrounds to know where to put most of the work and help them design backgrounds so that the player can see most of the scene instead of having part of it chopped off.  For example, I saw one with a moon that was cut in half by the browser’s UI, and had the artist known that would happen they might have been able to avoid that by designing the background differently.  In other backgrounds the complexity of the background causes the text links at the top to be unreadable, but if the background in that area was less complex the text might be more readable.

There are two templates I’ve created, one without the UI elements marked and one with them marked.  If the one with the UI elements marked is used, the center section needs to be deleted before being merged with the layer containing the background.  The first link goes to Imageshack, and can be saved from there via right-click > “Save Image As”.  The second link goes to Mediafire, and needs to be downloaded via the link at the top because the image shown is only a preview of the image and is smaller.

EDIT:  Due to something changing with the display of newer backgrounds I’ve modified the template to reflect the backgrounds being shifted down so the top of the background is at the bottom of the browser’s UI.  At least it is in Firefox.  This isn’t the case with the older backgrounds that have been scaled up.

Background Template w/ blank center

Background Template w/ general UI element locations marked

The Triple Cross

There’s a variety of ways to cross horses, and a variety of types of crosses.  One type of cross I’ve worked with is the Triple Cross which is a multi-generation breeding project intended to develop a cross-bred horse that is a nearly even blend of three different breeds.  There are three methods of achieving this type of cross.  The easiest two involve a process I call flip-breeding in which the breeding is flipped between two extremes, and it has two variants, the other process is one I call a Triangle Breeding program due to how the three lines are bred together forming a triangle.

The flip method of breeding is rather simple, you start with two 50/50 crosses of breeds A/B and A/C.  Breed the 50/50 crosses to breed A creating a 75/25 A/B cross and a 75/25 A/C cross.  Breed the 75/25 A/B cross to breed B and the 75/25 A/C cross to breed C.  This will create a 37.5/62.5 A/B cross and 37.5/62.5 A/C cross.  The next generation breed those back to the A breed, and continue flipping the breed being bred back to each generation.  Eventually you will get to a point in which the horses will have about 33% of the A breed and 66% of the B and C breed.  Anytime the A breed is low in both horses, you can breed those together and the resulting horse will be close to having 33% of each breed.

The variant of this is to use a 50/50 cross of the B/C breeds to flip the breeding between a purebred of the A breed and the 50/50 cross.  This is much cleaner and simpler.  Simply start by breeding a purebred with the 50/50 cross to get a 50/25/25 (A/B/C) cross, and breed that to the purebred line A to get a 75/12.5/12.5 (A/B/C) cross.  The breed that to a 50/50 B/C cross to get a 37.5/32.25/32.25 (A/B/C) cross, and keep flipping the breeding between the purebred A line and the 50/50 B/C line.  Eventually you’ll get close to a 33/33/33 (A/B/C) triple cross in which the A breed should remain dominant throughout.  If instead of breeding the 50/25/25 (A/B/C) cross to the purebred A line you breed it to the 50/50 B/C cross instead, the dominant breed will vary between the B and C breeds somewhat randomly.

The final method is one I call the Triangle Breeding program which relies on a closed breeding pool of about 4 horses in each generation breeding them in, roughly, a triangle formation formed by 3 breeding lines of horses starting with purebred horses of breeds A, B and C.  Line A to Line B, Line B to Line C, Line C to Line A.  So, starting with 3 lines of purebreds, A, B and C, you breed Line A with Line B to create the next generation of Line A, Breed Line B with Line C to create the next generation of Line B and do the same with Line C and Line A to create the next generation of Line C.  Keep repeating this process with each successive generation of the three Lines (A, B and C) and by the 8th generation you will get to an almost even blend of 33% of each breed in the three lines with each line having one breed dominant over the other two, and by 21 generations there will be an even 33.33333% of each breed.

Each method will, in fact, hit the same points in the generational sequence at the same time, the first two methods; however, are far easier to manage and not as complicated to keep track of in the long run.

Some graphs from when I devised the Triangle Breeding program initially.

Easy Cross

On Howrse International I run a cross breeding project called Proekt Haos.  In order to figure out the best pair for breeding to get the foal either one or two generations down the line I wanted, I devised a spreadsheet method of doing this.  This endeavor, however, was time-consuming due to having to constantly copy and paste the cells, connect them to the next generation etc.  So I created a spreadsheet that would do all of this for me, and all I have to do now is enter the stats of the horses in question, including the breed percentages.  What I came up with after several modifications is what I call Easy Cross, a spreadsheet that can calculate, out to 6 generations, crosses based on the starting horses including truncation of the breeding list at 5 breeds, calculating out the new percentage based on a ratio.  All you have to do is enter the horses information on the first page, and the horses names on the second page at the top where the pairings are set.  The spreadsheet will then do the rest.  The spreadsheet also includes the higher GP horses for each breed (on the International version of Howrse), so you can use the name of the breed instead of having to look it up on the game and put the information in yourself.

The spreadsheet was created with Open Office, and I’m not sure if Excel would break it or not.

There are several sheets.  The first sheet (named Horses)  is where the player can enter the data for their horses: name, GP stats, breeds, percentages.  The GP doesn’t have to be entered as the sheet will auto-calculate that once the stats and the horse’s name as entered.  Some breed names are truncated like Arabian Horse is listed as Arabian, Paint Horse as Paint.

The second sheet is Easy Cross which is where the horses are entered at the top where they should appear in the genealogy tree, and the spreadsheet will do the rest.  The names have to be the same as entered either on the Horses sheet or by breed name.  If you pick a name for two horses or that is the same as one of the breeds, this will break the spreadsheet as it uses lookup functions to find all the information being referenced and one error early will cause errors to appear later.

The third sheet is Easy Cross List which is contains all the information being referenced on the Easy Cross sheet.  This contains no user modifiable data unless they want to update the breed stats for their version of the game or the stats become outdated.  As of creating the spreadsheet initially, the stats of the breeds were the top GP horses of each breed, and, as the GP increases daily, they probably aren’t the top GP for the breeds, most likely.

The fourth sheet is just some useful information about the spreadsheet.

I’ve hosted the file on MediaFire here: Easy Cross

As it was created using Open Office, and I do not have MS Excel installed I do not know if it is compatible with MS Excel.

A couple sceenshots of the spreadsheet (linked to the full-size image on imageshack)