Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature idea: Condition driver for DT Smart Object #450

Open
TheGameratorT opened this issue Jan 6, 2025 · 1 comment
Open

Feature idea: Condition driver for DT Smart Object #450

TheGameratorT opened this issue Jan 6, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@TheGameratorT
Copy link

TheGameratorT commented Jan 6, 2025

Motive

In my avatar I have multiple object toggles that depend on other objects being disabled and those same objects also depend on others being disabled but I want them to stay selected in the menu so they automatically come back when I disable the dependent objects.

My current approach to this problem is to define 1 smart object with the menu toggle MenuParam and another one with just the unsynched condition parameter Param which has its own animator layer to toggle it ON and OFF depending on the condition that I set it. An example condition that would make Param be 1 could be MenuParam && Param2.

But doing this manually takes a long time and can get confusing.

Here is an example of Stockings that are only visible when the Bunny Suit is set.

Picture 1

imagem

Picture 2

imagem

Picture 3

imagem

Picture 4

imagem

Example DT Smart Object

This is a driver that I believe would be the solution to this problem.

Driver: Condition

Parameter:
	Unsynched.
        For usage in animator and internally with other smart controls.
	Contains result of all conditions, 0 or 1.
	Can be set by the VRCAvatarParameterDriver on Disabled, Enabled and Prepare Disable.
	Does not need to be generated if empty and not used by any other smart controls.

Conditions:
	Group 1:
		<DT Parameter Slot> > 0
		<DT Smart Control> = 1
		<DT Smart Control> = 0
	
	Group 2:
		<DT Parameter Slot> < 0.5
		<DT Smart Control> = 0
		<DT Smart Control> = 1
	
	(Each group will do OR with eachother)
	
	Add Condition Group

Control: Binary

Object Toggles...
Property Groups...
Cross-control Actions...

With this, picture 2 and 3 would not be needed.
This would also allow for objects to be enabled by default and disable when the menu is unselected, however a way of inverting the condition on the toggles would probably make more sense for that as each condition driver requires a new animator layer.

Considerations

Maybe a check on using the condition smart object on itself must exist to prevent an infinite recursion.

P.S.

I am really liking this tool and I see the potential on it, compared to VRCFury and Modular Avatar this was the only one that got the closest to my needs, so thank you a lot. I'd like to try to implement this driver myself but I am still not sure if I have time to get used to this codebase and I'd also like to know first what you think of it.

@poi-vrc poi-vrc added the enhancement New feature or request label Jan 7, 2025
@poi-vrc
Copy link
Owner

poi-vrc commented Jan 7, 2025

Thanks for your request. I have always wanted to create a driver based on conditions like you stated above. But I am currently working on other QoL refactor on the tool so I might not be able to implement this for the time being.
If you could read the code base and contribute to the code, it would be much appreciated. We could reach discord to talk more about the details if you are interested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants