-
-
Notifications
You must be signed in to change notification settings - Fork 3
Breeding Rules
Describes the rules for breeding two Pokemon. This object is a list of Rule objects, the Rules higher in the list are given priority over later ones; the first Rule to match the parents will be selected.
data/<NAMESPACE>/daycareplus/breeding_rules/<PRIMARY_PARENT>.json
The <NAMESPACE> is the namespace used in primary parent's id. The <PRIMARY_PARENT> is the path used in the primary parent's id.
For example, Pikachu has the id of cobblemon:pikachu. Creating breeding rules for Pikachu require creating a file:
data/cobblemon/daycareplus/breeding_rules/pikachu.json
Unlike typical datapack files, the top-level object is a JSON array, not a JSON object. Each item in the array is a JSON object describing a different Rule.
It exists in the form of:
[
{ },
{ },
{ }
]See below for a proper example.
| Field | Type | Default | Description |
|---|---|---|---|
| primary_parent | Pokemon Predicate | optional | A predicate that, if present, the mother or non-Ditto parent must pass. |
| secondary_parent | Pokemon Predicate | optional | A predicate that, if present, the father or Ditto parent must pass. |
| bypass_egg_group | Boolean | false |
Whether or not this rule should bypass egg group rules. |
| bypass_gender | Boolean | false |
Whether or not this rule should bypass gender rules. |
| offspring | List of Potential Offspring | The list of possible offspring to produce from this pair. |
When checking if a Rule matches the parents, Daycare+ will check if the parents have compatible egg groups and genders. If a Rule bypasses egg groups, then the egg group compatibility is ignored; similarly, if the Rule bypasses genders then the gender compatibility is ignored.
If the parents are compatible (or if compatibility is bypassed) and they match the predicates described by the Rule, then the Rule is valid for this pairing. The first valid Rule is the one that is used for breeding.
If multiple offspring are described by a Rule, then one is selected at random using their weights.
Daycare+ contains dozens of Breeding Rules to match the vanilla rules of Pokemon breeding. You can find the internal datapack here.
If either parent is a Pikachu holding a Light Ball, then the offspring is a Pichu that knows Volt Tackle.
[
{
"offspring": [
{
"pokemon": {
"moves": [
"volttackle"
],
"species": "pichu"
}
}
],
"primary_parent": {
"held_item": {
"whitelist": [
"lightball"
]
},
"species_showdown_ids": {
"whitelist": [
"pikachu"
]
}
}
},
{
"offspring": [
{
"pokemon": {
"moves": [
"volttackle"
],
"species": "pichu"
}
}
],
"secondary_parent": {
"held_item": {
"whitelist": [
"lightball"
]
},
"species_showdown_ids": {
"whitelist": [
"pikachu"
]
}
}
}
]Goomy does not have a Hisuian form, so Hisuian Goodra should produce Hisui-Biased Goomy instead. This requires a breeding rule instead of a property override because the parent and child have different forms.
[
{
"offspring": [
{
"pokemon": {
"features": {
"region_bias": "hisui"
},
"species": "goomy"
}
}
],
"primary_parent": {
"form_showdown_ids": {
"whitelist": [
"hisui"
]
}
}
}
]Datagen is provided for Breeding Rules, see the BreedingRuleGenerator as an example. Generators from sidemods should extend the BreedingRuleProvider class and are encouraged to use the BreedingRules builders.