PDA

View Full Version : Numerical order within strings



Fingersome
July 16th, 2021, 08:09
In fantasy grounds unity, I have noticed on several occasions that when the program displays a collection of strings it tends to sort the list alphabetically as I would expect, but when it comes to a string with a number in it or appended to it, it goes numerically by the first digit rather than the total value of the number. To further explain what I mean, if I label my campaigns "campaign 1" through to "campaign 9" they appear correctly but then if I add a new campaign and call it "campaign 10" it will place that campaign above "campaign 1", rather than below "campaign 9".

https://i.imgur.com/zid7ekT.jpg

This behaviour is also present in the turn order when multiple creatures have numbers appended to their name "kobold 1" all the way to "kobold 9" display in the correct order, but then "kobold 10" would appear at the top of the stack and yet underneath "kobold 1". This is a little confusing, if this is intended functionality.

https://i.imgur.com/FPR6tap.jpg



In the grand scheme this is "small potatoes" but I felt the need to mention it anyway.

Trenloe
July 16th, 2021, 08:31
This is standard programmatical string ordering, it's not specific to Fantasy Grounds. If you want numbers within string to order correctly, put a 0 in front on 1-9 = 01, 02, 03, ... 09, 10, 11, 12, etc..

Neovirtus
July 16th, 2021, 13:40
Maybe appended numbering for NPC's could use the leading zero method to help address this issue.

Fingersome
July 16th, 2021, 23:36
Maybe appended numbering for NPC's could use the leading zero method to help address this issue.

Agreed

Zacchaeus
July 17th, 2021, 00:43
Maybe appended numbering for NPC's could use the leading zero method to help address this issue.
Um, what issue? As soon as you roll initiative they’ll be all over the place.

Fingersome
July 17th, 2021, 03:24
It automatically rolls initiative when you drag a creature into the turn order; I prefer to run all my creatures of the same type with the same initiative score anyway, so they stack up like this.
As I said, it's not really a real problem as much as much as it is a quirk of my ADHD haha

Neovirtus
July 17th, 2021, 04:10
Um, what issue? As soon as you roll initiative they’ll be all over the place.

It's an issue if you're using grouped initiative, or haven't rolled initiative. It's also just plain counter-intuitive

Zacchaeus
July 17th, 2021, 09:20
If this is an actual issue for you I'd suggest adding it to the wishlist - that way the devs will see it. Link in my signature (the numbering on the CT I mean).