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

Auto sorting turn order after Summoning token

Having an issue trying to summon tokens to use as visual representation for spells. I'm using both the King Summon API and alot of TheAaron's API wonders. (e.g. Groupinitiative, Turnmarker, and AddCustomTurn) I've gotten them to work nicely enough so that a character can summon a spell token such as a grease spell, and add a custom duration token to the turn order. The problem comes when it first gets added to the tracker, it resorts the initiative, is there a way around this so that the character's spell remains on their initiative for duration? 
1558938015
The Aaron
Roll20 Production Team
API Scripter
What script are you using to add the turn order entry?  It sounds like it's doing the sort, or possibly triggering it. 
This was the only script I could find that did what I wanted other than tracker jacker which added alot more bloat to my chat window than desired. I'm pretty new to the pro roll 20 world, so there may be better ones out there now, I think I found this on a forum from you but from a few years ago.  on('ready',function(){     "use strict";     on('chat:message',function(msg){         var args,cmds,who,initial,change,entry;         if('api' === msg.type && msg.content.match(/^!act\b/) && playerIsGM(msg.playerid) ){             if(_.has(msg,'inlinerolls')){                 msg.content = _.chain(msg.inlinerolls)                     .reduce(function(m,v,k){                         var ti=_.reduce(v.results.rolls,function(m2,v2){                             if(_.has(v2,'table')){                                 m2.push(_.reduce(v2.results,function(m3,v3){                                     m3.push(v3.tableItem.name);                                     return m3;                                 },[]).join(', '));                             }                             return m2;                         },[]).join(', ');                         m['$[['+k+']]']= (ti.length && ti) || v.results.total || 0;                         return m;                     },{})                     .reduce(function(m,v,k){                         return m.replace(k,v);                     },msg.content)                     .value();             }             args = msg.content                 .replace(/<br\/>\n/g, ' ')                 .replace(/(\{\{(.*?)\}\})/g," $2 ")                 .split(/\s+--/);             cmds=args.shift().split(/\s+/);             change=parseFloat(cmds[1])||'+1';             initial=parseFloat(cmds[2])||0;             entry=args.join(' ');             if(entry.length){                 let to=JSON.parse(Campaign().get('turnorder'))||[];                 to.unshift({                     id: "-1",                     pr: initial,                     custom: entry,                     formula: change                 });                 Campaign().set('turnorder',JSON.stringify(to));             } else {                 who=getObj('player',msg.playerid).get('_displayname');                 sendChat('ACT',`/w "${who}" <div style="padding:1px 3px;border: 1px solid #8B4513;background: #eeffee; color: #8B4513; font-size: 80%;"><div style="background-color: #ffeeee;">Error: no entry name provided.</div></div>`);             }         }     }); });
Are you using VTT enhancement suite for Chrome?
Yes! Turning it off seemed to fix the issue. Thanks all!