Sorting lists

Describe your experience with the latest version of FreeOrion to help us improve it.
Forum rules
Always mention the exact version of FreeOrion you are testing.

When reporting an issue regarding the AI, if possible provide the relevant AI log file and a save game file that demonstrates the issue.
Post Reply
Message
Author
User avatar
Nutster
Krill Swarm
Posts: 13
Joined: Fri Aug 30, 2013 3:41 pm
Location: Toronto, Ontario, Canada area

Sorting lists

#1 Post by Nutster » Sun Aug 21, 2016 11:01 pm

FO Version: 0.4.5 [build 2015-09-01.f203162] MSVC 2013
I know that this version is almost a year old, but it is what I downloaded from SourceForge.

I would to propose the ability to sort the Research and Production queue lists according to various criteria. I would suggest adding "Sort >" as a menu item to the context menu when right-clicking an item in the lists, perhaps under "Move to Queue Bottom". This would open a sub-menu which would have a list of criteria. For Research: Ascending/Descending (Toggle), Item Name, Item Category (Learning, Production, Construction, Growth, etc.), Total Points required, maximum Points/Turn, Prerequisites First/Last. For Production: Ascending/Descending (Toggle), Item Name, Item Category (Ship, Building, etc.), Planet Name, Total Points required, maximum Points/Turn.

Use a stable sort, like linear sort, so that the order from prior sorts is preserved in the new sort. e.g. For production:
Space Elevator (25/turn) @ Clark II
Asteroid Processor (15/turn) @ Clark Asteroids
Xenocoordination Facility (15/turn) @ Clark II
Cellular Growth Chamber (8/turn) @ Clark II
Asteroid Processor (15/turn) @ Verne Asteroids
Orbital Incubator (5/turn) @ Verne III
Orbital Drydock (4/turn) @ Verne III
Gas Giant Generator (8.33/turn) @ Verne II

Sort By Planet Name:
Asteroid Processor (15/turn) @ Clark Asteroids
Space Elevator (25/turn) @ Clark II
Xenocoordination Facility (15/turn) @ Clark II
Cellular Growth Chamber (8/turn) @ Clark II
Asteroid Processor (15/turn) @ Verne Asteroids
Gas Giant Generator (8.33/turn) @ Verne II
Orbital Incubator (5/turn) @ Verne III
Orbital Drydock (4/turn) @ Verne III
Note that the three items being built at Clark II are in the same order, just with the other stuff moved out of the way.

Sort by Item Name:
Asteroid Processor (15/turn) @ Clark Asteroids
Asteroid Processor (15/turn) @ Verne Asteroids
Cellular Growth Chamber (8/turn) @ Clark II
Gas Giant Generator (8.33/turn) @ Verne II
Orbital Drydock (4/turn) @ Verne III
Orbital Incubator (5/turn) @ Verne III
Space Elevator (25/turn) @ Clark II
Xenocoordination Facility (15/turn) @ Clark II
Note that the two asteroid processors are still in order by their planet names.

Sort by Points/Turn:
Orbital Drydock (4/turn) @ Verne III
Orbital Incubator (5/turn) @ Verne III
Cellular Growth Chamber (8/turn) @ Clark II
Gas Giant Generator (8.33/turn) @ Verne II
Asteroid Processor (15/turn) @ Clark Asteroids
Asteroid Processor (15/turn) @ Verne Asteroids
Xenocoordination Facility (15/turn) @ Clark II
Space Elevator (25/turn) @ Clark II
Note that the Asteroid Processors are still ahead of the Xenocoordination Facility, because that was the order from the last sort.

This is the order I tend to put my production queues in, so I used this sequence of sorts. Doing this with 3 sorts instead of dragging a dozen items in a turn would be so much more convenient, but yield the same results. Other people will probably want a different sequence, so I thought this system of picking multiple sorts in sequence would be most flexible and require the least programming and interface changes.
Last edited by Nutster on Sat Sep 03, 2016 9:36 pm, edited 1 time in total.

User avatar
biza
Space Squid
Posts: 67
Joined: Wed May 29, 2013 6:48 pm

Re: Sorting lists

#2 Post by biza » Tue Aug 30, 2016 8:17 pm

hi,
items in queue lists are done in order that first item is done first, then second and so on.
Suggested sort order is good idea, but only reason i see to reorder items is when you want to put order by fastest done or by group.
Lets say you put a lot of research in queue (I usually do that in mid game by selecting few high tech i choose as goal), then you want to get things moving and you auto reorder queue to put those with less rp on top. Or at some point with long queue you want to research eg. defense techs first and don't want to manually search queue and select move on top on each one.

I don't see point to want research tech or produce thing based on alphabetical order of item or planet name.

As i said good idea, but i believe not very high on priority list.

Cheers!

User avatar
EricF
Space Dragon
Posts: 266
Joined: Fri Jul 29, 2016 10:12 am

Re: Sorting lists

#3 Post by EricF » Tue Aug 30, 2016 10:23 pm

A sort that could be useful would be a sort to maximize the efficiency of the queue.
So that each item in the queue is built/researched at the optimum rate.
I have no idea how feasible that would be, though...
Probably too many variables to make any one solution the answer.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 12243
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Sorting lists

#4 Post by Geoff the Medio » Tue Aug 30, 2016 10:25 pm

EricF wrote:the optimum rate.
What does that mean? The queues already allocate PP or RP up to as much as the first item in the queue can receive, then the next, etc. so the queue complete the top items as fast as possible.

User avatar
EricF
Space Dragon
Posts: 266
Joined: Fri Jul 29, 2016 10:12 am

Re: Sorting lists

#5 Post by EricF » Tue Aug 30, 2016 10:48 pm

Geoff the Medio wrote:
EricF wrote:the optimum rate.
What does that mean? The queues already allocate PP or RP up to as much as the first item in the queue can receive, then the next, etc. so the queue complete the top items as fast as possible.
I thought so, thanks for the confirmation, but there are times when things in the queue are not always built at the same rate as when they are in a different order.
For example. I've seen situations similar to this

Tech-A 5 Turns
Tech-B 8 Turns
Tech-C 12 Turns

and then you reorder the queue and you get something like;

Tech-C 4 Turns
Tech-B 11 Turns
Tech-A 12 Turns

You get all three Techs within 12 turns, but the first sort seems a little more efficient.
I'm getting two techs within 8 turns, but I have to wait 11 for the other.
These are just made up numbers, but I have seen similar cases while playing.
Maybe I can give you real examples from a game later.
Or maybe I'm just imagining things. :?

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 12243
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Sorting lists

#6 Post by Geoff the Medio » Tue Aug 30, 2016 11:07 pm

The assumption is that, since techs do things, you might want one in particular as soon as possible.

User avatar
Nutster
Krill Swarm
Posts: 13
Joined: Fri Aug 30, 2013 3:41 pm
Location: Toronto, Ontario, Canada area

Re: Sorting lists

#7 Post by Nutster » Sat Sep 03, 2016 9:41 pm

biza wrote: I don't see point to want research tech or produce thing based on alphabetical order of item or planet name.
I just do that to help keep track of things. Important when I am moving things manually, but would be less important if the sort routine is catching everything.

Post Reply