Difference between revisions of "Extensions:Character Pairings"

From Lorekeeper Wiki
Jump to navigation Jump to search
m
Tag: 2017 source edit
m (configuration part 1)
Tag: 2017 source edit
Line 1: Line 1:
 
{{Extensioninfobox|title=Character Pairings|desc=Allows two characters to be paired/bred for new MYO slots.|auth=Cylunny|status=testing|github={{Github|user=Cylunny|branch=lorekeeper/tree/extension/character-pairings}}|LKVer=2.1.2|migration=yes|package=no}}
 
{{Extensioninfobox|title=Character Pairings|desc=Allows two characters to be paired/bred for new MYO slots.|auth=Cylunny|status=testing|github={{Github|user=Cylunny|branch=lorekeeper/tree/extension/character-pairings}}|LKVer=2.1.2|migration=yes|package=no}}
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.  
+
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.
 +
 
 
== Installation ==
 
== Installation ==
 
* pull & deal with merge conflicts
 
* pull & deal with merge conflicts
 
* <code>php artisan add-site-settings</code>
 
* <code>php artisan add-site-settings</code>
* php artisan migrate
+
* <code>php artisan migrate</code>
* php artisan optimize x2
+
* <code>php artisan optimize</code> x2
* php artisan update-extension-tracker
+
* <code>php artisan update-extension-tracker</code>
  
 
== Configuration ==
 
== Configuration ==
<!-- Is any configuration necessary? Describe it here! -->
+
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 =====
 +
tbe
 +
 
 +
===== Boost Item Tag =====
 +
tbe
 +
 
 
== Usage ==
 
== Usage ==
 
<!-- Is there anything users should know about using your extension? -->
 
<!-- Is there anything users should know about using your extension? -->
 
== Troubleshooting ==
 
== Troubleshooting ==
<!-- Are there known issues or errors that require user action? Who should they contact, and where, for support? -->
+
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 ==
 
== Images ==
<!-- Do you have any images to show what it looks like in action? -->
+
 
 
== See Also ==
 
== See Also ==
<!-- Any relevant other pages. You may consider linking to related extensions, for instance. -->
+
If this extension helped you, feel free to support me on [https://ko-fi.com/cylunny Kofi]!

Revision as of 06:15, 5 September 2023

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.

Installation

  • pull & deal with merge conflicts
  • php artisan add-site-settings
  • php artisan migrate
  • php artisan optimize x2
  • php 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

tbe

Boost Item Tag

tbe

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!