Difference between revisions of "Extensions:Character Items"

From Lorekeeper Wiki
Jump to navigation Jump to search
Tag: 2017 source edit
Tag: 2017 source edit
(21 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Extensioninfobox|title=Character Items|desc=Enables item attachment, display, and management for characters.|auth=Mercury|status=Testing|github={{Github|user=itinerare|branch=character-items}}|migration=yes|package=no}}
+
{{Extensioninfobox|title=Character Items|desc=Enables item attachment, display, and management for characters.|auth=Mercury|status=Stable|github={{Github|user=itinerare|repo=lorekeeper-ext-archive|branch=character-items}}|migration=yes|package=no|modified-main=yes}}
 
<!-- Put a short summary of your extension here! -->
 
<!-- Put a short summary of your extension here! -->
This builds upon {{github|repo=lorekeeper|user=draginraptor|branch=inventory_stacks}}!
+
'''This extension is now incorporated into {{Github|user=corowne|branch=modified-main}}.''' The information here is maintained as documentation, and further support is via that branch.
 +
 
 +
This builds upon [[Extensions:Stacked Inventories]]! Not only is much credit due there, it also bears mention that the changes made there are necessarily included in this extension.
  
 
This adds item inventories to characters, as well as management of character items. This includes:
 
This adds item inventories to characters, as well as management of character items. This includes:
Line 7: Line 9:
 
* Character inventory logs
 
* Character inventory logs
 
* Granting of items directly to characters (via a modal on the character inventory panel, as with character banks)
 
* Granting of items directly to characters (via a modal on the character inventory panel, as with character banks)
* Attachment of items to characters (via the inv select widget, on the character inventory panel)
+
* Attachment of items to characters (via the user's inventory)
 
* A separate inventory stack modal for characters, which handles:
 
* A separate inventory stack modal for characters, which handles:
 
* Transferal of items back to the owning user
 
* Transferal of items back to the owning user
 
* Deletion of items direct from character inventory
 
* Deletion of items direct from character inventory
 +
* Naming of item stacks (when enabled for the item's category), for instance, in the case of pets
  
 
It also changes item logging to handle this by making it akin to currency logging. That is, the existing user_items_log table is renamed to items_log, and has sender and recipient type columns added. Existing log entries are updated in-place and treated as user <-> user.
 
It also changes item logging to handle this by making it akin to currency logging. That is, the existing user_items_log table is renamed to items_log, and has sender and recipient type columns added. Existing log entries are updated in-place and treated as user <-> user.
  
Character items are also held in their own table. Transferring items between user and character maintains source and notes-- which makes for some slightly strange logs, as the source is re-logged (though the log type is clearly labeled as user <-> character depending on the nature of the transfer). Note that as a consequence of this, items owned by characters remain in their possession when ownership of the character is transferred.
+
Character items are also held in their own table. Transferring items between user and character maintains source and notes-- which makes for some slightly strange logs, as the source is re-logged (though the log type is clearly labeled as user <-> character depending on the nature of the transfer). Note that as a consequence of this, items owned by characters remain in their possession when ownership of the character is transferred. To account for this, account-bound items can't be given to characters. However, account-bound/non-transferable items can be ''granted'' to characters, in which case they would not be able to be transferred from the character.
  
Items are not automatically available to be held by characters. Doing so is done via item categories; these now have a toggle on their admin panel interface for the purpose. Additionally, limits may be set per category for the number of items a character may hold. By default/if left empty, it is set to 0/infinite. This is also done via the admin panel interface.
+
Items are not automatically available to be held by characters. Doing so is done via item categories; these now have a toggle on their admin panel interface for the purpose. Additionally, limits may be set per category for the number of items a character may hold. By default/if left empty, it is set to 0/infinite. This is also done via the admin panel interface. Items may be toggled per category to be able to be named if in character inventories.
== Installation ==
 
<!-- Describe installation. Include any requirements (such as packages), necessary commands, etc. -->
 
Pull the branch, then run <code>php artisan migrate</code>.
 
  
 
== Configuration ==
 
== Configuration ==
Line 30: Line 30:
 
<!-- Are there known issues or errors that require user action? Who should they contact, and where, for support? -->
 
<!-- Are there known issues or errors that require user action? Who should they contact, and where, for support? -->
 
If you encounter errors, please find me in the Lorekeeper discord!
 
If you encounter errors, please find me in the Lorekeeper discord!
 +
== Images ==
 +
* [https://www.itinerare.net/gallery/pieces/3.Lorekeeper-Ext-%E2%97%88-Character-Items?source=projects/pages/lorekeeper&page=2 Writeup with images on my site]
 
== See Also ==
 
== See Also ==
 
<!-- Any relevant other pages. You may consider linking to related extensions, for instance. -->
 
<!-- Any relevant other pages. You may consider linking to related extensions, for instance. -->
 
* [[Extensions:Submission Addons]] - Another extension I made for providing more utility to items.
 
* [[Extensions:Submission Addons]] - Another extension I made for providing more utility to items.

Revision as of 14:01, 27 June 2021

Character Items
Description Enables item attachment, display, and management for characters.
Author(s) Mercury
Status Stable
Github itinerare/lorekeeper-ext-archive/character-items
LK Version Unspecified
Contains a Migration
Is part of LK v2 (modified-main)



This extension is now incorporated into modified-main . The information here is maintained as documentation, and further support is via that branch.

This builds upon Extensions:Stacked Inventories! Not only is much credit due there, it also bears mention that the changes made there are necessarily included in this extension.

This adds item inventories to characters, as well as management of character items. This includes:

  • Character inventory pages
  • Character inventory logs
  • Granting of items directly to characters (via a modal on the character inventory panel, as with character banks)
  • Attachment of items to characters (via the user's inventory)
  • A separate inventory stack modal for characters, which handles:
  • Transferal of items back to the owning user
  • Deletion of items direct from character inventory
  • Naming of item stacks (when enabled for the item's category), for instance, in the case of pets

It also changes item logging to handle this by making it akin to currency logging. That is, the existing user_items_log table is renamed to items_log, and has sender and recipient type columns added. Existing log entries are updated in-place and treated as user <-> user.

Character items are also held in their own table. Transferring items between user and character maintains source and notes-- which makes for some slightly strange logs, as the source is re-logged (though the log type is clearly labeled as user <-> character depending on the nature of the transfer). Note that as a consequence of this, items owned by characters remain in their possession when ownership of the character is transferred. To account for this, account-bound items can't be given to characters. However, account-bound/non-transferable items can be granted to characters, in which case they would not be able to be transferred from the character.

Items are not automatically available to be held by characters. Doing so is done via item categories; these now have a toggle on their admin panel interface for the purpose. Additionally, limits may be set per category for the number of items a character may hold. By default/if left empty, it is set to 0/infinite. This is also done via the admin panel interface. Items may be toggled per category to be able to be named if in character inventories.

Configuration

Set availability for any categorie(s) you want characters to be able to own, as well as any item limits for those categorie(s), in the item category admin panel.

Usage

Granting items to characters is done via an admin modal located on the character's inventory page, similarly to character banks. Managing character items is also done on this page, similar to user inventories.

Troubleshooting

If you encounter errors, please find me in the Lorekeeper discord!

Images

See Also