Extensions:Trait Item Tag
Description | Allows you to create items that grant trait(s) if the user attaches it to a design update or myo approval request. |
---|---|
Author(s) | Cylunny |
Status | testing |
Github | extension/trait-item-tags |
LK Version | 2.1.3 |
Contains a Migration | |
An item tag called "trait" that, when added to an item, allows you to select trait(s) that the item can grant a character. Beware that when installing this extension, users will be unable to freely choose traits on design submissions! The purpose of this extension is to limit the trait choices the user has and to make sure they can only select traits that they own the item for. There are a couple of ways you can configure this to work, such as:
- One item grants one trait
- One item grants one trait from a selection of traits
- One item grants any amount from a selection of traits
It also adds a trait remover item tag, which makes it so users may only remove traits during a design update if they attach a trait remover item. You can also configure if you wish to use such an item, or always let users remove traits freely.
As such, the new work flow using this extension would be something like:
- User adds trait item to request
- Trait tab is automatically filled with the trait(s) that the item grants
- User selects trait from choice, or simply saves the one available trait
If the user removes the trait item, the trait tab will turn red again and show no traits available for choice.
Contents
Installation
- pull & deal with merge conflicts
php artisan migrate
php artisan optimize
x2php artisan add-site-settings
php artisan update-extension-tracker
Configuration
You will want to edit two site settings to your preferences:
trait_per_item
0: One item unlocks x traits for selection, and x of them can be chosen. 1: One item unlocks x traits for selection, only one of them can be chosen.
trait_remover_needed
0: No item needed to remove traits via design update. 1: Trait Remover item needed to remove traits via design update.
Usage
Simply add the trait or trait remover item tags to your items as needed. Make sure to test if they work as expected by creating some test design requests.
Troubleshooting
We are never 100% safe from those pesky bugs. If you find something, feel free to contact me- I am cylunny on discord or toyhou.se!
Images
(not at the time :c)
See Also
If this extension helped you, feel free to support me on Kofi!