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

Macro typing

1412562664

Edited 1412563511
Hello there, I'm a new GM using Roll20 for the first time.I'm currently working on all the macro for my players and I find all this quite amazing! I'm just starting this post to see if I'm doing things correctly and to get some feedbacks. First off, my system is quite similar to Dark Heresy. So I'll use D100 most of the time. I'm creating some generic caracter sheet, and mostly using macro insipired by the reference page on the wiki. But, as I don't want to create a macro for each player (or each weapon), I've juste created a generic one like this: /me attacks with range weapon and shoots [[-1*1d100-((@{Selected|Ballistic Skill}+?{Modifier|0})*-1)]] Dealing [[((@{Selected|Rngwpn}))]] damage. This way, I create and attribute in the player sheet refering to ''Rngwpn'' and give the damage I want to his personnal ranged weapon. (1D10, 2D10) Would that work? And I was wondering if I can create various values. Does 2d10k1 is a valid input if I create it in the attributes of the token? So if the player get a chansword in CC, he throw 2d10 and keep the highest, right? Thanks in advance! two others points/questions I have to factor strenght bonus in CC. So for the damage output of the player, I've written (in CCdmg attribute): 1D10+floor(@{selected|Agility} /10) If i get ot use a weapon that double my streght bonus, can I just insert a (2x) in the formula? Is their a way to automaticly stop any damage calculation if my inital ''to hit'' roll fails?
1412567835

