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

[Script Request] Initiative Assistant

The setup: I have 6 players sitting around a table playing old fashion D&D. They don't want to give up the ability of actually rolling their own dice, I can't really blame em' if i'm playing in person I have a lucky set of dice too.. So I have Aaron's groupnit mod that I use for the NPCs/Monsters but I wanted a better way to enter it for the PCs, what I currently do is one of two things. 1. Selected all players with groupinit and enter their turn info, then scroll through the list and update them one by one. 2. Longer way if the group is spread out to far, I'll right click, add turn. then scroll through and update them. 3. Click the macro: &{template:5eDefault} {{title=Initiative}} {{subheader=@{Ragnar|character_name}}} {{rollname=Initiative}} {{roll=[[?{Enter Ragnar's Init|0} &{tracker} ]]}} Have to have one for each PC. As it looks like &{tracker} won't update only 1 per macro. so 5-8 separate macros on a give basis. So what i'm thinking i'd like and i'm guessing it would only require a slight modification to one of the autoinitative / groupinit or turn tracker scripts are: 1. Click Initiative Assistant "IA" or whatever, it prompts me for each PC's initiative by name, outputs that to chat using the templates puts it/them in the turn bar and sorts it automatically via descending order. Easy enough right? Aaron could probably do this while he's sleeping. :) -Greg
1429511261
The Aaron
Pro
API Scripter
Snooorreeee.... !init-assist --bob|?{Bob's Init?|0} --tim|?{Tim's Init?|0} or !init-assist {{ --bob|?{Bob's Init?|0} --tim|?{Tim's Init?|0} }} or !init-assist {{ --bob|12 --tim|22 }} or !init-assist {{ --bob|[[1d20+5]] --tim|[[1d20+2]] }} You'll need to put a token on the board for the characters, but if you don't it will tell you who you need to do it for and provide a button to add them once you do: It remembers the numbers for the init and will set them when you click the API Button. If your name is not specific enough, it will ask you who you meant: And likewise, remembers the input number. It will also tell you if the name didn't match anyone: Git: <a href="https://github.com/shdwjk/Roll20API/blob/master/In" rel="nofollow">https://github.com/shdwjk/Roll20API/blob/master/In</a>... ...and now back to sleep...
1429516451

Edited 1429516840
Lol, you sir are amazing. Ty so very much! Sweet dreams! i shall eagerly play with this in the morning, as opposed to doing work. :)
1429535732
The Aaron
Pro
API Scripter
=D no worries!
Its awesome, works perfect! Thanks Aaron!
1429539985
The Aaron
Pro
API Scripter
Great! It does actually have one flaw, which I'll fix at some point: It can't deal with more than one character with the same name. (Will get stuck in an infinite prompt loop.) However, that's a pretty minor problem, all told and easily fixed when I have a minute. =D
Sweet, no way to have it activate desending on turn tracker? without clicking on the cogwheel and clicking it manually?
1429545651
The Aaron
Pro
API Scripter
Yeah, I figured you'd ask about that. I'll see about adding that in v0.1.2..... Git: <a href="https://github.com/shdwjk/Roll20API/blob/master/In" rel="nofollow">https://github.com/shdwjk/Roll20API/blob/master/In</a>... Just check the help, click the button for the one you want in the GenCons...
LOL, Thank you sir, I wasn't trying to be greedy, but its awesome. Could have also put this functionality in the Groupinit as well as it would have be awesome there as well. Thanks Again.
1429550373
The Aaron
Pro
API Scripter
Yeah, actually I was thinking about merging these two when I rewrite group-init... =D
1429554262
Gen Kitty
Forum Champion
*big blue eyes at The Aaron*
1429557824
The Aaron
Pro
API Scripter
Hahahhaah! They're really more Cyan... =D
Haha, as long as I didn't get you in trouble. Its not his fault GK he wrote it while he was sleeping.
1429561485
Gen Kitty
Forum Champion
*sad Tennant in the rain*
1429561858
The Aaron
Pro
API Scripter
"Shaka when the walls fell"?
Man, I would totally use this for my campaigns to just quickly add initiatives for everyone, if I could really imagine players being willing to give up rolling their own initiative. Something more amazing would being able to somehow get everyone to be able to use the &{tracker} modifier and have it actually work, because I swear I have spent so much time explaining that macro to players, and still only a minority of them can ever actually do it right even when provided with the macro itself.
1429572731
The Aaron
Pro
API Scripter
I could adjust this script to allow the players to utilize it provided the character they are specifying is one they control. It does have the benefit of not requiring a token to be selected as it selects it based on the character anyway. You might still have the same issue though, if you can't get them to roll their initiative with the &{tracker} already.
1429573959
Gen Kitty
Forum Champion
Askren said: Something more amazing would being able to somehow get everyone to be able to use the &{tracker} modifier and have it actually work, because I swear I have spent so much time explaining that macro to players, and still only a minority of them can ever actually do it right even when provided with the macro itself. Don't have them try to make the macro, make it FOR THEM :&gt; Create it as a token action, that way the token HAS TO BE selected before they can access the macro! ^_^
Try /em @{selected|token_name} Moves! [[(1d10 + (?{Total Adjustments|0})) &{tracker}]] Adjust the dice to match your system, make it a token action usable by "all players" You could also make a weapon/action specific macro for each character, Replace (?{Total Adjustments|0}) with whatever is appropriate.
GenKitty said: Askren said: Something more amazing would being able to somehow get everyone to be able to use the &{tracker} modifier and have it actually work, because I swear I have spent so much time explaining that macro to players, and still only a minority of them can ever actually do it right even when provided with the macro itself. Don't have them try to make the macro, make it FOR THEM :&gt; Create it as a token action, that way the token HAS TO BE selected before they can access the macro! ^_^ Yeah, what Kitty said. If your player is technologically inept, make the macro for them. You can do this on their character sheets quite easily.
1429590699
Gen Kitty
Forum Champion
I write and maintain all the macros for the five players in my game, and my players are quite appreciative of it. None of them really want to learn how to write powercards, and I don't blame them.
1429594229

Edited 1429594239
GenKitty said: I write and maintain all the macros for the five players in my game, and my players are quite appreciative of it. None of them really want to learn how to write powercards, and I don't blame them. The recent update that allows you to write them on multiple lines should make it easier though.
1429601141
The Aaron
Pro
API Scripter
And don't forget you can get the benefit of that line wrapping automatically with the multi line rewrite script I threw in the power cards forum: <a href="https://app.roll20.net/forum/post/1793309/#post-18" rel="nofollow">https://app.roll20.net/forum/post/1793309/#post-18</a>...
1429619127

Edited 1429619144
Gen Kitty
Forum Champion
HoneyBadger said: The recent update that allows you to write them on multiple lines should make it easier though. Easier, yes, but they still have zero interest in the codebase. :&gt; It's fine, this lets me exert artistic control over all the macros, muhahahahahaha! Aaron, I'm not sure I'll be using that script. All their macros are stored in notepad++ files and the idea of having to copy, one at a time, slowly and annoyingly, their macros from their character sheets to my notepad... well, you can see why I have yet to update my PC macros. Anyway, enough derail.....
1429622230
The Aaron
Pro
API Scripter
A single notepad++ file? Pretty sure that's scriptable... Hmmm...
There's already an export/import script for character macros somewhere.
1429630270
Gen Kitty
Forum Champion
No, five files. One per PC. But still. And yeah, I've seen scripts talked about for import/export, but of the scripts I've seen, none have had step by step instructions attached, calibrated for the brain-dead. I only look smart; the minute I try twiddling with these scripts I tend to brain-lock. That's why I like you and Aaron, you either write extremely clear guides or you will come in and do the setup yourself.
I think I got my script from Kevin, has more than I need which maybe you'd be ok with. I modified it for what I need but I think I still have his original somewhere, he posted it.. pretty much you create a macro, run the command enter the PC name and its loads a ton of token macros.
@GenKitty - how many macros do you have? Are they generic in the sense that these same macros are used consistently for your campaigns/characters? If yes, I would be happy to write something for you. It won't be as nice, elegant, or effecient as The Aaron/Honeybadger/several others, but it will be functional. Here is a link to my 5e script , it would be easy enough to modify if you have the list of generic macros that you use for PC/NPC.
1429652694

Edited 1435307728
Gen Kitty
Forum Champion
No, my macros are not AT ALL generic. 4e really doesn't support that concept, IMO. Each macro is unique and I have upwards of 20-30 macros per PC for 5 PCs. There's a script I have my eye on and I've asked The Aaron to help me understand how to use it. ( <a href="https://app.roll20.net/forum/post/1755413/imports-slash-exports-roll-20-characters-as-json-objects#post-1755413" rel="nofollow">https://app.roll20.net/forum/post/1755413/imports-slash-exports-roll-20-characters-as-json-objects#post-1755413</a> )
Oh Mr. Aaron, you have me so used to the turn tracker setting up the values in descending order using init-assist that now my roll20 online only games need it too :).
1429818321
The Aaron
Pro
API Scripter
HA. Really need to add that. I have a really awesome version 2 of TurnTracker mostly written... time is what I really need more of...
I cannot wait! Especially if that feature is included.