Extensions:Free MYOs
Description | Allow users to create free MYOs |
---|---|
Author(s) | AnimatedCritter |
Status | stable |
Github | extension/free-myos |
LK Version | 2.1.0 |
Contains a Migration | |
An alternative to the slot-box system, this extension was made in an attempt to reduce the amount of menuing required to access free MYO slots!
A "Create Free MYO" button is added to the navbar and /characters/myos page, redirecting users to a form and admin-select pool of species/subtypes they can select to create a free MYO slot with. Depending on how the extension is set up, users can create as many MYOs as they'd like!
Installation
Pull and merge the branch, making sure to address any merge issues.
Afterwards, run the following commands in your console:
php artisan migrate
php artisan add-site-settings
php artisan update-extension-tracker
Configuration
Set species to is_free_myo_usable*:
This is required for setup! If no species with this value set to true are found, the creation page will instruct users to submit a bug report, and they will not be able to create free MYOs.
To set a species as is_free_myo_usable, go into your admin menu and find your species data. When you click edit (or create) you will find a toggle next to the name field. Turn it on and submit the form. Users will now be able to select that species for their free MYO slot!
Set subtypes to is_free_myo_usable*:
The same process as species, although subtypes aren't required--even if you have free_myos_require_subtypes enabled in site settings (see below).
Free MYO Slot Name:
By default, free MYO slots are named, well, "Free MYO". If you'd like to change this, go into resources\views\home\create_free_myo.blade.php, find Form::hidden('name', 'Free MYO')
and change 'Free MYO'
to whatever you prefer (e.g. 'Example Slot').
This extension has seven (7) site settings:
free_myos_open
- Determines if users can access the free MYO page.
- This only prevents new slots from being created. This does not halt design submissions for pre-existing slots.
- Closed by default to allow time for any initial setup while the site is live.*
free_myos_max_number
- This sets the limit for how many free MYOs a user can create.
- When set to 0, users can make unlimited MYOs.
- You can always change this setting.
- When users reach this number, they can no longer access the creation form.
- By default, users can create unlimited MYOs.
free_myos_rarity
- The ID of the highest rarity a user's free MYO can be.
- Set to 0 to allow for any rarity.
- By default, users aren't bound by any rarity.
free_myos_require_subtype
- Requires users to choose a subtype after selecting it's correlating species.
- This only applies if the species has a subtype marked as is_free_myo_usable!
- If a species doesn't have a subtype available, no subtype is applied.
- Disabled by default.
free_myos_
...
- ...
is_tradeable
- ...
is_giftable
- ...
is_resellable
- Self-explanatory, although resale values will need to be set during the design request approval process.
- By default, MYOs are tradeable and giftable, but not resellable.
*If you plan on changing is_free_myo_usable values while your site is live, I highly suggest that you temporarily disable free_myos_open in site settings.
Troubleshooting
I am no longer on Discord. Instead, please contact me through CritterCodes (https://crittercodes.neocities.org/). Thank you!
Known Issue:
- When MYO limit is set, users cannot create a free MYO/can still create MYOs (depending on the number of MYO user ID 1 has made)
- Currently pushing a commit to fix this.
- For now, please go into your `app/Services/CharacterManager.php` and update
UserSettings::find($data['user_id'])->pluck('free_myos_made')->first()
with UserSettings::where('user_id', $data['user_id'])->pluck('free_myos_made')->first()