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

StatusInfo - reorder added conditions alphabetically

Hey guys, sorry in advance if this has been asked before. I've searched the forum and can't find exactly what I'm looking for. What I'm trying to do is re-order the conditions I've added alphabetically. This is what I'm seeing currently: I simply want to be able to re-order these or, if possible, have these sorted alphabetically automatically. Is there a way to do this?&nbsp; This is what I'm using: <a href="https://raw.githubusercontent.com/Desecrator7/Roll20Stuff/master/statusInfoModified.js" rel="nofollow">https://raw.githubusercontent.com/Desecrator7/Roll20Stuff/master/statusInfoModified.js</a> Any help would be greatly appreciated!
Token Status Markers are sorted based on their order in the Token Marker Set list:&nbsp; <a href="https://wiki.roll20.net/Token_Markers#Adding_a_Token_Marker_Set_to_a_Game" rel="nofollow">https://wiki.roll20.net/Token_Markers#Adding_a_Token_Marker_Set_to_a_Game</a>
1648334827
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I think Status Info pre-dates custom Token Markers and is not built to see them. There might be an updated version floating around the forums, but most folks just use Combat Master, which Status Info was folder into.
Fwiw, simple is often better.&nbsp; I use Statusinfo because I don't need all the features of combatmaster and when you install that script it blows up the transmogrifier list with a ton of archived handouts.&nbsp;&nbsp;
1648341244

Edited 1648341306
Oosh
Sheet Author
API Scripter
I think this should do the trick (not tested at all): if(condition === 'sort') state[state_name].conditions.sort((a,b) =&gt; a.name &gt; b.name ? 1 : -1) Throw that on line 125, under the line "let condition = args.shift();" You should then be able to run it with config-conditions sort to sort the list of conditions. Alternatively, you can add this at 191, immediately before "sendConditionsConfigMenu():" state[state_name].conditions.sort((a,b) =&gt; a.name &gt; b.name ? 1 : -1) to sort the list whenever any config-conditions command (add, remove, edit etc) is received. Yeah.... probably go the second option.