Difference between revisions of "Extensions:Free MYOs"

From Lorekeeper Wiki
Jump to navigation Jump to search
Tag: 2017 source edit
m
Tag: 2017 source edit
 
(14 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Extensioninfobox|title=Free MYOs|desc=Allow users to create free MYOs|auth=AnimatedCritter|status=stable|github={{Github|user=AnimatedCritter|branch=extension/free-myos}}|LKVer=2.1.0|migration=yes|package=no}}
+
{{Extensioninfobox|title=Free MYOs|desc=Allow users to create free MYOs|auth=AnimatedCritter|status=testing|github={{Github|user=AnimatedCritter|branch=extension/free-myos}}|LKVer=3.0.0|migration=yes|package=no}}
 +
 
 
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!
 
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!
 
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 ==
 
== Installation ==
Pull and merge the branch, making sure to address any merge issues.
+
{| style="padding: .5rem; border-radius: .5rem; background: #cf8a8a;"
 +
|-
 +
| '''This extension is on Lorekeeper v3.0.0 as of May 25, 2025'''
 +
|-
 +
| Users on Lorkeeper v2 should pull only to commit c25637d and apply the change described under ''"Known Issue (v2 only)"''.
 +
|-
 +
| Notice that v2 of this extension is no longer supported, and this documentation only covers installation of Free MYOs v3, although the installation instructions are the same.
 +
|}
  
Afterwards, run the following commands in your console:
+
1. Pull and merge the branch ([[Tutorial: Installing Extensions]]) making sure to address any merge issues.
  
<code>php artisan migrate</code>
+
2. Run the following commands in your console:
  
<code>php artisan add-site-settings</code>
+
* <code>php artisan migrate</code>
  
<code>php artisan update-extension-tracker</code>
+
* <code>php artisan add-site-settings</code>
== 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.
+
* <code>php artisan update-extension-tracker</code>
  
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!
+
* <code>php artisan optimize</code> (may need to run twice)
  
 +
3. If upgrading from Free MYOs v1.0.0, you will also need to run <code>php artisan delete-obsolete-settings</code> after applying your current settings to the free MYOs configruation file (config\lorekeeper\free_myos.php).
 +
== Configuration ==
 +
'''Configure Free MYO Preferences'''
 +
Located at <code>config\lorekeeper\free_myos.php</code> is the extension configuration file. There are comments in the code that describe what each setting is and the accepted values it will take.
  
'''Set subtypes to is_free_myo_usable*:'''
+
* '''!! Important !!''' You must run <code>php artisan optimize</code> to apply changes published to your configuration file.
 
 
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 <code>Form::hidden('name', 'Free MYO')</code> and change <code>'Free MYO'</code> to whatever you prefer (e.g. 'Example Slot').
 
 
 
 
 
'''This extension has seven (7) site settings:'''
 
 
 
<code>free_myos_open</code>
 
* 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.*
 
 
 
<code>free_myos_max_number</code>
 
* 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.
 
  
<code>free_myos_rarity</code>
 
* 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.
 
  
<code>free_myos_require_subtype</code>
+
'''Enable Species/Subtypes for Free MYOs'''
* Requires users to choose a subtype after selecting it's correlating species.
+
After following the installation instructions, you can now see a "Free MYO Usable" toggle on each species/subtype's respective page. You may toggle as many or as few on or off as desired. Be aware that if there are no species available for Free MYOs, users who visit the free MYO page will not be able to create MYOs and be prompted to submit a bug report.  
* 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.
 
  
<code>free_myos_</code>...
 
* ...<code>is_tradeable</code>
 
* ...<code>is_giftable</code>
 
* ...<code>is_resellable</code>
 
** 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.
 
  
 +
'''Release the Feature to Users'''
 +
After following the installation instructions, there is a free_myos_open setting available on your site settings page. This setting:
 +
* determines if users can access the free MYO page.
 +
* (when closed) only prevents new slots from being created. It does not halt design submissions for pre-existing slots.
 +
When you're site is ready, change this setting to 1 to allow users to create free MYOs. You may disable the Free MYOs creation at anytime by resetting the value to 0.
  
<small>*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.</small>
 
 
== Troubleshooting ==
 
== Troubleshooting ==
If you are having any issues (or have suggestions to improve this extension) you can find me over on the Lorekeeper Discord server (AnimatedCritter#7094)!
+
Please see [[User: AnimatedCritter]] for contact information regarding questions, bug reports, or anything inbetween! c:
  
'''Known Issue:'''
+
'''Known Issue (v2 only)'''
 
* 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)
 
* 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.
+
** Go into your `app/Services/CharacterManager.php` and update <code>UserSettings::find($data['user_id'])->pluck('free_myos_made')->first()</code>
** For now, please go into your `app/Services/CharacterManager.php` and update <code>UserSettings::find($data['user_id'])->pluck('free_myos_made')->first()</code>
 
 
with <code>UserSettings::where('user_id', $data['user_id'])->pluck('free_myos_made')->first()</code>
 
with <code>UserSettings::where('user_id', $data['user_id'])->pluck('free_myos_made')->first()</code>
 
== Images ==
 
== Images ==
 
[[File:Screenshot 2022-10-06 214731.png|none|thumb]][[File:Screenshot 2022-10-06 214822.png|none|thumb]]
 
[[File:Screenshot 2022-10-06 214731.png|none|thumb]][[File:Screenshot 2022-10-06 214822.png|none|thumb]]

Latest revision as of 13:52, 25 May 2025

Free MYOs
Description Allow users to create free MYOs
Author(s) AnimatedCritter
Status testing
Github extension/free-myos
LK Version 3.0.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

This extension is on Lorekeeper v3.0.0 as of May 25, 2025
Users on Lorkeeper v2 should pull only to commit c25637d and apply the change described under "Known Issue (v2 only)".
Notice that v2 of this extension is no longer supported, and this documentation only covers installation of Free MYOs v3, although the installation instructions are the same.

1. Pull and merge the branch (Tutorial: Installing Extensions) making sure to address any merge issues.

2. Run the following commands in your console:

  • php artisan migrate
  • php artisan add-site-settings
  • php artisan update-extension-tracker
  • php artisan optimize (may need to run twice)

3. If upgrading from Free MYOs v1.0.0, you will also need to run php artisan delete-obsolete-settings after applying your current settings to the free MYOs configruation file (config\lorekeeper\free_myos.php).

Configuration

Configure Free MYO Preferences Located at config\lorekeeper\free_myos.php is the extension configuration file. There are comments in the code that describe what each setting is and the accepted values it will take.

  • !! Important !! You must run php artisan optimize to apply changes published to your configuration file.


Enable Species/Subtypes for Free MYOs After following the installation instructions, you can now see a "Free MYO Usable" toggle on each species/subtype's respective page. You may toggle as many or as few on or off as desired. Be aware that if there are no species available for Free MYOs, users who visit the free MYO page will not be able to create MYOs and be prompted to submit a bug report.


Release the Feature to Users After following the installation instructions, there is a free_myos_open setting available on your site settings page. This setting:

  • determines if users can access the free MYO page.
  • (when closed) only prevents new slots from being created. It does not halt design submissions for pre-existing slots.

When you're site is ready, change this setting to 1 to allow users to create free MYOs. You may disable the Free MYOs creation at anytime by resetting the value to 0.

Troubleshooting

Please see User: AnimatedCritter for contact information regarding questions, bug reports, or anything inbetween! c:

Known Issue (v2 only)

  • 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)
    • 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()

Images

Screenshot 2022-10-06 214731.png
Screenshot 2022-10-06 214822.png