Automatically sorts hediffs alphabetically, effectively fixing the issue where different pawns have different hediff orderings. It's also very performance-friendly.
PS:Players who use a lot of implant mods often run into this problem: when you want to install implants, you have to arrange the surgeries in a strict order. If something goes wrong in the middle and some other hediff takes its place, the whole plan gets messed up. It isn’t a big deal, but it drives perfectionists crazy. A few mods have tried to fix this—HediffSort keeps the order consistent by manually copying and pasting, but it doesn’t always work perfectly and having to paste it every time is a hassle. Better Health Tab has some bugs, and you can only see the sorted result in the health tab; places like the character editor are still a mess. So I had no choice but to write this thing to fix it once and for all. I actually wrote this a long, long time ago and even forgot how it works. It just occurred to me recently that someone else might need it, so I’m posting it now.
8.20 Update
Sorting will now follow these rules:
1) Order by body part (for example, left leg first, then right leg)
2) Within the same body part, sort by LabelCap (case-insensitive)
3) If the names are the same, sort by severity in descending order (more severe comes first)