Share and import designs
How shield designs reach the shared library, how players import them by id or from the browser, and how to set up a lobby showcase.
Every design a player saves in ExyliaShields lands in a shared library under a number, its id. Anybody can browse the most taken designs, copy one into a free slot, and your lobby can play them off to passers-by with a showcase.
Before you start#
Players need exyliashields.browser to browse and import, and exyliashields.command.shields to open /shields. Both are granted to everyone by default. Showcases also need ExyliaLib's NPC support (PacketEvents is a dependency of the plugin).
Steps#
Save a design
In /shields, design a shield and save it to a slot. Saving publishes it to the library under the player's name and gives it an id. Nothing else has to be done to share it. Saving a design the player already owns keeps its id.
Open the browser
Click Community browser in the shield list (the 3D picker and designer have a COMMUNITY button). Designs are shown most taken first; the 3D browser also has a newest tab. Each one shows its author, layers and uses.
Import one
In the inventory browser a click on a design imports it and opens it in the editor; in the 3D browser pick a design, then click IMPORT. It is copied into the first free slot. With no free slot the player is told so and nothing is copied. A player who knows an id clicks Import by ID in the shield list and types it in chat; cancel goes back.
Check that it works#
Save a design with one account, then import it by its #id with a second account. The second account gets the design in a free slot, and the first one's design has one more use.
Going further#
How use counts work#
shield_design_uses records who has taken which design, once per player, and the design's use counter goes up only the first time. A design taken by forty different players therefore ranks above one its author imported forty times. A copy cancelled by another plugin through the ShieldDesignImportEvent is not counted.
Ownership#
A design in the library has an owner. Importing does not transfer it: the importer gets a copy in their slot that still points at the original id. If the importer edits and saves it, the plugin publishes the edited one as a new design under their name and leaves the original alone.
Imports and permissions#
An import is copied as it is, with every layer. The permission check happens when the player saves new layers in the editor, and again each time they join: layers using a pattern or colour they have no permission for (or have not unlocked from a crate or the shop) are dropped, and a base colour they cannot use goes back to the default one. Deny exyliashields.browser to the default group to make the library a rank perk.
The browser menu#
menus/community_browser.yml is an ExyliaLib menu: icons, slots, titles, lore and sounds are editable. See Edit menus. The 3D browser is described on 3D menus.
Showcases#
A showcase plays the community's designs off on a loop for whoever walks past: a lobby centrepiece. Two bodies stand either side of the spot, one holding a shield up while the other swings a sword at it, and every blow lands on the shield. The bodies wear the skins of the players standing nearby, and the name of whoever drew the design floats above it.
A showcase plays the 30 designs the community took most, read from the library when the server starts, on every reload and every ten minutes. Each one holds the stage for four seconds.
Stand on the spot
Face the way the audience will stand: they see the blows land on the shield in profile.
Add it
Run /shieldsadmin showcase add. Use showcase list to see them, showcase remove for the one within 5 blocks of you, and showcase clear to remove all of them.
Walk up to it
It plays once a player is inside radius. With nobody there nothing plays, so an empty lobby costs nothing.
Showcase settings in config.yml
showcase:
locations: []
pause-seconds: 3.0
radius: 24.0
only: []
effect-scale: 1.0| Key | Default | What it does |
|---|---|---|
locations | [] | Where showcases stand. Set them with /shieldsadmin showcase add. |
pause-seconds | 3.0 | The rest between one design and the next. |
radius | 24.0 | How close a player has to be for a showcase to play and to be seen, in blocks. |
only | [] | The library ids a showcase may pick from, among the most taken. Empty picks from all of them. |
effect-scale | 1.0 | How large each effect plays: offsets, movement and spread are this many times their written size. |
The line above the shield is showcase.designer in messages.yml, with %owner%. See Messages and languages.
Something missing on this page? Tell us on Discord