• Hi Guest!

    We have recently added a new Support Tickets feature to the Hub!
    You can check out the details in our official announcement!
LogicBricks2

Plugins LogicBricks2

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:

LogicBricks2_UI.jpg


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.

UI_TransformSync​

Can be used to print Position and/or Rotation values of an object to a UIText element. To format your output, you use use C# String.Format strings in the text of the Control to customise the value, e.g., {0:0.00} would show the X-position with two decimals; {1:+00.0;-00.0} would show the Y position with a sign, two digits before and one after the decimal point. The first digit after the "{" is the value to print: 0=X pos, 1=Y pos, 2=Z pos, 3=X rot, 4=Y rot, 5=Z rot. So, e.g., a full line with all the 6 values and one decimal digit precision would be "Pos: X={0:0.0}, Y={1:0.0}, Z={2:0.0} / Rot: X={3:0.0}, Y={4:0.0}, Z={5:0.0}". As another example, check out the woman's left hand that has an info text attached.

Credits:​

@MacGruber for the ideas, code examples, and eternally useful MacGruber_Util.cs file.
Author
HAL9001
Downloads
67,230
Views
67,230
Packages
1
Total Size
0.17 MB
Version
v11
First release
Last update
Rating
5.00 star(s) 9 ratings

More resources from HAL9001

Latest updates

  1. v11: OnOutputChanging trigger for ValueDelay

    Added a trigger for when the output value in ValueDelay starts and finishes changing (Request by...
  2. v10: Bugfixes and relative/absolute PerlinNoiseMovement

    Some bugfixes around plugins that would not honour the "disabled" flag (e.g., ValueDelay) Bugfix...
  3. v9: (BREAKING CHANGE) ValueMap Mapping Curve added / Overall naming unifications

    THIS UPDATE COULD BREAK SCENES THAT HAVE USED PerlinNoiseValue, ValueMapRelay, ValueDelay...

Latest reviews

Nice. I was just making something with LogicBricks (MacG version) and was wishing the Sequence Machine was bidirectional. Next time...
HAL9001
HAL9001
That was my thinking as well ;-)
Upvote 0
I can't think of making a scene without using this
HAL9001
HAL9001
Thanks for the feedback :-)
Upvote 0
I know some correct usage, great plugin!!!
HAL9001
HAL9001
Thanks.
Upvote 0
Fantastic! Being able to sync with UI sliders is superb - long needed. And lol, back in January I made a music player that could be faded-out with Timeline and then fade-in again at selected volume. I had to use discrete values, many buttons and layers of relays (I'm not a coder). To date, my proudest achievements are once saving someone's life and making that damn player.

And then I saw these today and the same thing can be achieved in minutes. This is both fantastic... and profoundly upsetting :D
HAL9001
HAL9001
Thanks for the feedback and the Tutorial.
Upvote 1
Very usefull logics! Must have!
Upvote 0
Great work!
HAL9001
HAL9001
Thank you :-)
Upvote 0
Excellent, I repeat excellent plugin!

Where as I thought Grubers LogicBricks 1 was already revolutionary, Hal manages to expose even more in-depth logic to us for more complicated triggers!

This stuff should be included in the base of VaM.
HAL9001
HAL9001
Thank you :-)
Upvote 0
I was legit sitting on the toilet in my thinking pose yesterday thinking how cool it would be if some of these exact features existed lmao. Clearly HAL has heard my bathroom time pleads.
HAL9001
HAL9001
Too much information.... ;-) But to be honest, I get my best thoughts there, too
Upvote 0
Thank you!
HAL9001
HAL9001
You're welcome :-)
Upvote 0
Back
Top Bottom