LogicBricks

Plugins LogicBricks

Overview
LogicBricks is a collection of now 34 reusable logic plugins to quickly build simple logic without coding. These go from a simple Relay that just groups triggers via Counter and Blend to more complex bricks for RandomChoice and a very powerful StateMachine brick. There are six demo scenes with altogether 30 examples to spawn some ideas.

The key feature here is that it is using VaM's own Trigger UI, so it should be familiar and easy to use for any creator who used VaM's trigger system before. Just like an UIButton, you can hook it up to AnimationPattern's, Timeline, other plugins and all the kinds of things VaM has to offer.

LogicBricks are a good way to make your scenes a bit more interesting without coding skills. Have some randomness and logic rules instead of just simple animation loops. For example the scene controller plugin used in the Life04 demo scene could now be entirely replaced with just a StateMachine brick. However, you likely won't want more than a few of these in your scene, since at some point coding a custom plugin for your scene becomes way easier.

Note that you can download older versions of this plugin for free from here.

Examples
There is a separate package with five demo scenes containing altogether 30 examples that hopefully will spawn some ideas for you. This includes a more complex example using two StateMachine bricks as well as a ValueUpDown brick controlling IdlePoser animation for a Handjob setup. Another example, using ScreenFade and LoadingDelay bricks, shows how to have a nice fade-to-black transition to hide the transition when loading another subscene.

In addition I recommend to checkout my three more elaborate demo scenes that make use of LogicBricks:
  • DoubleTrouble: POV bondage femdom. NOT simple linear animation, different every time you play it.
  • CyberNight: Demo showing how you can build branching multiple-choice dialogs that came with LogicBricks 7.
  • EvilCorpHQ: Simple demo showing the separate SpeechRecognition brick.
There is also a hopefully growing number of video tutorials that can be found here:

Screenshots
StateMachine1.jpg RandomChoice.jpg RandomDelay.jpg StateMachine2.jpg
Examples1.jpg Examples2.jpg Examples3.jpg SmoothLoading.png


LogicBricks
  • Relay: LogicBrick that triggers directly after Trigger is called. Useful if you want to trigger the same things from multiple sources.
  • RelayOnce: LogicBrick that triggers directly after Trigger is called, but only once. Call Reset to use again.
  • Counter: LogicBrick that can count up and down and provides a status value between 0 and 1. Provides a trigger signal when reaching either end of the range.
  • Delay: LogicBrick that triggers a fixed time after Trigger is called.
  • RandomDelay: LogicBrick that triggers a random time after Trigger is called.
  • LoadingDelay: Similar to Delay, except that it internally resets its timer while there is any loading in progress. So you trigger it before you start loading stuff and get a trigger back X seconds after loading finished. The extra delay allows you to wait for hair/clothing/body physics to settle into place.
  • Blend and RandomBlend: These are a variants of the Delay and RandomDelay. After Trigger was called, these provide a separate Start trigger, a value slowly going from 0 to 1 and eventually an End trigger. Classic use case would be to blend something in or out.
  • Loop: LogicBrick that triggers multiple times with at a fixed time interval after Trigger is called.
  • RandomLoop: LogicBrick that triggers multiple times with at a random time interval after Trigger is called.
  • FrequencyLoop: Triggers multiple times with at an accelerating or decelerating frequency after being triggered. Can also be used for constant frequency by setting start/end to the same value.
  • Timer: LogicBrick that triggers continuously in a fixed time interval.
  • RandomTimer: LogicBrick that triggers continuously in a random time interval.
  • RandomChoice: LogicBrick that, after Trigger is called, selects a random Choice to trigger. Use Avoid Repetition take the last one or two choices out of the selection, depending on the number of total available choices.
  • SelectChoice: Similar to the RandomChoice, except that the choice is not random, but based on a drop-down parameter you can set via trigger. Basically its a "switch" statement you might know from many programming languages.
  • SequenceChoice: Similar to RandomChoice and SelectChoice. However, each time it's triggered, it executes the next item in the sequence. There is also a RandomShuffle option.
  • RandomSound (updated!): Plays random sound after Trigger is called. This can work with VaM's embedded sounds as well as sounds referenced on the Scene Audio tab. Needs to be placed on a Person, AudioSource, RhythmAudioSource or AptSpeaker atom.
  • RandomSoundFromAB (updated!): Similar to RandomSound, but can load sounds from AssetBundles instead. See also SoundFromAB, which also has a random function.
  • SoundFromAB (new!): Exposes audio files found in Unity AssetBundles to VaM's Trigger system. If you have lots of sounds, this loads way faster and is more convenient. Folders inside the bundle will be exposed by two triggers each: PlaySpecific and PlayRandom. The benefit of this approach is that you do not need an individual brick for each sound or small random set of sounds you want to play. You just need one instance of this brick per AssetBundle and AudioSource. That allows managing hundreds of sounds in scene without long load times.
  • StateMachine: Very powerful LogicBrick that represents a the concept of a StateMachine. Each State has a random duration after which it randomly chooses among the transitions of that State to switch the next State. Can also be controlled externally as well as provides a sync feature to sync with other systems in your scene. More advanced features allow you to use this brick to build multiple-choice dialogs in your scenes.
  • SequenceMachine: Similar to StateMachine, except transitions are fixed so states are gone through in sequence. This makes handling this common case a lot easier. There is also a RandomShuffle option.
  • ValueRelay: Just like a relay, but for values.
  • ValueEaseIn: Relays a float value after applying a quadratic EaseIn curve. (FadeIn)
  • ValueEaseOut: Relays a float value after applying a quadratic EaseOut curve. (FadeOut)
  • ValueSmoothStep: Relays a float value after applying a classic SmoothStep curve (FadeIn - FadeOut).
  • ValueInvert: Relays a float value after inverting it: 1 - X
  • ValueRandom: Provides a random value between 0 and 1 when Trigger is called.
  • ValueUpDown: Provides a value that ping-pongs between 0 and 1. You can smoothly adjust the speed and through triggers you can have it smoothly stop at exactly 0 or 1, causing a trigger signal you can connect to. This is obviously useful handjobs and similar animations where you want them to stop at a precise point to you can transition to some other animation. You see this in action in this video.
  • ValueThreshold: Allows you to fire a trigger when a float value crosses a particular threshold, the DoubleTrouble scene uses it for lube audio effects of the handjobs.
  • LinearAnimation: Allows you to interpolate the position of an atom between two positions. Essentially this is an AnimationPattern with just two steps, except it's all in a single atom and its actually linear. In this video you see this in action, it's utilized to animate Empty atoms used as anchor for IdlePoser states. This keeps your scene organized when you need like 10 different of those anchor atoms in a very tight space where it would be impossible to tell the AnimationSteps apart.
  • RandomAnimation: Simple plugin that provides a random motion within a sphere for the main control of an atom. This is intended to be used as anchor for IdlePoser states, for example providing some small continuous idle motion for a hand when it's not touching the body.
  • EventSceneLoad: Brick that triggers on scene load. Also allows you to do different things depending on whether you are in VR or Desktop.
  • EventAudioQueueEmpty: Brick that triggers when an AudioSource did run out of audio to play. Needs to be placed on a Person, AudioSource, RhythmAudioSource or AptSpeaker atom.
  • ScreenFade: Brick that can fade the entire scene to any color. Nice to cover up loading transitions, things like player teleports or simply helping with telling the story of your scene.
  • RichText helper plugin: Allows you to use Unity RichText on SimpleSign and UIText atoms. You can have bold or italic font, control the fontsize as well as color of individual words. I used this for the example scenes.

