Summary:
This is a collection of more LogicBricks that hopefully add useful features to the already awesome set by @MacGruber. Check out the included scene for a demo of all the additional bricks' functionalities:Included Modules:
ValueDelay
Applies a delay and smoothing function to an input value, so that the output value only changes gradually with a configurable delay. Useful, e.g., for setting an erection controller's target value to 1, but have the delay slowly change the actual erection slider. In the demo, the Input slider affects the character's smile pose.WARNING: Breaking change introduced in v9 to get rid of a naming inconsistency. Please see the instructions here how to edit your scene to fix that issue.
ValueMapRelay
Takes a value that comes from a certain input range, and maps it relatively to an output range. This can be used to amplify, weaken, and invert input values. Example application: Control overall fading of music from Timeline by changing the input value, ranging from [0...1]. However, the user can configure the overall volume by having a slider that changes the "Output To" value. See also the useful detailed tutorial by @CabaretNoir here.In v9, an additional map function was introduced, so the response to incoming values can further be shaped. By default, the function is "Linear", but it can also be set to "Smooth Step", which provides a slower start and again a slow down at the end of the range. A third alternative is "Power Function", where the response is run through the equation out=in^factor, and your choice of factor determines whether the response starts slow and speeds up (factor between 0 and 1), is linear (factor = 1), starts fast and then slows down (factor > 1).
WARNING: Breaking change introduced in v9 to get rid of a naming inconsistency. Please see the instructions here how to edit your scene to fix that issue.
HysteresisThreshold
If you need a trigger when a value exceeds/goes below a threshold, but your signal is noisy, and you want to avoid lots of triggers exactly around the threshold value. That's what a hysteresis is for. The threshold is a bit higher when the signal goes up, and a bit lower when the signal goes down, providing a "corridor" for noise without triggering events. In the demo, there is one UI to play with, and a second application (a bit of an abuse of the plugin) for changing her facial expression when the dildo EnabledRelay trigger is clicked.WARNING: Breaking change introduced in v9 to get rid of a naming inconsistency. Please see the instructions here how to edit your scene to fix that issue.
FloatOperator
Takes two input values and outputs the result of one of five mathematical operations: minimum, maximum, average, difference, multiplication. Useful, e.g., with "Maximum", for arousal slowly driving a nipple erection slider through the first value, but Timeline driving the second value for a quick "harden effect" when she is touching herself.WARNING: Breaking change introduced in v7 to get rid of a naming inconsistency. Please see the instructions here how to edit your scene to fix that issue.
BinaryBoolOperator
Takes up to 8 boolean values as inputs and changes a boolean output using the typical operators AND, OR, XOR, and three operators (<, =, >) that compare the amount of inputs that are TRUE. Useful, e.g., for building puzzles based on a range of switches (AND), or for controlling light from several points of a room (XOR).WARNING: Breaking change introduced in v8 to get rid of a naming inconsistency. Please see the instructions here how to edit your scene to fix that issue.
FloatSelector / BoolSelector
Takes up to 8 inputs (float/bool) and forwards one of them to the output. Similar to a "switch" statement in programming, but for values (for Triggers, there is already an equivalent module in MacGruber's package).SequenceMachineBidirectional
An extension of MacGruber's SequenceMachine that can also step backwards. Useful, e.g., for forward/backwards buttons on a series of animations or clothing/appearance options (like in the demo scene).ProbabilisticChoice
Chooses between several configurable options based on their probability. Useful, e.g., for dialogues where user decisions can change the probability of the next response.EnabledRelay
Extension of MacGrubers Relay in that a trigger will not be forwarded when the atom containing the plugin is disabled. There is an option to "remember" that the trigger was fired, and the plugin will then relay that as soon as its containing atom becomes enabled. Useful, e.g., to have the same button cause different things depending on what scene objects are currently active.OnLoadingActions
An event hook that checks whether there is a loading dialog (or the hourglass icon), e.g., when loading scenes, subscenes, and textures. Will fire events when loading starts/stops, and provides a continuous value (a bit hack-ish, though) for the loading progress. Perfect to, e.g., stop a fade-out/fade-in animation in the middle while the loading happens, and only continue the fade-in/story when everything is loaded. Or to animate something based on the loading progress.Update in v3: It is now also possible (additional option in the UI) to monitor the loading state of all CUAs, whether in the current scene or in subscenes getting loaded.
PerlinNoiseValue / PerlinNoiseMovement
Changes a value/moves an atom based on the smooth characteristics of Perlin noise. Perfect for adjusting light colour/intensity and position of a point light in a fireplace/torch/candle (see demo scene). Or for subtle shake of a handheld camera. Or for speed variations of a sex animation. Or...The Movement plugin needs to know what reference position/rotation the noise is applied to. That can be done either by parenting the atom, and the parent determines those values, or by NOT parenting the atom and choosing from any of the scene atoms/parameters in the provided popup lists.
WARNING: Breaking change introduced to PerlinNoiseValue in v9 to get rid of a naming inconsistency. Please see the instructions here how to edit your scene to fix that issue.
UI_Sync
Keeps a UI element such as UIToggle, UISlider, UIText in sync with any VaM parameter. Whenever the UI element or the parameter change, the other "side" will update accordingly. Use UIToggle for a boolean parameter, UISlider for a float parameter, and UIText for a String or StringChooser (the last one works only "to" the UI element due to lack of in-game input).Since v6, it is possible to use C# String.Format strings in the text of the Control to customise the value, e.g., {0:0.00} would show a float value with two decimals, {1:On;0;Off} would translate a boolean into On/Off instead of True/False. See this documentation page for more details, and check out the controls in the demo scene.