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] TurnMarker1 - Turn Token Highlight, Round Counter, Player Advance Command, Turn Announce + spiny graphics if you want them!

It causes an incredible amount of lag for my players, so no.
August 04 (10 years ago)
The Aaron
Roll20 Production Team
API Scripter
I have found a way to speed it up and make it more smooth, but yeah, it's a bit laggy..
the auras no, but i use the rotation. it lets me know at a glance if the api has crashed, cause if its turning, then the api is still running.
August 05 (10 years ago)
The Aaron
Roll20 Production Team
API Scripter
Ha. I guess that's one use for it. =D
The best initiative tracker I've used. Thank you so much. Actually, I'm using most of the scripts that you've shared so thank you for all your contributions.

As for the rotation and aura animations, I've not used them and have no plans to do so.
Aaron. I'm not sure if you could think this could merge into this amazing script or have to be a different one. However I am thinking of an idea where I can select multiple creatures. and roll for initiative for them all together and take the lowest initiative and add them all to the turn order at that initiative.

What I want to do for medium to large fights is select a group of 4-5 creatures of the same type. and roll them together.

So what I am looking for is it to check for each selected and add it to a total. Then roll that many d20s. so #SelectedD20 + Dex modifier.

After rolling that many, kl1 (keep lowest one) and set all of their initiatives on the turn order to that value.

What I am trying to achieve with this is for when I have the party go against ~20 creatures. With macros I can keep it moving, but with the random rolling and no easy other solution that comes to mind (other than maybe using a marker???), I think this might be the best.

What it would simulate is those creatures working together in the turn order. That way I don't have to drop them in the turn order to be next to each other, or change their numbers after adding them.

August 05 (10 years ago)
The Aaron
Roll20 Production Team
API Scripter
Probably doesn't belong in this script. But separate should be fine...

https://app.roll20.net/forum/post/1066916/script-g...


=D
August 05 (10 years ago)
Hey Aaron,

Is there any way to make this (or the group init) script affect the tokens that are in the GM layer?
August 05 (10 years ago)
The Aaron
Roll20 Production Team
API Scripter
For the TurnMarker script, if you want the script to stop on tokens with initiative on the GM layer, you can do this:
!tm toggle-skip-hidden
By default it passes over the hidden tokens so the players don't know they are there.

For the Group Init script, you just need to switch to the GM layer and select the tokens to add.
August 05 (10 years ago)
Gotchya. Thanks much! :-)
Oh, I do have a request. It seems with the latest update, it also adds a bar on the bottom of a turn change. In my campaigns I have the DM have explicit control over tokens (from when your IsGM wasn't in all of your scripts??? as well as the carry torch).

So it pastes both the player name and an additional bar for the DM/GM. Is there anyway it skips pasting the DM/GM unless the DM/GM is the only controller of the token OR if no one controls it? I love the bar. and love this script, but this bar can get confusing if there are multiple controllers of a token, etc.

What do you think?
August 05 (10 years ago)
The Aaron
Roll20 Production Team
API Scripter
Hmm...

You can turn that bar off with:
!tm toggle-announce-player

Probably skipping the GM's name would be reasonably easy. I'll keep that in mind for the next update (coming soon!!).
WOW this is a amazing script brudda good job
August 08 (10 years ago)
The Aaron
Roll20 Production Team
API Scripter
Thx!!
August 08 (10 years ago)
The Aaron
Roll20 Production Team
API Scripter
hmm.. do you have anything in your turn order besides the Round entry?
ok nm i got
damn your good...
I dont supose you could help me out with a script?
August 08 (10 years ago)

Edited August 08 (10 years ago)
As it stands when a chr attacks weather or not he hits or not the damage is rolled id like to be able to do dam only on a hit
this is the macro as it stands
"EXAMPLE:
Abilities Name-Attack-sword
/roll 1d20+@{Melee Tab} vs @{target|AC}
if roll is higher than target AC @{target|AC}
/roll 1d10+@{Melee Dam}"
August 08 (10 years ago)
The Aaron
Roll20 Production Team
API Scripter
Sure! PM or start a new thread and let's discuss how that would work. I've been thinking about something similar myself. :)
ok new thread titled

"API script for successful attack dam result"


in api script forum
August 08 (10 years ago)
The Aaron
Roll20 Production Team
API Scripter
=D yup, I saw it and replied.
August 08 (10 years ago)

Edited August 08 (10 years ago)
Aaron, I don't think my scripts like this amazing script. =(

I use AutoInit, Yours, HeroLab, PowerCard (HoneyBadger), plus the Pathfinder custom Powercard sheet.

Is there any kind of incompatibilities? :\

edit: OK. It looks like AutoInitiative does not want to work when I have all of my scripts working. Gah, wth?!
What error do you get Kuriin?
August 08 (10 years ago)

Edited August 08 (10 years ago)
Ok very weird. Last night it was not working for me but now it seems to be working. But, AutoInitiative is no longer working whereas that was working last night. What the heck. ;\ I'm not even getting any errors.


edit: The large animation thing that shows what token it is isn't working, but everything else is working (minus AutoInit).
August 08 (10 years ago)
The Aaron
Roll20 Production Team
API Scripter
I think I know the issue with auto init and how to fix it. does the error message have >>> and >> in it?
August 08 (10 years ago)
The Aaron
Roll20 Production Team
API Scripter
Ok, I've backported a change from my 2.0 version of this script (in development) which should fix this and other issues with compatibility with other scripts Download 1.21 (link above) and see if auto init works now. =D
August 08 (10 years ago)
Yay!!! Everything works now!!
August 08 (10 years ago)
The Aaron
Roll20 Production Team
API Scripter
Excellent!

