Pet companions
A pet companion is a small pet that walks with a player’s avatar. It is a clothing part, not a room pet. The companion has no needs, levels or commands. It is part of the avatar’s look, in the same way as a hat or a shirt.
In the figure data, companions use the pt set type. PlusEMU sells 33 companions on the Clothing > Companions page for 25 credits each.
What players do
Section titled “What players do”Buy a companion
Section titled “Buy a companion”- Open the catalogue and go to Clothing > Companions.
- Select a companion. The preview shows the avatar with the companion.
- Buy it for 25 credits. The player gets a clothing furni in their inventory.
Unlock a companion
Section titled “Unlock a companion”- Place the clothing furni in a room.
- Double-click the furni. A dialog shows the avatar with the companion.
- Confirm the dialog.
The furni leaves the room and the companion is added to the player’s wardrobe for good. Volt also saves the new look, so the avatar wears the companion right away.
Only the owner of the furni can unlock it. If the player already owns that companion, the furni is still used up.
Wear or remove a companion
Section titled “Wear or remove a companion”- Open the wardrobe.
- Open the “…” tab. The pets sub tab opens first.
- Click a companion to wear it. To remove it, click the empty item at the start of the list.
- Save the look.
The pets sub tab lists only the companions the player has unlocked. The plus button at the end of the list opens Clothing > Companions.
An avatar can wear one companion at a time.
How it works on the server
Section titled “How it works on the server”- Each companion is a
furniturerow withinteraction_type = 'purchasable_clothing'. Thecustom_paramscolumn holds the figure set id that the furni unlocks, for example6383for the Pet Toucan. - When a player unlocks the furni, PlusEMU deletes the item and adds one row to
user_clothingper figure set id. The table has the columnsuser_id,part_id(the figure set id) andpart(the furni’sitem_name). - When a player saves a look, PlusEMU checks it against
Config/figuredata.xml. A set withsellable="1"is only kept if the player has it inuser_clothing. If not, PlusEMU removes or replaces that part. This stops players from wearing a companion they have not unlocked. - PlusEMU sends the list of unlocked set ids to the client at login and after each unlock.
Change the Companions page
Section titled “Change the Companions page”Migration 102 creates the page and the offers. The page has the link clothing_companions and the caption Companions. It sits under Clothing, right after Accessories, and uses the default_3x3 layout. Search by the link, because the page id is different in each hotel.
The page uses these tables:
catalog_pages: the page itself, withvisibleandenabled.catalog_page_offers: links offers to the page, withposition.catalog_offers: the price, withcost_credits,cost_points,points_typeandenabled.catalog_offer_products: links an offer to itsfurniture_id.
After any change, reload the catalogue with :update catalog. See catalogue and furniture data.
Change the price
Section titled “Change the price”This example sets all companions on the page to 50 credits:
UPDATE catalog_offers oJOIN catalog_page_offers po ON po.offer_id = o.idJOIN catalog_pages p ON p.id = po.page_idSET o.cost_credits = 50WHERE p.link = 'clothing_companions' AND p.catalog_mode = 'NORMAL';To change one companion, add a condition such as AND o.localization_key = 'clothing_r26_toucancompanion'. The migration uses the furni’s item_name as the localization_key.
Stop selling one companion
Section titled “Stop selling one companion”Set enabled = 0 on its offer. The catalogue then hides the offer and refuses to sell it. Players who already unlocked the companion keep it.
UPDATE catalog_offers oJOIN catalog_page_offers po ON po.offer_id = o.idJOIN catalog_pages p ON p.id = po.page_idSET o.enabled = 0WHERE p.link = 'clothing_companions' AND p.catalog_mode = 'NORMAL' AND o.localization_key = 'clothing_nftshiba';Hide the page
Section titled “Hide the page”Set visible = 0 to remove the page from the catalogue tree. Set enabled = 0 to stop the page from showing its offers.
UPDATE catalog_pagesSET visible = 0, enabled = 0WHERE link = 'clothing_companions' AND catalog_mode = 'NORMAL';The wardrobe’s plus button still points to clothing_companions. You can point it to another page with the Volt setting avatareditor.pets.catalog.page.name.
Add a companion
Section titled “Add a companion”A new companion needs all of these parts:
- A
ptset withsellable="1"in the server’sConfig/figuredata.xmland in the client figure data. Use the same set id in both. - The figure map entry and the figure library for its parts in the hotel files.
- A
furniturerow withinteraction_type = 'purchasable_clothing'and the set id incustom_params. - An offer in
catalog_offers, a product incatalog_offer_productsand a link incatalog_page_offers.
Then run :update furni and :update catalog. If you changed Config/figuredata.xml, run :update mutant to reload it.
Hotel files the client needs
Section titled “Hotel files the client needs”Volt loads these files through renderer-config.json:
- Figure data, from
avatar.figuredata.url(FigureData.json). It must contain theptsets. - Figure map, from
avatar.figuremap.url(FigureMap.json). It tells the client which library holds each part. - Figure libraries, from
avatar.asset.url(figure/<library>.hab). They hold the companion images.
If a file is missing, the client does not show an error for that companion:
- With no
ptsets in the figure data, the pets sub tab stays empty. - With no figure map entry or no library, the avatar shows without the companion.
- If the server’s
Config/figuredata.xmldoes not have the set, PlusEMU removes the companion when the player saves the look.
Keep the server figure data and the client figure data in step. After an update, compare Config/figuredata.xml with the release copy, as described in updates.
Differences from Habbo
Section titled “Differences from Habbo”- Habbo has no public catalogue offer for these companions. PlusEMU adds its own Companions page and sets the price to 25 credits.
- The unlock flow and the wardrobe follow Habbo. The wardrobe lists only unlocked companions, and the “…” tab is on by default, as on Habbo.