Thread: Effects Sort Order
-
May 26th, 2022, 08:49 #1
- Join Date
- Sep 2016
- Posts
- 14
Effects Sort Order
Is anyone aware of a method or extension that allows the effects on PCs/NPCs on the combat tracker to be sorted alphabetically.
Perhaps there is a simple setting somewhere already? I cannot work out how it works. Whenever I place effects, where it appears in the list seems truly random...
I run a 3.5 game and the characters (and some NPCs) have 30-40 effects on them. :-)
-
June 14th, 2022, 15:03 #2
I am unaware of any but would love that too.
I do have a link to a thread with a few options for PF1e note lines and alphabetize option in the actions tabMy First Mod PFRPG - Feats Extended, focusing on PF1e Feats and Racial Traits automation. It is open to community assistance** accidentally deleted, If anyone grabbed a copy, PLEASE let me know**. Here is the forum Link.
40+ PF1e Extensions & Modules I use, with links.
PF1E Coding Effects - Spreadsheet
Discord: Morenu
-
March 30th, 2023, 17:39 #3
possible mod?
I also have been trying to find a feature that does this.
!!Disclaimer: while I am a software engineer, both lua and the FG code base are new to me, so I could be way off in the following analysis. I have tried to run the one line code change below but I am having trouble managing the revved CoreRPG.pak to get it to work. (Perhaps those proficient in such things are monitoring this thread and could render some advice. Fully open to suggestions to aid my understanding here.)
Looking at the EffectManager code (manager_effect.lua), it appears that there is some effect sorting happening but it does not look like it is using the effect descriptive elements, only some database specific element(?). Note also, that there might be another method that yields the effect summary string that is different than the list, since the summary does not list effects whose status is 'off' or 'skip' - no indication yet on that aspect. The line in bold is my suggested addition.
function getEffectsString(nodeCTEntry, bPublicOnly)
local aOutputEffects = {};
-- Iterate through each effect
local aSorted = {};
for _,nodeChild in ipairs(DB.getChildList(nodeCTEntry, "effects")) do
table.insert(aSorted, nodeChild);
end
table.sort(aSorted, function (a, b) return DB.getName(a) < DB.getName(b) end);
for _,v in pairs(aSorted) do
local sEffect = EffectManager.getEffectString(v, bPublicOnly);
if sEffect ~= "" then
table.insert(aOutputEffects, sEffect);
end
end
table.sort(aOutputEffects); -- this is probably the table that needs to be sorted
return table.concat(aOutputEffects, " | ");
end
-
May 20th, 2024, 11:36 #4
- Join Date
- Sep 2016
- Posts
- 14
-
May 20th, 2024, 15:51 #5Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
May 30th, 2024, 15:36 #6
- Join Date
- Sep 2016
- Posts
- 14
Added the string. It works in that it sorts the condensed version of the effects.
However how can I sort the expanded list?
I've tried putting in some table.sorts where I think it could work but it doesn't seem to.
-
May 30th, 2024, 15:42 #7
Yes, that is the question. I don't know where the expanded CT effects gui gets/presents its data.
-
May 30th, 2024, 15:55 #8
The expanded effects list is a windowlist, which has sortby properties: https://fantasygroundsunity.atlassia...260/windowlist
Try the attached extension as an example of CT effects alphabetical sorting.Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
May 30th, 2024, 16:48 #9
- Join Date
- Sep 2016
- Posts
- 14
Seems to work...well done.
Screenshot 2024-05-30 164958.pngLast edited by AndyGJFantasyG; May 30th, 2024 at 16:51.
-
May 30th, 2024, 16:52 #10
- Join Date
- Sep 2016
- Posts
- 14
Makes it much easier to spot the duplicates.
Thank you so much.Last edited by AndyGJFantasyG; May 30th, 2024 at 16:59.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks