Extensions:Character Links

From Lorekeeper Wiki
Jump to navigation Jump to search
Character Links
Description Bind characters together to facilitate or restrict transference.
Author(s) Junijwi
Status testing
Github character-links
LK Version Unspecified
Contains a Migration



Adds a table, character_links, which stores relationships between characters. "Children" are bound to "Parents" and will be transferred when the parent is transferred. They are displayed as parents "binding" children and children being "bound to" parents ( https://i.gyazo.com/45e1ca4fa719d20b4a443b210ef4c8a8.png )

Installation

Pull the branch, push, and run php artisan migrate.

Be careful with merging conflicts if you installed or tweaked anything in character areas. I cannot recommend you install this extension unless you are confident about merging, OR if you have backups created just beforehand. This extension is not very destructive, but fiddles in a lot of areas of code (character creation, transfers, etc).

Configuration

Feel free to change the verbage for character links. Binding/bound is used on the front end (in _tab_stats.blade.php), while parent/child are used in the back end.

Usage

This extension is NOT a relationships extension, and is not meant to serve that function (both in genealogy or friendships). This extension links characters in order to lock their transferability to their parents-- aka binding. This allows twins to exist on separate entries on a masterlist, or any derivative designs, or NPC's/pets/mounts which are attached to a main character.

You can set a character to be "Bound" in the transfer area as an admin. The selectize works on character's full names (slug + nickname). You can unset a character by deleting the bound selection and saving. NOTE: setting a character to be bound turns OFF all of its transfer privileges, which must be manually tweaked when unbound.

You can also set a character to be "Bound" in the character/myo creation pages.

It should be noted that MYO slots are not meant to act as "parents" but can be bound as "children".

All children will be transferred in trades, user transfers, and admin transfers HOWEVER there are not many good visual indicators for this. A message will flash during transfer requests warning that all children will also be transferred, but there is no indicator in the trade offer window that a character carries children.

Children can be chained, HOWEVER there is a limit to how many chained children/generations the code checks for (it'll loop about 5 times). You can alter this for your needs but I didn't think that anyone would be making more than 5 generations long chains of characters whose permissions are bound to one another.

Children are not allowed to be transferred, not even by admins, so as to not break the chain of ownership. The system will demand that admins transfer the parent.

Characters can be mutually bound (a parent is also the child of the child) and when one is transferred, the other is allowed to be transferred as well. The code will show the character in both the BOUND and BINDING sections, it is up to you to check for 'mutual' status and consolidate this if that's what you want.

Troubleshooting

Feel free to @ me in the discord (Juni#0448) for any issues.

See Also