Extensions:Character Pairings
Description | Allows two characters to be paired/bred for new MYO slots. |
---|---|
Author(s) | Cylunny |
Status | testing |
Github | lorekeeper/tree/extension/character-pairings |
LK Version | 2.1.2 |
Contains a Migration | |
A character breeding/pairing extension! This extension serves as a baseline and should be flexible enough for simple breeding systems, or for not yet existing ones! If your system is very specific, feel free to edit parts of this for your own use. For the sake of breeding, this also adds the sex field to characters (character images to be clear). This field is optional.
Contents
Installation
- pull & deal with merge conflicts
php artisan add-site-settings
php artisan migrate
php artisan optimize
x2php artisan update-extension-tracker
Configuration
While everything should be set up with a default value, you have a lot of configurations options!
Site Settings
Within your site settings, you will find these new fields:
- pairing_cooldown - 0: Disabled. Number of days to wait between pairing a character.
- pairing_female_percentage - 0: Disabled, do not roll sex. 1-100: Chance to generate a male offspring. Must total 100 with the pairing_male_percentage setting.
- pairing_male_percentage - 0: Disabled, do not roll sex. 1-100: Chance to generate a male offspring. Must total 100 with the pairing_female_percentage setting.
- pairing_sex_restrictions - 0: Any character can be paired. 1: Only male/female characters can be paired.
- pairing_trait_inheritance - Number between 0-100. Percentage chance to inherit traits from both parents upon generating offspring. Set 100 for always. Set 0 for never (or any value inbetween).
Existing Data
Rarities
Rarities have a new field that allows you to set the inherit chance for any trait of that rarity. For example, a common trait could be inherited 90% of the time, a rare one 25% of the time, etc. They should default to 50% upon running the migrations.
Species
Species have a new field that allows you to set the inherit chance of the species. They should default to 50 upon running the migrations. IMPORTANT NOTE: If one species is set to 50 and the other to 50, then the likelyhood of inheriting one is the same. However, if one species is set to 100 it does NOT mean it is inherited 100% of the time. If the second species is 50, then the total chance is 150, making the first species twice as likely to be inherited instead.
Subtypes
The same functionality as for species applies.
Trait Categories
Trait categories get two new fields that allow you to set a min and a max number of traits from this category that can be inherited. Let's say you have a trait category for wings and your character can only have one wing trait at a time. You can then set the wings category to inherit 0-1. Or, if you would like to always force a wing trait, 1-1. The default for all categories is 0-5.
New Item Tags
Two new item tags were added. One is the pairing item that is required for the user to create a pairing. The other is a boost item that can boost chances.
Pairing Item Tag
Lets you optionally configure what kind of pairing this item allows. The only mandatory setting is the min and max offspring/MYO slots that should be generated.
Basics
- min and max amount of offspring - Will pick a number between the two on every myo creation.
Optional The following can be left empty, in which case the traits, species and subtype are solely based on the two parent characters.
- Offspring Trait - meant to be used as a marker if two species/subtypes were paired and you would like to somehow make that apparent via a special trait. Does not affect pairings of the same species and subtype!
- Offspring Species - Forces this species onto every offspring generated. This species will be elegible for ALL traits!
- Offspring Subtype - Forces this subtype onto every offspring unless the offspring species does not match
Restrictions
- Species Exclusions - enter all species here that this item should not allow to be passed on. If one parent is an excluded species and the other is not, the offspring always is the legal species. If both parents are not valid, you may set a default species to be used instead. If there is no default species, it should not allow the pairing.
- Subtype Exclusions - enter all subtypes here that this item should not allow to be passed on. Works the same as species including an optional default, but the subtype must match the species.
- Trait Exclusions - enter all traits that should never be passed on here.
Boost Item Tag
Lets you create items that influence the chance of inheriting a trait of a certain rarity, or the chance of a site setting. Values set here always override the default rarity or setting chance. You could use this to make boost items that make females more likely, or that make rare traits more likely to appear. You must set either a setting or a rarity chance to be overwritten!
Settings Asks for a site setting to be overwritten and the new chance for it.
Rarities Asks for a rarity to be overwritten and the new chance for it.
Usage
Troubleshooting
As the process with all it's options is rather complex, I expect some issues here and there. If you find something, feel free to contact me- I am Cylunny on the lorekeeper discord!
Images
See Also
If this extension helped you, feel free to support me on Kofi!