Talk:Is it possible to change the default sort order for this table?

https://ddowiki.com/page/Quests_by_level_and_XP

For this page here, the default sort order is by quest level only. The issue is that this doesnt group quests from the same pack together, which makes it a mess.

For example, by default it displays the level 1 quests first, but the first two quests are borderlands quests, followed by korthos quests, followed by more borderlands quests, followed by more korthos quests.

If I click "adventure pack" followed by "level", it will sort the table so that all the level 1 korthos quests are grouped together, followed by all the level 1 borderland quests, etc. Its much more readable and tidy.

Unfortunately, this isnt the default sort order so everytime I go to this page (such as when i close the browser), i have to sort it manually again.

Is it possible to make the table sort adventure pack + quest level by default? It would save everyone a LOT of time. &rArr; Question (Contribs • Message • Email ) 23:19, August 15, 2020 (EDT) &rArr; Question (Contribs • Message • Email ) 23:19, August 15, 2020 (EDT)
 * No, I don't think it's possible to have two initial criteria for sorting. However, clicking 2 times to sort the table as you like it is not a very serious problem. Aside from that, I want to ask you what exactly do you use the table for. What is the question you ask and what answer do you expect to get from this table? Let me tell you my usage for example: "My character is level 5. What are the level 3 quests so I can run them on reaper and how can I group them up by adventure pack?". I then go to Level 3 quests which are sorted by adventure pack by default. I see there are some free quests, Tangleroot, Catacombs, lost gatekeepers and shan-to-kor. Now from my experience, I know that except for lost gatekeepers the other packs contain quests at other levels as well. So I click on each adventure pack (Tangleroot Gorge, The Catacombs, The Seal of Shan-To-Kor) and see their quests (which are sorted by level by default). This allows me to do the lost gatekeepers quests first, then tangleroot up to level 7 because no reaper, then catacombs because only one lvl 4 quest, then shan-to-kor to level up. I'm asking that question in order to be able to make some page with tables to satisfy your usage. However, if that page already satisfies you, then I don't think clicking 2 sort options is important enough to create a new page. &rArr; Faltout (Contribs • Message • Email ) 05:30, August 16, 2020 (EDT)
 * I use it to sort all quests by adventure pack/level. So for example if im looking at level 1 quests, i want it to show all the level 1 borderland quests together instead of a total mess where they are mixed up with level 1 korthos quests. Sorting 2 times by itself isnt a problem, but having to do it everytime the page is refreshed (such as when you close the browser) gets tiring quickly. Especially when you have to scroll all the way to the top of the page to sort it again. It would just be a huge QOL change if the table could put all the quests in the same pack together instead of in some random order. You can see that theres a massive difference in readability if you look at this screenshot : https://imgur.com/a/YbVKof5. I dont even understand how the default sort works, Why does it put Violent Delights at the top for example? &rArr; Question (Contribs • Message • Email ) 12:28, August 17, 2020 (EDT)
 * Not all borderlands quests are level 1. And it gets trickier with Tangleroot that spans the levels 3-7. So you're not going to get all the quests from an adventure pack together. In which case, you may want to look into the pages Level 1 quests, Level 2 quests, etc. that are sorted by adventure pack. &rArr; Faltout (Contribs • Message • Email ) 12:50, August 17, 2020 (EDT)
 * This actually can be done, although I'm not sure if the template is currently set up to allow it. If you go to each quest and add a   with a number of quest for the order of the chain and tell the DPL template to sort by name instead of by ML, theoretically it should sort by the order specified in the  .  If not, I'm sure  or myself can modify the DPL template to allow it to/make it work that way.  &#x1f45f;&thinsp;ShoeMaker (Contribs&thinsp;•&thinsp;Message&thinsp;•&thinsp;Email )&thinsp;&#x1f45f; 19:43, August 18, 2020 (EDT)
 * In this particular case, now that I've had some time to really look at it; yes, we can make those changes. DPL sort by whatever column is specified and then by each column to the right across the table.  If the "Adventure Pack" column was moved to be right after ML column, it should sort by ML and then pack.  I'll try this in the sandbox during today's livestream and we'll see if it works as intended/advertised. &rArr; DDOstream (Contribs • Message • Email ) 09:22, August 19, 2020 (EDT)

DPL:Manual_-_DPL_parameters:_Controlling_output_format#tablesortcol says:

Syntax:

number

number is the position of the column that shall be used as sortkey when the result is initially displayed.

