Solved Plugins that use VAMMoan's read only variables

CheersMate

Well-known member
Messages
197
Reactions
773
Points
93
Website
ecchi.iwara.tv
VAMMoan's receiver target lists several "Vars below meant to be read by external plugins" like "VAMM CurrentArousal" and "VAMM TriggerCount"
Does anyone know of any plugins that take advantage of these vars?
 
Solution
I'm digging around in existing code to see how VaM handles things like finding and using variables from another plugin. And, if I could find an example that already read these VAMMoan variables, even better. That's where Cue hopefully comes in.

I would not use Cue for this. It has a pretty complex porting layer to isolate VaM stuff from the main plugin, plus a lot of bullshit to be able to find parameters on the fly when new plugins are added.

You start by finding an Atom with SuperController.singleton.GetAtomByUid() and giving it the atom's name. You can also get all the atoms with GetAtoms().

Given an Atom, the first function you want to use is GetStorableByID(). A Person atom, for...
Found an answer: Cue by @via5

The only one I use is VAMM IntensitiesCount, which hazmhox kindly added for me. The voices don't have the same number of intensities, so this allows Cue to know the highest intensity for the currently selected voice and trigger it when arousal gets close to 100%.
 
Upvote 0
The only one I use is VAMM IntensitiesCount, which hazmhox kindly added for me. The voices don't have the same number of intensities, so this allows Cue to know the highest intensity for the currently selected voice and trigger it when arousal gets close to 100%.
That might be good enough for my needs or at least point me in the right direction. I'm trying to learn plugin scripting so I thought I'd start with what seemed like a fairly simple concept: a plugin that reads VAMMoan arousal value and updates an object's (maybe a dildo or arrow) rotation to create an arousal meter: 0/700 --> dildo pointing down, 700/700 --> dildo pointing up. Sounds simple enough, right?

@nobutyea 's "Hello World" guides got me started and I know a little C# so now I'm digging around in existing code to see how VaM handles things like finding and using variables from another plugin. And, if I could find an example that already read these VAMMoan variables, even better. That's where Cue hopefully comes in.

BTW, this was the 1st time I'd seen or heard of the Cue plugin. I haven't had a chance to play with it yet (stupid real job) but it sounds amazing.
 
Upvote 0
I'm digging around in existing code to see how VaM handles things like finding and using variables from another plugin. And, if I could find an example that already read these VAMMoan variables, even better. That's where Cue hopefully comes in.

I would not use Cue for this. It has a pretty complex porting layer to isolate VaM stuff from the main plugin, plus a lot of bullshit to be able to find parameters on the fly when new plugins are added.

You start by finding an Atom with SuperController.singleton.GetAtomByUid() and giving it the atom's name. You can also get all the atoms with GetAtoms().

Given an Atom, the first function you want to use is GetStorableByID(). A Person atom, for example, has a bunch of storables: one for each controller, one for each rigidbody, one for each plugin, etc. You can see storables in the Receiver list when you edit a trigger.

Once you have a storable, you call GetXJSONParam(), where X can be Bool, Float, String, etc. This gives you a specific parameter within that storable. You can see parameters in the Receiver Target list when you edit a trigger. Storables will have a val property that you can use to get or set the value.

Finding a parameter from a plugin is a bit messy because the storable name will be something like plugin#0_Cue.CueMain. The #0 is the order of the plugin in the list, which changes depending on the order in which the user adds plugins. Once you know the name of the plugin's main class (for example, Cue.CueMain) you can call GetStorableByID() in a loop with increasing indexes (plugin#0_Cue.CueMain, plugin#1_Cue.CueMain, etc.)

You can also use GetStorableIDs() and look for an ID that contains the plugin's class name.
 
Upvote 0
Solution
If you dont have it, Get visual studio 2022 community. Free. You can right click on just about everything and go to its implementation and definition. Or another IDE that has the same feature. Linked scripts, source code, etc...
 
Upvote 0
I would not use Cue for this. It has a pretty complex porting layer to isolate VaM stuff from the main plugin, plus a lot of bullshit to be able to find parameters on the fly when new plugins are added.

You start by finding an Atom with SuperController.singleton.GetAtomByUid() and giving it the atom's name. You can also get all the atoms with GetAtoms().

Given an Atom, the first function you want to use is GetStorableByID(). A Person atom, for example, has a bunch of storables: one for each controller, one for each rigidbody, one for each plugin, etc. You can see storables in the Receiver list when you edit a trigger.

Once you have a storable, you call GetXJSONParam(), where X can be Bool, Float, String, etc. This gives you a specific parameter within that storable. You can see parameters in the Receiver Target list when you edit a trigger. Storables will have a val property that you can use to get or set the value.

Finding a parameter from a plugin is a bit messy because the storable name will be something like plugin#0_Cue.CueMain. The #0 is the order of the plugin in the list, which changes depending on the order in which the user adds plugins. Once you know the name of the plugin's main class (for example, Cue.CueMain) you can call GetStorableByID() in a loop with increasing indexes (plugin#0_Cue.CueMain, plugin#1_Cue.CueMain, etc.)

You can also use GetStorableIDs() and look for an ID that contains the plugin's class name.
This is will be a huge help. Thanks!
Yeah, I dug around in the Cue folders/code and there's a lot going on there.
Thanks again for the tips.
 
Upvote 0
If you dont have it, Get visual studio 2022 community. Free. You can right click on just about everything and go to its implementation and definition. Or another IDE that has the same feature. Linked scripts, source code, etc...
Yep. Visual Studio is pretty awesome. Thanks for the suggestion.
 
Upvote 0
Back
Top Bottom