PDA

View Full Version : CombatManager.setCustomSort()



rmilmine
March 8th, 2026, 20:20
If I call CombatManager.SetCustomSort() it doesn't sort the combat tracker based on the function passed right away.
How do I get it to resort the combat tracker?
I've looked in the scripts folder in ct and I can't see anything there. I've also looked in combatManager and again can't seem to find a function that will resort the ct.
How do you force the ct to resort using the new custom sort?

Moon Wizard
March 9th, 2026, 17:45
Look at the option CTSI. It does this specifically for controlling the player client display when changing the Show turn order option.

It registers a callback to listen for CTSI option changes; then updates the display windows and runs a new sort on the list.

Regards,
JPG

rmilmine
March 9th, 2026, 18:39
Thanks for that.
What I did was use CombatManager.setCustomSort and then in the sort function I looked at the value of the option to determine which direction the sort was.
I did figure out the callback part and could get it to call it when the value of the option changed.
What I couldn't figure out was how to get it to do a sort from within the callback.

I'll look at CTSI and see what it does.

Thanks.

rmilmine
March 9th, 2026, 18:50
That worked beautifully. Thank you.