Breeding Calculator

***ATTENTION*** As of July 11, 2013, TeamLava has royally broken their Dragon Story breeding code. There have been reports of the phantom colors emerging where there was no way for them to have been introduced via basic colors, minor color splitting, or special Diamond rules at all. This is a confirmed bug with the actual game, not the calculator. It is unintended behavior and hopefully TeamLava will fix it soon. They have announced that these bugs are the foundation for a "special surprise" due next week, but they have not explained anything. Until then, you may see strange impossible results emerge that are not listed in the calculator. ''' Refrain from spending any gold to speed up breedings while TeamLava's code is broken! ''' Knowing the company, it is unlikely that you will get your gold back, so do not spend it until everything is fixed.

Having issues using the calculator?

If you are still experiencing issues, you can try Hyper ch's external breeding tool.

DISCLAIMER: The Breeding Calculator is a player-updated tool. While we try our best to keep it up-to-date, TeamLava makes constant changes to the breeding rules, which can sometimes be implemented quickly, but other times they require a complete restructure of the code. If something happens in the game that doesn't match the results shown by the tool and the unexpected behavior continues AFTER you have cleared your cache, please report it.

Because things change from time to time, remember to clear your cache to get the updated code before you attempt to report an error. We appreciate your patience and cooperation. Thank you.

Breeding Outcomes
See what happens when you breed two dragons here.

''* Dragons with incubation times of longer than 24 hours will inaccurately display in the game rounded up to the next whole day when you first breed them (Ex: 25 hours gets rounded to 2 days). To determine how many hours the incubation will take, check the initial gold cost.''

BreedingCalculator

Breeding Possibilities
See which dragons you can use to breed your desired dragon here.

''* Dragon level, order, and species do not affect the probability of getting a rare dragon. To breed a desired dragon, you simply need the correct parents and enough patience.''

BreedingPairCalculator

BreedingCalculatorData

<!--Instructions to include new dragons:


 * Note: You must be logged in with admin rights to edit most of the pages in question. MediaWiki pages automatically place this requirement, although you can view the pages without any admin access.

1) Go to the http://dragon-story.wikia.com/wiki/MediaWiki:BreedingCalculatorData page. You won't see anything on the page; don't panic.  It's purposely set that way because we do not want the data to be displayed.  Just click to edit the page.

2) Find the big list of breeds = {...} where the majority of the information for dragons resides. You will want to scroll to the section where you can include the new dragon's data in alphabetical order.  Now, add a section that looks like one of the following.  Remember to include a comma after the } if the dragon is not the last one in the list.  Do not include a comma if the dragon is the last one in the list.  Remember to add the name WITHOUT spaces or punctuation (Ex: Change ice cream to icecream).

A more detailed explanation of each component of the data is included below the examples.



--- Examples of dragons that follow normal rules ---

air: { name: "Air", colors: ["yellow"], incubation: "2_hours_2", rarity: 1 },

titan: { name: "Titan", colors: ["red", "purple"], incubation: "32_hours_32", rarity: 2 },

--- Examples of dragons that involve special exceptions ---

clockwork: { name: "Clockwork", colors: ["yellow", "red"], incubation: "13_hours_13", rarity: 3, offspringeligibility: "goal" },

nightelf: { name: "Night Elf", colors: ["black"], incubation: "14_hours_14", rarity: 3, parents: ["colors", ["purple", ["colors", ["black"]]]] },

passion: { name: "Passion", colors: ["valentine"], incubation: "16_hours_16", rarity: 3, parents: ["id", "leftheart"], ["id", "rightheart"], parenteligibility: "purevalentine", offspringeligibility: "expired" },

infinity: { name: "Infinity", colors: ["diamond"], incubation: "40_hours_40", rarity: 4, expired: false, parents: ["id", "wizard"], ["colors", ["green", "yellow"], "colors", ["diamond", ["colors", ["diamond"]]]], specificoffspring: ["fire"] },



The basic skeleton of a dragon data entry is as follows:

id: { name: "", colors: [], incubation: "", rarity: }

--- id: ---

The name must be in lowercase and not have any punctuation. A dragon data entry should be included in alphabetical order in the list of dragon_data. Special dragon names such as "Ice Cream" or "Four-Leaf" should have ids of "icecream" (space removed) or "fourleaf" (hyphen removed) because these ids are treated as lookup keys and punctuation will cause an error.

--- name: ---

The name must have the correct capitalization and punctuation. For example, "IceCream" or "ice cream" are incorrect and should be written as "Ice Cream".

--- colors: ---

This is a list of the dragon's actual colors. Include each color in quotation marks ("") and include a comma following those quotes if the color is not the last one in the list. Include each color in the order that it should be displayed for that dragon. For example, the Eagle Dragon's entry should say colors: ["yellow", "red"] while the Firestorm Dragon's entry should say colors: ["red", "yellow"].

--- incubation: ---

Notice that each part of the incubation information is separated by an underscore (_).

The first part is the number that corresponds to the dragon's breeding time. If it's 2 hours, the first part will say 2. If it's 30 seconds, the first part will say 30.

The second part is the time measurement type. If it's 2 hours, the second part says hours. If it's 30 seconds, the second part says seconds.

The third part is the number that corresponds to the dragon's initial gold cost for speeding up. If it's 44 hours, the third part will say 44. If it's 15 seconds, the third part will say 1.

--- rarity: ---

This is the dragon's in-game rarity. Add in the number that corresponds to the keys:

