Difference between revisions of "Extensions:Research Trees"

From Lorekeeper Wiki
Jump to navigation Jump to search
(Adding content.)
Tag: 2017 source edit
m (Changed from old develop to main (v2).)
Tag: 2017 source edit
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{Extensioninfobox|title=Research Trees|desc=Customizable research trees for your ARPG|auth=Preimpression|status=testing|github={{Github|user=preimpression|branch=researchTrees}}|migration=yes|package=no}}
+
{{Extensioninfobox|title=Research Trees|desc=Customizable research trees for your ARPG|auth=Preimpression|status=testing|github={{Github|user=preimpression|branch=extension/research_trees}}|migration=yes|package=no}}
 +
 
 +
'''This extension is on v2.'''
  
 
Create research/tech trees for your users. Admins can grant research but as of first release, require DB editing to remove if sent accidentally. The ability to revoke research will eventually be added in.
 
Create research/tech trees for your users. Admins can grant research but as of first release, require DB editing to remove if sent accidentally. The ability to revoke research will eventually be added in.
Line 11: Line 13:
 
Carefully check for conflicts and manually fix them. I've noticed on the GrantController especially it can get testy if you have the Awards extension.
 
Carefully check for conflicts and manually fix them. I've noticed on the GrantController especially it can get testy if you have the Awards extension.
 
Run <pre>php artisan migrate</pre>
 
Run <pre>php artisan migrate</pre>
 +
Run <pre>php artisan update-extension-tracker</pre> - If the above says there are no updates, you may need to clear and recache your config before it will work.
  
 
== Configuration ==
 
== Configuration ==
Line 19: Line 22:
 
=== Trees ===
 
=== Trees ===
 
* '''A name''' - Self-explanatory. Same length as all other names for items, characters, etc.
 
* '''A name''' - Self-explanatory. Same length as all other names for items, characters, etc.
* '''A summary''' - Short statement to say what the tree is about.
+
* '''A summary''' - Optional. Short statement to say what the tree is about.
 
* '''An image''' - Recommended!
 
* '''An image''' - Recommended!
 
* '''A currency''' - Only those that can be owned by the user - it's not set to take character-owned currencies.
 
* '''A currency''' - Only those that can be owned by the user - it's not set to take character-owned currencies.
Line 27: Line 30:
 
=== Research ===
 
=== Research ===
 
* '''A name''' - Self-explanatory. Same length as all other names for items, characters, etc.
 
* '''A name''' - Self-explanatory. Same length as all other names for items, characters, etc.
* '''A summary''' - Short statement to say what the research is about.
+
* '''A summary''' - Optional. Short statement to say what the research is about.
 
* '''An icon''' - Fontawesome. here is a link on the Research creation page to easily access Font Awesome. If not set, it will be the site map icon.
 
* '''An icon''' - Fontawesome. here is a link on the Research creation page to easily access Font Awesome. If not set, it will be the site map icon.
 
* '''A tree''' - Required. This is where it'll show. If the tree is changed and research has children, it will recursively edit the tree for the children.
 
* '''A tree''' - Required. This is where it'll show. If the tree is changed and research has children, it will recursively edit the tree for the children.
Line 33: Line 36:
 
* '''A prerequisite''' - Optional. To purchase the research with a prerequisite, you have to have the prerequisite. They do NOT have to be direct parents of the research and they don't have to be in the same tree. There is a toggle to reduce select box scrolling if they are the same.  
 
* '''A prerequisite''' - Optional. To purchase the research with a prerequisite, you have to have the prerequisite. They do NOT have to be direct parents of the research and they don't have to be in the same tree. There is a toggle to reduce select box scrolling if they are the same.  
 
* '''A description''' - Optional. Big nice text box with WYSIWYG editor.
 
* '''A description''' - Optional. Big nice text box with WYSIWYG editor.
 +
* '''Rewards''' - Optional. Allow users to gain rewards after purchasing a research branch. Can be loot tables, items, currency, or raffle tickets in v.1.1.0.
  
 
== Usage ==
 
== Usage ==

Latest revision as of 00:24, 19 August 2024

Research Trees
Description Customizable research trees for your ARPG
Author(s) Preimpression
Status testing
Github extension/research_trees
LK Version Unspecified
Contains a Migration






This extension is on v2.

Create research/tech trees for your users. Admins can grant research but as of first release, require DB editing to remove if sent accidentally. The ability to revoke research will eventually be added in.

Uses javascript for the opening/closing of tree branches. Uses ajax to pull in branches (research) from the tree you choose in order to pick as a Parent - you don't want to pick a parent in a different tree, as the research won't show display.

Installation

Pull the branch and merge it into your files. Carefully check for conflicts and manually fix them. I've noticed on the GrantController especially it can get testy if you have the Awards extension.

Run

php artisan migrate

Run

php artisan update-extension-tracker

- If the above says there are no updates, you may need to clear and recache your config before it will work.

Configuration

You will need to create a tree before you can create research. Every research requires a tree - so you may need to make a tree of standalones if you have standalone research. Includes a notification with the id of 100 - the start of the User:Preimpression notification offset.

Trees

  • A name - Self-explanatory. Same length as all other names for items, characters, etc.
  • A summary - Optional. Short statement to say what the tree is about.
  • An image - Recommended!
  • A currency - Only those that can be owned by the user - it's not set to take character-owned currencies.
  • A sorted order - Sortable table from the trees index page.
  • A description - Optional. Big nice text box with WYSIWYG editor.

Research

  • A name - Self-explanatory. Same length as all other names for items, characters, etc.
  • A summary - Optional. Short statement to say what the research is about.
  • An icon - Fontawesome. here is a link on the Research creation page to easily access Font Awesome. If not set, it will be the site map icon.
  • A tree - Required. This is where it'll show. If the tree is changed and research has children, it will recursively edit the tree for the children.
  • A parent - Optional. Should be the same tree as the research itself, but doesn't have to be a prerequisite.
  • A prerequisite - Optional. To purchase the research with a prerequisite, you have to have the prerequisite. They do NOT have to be direct parents of the research and they don't have to be in the same tree. There is a toggle to reduce select box scrolling if they are the same.
  • A description - Optional. Big nice text box with WYSIWYG editor.
  • Rewards - Optional. Allow users to gain rewards after purchasing a research branch. Can be loot tables, items, currency, or raffle tickets in v.1.1.0.

Usage

This does rely on some CSS to show the tree nicely - if it looks weird, you may need to clear the cache (either of your site if you have Cloudflare or of your own browser). If it's been some time, a hard refresh should be sufficient.

Troubleshooting

Known Bugs

  • There is sometimes an Ajax error when selecting a tree that has no research on the Research creation page.

If something breaks or you need assistance, contact Uri on the LK discord.

See Also

This could absolutely be adjusted to suit Skill trees for characters.