However, after moving the Adventure pack column next to the minimum level column, it does not seem to be working properly unless there is some hidden content in there... Let me try one other thing to make it work correctly. &rArr; DDOstream (Contribs • Message • Email ) 09:48, August 19, 2020 (EDT)
 * column numbering starts with 1;
 * tablesortcol = 0 means do not sort; this is the default.
 * Negative numbers are used to sort in descending order; e.g. -3 would sort according to the third column in descending order.
 * Note that the rest of the row after the selected column will also be part of the sortkey; so the contents of successive columns may serve as a secondary sort criterion if there are identical values in the selected column.
 * Also note that the whole column contents is taken; this may include hidden contents or markup sequences if you used column formatting commands. For the same reason you cannot expect numeric contents to be sorted 'numerically' - sorting will always be alphabetical.
 * you can of course use something like 'class=sortable' together with 'tablesortcol'. The difference is that ..
 * interactive sorting only works after the article has been initially displayed
 * interactive sorting tries to guess the content type of a column and sorts according to that (date, number, string)
 * If you do not use  the output order of your table rows will depend on the sort order by which the articles were analysed. That order depends on other DPL commands like ordermethod. The default is "alphabetically by title". So, without 'tablesortcol' you get the tablerows in alphabetical sequence of the article names where they come from. With 'tablesortcol' you can order them by the column contents itself.
 * Okay! So I THINK I've accomplished what you wanted.  The table is now default sorted by ML-adpack (F2P on top).  I accomplished this with the following changes:
 * Hope this is what you wanted! &rArr; DDOstream (Contribs • Message • Email ) 10:46, August 19, 2020 (EDT)
 * Hope this is what you wanted! &rArr; DDOstream (Contribs • Message • Email ) 10:46, August 19, 2020 (EDT)
 * Hope this is what you wanted! &rArr; DDOstream (Contribs • Message • Email ) 10:46, August 19, 2020 (EDT)
 * Hope this is what you wanted! &rArr; DDOstream (Contribs • Message • Email ) 10:46, August 19, 2020 (EDT)


 * The changes are great and all, but now that you've tied the level sort with the adpack, you have invalidated any other complex sort. For instance, if you want to sort by elite xp and then by level to get the quests by level with descending xp, you cannot. Which is why I was not going to do exactly what you did. However, it is typical of you to hastily make changes without thinking the results. &rArr; Faltout (Contribs • Message • Email ) 10:50, August 19, 2020 (EDT)
 * I just checked it on stream, and it seems to be working fine for me. &rArr; DDOstream (Contribs • Message • Email ) 11:15, August 19, 2020 (EDT)
 * It clearly doesn't work. Clicking on the xp column twice to sort descending and then on level to sort ascending does not keep the xp sort. &rArr; Faltout (Contribs • Message • Email ) 11:51, August 19, 2020 (EDT)
 * you aren't sorting. You need to shift click for second sort. &rArr; DDOstream (Contribs • Message • Email ) 12:02, August 19, 2020 (EDT)
 * Step 1: Click the xp sort twice: Step 2: Click level to sort by level while preserving the (secondary) xp sort:  Result: xp remains sorted in each adventure pack, but not in each level. &rArr; Faltout (Contribs • Message • Email ) 12:26, August 19, 2020 (EDT)
 * Your step 2 is wrong. You must SHIFT-click to preserve primary sort...  &#x1f45f;&thinsp;ShoeMaker (Contribs&thinsp;•&thinsp;Message&thinsp;•&thinsp;Email )&thinsp;&#x1f45f; 13:43, August 19, 2020 (EDT)
 * I don't know where you're getting that info. However, I'll be happy if you show me a screenshot with the quests sorted first by level and then by descending xp (which is what many players use to find the top xp quests per level to level up quickly). To clarify, this means the quest order being "The Collaborator", "The Hobgoblin Horde", "Sacrifices", "Redemption", "Stopping the Sahuigin", "Caged Beast", "Treasure Hunt", etc. &rArr; Faltout (Contribs • Message • Email ) 16:01, August 19, 2020 (EDT)


 * Thanks, that looks great and much more user friendly now. I think what Faltout is trying to say is that the wiki seems to always sort via adventure pack, i can get it to sort highest xp quests + level so that collaborator is at the top, but it always sorts the other free to play quests below that next. I dont think its a big deal because base xp is not a good indicator of whether a quest is good to run for XP, since it doesnt factor in optionals (e.g. wiz king), how hard the quest is, how long it takes, etc. But theres definately room for improvement there (not sure if thats possible though). &rArr; Question (Contribs • Message • Email ) 14:03, August 26, 2020 (EDT)
 * It's not only the sorting by xp, it's any other sorting that doesn't work now. Favor + level, xp + level and patron + level. And just like someone (for example you), may find adpack + level the only useful sort, someone else may find some other sort useful for their own reasons. So while previously everyone needed to click 2 times to get the table sorted the way they wanted, now you may click 0 times and everyone else cannot get their preferred sort. Is that fair? Thankfully, there are the individual level pages that are much more useful and still support all kinds of sorting. I should add a note about them at the top of the page. &rArr; Faltout (Contribs • Message • Email ) 16:50, August 26, 2020 (EDT)