Common = 1 Rare = 2 Super Rare = 3 Ultra Rare = 4

--- other potential properties (include only if needed) ---

Some special dragons may require extra property data. You should only include these if necessary.


 * parenteligibility*

If a dragon cannot be used as a parent, set the parenteligibility variable to the matching type. There is a list inside the parent_eligibility_explanations variable, which is located in the Breeding Calculator data file.

For example, if the matching type in the parent_eligibility_explanations variable for a particular dragon is "goldtype", this is how the property would look:

parenteligibility: "goldtype"

Remember, you do not need to include the parenteligibility variable if a dragon can be used as a parent.

Additionally, do not be afraid to add new types to the parent_eligibility_explanations variable as needed. It is as simple as adding the type and matching explanation to the data, then using that type in the parenteligibility variable for applicable dragons.


 * offspringeligibility*

If a dragon cannot be acquired as offspring, set the offspringeligibility variable to the matching type. There is a list inside the offspring_eligibility_explanations variable, which is located in the Breeding Calculator data file.

For example, if the matching type in the parent_eligibility_explanations variable for a particular dragon is "tournament", this is how the property would look:

offspringeligibility: "tournament"

Remember, you do not need to include the offspringeligibility variable of a dragon can be acquired as offspring.

Additionally, do not be afraid to add new types to the offspring_eligibility_explanations variable as needed. It is as simple as adding the type and matching explanation to the data, then using that type in the offspringeligibility variable for applicable dragons.


 * parents*

If a dragon has some specific rules attached to how it can be bred regardless of normal rules, add a list of rules, separated by commas and the appropriate brackets [], with the parents property.

To explain the needed brackets [] more clearly, below are several illustrations of empty rulesets for demonstration purposes only (you would never use these in practice, since you shouldn't include empty rules).

This is how an empty list of rules would look like:

parents: []

To add a rule, you must add another list within its own brackets, separating each rule by commas if there are multiple ones, such as with the Infinity Dragon. This is how a list of rules with empty rule(s) inside would look like:

parents: (one empty rule)

parents: ], [ (two empty rules)

Now, each rule comes in a pair. The first item in the rule involves the requirements for one parent, while the second item in the rule involves the requirements for the other parent. The order of requirements in a pair does not matter. This is how a list of rules with empty rules each holding an empty pair would look like:

parents: [], [] (one empty rule with an empty pair)

parents: [], [, ], [] (two empty rules, each holding an empty pair)

Now, each requirement in a pair will have a type of "id" or "colors". A requirement will be represented in a list of two elements with the type on the left side and the specifics on the right.

The id requirement contains a type "id" on the left and a dragon's id in quotes on the right, like so:

["id", "icecream"]

The colors requirement contains a type "colors" on the left and a list of colors in brackets, separated by commas if there are multiple colors, on the right, like so:

["colors", ["red"]] (only one color: red)

["colors", ["yellow","blue","green"]] (three colors: yellow, blue, green)

Now, let's say that one parent requirement must have the id icecream and the other parent must have the colors yellow, blue, and green. This is how you would put it into the parents field:

parents: ["id", "icecream"], ["colors", ["yellow", "blue", "green"]] (one rule with a pair containing an id requirement and a colors requirement)

Let's say that this fictional dragon has another set of rules aside from the one that we just added, and it can also be bred if each parent contributes the color red. This is how the parents field should look with both rules included (new line and spaces are optional and only done for clarity's sake):

parents: ["id", "icecream"], ["colors", ["yellow", "blue", "green"], "colors", ["red", ["colors", ["red"]]]]

In general, just make sure that every list has its own set of brackets [], every element is properly separated by a comma, every rule contains a pair of parent requirements, and every parent requirement contains a list with the type on the left and the specific requirement on the right (an id for the "id" type and a list of colors for the "colors" type).


 * specificoffspring*

If using a particular dragon as a parent will always result in specific dragons that don't follow the normal rules, add a list of the dragons in question, separated by commas, with the specificoffspring property. Remember to use the dragon's id, not its name ("icecream" rather than "Ice Cream"). Ex:

infinity: { name: "Infinity", colors: ["diamond"], incubation: "2_days_40", rarity: 4, specificoffspring: ["fire"] }

If, for example, the Infinity dragon would randomly produce Fire, Forest, or Angel dragons only (which disregards normal rules), then the property would look like this:

specificoffspring: ["fire", "forest", "angel"]



Don't forget the comma at the end of every line except the last one! Ex:

ruby: { name: "Ruby", colors: ["red"], incubation: "16_hours_16", rarity: 2, offspringeligibility: "crafted" }

3) Once you have entered all the new data, publish your changes. Go to the Breeding Calculator page. When you are there, edit the link by adding ?action=purge, so that the link looks like this:

http://dragon-story.wikia.com/wiki/Breeding_Calculator?action=purge

Then, press Enter (or Go or whatever) to make the browser do that action on the page. This should refresh the server cache.

If you have performed all the steps correctly, the changes should now be live for everyone! You should not have to clear your cache or do anything else.

If the newest dragon is not obeying the correct rules, re-check step 2. The data entered is most likely incorrect.

If your latest changes are still not showing up, there could be a caching issue. Make sure you performed ?action=purge after the most recent change. This will usually refresh the server cache immediately, but sometimes it is possible to take a few minutes.

If you have to change the MediaWiki:BreedingCalculatorData page, remember to go to the Breeding Calculator page and perform that ?action=purge again so that the changes are refreshed.

-->