@attachallthis has two unrelated forms that share a name: a folder lock (=n/=y) and a force command (=force). Both act on folders chosen relative to worn items.
@attachallthis=force wears (replacing what's already worn) the contents of the shared folder(s) that contain a worn item (by default, the issuing object itself), including all of its non-hidden subfolders.
@attachallthis[:<target>]=force
spine): the folders of everything worn on that point;shirt): the folders of every worn wearable of that type;#RLV count. If an item lives in a folded folder (.(spine), .(nostrip)), the folder's parent is used. A shared-folder path is not accepted here, and any other option fails with an option error.All RLVa force-wear commands share one handler (RLV_CMD_FORCEWEAR). They differ only in three flags taken from the dictionary entry:
| Command | Action | Scope | Option selects |
|---|---|---|---|
| attach | replace | folder only | #RLV path |
| attachall | replace | folder + subfolders | #RLV path |
| attachover | add | folder only | #RLV path |
| attachallover | add | folder + subfolders | #RLV path |
| attachthis | replace | folder only | worn item (self, point, layer, UUID) |
| attachallthis | replace | folder + subfolders | worn item (self, point, layer, UUID) |
| attachthisover | add | folder only | worn item (self, point, layer, UUID) |
| attachallthisover | add | folder + subfolders | worn item (self, point, layer, UUID) |
| detachall | remove | folder + subfolders | #RLV path |
| detachthis | remove | folder only | worn item (self, point, layer, UUID) |
| detachallthis | remove | folder + subfolders | worn item (self, point, layer, UUID) |
| detach | remove | folder (node) | path, attachment point, point group, UUID or none |
Synonyms that map to exactly the same flags: @addoutfitallthis, @attachallthisoverorreplace.
.(point) folder) gives an attachment point, or if RLVaEnableSharedWear is TRUE (the default). With shared wear, items with no point named attach wherever the viewer would normally put them.RLVaWearReplaceUnlocked is TRUE (the default); otherwise the new item is detached again. For clothing, the first item of each type replaces what you're wearing, and further items of the same type in the folder are added on top. Body parts always replace.+ (the RestrainedLoveStackWhenFolderBeginsWith setting) switches replace to add, and a name starting with the RestrainedLoveReplaceWhenFolderBeginsWith string (empty by default) switches add to replace..) are processed recursively, plus folded folders and folder links.@addoutfit, @remoutfit, @addattach, @remattach, @detach) in the same message is processed first.#RLV, nothing happens and the command still succeeds. A UUID that isn't one of your attachments fails with an option error.// Act on the folder this object lives in
llOwnerSay("@attachallthis=force");
// Act on the folder(s) of whatever is worn on the spine
llOwnerSay("@attachallthis:spine=force");
As a restriction, @attachallthis=n stops items being worn from the locked folder (and all of its subfolders): the user can't wear or attach them, and force-wear commands skip them. It's an RLV_LOCK_ADD folder lock with PERM_DENY.
@attachallthis[:<target>]=<n|add|y|rem>
The target selects the folder(s) to lock:
#RLV.#RLV (resolved with partial matching, like the force form). It must exist when the command is issued, or the command fails.A UUID is not accepted, and anything that isn't one of the above fails with an option error. The option is parsed in the order layer, attachment point, UUID, folder, so a single-component path that's also a layer or point name is taken as that layer or point.
// Lock the folder this collar lives in so it can't be taken off,
// and make the "restraints" folder unwearable
llOwnerSay("@detachallthis=n,attachallthis:restraints=n");
RlvBehaviourInfo("attachallthis", RLV_CMD_FORCEWEAR, RLV_TYPE_FORCE, FORCEWEAR_WEAR_REPLACE | FORCEWEAR_SUBTREE | FORCEWEAR_CONTEXT_OBJECT) (rlvhelper.cpp:261). There is no processor class, so the legacy switch in RlvHandler::processForceCommand() handles it (rlvhandler.cpp:2883-2900).FORCEWEAR_CONTEXT_OBJECT: the option goes through RlvCommandOptionGetPath (rlvhelper.cpp:1025-1075), whose items are mapped to folders by RlvInventory::getPath() (rlvinventory.cpp:214-237, folded folders map to their parent). Delayed resolution uses RlvCommandOptionGetPathCallback with a 30-second expiry (rlvhelper.cpp:982-1022) and RlvHandler::onForceWearCallback() (rlvhandler.cpp:3235-3247).RlvHandler::onForceWear() (rlvhandler.cpp:3221-3233) checks isSharedFolder() and maps the flags to ACTION_WEAR_REPLACE and FLAG_MATCHALL. RlvForceWear::forceFolder() (rlvhelper.cpp:1275-1398) and RlvWearableItemCollector (rlvinventory.cpp:687-849) choose the items. The batch is committed by RlvForceWear::done() (rlvhelper.cpp:1731+), called at llviewermessage.cpp:3203-3204.RlvInventory::getSharedFolder(), with partial matching on by default (rlvinventory.cpp:267-308, rlvinventory.h:62).RlvBehaviourInfo(…, RLV_BHVR_ATTACHTHIS, RLV_TYPE_ADDREM, FORCEWEAR_NODE|SUBTREE) (rlvhelper.cpp:95-96). It's handled by RlvHandler::onAddRemFolderLock() (rlvhandler.cpp:1988-2030), which creates a RlvFolderLocks entry with PERM_DENY, RLV_LOCK_ADD and SCOPE_NODE or SCOPE_SUBTREE taken from the flags.getLockedFolders() (rlvlocks.cpp:982-1046) and isLockedFolder() (rlvlocks.cpp:1149-1214), which walks up from the folded parent. Wear checks go through RlvAttachmentLocks::canAttach(item) and RlvWearableLocks::canWear() (rlvlocks.h:426-436, 514-520).isLockedFolder() tests pLockDescr->eLockType & eSourceTypeMask, where you'd expect the lock's source type (rlvlocks.cpp:1180-1184). Every caller in this tree passes a mask that includes bits 0x01 and 0x02, so this has no visible effect.getLockedFolders() for an empty option registers the issuing item's direct parent, but isLockedFolder() starts its walk at the folded parent. A node-scope lock from an attachment that lives in a .(point) folded folder may therefore never match.This command works differently from RLV's @attachallthis; see the comparison.