Clothing Triggers

Plugins Clothing Triggers

bill_prime

Well-known member
Featured Contributor
Messages
414
Reactions
1,697
Points
93
Website
www.buymeacoffee.com
bill_prime submitted a new resource:

Clothing Triggers - Setup custom triggers to run when specific clothing items are Worn or Removed/Undressed.

Add this plugin to a Person Atom.
Setup triggers for any active clothing (select active clothing, click Add Triggers), and then setup the OnWear and OnRemove triggers to run when the clothing item is Worn or Removed/Undressed.
This is similar to NippleClippingReducer in how it monitors the clothing items, but you can setup any triggers you like to run.

Credit to vamtaco for NippleClippingReducer and Macgruber.
View attachment 285548

Read more about this resource...
 
This is great, been looking for something to adjust the breasts automatically when a bra is worn. Just wanted to see, is there a way to have it go off of tags instead of specific clothing items? For example, anytime a clothing item tagged as Bra, it runs the triggers? I don't know enough about the BTS of VAM to know if that is even possible, but would be very helpful to automate any bra to trigger a breast morph. Thanks
 
This is great, been looking for something to adjust the breasts automatically when a bra is worn. Just wanted to see, is there a way to have it go off of tags instead of specific clothing items? For example, anytime a clothing item tagged as Bra, it runs the triggers? I don't know enough about the BTS of VAM to know if that is even possible, but would be very helpful to automate any bra to trigger a breast morph. Thanks

It's definitely something I considered, but in the end I would probably want different triggers for different bras etc.
I would also like to build in some save/load functions eventually to this plugin to make it easier to user in different scenes.
 
bill_prime updated Clothing Triggers with a new update entry:

Fixed issues loading clothing presets incorrectly, updated logic for triggering OnWear/OnRemove

  • Resolved an an issue causing clothing presets to not load fully if there were clothing triggers. Seemed to be a timing issue or something, but finally found a decent fix for it.
  • Updated logic so all OnRemove triggers always happen first before any of the OnWear triggers (milliseconds before, but still).

Read the rest of this update entry...
 
Oh man, if this worked as a scene/session plugin it would be ideal for me. As an example, I have some appearances that I occasionally load that include the ball gag clothing, and it would be great for this to pick up on that in whatever scene, on whichever person, and apply the associated ball gag morph.

Don't get me wrong, it also seems quite useful for other cases as is, but that's the potential I see for it for my main relevant use cases.

I'm not aware of any other simple plugin or method to tie such morphs to associated clothing.
 
I don't know how to get this to work. When I load it onto a person atom, it gives me a mostly blank UI with only the refresh trigger and active clothing boxes available. There is no place for me to add triggers to the clothing. It gives me an error message

!> Exception during plugin script Init: System.ArgumentException: An element with the same key already exists in the dictionary.
at System.Collections.Generic.Dictionary`2[System.String,System.String].Add (System.String key, System.String value) [0x00000] in <filename unknown>:0
at bill_prime.ClothingTriggers.Init () [0x00000] in <filename unknown>:0
at MVRPluginManager.CreateScriptController (.MVRPlugin mvrp, DynamicCSharp.ScriptType type) [0x00000] in <filename unknown>:0
!> Exception during plugin script Init: System.ArgumentException: An element with the same key already exists in the dictionary.
at System.Collections.Generic.Dictionary`2[System.String,System.String].Add (System.String key, System.String value) [0x00000] in <filename unknown>:0
at bill_prime.ClothingTriggers.Init () [0x00000] in <filename unknown>:0
at MVRPluginManager.CreateScriptController (.MVRPlugin mvrp, DynamicCSharp.ScriptType type) [0x00000] in <filename unknown>:0

not sure what that means, but would appreciate some help.
 
I don't know how to get this to work. When I load it onto a person atom, it gives me a mostly blank UI with only the refresh trigger and active clothing boxes available. There is no place for me to add triggers to the clothing. It gives me an error message

!> Exception during plugin script Init: System.ArgumentException: An element with the same key already exists in the dictionary.
at System.Collections.Generic.Dictionary`2[System.String,System.String].Add (System.String key, System.String value) [0x00000] in <filename unknown>:0
at bill_prime.ClothingTriggers.Init () [0x00000] in <filename unknown>:0
at MVRPluginManager.CreateScriptController (.MVRPlugin mvrp, DynamicCSharp.ScriptType type) [0x00000] in <filename unknown>:0
!> Exception during plugin script Init: System.ArgumentException: An element with the same key already exists in the dictionary.
at System.Collections.Generic.Dictionary`2[System.String,System.String].Add (System.String key, System.String value) [0x00000] in <filename unknown>:0
at bill_prime.ClothingTriggers.Init () [0x00000] in <filename unknown>:0
at MVRPluginManager.CreateScriptController (.MVRPlugin mvrp, DynamicCSharp.ScriptType type) [0x00000] in <filename unknown>:0

not sure what that means, but would appreciate some help.

That error message means the person is currently wearing 2 pieces of clothing with the same display name, causing it to freak out. That might be why it's not working for you.
Does it always do this? Can you double-check what clothing the person is wearing and see if there are any duplicate names?

Typically it works like this:
  1. Refresh Active Clothing to make sure the list of active clothing is up to date
  2. Select a clothing from Active clothing list you want to add triggers for.
    1. 1694180595807.png
  3. Click Add Triggers
  4. It should add the clothing item to the Clothing Triggers list
  5. Select the item from the Clothing TriggersList
    1. 1694180657337.png
  6. Add your triggers
    1. 1694180669243.png
 
Ok, I got it working. Thanks. Do you have recommendations on how to hide head & body hair? I can get it to hide other clothing items underneath clothing, but hair is something that I'm having problems with removing as a clothing item is turned on.
 
Ok, I got it working. Thanks. Do you have recommendations on how to hide head & body hair? I can get it to hide other clothing items underneath clothing, but hair is something that I'm having problems with removing as a clothing item is turned on.

Wow I never even thought of hiding panties etc.! No more clipping!
Body hair I'm not sure, I would think you could just create a trigger and it will hide or remove the hair depending on how you setup the trigger.
 
it should be simple, but the hair has different properties such as scalp and other materials that make it hard for me to find how to hide it. but i'll keep looking...
 
it should be simple, but the hair has different properties such as scalp and other materials that make it hard for me to find how to hide it. but i'll keep looking...
Should be able to find it in Triggers like this:
Person
geometry
hair:{hair uid here, can search}

set enabled = false
 
It becomes impossible to scroll past the 16th or 17th clothing trigger if you have multiple for different clothing items
 
it should be simple, but the hair has different properties such as scalp and other materials that make it hard for me to find how to hide it. but i'll keep looking...
If you're able to code a plugin, or have some one cook you up a simple one, here's a short summary of what I ended up doing for cases where I temporarily wanted to hide all hair on a person:

void HideAllHair() {
foreach (DAZHairGroup hairGroup in m_person_atom.GetComponentsInChildren<DAZHairGroup>())
hairGroup.GetComponentInChildren<HairSimControl>().renderSuspend = true;
}
 
Back
Top Bottom