[Plugin release] Basic math operations

387 views
Skip to first unread message

Luca D

unread,
Sep 16, 2014, 4:19:47 AM9/16/14
to voice...@googlegroups.com
Hello again
I've seen some requests in a few threads that involved some tinkering  with numeric condition values, so I though i could put out a simple plugin to help with some basic math functions.

The first release supports the four basic operations "add/subtract/multiply/divide", and they will be applied onto any condition that you set before calling the function (at least two values are needed, of course, but more are supported, they will be considered in the order specified)
Feel free to suggest additional functions to add, I'll try and implement that... keep in mind that VoiceAttack conditions are simple 16 bit integer values, so the range of possible operations is a bit limited

You can download it from here: https://dl.dropboxusercontent.com/u/90846278/VAMath.zip
Please follow the instructions in the 'readme.txt' file, the sample profile and the included help file in RTF format.

Have fun,
Luca

Lynx-Lynx

unread,
Sep 16, 2014, 9:29:04 AM9/16/14
to voice...@googlegroups.com
Senor..... You're a star !!!!

Works absolutely perfect (also, when the result is negative)! What can i say ?

THANKS FOR PUTTING THIS TOGETHER !!!

The only thing we could need from Gary now, is to implement in the command window, the possibility to "tick" execute command {ConditionValue} times !

Luca D

unread,
Sep 17, 2014, 2:20:07 PM9/17/14
to voice...@googlegroups.com
...and already a new version!

Three new functions added: min, max and countdown

The first 2 should be pretty self-explanatory: return the lower or higher value from a set of condition passed to the plugin

Countdown can be used to simulate a countdown/cooldown: set a condition with an arbitrary name that rappresents a given number of seconds, execute a command the first time and, after that, each subsequent call will return the number of seconds still left from the starting invocation. It's actually easier to understand when you see this in action, just check the sample

As always, please follow the instructions in the 'readme.txt' file, the sample profile and the included help file in RTF format.

Have fun,
Luca

Raron

unread,
Sep 17, 2014, 7:22:01 PM9/17/14
to voice...@googlegroups.com
Lynx-Lynx: That's already possible natively in VA. Just make a counting variable (condition value), make a looping command by ticking either "This command repeats continuously" or "... repeats X nr of times". And then exit it when some condition is met (or not met),

Here's an example of a countdown loop:

Begin Condition: [Countdown] Is Greater Than 0
 
Say, '{Countdown}'
 
Pause 1 second
End Condition - Exit when condition not met
Set [Countdown] value as decremented by 1



This need to be called from another command (the "Execute Another Command"), which also needs to set the Countdown value to something.

Dizzy High

unread,
Sep 21, 2014, 4:00:14 AM9/21/14
to voice...@googlegroups.com
Great stuff, had been hoping someone who knew what they were doing would put this together!

Happy Dayz

MJ Feldo

unread,
Sep 30, 2014, 1:45:47 PM9/30/14
to voice...@googlegroups.com
I'll use it, thanks!

Luca D

unread,
Dec 30, 2014, 1:45:06 PM12/30/14
to voice...@googlegroups.com
New version of the plugin is out, it features:
  • modulo operator
  • bitwise AND
  • bitwise OR
  • bitwise XOR

Xen Xennon

unread,
Dec 30, 2014, 5:21:37 PM12/30/14
to voice...@googlegroups.com
Amazing!  I have not had a chance to fiddle with this yet (trying to get the logic right first for my whole profile to work properly).  Adding the boolean ops is also terrific because it can simplify many *decisions* well.

Suggestion: Changing the name of the archive to indicate the version release date so we know whether or not we have the latest version.
eg. VAMath-20141231.zip for year-month-day of the build.

Luca D

unread,
Dec 30, 2014, 5:52:52 PM12/30/14
to voice...@googlegroups.com
True, but since you can't actually browse the "Public" folder in DosBox, where i keep all my plugins, you can't see before hand how the archives are named, unless I post a direct link to each one of them.... at that point, given that i've also posted the links elsewhere, I'd rather keep the name unchanged; that way old links never break, and it's guaranteed to always point at the latest version

I always make a post in the plugin main topic when i upload some update

Luca D

unread,
Jan 24, 2015, 10:08:51 AM1/24/15
to voice...@googlegroups.com
Version 1.03 is available at the usual address:
https://dl.dropboxusercontent.com/u/90846278/VAMath.zip

This release adds support for permanent storage and retrieval of text variables and conditions, so that they can be persisted between sessions.

Just pass any desired variable, and they will be stored on disk (in a simple XML file in the plugin directory); call the load function in a subsequent session, using the exact same variable names used before, and they will be loaded back from disk into memory

Needless to say, just read the help file included and look at the sample profile for any detail

Have fun,
Luca
Reply all
Reply to author
Forward
0 new messages