Additional LogicBricks in separate packages
  • SpeechRecognition: Recognize simple keywords lists as well as more complex grammar using Windows 10 and Unity's speech recognition features.

Coders: Make your own!
I hope this collection will grow eventually as I need little plugins when building demo scenes for other plugins. Maybe other coders chime in and build compatible plugins using the same EventTrigger system. If you are a coder, check out the included MacGruber_Utils.cs, which handles the needed building of custom UI for the trigger screen, internal handling of AssetBundles as well as scene load/save for you. The Utils class also helps with creating sliders, buttons, etc. for your plugin UI. including some custom UI elements and handling for context sensitive UI that can change at runtime. If you build your own LogicBrick plugin, using one of mine as a starting point might be a good idea.

License
This was an EarlyAccess release! Download is now available for free under CC BY-SA license. You are allowed to reference this package in your own VAR packages, even if they are paid or use a different license. Links to my Patreon are always appreciated.
PatreonBanner480.png
Author
MacGruber
Downloads
1,601,755
Views
1,601,755
Dependencies
4
Packages
2
Total Size
0.6 MB
Version
14 (free)
First release
Last update
Rating
5.00 star(s) 29 ratings

More resources from MacGruber

Latest updates

  1. Version 14 (free)

    Version 14 is now free!
  2. Version 14

    Version 14 adds the new SoundFromAB brick and other improvements around the topic of handling...
  3. Version 13 (free)

    Probably very random seeming list of changes....but it all makes sense! I need them for an...

Latest reviews

No scene is complete without at least one of those. Swiss army knife of the VaM developer.
Upvote 0
Insane toolbox which adds so many, much needed options to VaM. I especially love the randomization possibilities - Thank you so much for this!
Upvote 0
The sand bucket to the sandbox, you help us mold our creations, thank you!
Upvote 0
Fantastic suite of plugins, so many uses, nice one.
Upvote 0
If VAM is one thing, then LogicBricks empower it into something else.
Upvote 0
as great as the timeline。。
Upvote 0
Legendary plugins to level up your scene.
Upvote 0
A MUST-HAVE toolbox.
Upvote 0
Its the blocks to build on.
Upvote 0
Back
Top Bottom