Happy gaming!
On what "line" can i change so the round counter read 1 instead of zero? Cause combat usually starts on round 1 in my games.
August 08 (10 years ago)
The Aaron
Roll20 Production Team
API Scripter
Lines 55-68:
            marker = createObj('graphic', {
                name: state.TurnMarker.tokenName+' 1',
                pageid: Campaign().get("playerpageid"),
                layer: 'gmlayer',
                imgsrc: state.TurnMarker.tokenURL,
                left: 0,
                top: 0,
                height: 70,
                width: 70,
                bar2_value: 1,
            	showplayers_name: true,
                showplayers_aura1: true,
                showplayers_aura2: true
            });

Lines 164-166:
				marker.set({
					name: state.TurnMarker.tokenName+' '+1,
					bar2_value: 1
				});
August 08 (10 years ago)
The Aaron
Roll20 Production Team
API Scripter
Incidentally, this and other woes will be fixed in the next version. =D (Mostly fixed now in dev!)
yer just awesome
August 08 (10 years ago)
The Aaron
Roll20 Production Team
API Scripter
;)
I'd like to think there would be something I could do for you. You say you are shite with maps, well I'd like to think mine are are well (insert horn sound here) pretty freeking awesome if you ever need some work done let me know and we can work something out quid pro quo like.
August 08 (10 years ago)
The Aaron
Roll20 Production Team
API Scripter
Thanks, I appreciate that. =D
August 14 (10 years ago)
Hello Aaron,

I have a request if you have to time.

We've been using your initiative script for awhile now & we are playing a game where we do not roll for initiative at all. Instead your character's initiative is determined by your character's stats. Doc Holiday is always faster than Jango, for example. However, when two character's share the same initiative value, they roll off to determine who goes first. Picture below.



When I first begin combat with my script, it randomizes all the participants who have the same initiative value. However, when we reach the next round- Is it possible for it to automatically randomize the participants at the same initiative? otherwise, there is no rolling off & when the combat starts- it determines the initiative for the whole combat.

Perhaps when it announces the new round, could it re-randomize the combatants at the same initiative then?

Thanks.
August 14 (10 years ago)
The Aaron
Roll20 Production Team
API Scripter
Hi William.

If you already have a script for this, what if I could show you how to call your script at the prescribed time?

If you go down to line 320:
_AnnounceRound: function(round) {

You can insert some code to call your script's function there. Assuming your function is in an object called WilliamsInit and the function is called AdjustOrder, it would look like this:
        if("undefined" !== typeof WilliamsInit && _.has(WilliamsInit,'AdjustOrder') && _.isFunction(WilliamsInit.AdjustOrder)) {
WilliamsInit.AdjustOrder(); }
If it's just a bare function in the global scope called AdjustOrder, this should work:
 if("undefined" !== typeof AdjustOrder && _.isFunction(AdjustOrder)) {
        AdjustOrder();
 }

Let me know if that works for you! If not, I can help you with some custom modifications. =D

Cheers!
August 14 (10 years ago)
Unfortunately, I do not have a script that adjusts the order.

I have a very blunt script that puts all the tokens i have selected into the initiative order in descending order & then I have yours that announces who's turn it is & places that cool token under it.
August 14 (10 years ago)
The Aaron
Roll20 Production Team
API Scripter
Ah, then I guess I'll have to help you with a custom solution. :)
August 22 (10 years ago)
Just installed this script. Seems like it will be very useful! Thank you for the hard work
August 22 (10 years ago)
The Aaron
Roll20 Production Team
API Scripter
Thanks for using it! I have a rewrite of this script partially finished. Let me know if you think there are any missing features.
August 25 (10 years ago)
This is a pretty awesome script, thanks for developing it. Request some sort of movement tracker from you if you decide to develop another mod!
August 25 (10 years ago)
The Aaron
Roll20 Production Team
API Scripter
What do you mean by movement tracker?
August 26 (10 years ago)
Something that can allow the character to only move his token by the amount of moves available on their character sheet.
August 26 (10 years ago)
The Aaron
Roll20 Production Team
API Scripter
Hmm.. how would you handle difficult terrain?
August 26 (10 years ago)
it isnt just difficult terrain, what about charging, retreating etc or flying. There are a lot of variables for movement that could make a script such as that clunkier to use than just using the measuring tool
I love this script but it causes an issue running longside the conditons tracker in the listing of Apis. When the turn order moves from the round counter to acontrolled token the conditions script doesnt seem to pick up the (which is only speculation) the end turn command or next turn command from your script.

Is it possible to set it so b it so having a round counter is optional or point me in the right direction of removing the automatic moving to the next turn from the round counter
August 26 (10 years ago)
The Aaron
Roll20 Production Team
API Scripter
@Saevar, if you comment out line 355, it won't automatically advance:
//			TurnOrder.Next();

You'll want to avoid using the !eot command as well. You are correct about the cause, the conditions tracker is listening to the on('campaign:turnorder',...) event to trigger it's condition counts. However changing the turnorder entry of the campaign object does not trigger that notification. I had to handle a similar issue with my Marks script, which I did by adding a call from the TurnMarker script to notify the Marker script of the order change. There has been discussion before about the need to be able to manually trigger certain events like this, but it's not something easily done.