Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account
This post has been closed. You can still view previous posts, but you can't post any new replies.

Higher Level Variable Functionality

At the moment, the only variables we have to work with are the attributes, and even as is, we can only read data out of the variables, we aren't able to write data to them from within a macro, at least as far as I can tell, I haven't seen any info on it in the help sections.  I would like to be able to set macros up that allow me to modify variables.  Such as: I have an attribute on my character called "Arrows," and it is set to 30.  When I roll my Bow Attack Macro, I would like to be able to decrement my Arrows attribute like so. /em nocks two arrows and fires them at the enemy. /roll 1d20+@dexMod /roll 1d8+@bab /set @Arrows = @Arrows-2      Or if I am a GM, maybe I would like to automatically modify a characters HP after an attack, like so: /em nocks two arrows and fires them at @playerOne:Name. /set @attack = (/roll 1d20+@dexMod) /if @attack >= @playerOne:AC /begin /set @playerOne:HP = @playerOne:HP - (/roll 1d8+@bab) /end /set @Arrows = @Arrows-2 Okay, I might have introduced IF statements in that last example, but can you blame me really.  The important thing is being able to write to variables, that would make a world of difference to me and my friends who I will be starting up some campaigns with in the near future. 
 that would be a great utility. 
1365048588
Konrad J.
Pro
API Scripter
Yup, variables are needed.  I tried to do a very simply thing and couldn't
That's probably not going to happen with macros as they are, but may be available via the API that mentors will be able to use in their campaigns on the dev server when the API gets implemented. If you're interested in learning more about the API and what you'll be able to do with it... you should subscribe and chime in with your interests and suggestions.
As Jonathan said the dice engine and macros are about as complex as they are going to get. Further features add too much complexity to the syntax which is already quite complex. There is an API in development that will be available to Mentors only one released. There are a lot of "The API might be able to do that" posts and this falls in there but I want to make it clear that we don't have a complete picture of what the API will and will not let you do.  
+1 Jonathan TheBlack  More supporters/mentors will mean more features and a better system.
Cool beans, me and my buddy spent the last two days learning the systems ins and outs as far as player permission inhertance works, i was planning to subscribe today to put together some dynamic lighting maps to see how that works, if the API functions allow for more programming versatility, then even more reason for me to give you my dollars.
Honestly dynamic lighting is one of my favorite features. At first I was thinking "this will be nice for Fog  of War stuff so that isn't so much work" I have since fallen in love with the amount of role playing it creates in my players. I have it setup so everyone can only see their own light and use it more as a vision tool. They have to communicate and deal with the fact that they don't have perfect knowledge of the map and what is going on :)