LogicBricks2

Plugins LogicBricks2

Added a trigger for when the output value in ValueDelay starts and finishes changing (Request by CyberHAMSTER on VaM discord).
  • Some bugfixes around plugins that would not honour the "disabled" flag (e.g., ValueDelay)
  • Bugfix in Threshold plugin when starting with values on the "wrong end" of the threshold
  • Some code cosmetics to variable names
  • As requested by @3348302775, added relative movement option to PerlinNoiseMovement (default setting is absolute so not to break any existing scenes... for a change ;-) )
THIS UPDATE COULD BREAK SCENES THAT HAVE USED PerlinNoiseValue, ValueMapRelay, ValueDelay, HysteresisThreshold.

Ok, now we should finally be done with those breaking changes. I am sorry, and I have to take my own medicine and edit several scenes by search/replace, too, so I hear your pain...
  1. Again, for consistency purposes I changed "Value" to "Input" or "Output" in the above mentioned plugins, so that all bricks now have a consistent naming convention. This is a breaking change, but can again easily be fixed by opening a scene JSON file in a text editor (e.g., Notepad++) and replacing some strings:
    • PerlinNoiseValue:
      • replace "Value Min" with "Output Min"
      • replace "Value Max" with "Output Max"
      • replace "OnValueOut" with "OnOutput" (optional as this change is automatically handled when loading an old scene, but that is not possible for the other two changes above)
    • ValueMapRelay:
      • replace "Value" with "Input"
      • replace "OnValueSet" with "OnOutput" (optional as this change is automatically handled when loading an old scene, but that is not possible for the other change above)
    • ValueDelay:
      • replace "Value" with "Input"
      • replace "OnValueSet" with "OnOutput" (optional as this change is automatically handled when loading an old scene, but that is not possible for the other change above)
      • Rethink the In/DecreaseDelay times as I have introduced a factor of 0.25 that makes those values close to the ACTUAL time in seconds that a value change will be delayed. Before that, these numbers had to be determined more by trial and error. If you want to preserve existing delays, multiply your values by 4.
      • The timing should be independent of the framerate as I now use a hardware stopwatch.
    • HysteresisThreshold
      • replace "Value" with "Input"
  2. And now for some good news: ValueMapRelay now has a map function to influence the response "curve".
    • By default, it is "Linear", but you can also change the function to
    • "Smooth Step", which provides a slow start, then a bit steeper in the middle, then slow down at the end, and
    • "Power Function", where the "Map Function Factor" comes in (for the geeks: the output is run through y = x^factor):
      • between 0 and 1: quick start, then slowing down
      • =1: equal to linear
      • >1: slow start, then quick towards the end
  3. The demo scene uses almost exclusively UI_Sync for toggles and sliders, so when you fiddle with the plugin settings, the scene should stay in sync.
THIS UPDATE BREAKS SCENES THAT HAVE USED BinaryOperator.
  • Again, for consistency purposes (sorry, I hope this is the last time), renamed BinaryOperator to BoolOperator. This is a breaking change, but can easily be fixed by opening a scene JSON file in a text editor (e.g., Notepad++) and replacing all "BinaryOperator" with "BoolOperator".
  • As requested by @mechanimus, Added a Bool/FloatSelector plugins to choose from one of 8 inputs to be forwarded to an output.
THIS UPDATE BREAKS SCENES THAT HAVE USED FloatOperator.
  • As requested by @Voithe, added a plugin that can display (but not change) the transformation (Position/Rotation) of an object in a UIText.
  • As requested by @mechanimus, added a Multiplication operator to FloatOperator.
    During that move, I removed the "Value 1" and "Value 2" operations I had introduced just before (they will go into another plugin)
    and cleaned up an inconsistency in variable/parameter naming
    that breaks scenes that have used FloatOperator before.
    But that break can easily be fixed with a text editor:
    • Open an affected scene in a text editor (e.g., Notepad++)
    • Search for the text "HAL9001:FloatOperator", and in the parameters or settings of the following JSON block:
      • Rename anything "Input Value 1" to "Input 1", (that could be in actions as well as in the plugin settings)
      • Rename anythign "Input Value 2" to "Input 2", (that could be in actions as well as in the plugin settings)
      • Rename "OnValueOut" to "OnOutput" in the plugin settings
  • Fixed a bug that would break sync on Slider atoms when disabling/re-enabling
  • Added a formatting feature, so one can use C# String.Format strings to customise the output. Examples are on the three demo controls
Didn't know about the filterable StringChooser popups until now. Much better for choosing atoms/storables in the UI_Sync settings.
Added a brick that allows to keep a parameter in VaM and a UI element in sync - either way.
UIToggle <-> Boolean, UISlider <-> FLoat, UIText <- String or StringChooser (only one way)
As a result of a discussion with @darkesthours443, the OnLoadingActions plugin can now also monitor the loading progress of all CUAs in the scene (new option added in the UI). This also applies to subscenes, so it should now be fairly easy to fade out or do something else while a subscene or a large CUA is loading.
*facepalm*, *hangingheadinshame*, I am always such a nitpicker when it comes to details and can get really furious when people don't get the credit they deserve, and what do I do here... Mess up the license requirements of MacGruber's plugins... Seriously sorry. fixed now.
Back
Top Bottom