Edited 1412567968
Yes, storing the damage dice and bonus' in the character sheet is a common practice. It works great and lets you use a single macro for all players. There's no conditionals in the macro system, so you can't prevent it from processing commands. What you can do is use Boolean math and Queries to ask your players to enter a 0 or 1 for different conditions and have your calculation multiplied by that result. Example modified from Macros - Pathfinder Examples [[ 1d10 + 5[STR] + ( ?{Two-Handed Weapon? 0=No, 1=Yes|0}[TwoHanded?] * 5[STR] ) ]] With 5 STR This asks the players " Two-Handed Weapon? 0=No, 1=Yes ". If they enter 0, 5[STR] is multiplied by 0 and thus 0. If they answer 1, 5[STR] is multiplied by 1, thus 5; giving your total result 5[STR] + 5[STR], or double your strength bonus.
Could my macro simply ask the player wich weapon they are using and then factor any bonus (+floor(@{selected|Strength} /10)? It would reduce 2 macro (WS2 ans BS2) that I've created and combine the operation?
1412569702

Edited 1412569866
If you can work out the math to combine a Query result (0,1,2, etc) with attributes containing your weapon dice, and still have it calculate correctly, perhaps. I can't offhand think of an easy (or feasible) way to do that, mathematically, though (Math is not my strong suite). If they were all the same base dice, 1d10 and just the bonus changed by a multiple, that could be doable. The limitation here is that you can't use a Query result to call the name of an attribute and still have that value process as a roll. It would only return the plain text of the value without processing it. ex If you had an attribute named "Rifle" with a value of 2d4+1, and used ?{Attribute?} to respond "Rifle" it will just give you the TEXT "2d4+1" without doing any rolling on it. EDIT: While defeating a certain amount of automation; you could always just store the final dice roll, including whatever bonus' it would have had as an attribute for each weapon. ie: attribute "ChainSword" might have "1d10+ (4 * 2)" and you just keep the attribute updated as Strength changes. You'd still have to have seperate macros for different weapons or just have your macro roll all of them together and you decide which one you're using in-game.
If you ever need an "If, Else" query in your roll such as "If Weapon Finesse use Dex, else use Str" then just do a query like Mark presented above but with a small change. [[ 1d10 + ?{Weapon Finesse? 0=No, 1=Yes|0}*@{Selected|Dextreity}[Dex] +(1-?{Weapon Finesse? 0=No, 1=Yes|0})*@{Selected|Strength}[STR] ) ]] I'm not sure if you'll need something like that with the rule system you're using but it helps to know how to handle such situations if they ever come up.
Chell said: If you ever need an "If, Else" query in your roll such as "If Weapon Finesse use Dex, else use Str" then just do a query like Mark presented above but with a small change. [[ 1d10 + ?{Weapon Finesse? 0=No, 1=Yes|0}*@{Selected|Dextreity}[Dex] +(1-?{Weapon Finesse? 0=No, 1=Yes|0})*@{Selected|Strength}[STR] ) ]] I'm not sure if you'll need something like that with the rule system you're using but it helps to know how to handle such situations if they ever come up. Does the macro you've written always give you 2 results for your two type of damage? And why add [STR] or [Dex] after? I would need my player to input their weapon (1st or 2nd) and then roll everything and get only one final result.
If you're only dealing with two weapons, it shouldn't be too bad. (Note: this is my brain failing at Math, so I'm just offering up two queries instead of asking once and figuring out the math) [[ ( ?{Using First Weapon? 0=No 1=Yes|0} * (Whatever Weapon 1 does) ) + ( ?{Using Second Weapon? 0=No 1=Yes|0} * (Whatever Weapon 2 does) ) ]]
Great! I've finally found something. Thanks a lot Mark and Chell. I've combined both your idea and I've found a way to create a condition for using weapon 1 or weapon 2. It goes like this: /me attacks with range weapon and shoots [[ floor((@{selected|Ballistic skill} + ?{Modifier|0} - d100)/10))]] the shoot dealing [[ ?{Using First weapon? 0=No, 1=Yes|0}*@{Selected|Rngwpn1} +(1-?{Using First weapon? 0=No, 1=Yes|0})*@{Selected|Rngwpn2}) ]] The first ''to hit'' part give me the degree of sucess for the throw and only one damage is given to me. Only one query is asked to the player. Perfect! Thanks a lot. I'm now wondering how I can include the armor penetration in the written result. I could write it down as and attribute and ask for a query, but how could I relate it to the good weapon used in the process of the shotting attack? I've also found out I can just write it down in the attribute and when I execute the macro, it will be written un the formula. Is their a better way to do this?
When using a single macro for different weapons, I would tend to keeping the specifics about the weapon roll in an attribute or its own macro and call it with #macroname. Just keep in mind you don't include the [[ ]] in the called macro when doing that. ie: [[ blah blah + #FirstWeaponMacro ]]
Don't discount what folks before you have already accomplished, btw. Search the forums and you'll find example of what other folks have done in the same setup. (example link )
the purpose of adding [STR] or [DEX] or whatever inside a singe pair of square brackets [TEXT HERE] is simply to add tags to the in-line roll so if you ever mouse over the result to check what it did you know what bonuses are from what. Also... you don't need the extra closing parenthesis at the end of the roll... It was late at night when I posted my example and didn't notice I added an extra one there....
Speaking as a player, not a GM, I absolutely do not like macro's that pop up a query every time I use it just to save a little space on the macro bar. It slows the game down, imo.
1412637354

Edited 1412637428
Point taken HB. I'm currently creating all my weapon with different macro. And I've decided to create a ''close combat strike'' and a ''shooting'' strike, thus, minimizing all query to my players. Creating all the weapons is time consuming, but everything will be more enjoyable after this. Thanks for the input everyone! I'm currently wondering how I can create a macro to indicate any plasma overheat...
Does anybody know how I could create a ''overheat'' effect? Plasma gun, when rolling over 90, will overheat. And then, I'll use a d10 to see what happen. I've checked around the forums and I didn't find anything.
You're basically in the realm of API coding at this point. The Macro system, unfortunately, can only do so much. This will be a manual examination of the dice roll, generally.
What I would do is add this to your macro after your roll +[[1d10[Overheat]]] And just make it known that the additional is for the Overheat affect... Alternatively, since this is to determine a random effect you may wish to use a rollable table instead. If you take this route add this to the end of your macro after making a rollable table with each of the 10 results (Overheat Effect: [[1t[Overload-effect-table]]]) To display text based effects properly from the rollable table in an in-line roll avoid putting any numbers at the start of each table entry