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 .
×
May your rolls be chill this holiday season!
Create a free account

Need help making Auto fire macros for cyberpunk 2020.

1547169259

Edited 1547169351
Well, the title i have no clue what I'm doing. I need it to do 30 shots.
1547224890
GiGs
Pro
Sheet Author
API Scripter
What does a one shot version of the macro look like? Many people here who can help with making macros don;t know how cyberpunk works. We need to know how the dice roll system works, what stats will be used, etc. I will say if you have to make 30 individual attack rolls, it could be a bit tedious. Can you divide the shots between multiple targets, or are they treated as a single lump sum?
1547242092

Edited 1547246438
There one target and the dice is a 1d10. and the skills are Rilfe and Ref. the modifier would be plus 3. Also not sure what a single shot would look like. I'm very new to macros.
1547247123
GiGs
Pro
Sheet Author
API Scripter
So its 1d10 + Rifle score + Ref Score + 3? Is each roll against a target number? If so, you could do this. Add the following as an Ability on your character. Change rifle and ref below to the attribute names on your character sheet. /roll {30d10+@{rifle}+@{ref}+3}>?{Target|0} Alternate way of expressing the same, which takes up less space on screen. [[ {30d10+@{rifle}+@{ref}+3}>?{Target|0} ]] The latter version can be combined with text easily, like &{template:default} {{name=Autofire}} {{number of hits=[[ {30d10+@{rifle}+@{ref}+3}>?{Target|0} ]]}}
1547247248

Edited 1547247875
GiGs said: So its 1d10 + Rifle score + Ref Score + 3? Is each roll against a target number? If so, you could do this. Add the following as an Ability on your character. Change rifle and ref below to the attribute names on your character sheet. /roll {30d10+@{rifle}+@{ref}+3}>?{Target|0} Alternate way of expressing the same, which takes up less space on screen. [[ {30d10+@{rifle}+@{ref}+3}>?{Target|0} ]] The latter version can be combined with text easily, like &{template:default} {{name=Autofire}} {{number of hits=[[ {30d10+@{rifle}+@{ref}+3}>?{Target|0} ]]}} I will try this thanks. It just gives me this "TypeError: Cannot read property 'substring' of undefined"
1547248075
GiGs
Pro
Sheet Author
API Scripter
Oh, that's my mistake sorry. ?{Target|0} should be @{target|0} - change the ? to an @.
GiGs said: Oh, that's my mistake sorry. ?{Target|0} should be @{target|0} - change the ? to an @. Same thing sorry.
1547249083
GiGs
Pro
Sheet Author
API Scripter
Some basic questions: Have you created this text as an Ability on your character sheet, as a Macro in the roll20 sidebar, or are you just typing it into chat? Only the first of the there will work as written. Secondly, are the attribute names spelled correctly? Do you have attributes on your character sheet named rifle  and ref  and spelled exactly that way?
1547249576

Edited 1547249746
GiGs said: Some basic questions: Have you created this text as an Ability on your character sheet, as a Macro in the roll20 sidebar, or are you just typing it into chat? Only the first of the there will work as written. Secondly, are the attribute names spelled correctly? Do you have attributes on your character sheet named rifle  and ref  and spelled exactly that way? Sorry I was not adding as an Ability my bad. But now it tells me this. "There was an error with your formula. Please try again." and "No attribute was found for @{TARGET:target|0}"
If i get rid of the Target bit then it rolls. But a new problem comes in to play. It is not adding the +3 and the Rifle and Ref to each roll.
1547253391

Edited 1547253416
GiGs
Pro
Sheet Author
API Scripter
@{TARGET:target|0} should be @{Target|0} When that is fixed, the stat addition will work properly
It is. That is just the error it is giving me.
1547260015
GiGs
Pro
Sheet Author
API Scripter
Can you copy the text of the Ability and paste it here?
/roll {30d10+@{rifle_Skill}+@{ref}+3}>@{Target|0}
1547261502
GiGs
Pro
Sheet Author
API Scripter
This is embarrassing, hehe. It was my mistake again. Try this /roll {30d10+@{rifle_Skill}+@{ref}+3}>?{Target Number|0}
1547262010

Edited 1547262389
Alight that worked. Thanks this will help a lot.
1547264841

Edited 1547264917
GiGs
Pro
Sheet Author
API Scripter
I was just reading a page on the internet about CP2020's combat system. Are you sure you roll 30 dice for attacks? What I read suggested you roll one die, and you get 1 hit for each point you beat the target. If that's the case, this is the macro you want: /roll {d10+@{rifle_Skill}+@{ref}+floor(?{ROF|30}/10)-?{Target Number|15}+1,0d0}k1 Here are a couple of prettier ways of displaying it Method one &{template:default} {{name=Autofire Attack, ?{ROF|30} Shots}} {{Target [[?{Target Number|15}]]=Hits Scored: [[ {d10+@{rifle_Skill}+@{ref}+[[floor(?{ROF}/10)]]-?{Target Number}+1,0d0}k1 ]] }} Method 2 &{template:default} {{name=Autofire Attack, ?{ROF|30} Shots}} {{Target=[[?{Target Number|15}]]}} {{Hits Scored=[[ {d10+@{rifle_Skill}+@{ref}+[[floor(?{ROF}/10)]]-?{Target Number}+1,0d0}k1  ]] }}
1547273772

Edited 1547274472
Oh, Thanks that is 100% what I needed. and is there a way to dmg?
1547322598
GiGs
Pro
Sheet Author
API Scripter
There's no way at the free subscriber level to automatically roll damage for each hit.  The simplest way is to set the damage roll up as an Ability, add it to your macro bar, and click it once for every hit. It might be a bit tedious for 20+ hits. You can also create a macro that asks how many hits, and rolls each one, but trust me, that would be a monster of a macro for up to 30 hits and I dont know if roll20 can cope with it.
GiGs said: There's no way at the free subscriber level to automatically roll damage for each hit.  The simplest way is to set the damage roll up as an Ability, add it to your macro bar, and click it once for every hit. It might be a bit tedious for 20+ hits. You can also create a macro that asks how many hits, and rolls each one, but trust me, that would be a monster of a macro for up to 30 hits and I dont know if roll20 can cope with it. That is fine there is way to roll to hit location and dmg of more than one shot on the character sheet already just not a way to see how many shots hit.