aliens

Author Topic: "Sort by" combobox on Craft Soldiers page  (Read 12887 times)

Offline myk002

  • Colonel
  • ****
  • Posts: 227
    • View Profile
"Sort by" combobox on Craft Soldiers page
« on: May 19, 2015, 03:48:41 am »
I felt so sorry for Meridian when I saw him manually organizing upwards of 70 soldiers on the Craft -> Soldiers page that I wrote this.

It adds a combo box to the bottom of the screen that allows you to sort the soldiers by any attribute.  Choose "Original order" to restore the order they were in when you entered the screen.

The order of the attributes to sort by is the same as in the soldier info page, but I think some items are more useful than others to sort by.  What do you think?  Which items should go at the top?

Code is up at: https://github.com/myk002/OpenXcom/tree/sort_soldiers   I'll wait for a bit for feedback before I submit the pull request.

« Last Edit: May 19, 2015, 03:50:58 am by myk002 »

Offline hellrazor

  • Commander
  • *****
  • Posts: 2013
  • Deep Ruleset Digger & Bughunter
    • View Profile
    • Github Account
Re: "Sort by" combobox on Craft Soldiers page
« Reply #1 on: May 19, 2015, 12:33:52 pm »
I personally sort my soldier after:
For Rookie Screening:

1. Psi Strength (obviously very important)
2. Reactions (everyone with reaction lower then 56-60 gets sacked automatically)
3. Firing Accuracy (everyone with accuracy lower then 52-70 get sacked automatically)

Thats mostly all i care about.
4. Strenght is also important for Rookies (so you know who can carry heavy weapons from the start).

5. TU's (High TU+High Reactions = high chance to reactionfire and survive, or not get shot when trying to kill a enemy in LOS).

The others are marginal.

Offline pilot00

  • Colonel
  • ****
  • Posts: 487
  • Back in the day it was gameplay not a feature....
    • View Profile
Re: "Sort by" combobox on Craft Soldiers page
« Reply #2 on: May 19, 2015, 02:32:53 pm »
The only soldiers I sack automatically are those with bravery <40. The rest can be trained if they survive long enough and psi str you dont know till in the late game so....

Thats a good mod Op.

Offline hellrazor

  • Commander
  • *****
  • Posts: 2013
  • Deep Ruleset Digger & Bughunter
    • View Profile
    • Github Account
Re: "Sort by" combobox on Craft Soldiers page
« Reply #3 on: May 19, 2015, 02:41:33 pm »
The only soldiers I sack automatically are those with bravery <40. The rest can be trained if they survive long enough and psi str you dont know till in the late game so....

Thats a good mod Op.

Bravery only has 2 cases when it matters:

1. You are unfortunate enough and let your Soldiers die, because of Enemy fire.
2. Your Soldier get paniced by Aliens Psionics (you can build up there morale, when you kill enemies with others or if not paniced with them, 1 kill really boost them up from 20 morale to 80 or 90)

Offline myk002

  • Colonel
  • ****
  • Posts: 227
    • View Profile
Re: "Sort by" combobox on Craft Soldiers page
« Reply #4 on: May 20, 2015, 02:04:52 am »
For the record, I find myself sorting most often by:
firing accuracy
time units
reactions
psi strength
psi skill
rank
strength

Offline pilot00

  • Colonel
  • ****
  • Posts: 487
  • Back in the day it was gameplay not a feature....
    • View Profile
Re: "Sort by" combobox on Craft Soldiers page
« Reply #5 on: May 20, 2015, 02:41:43 am »
Bravery only has 2 cases when it matters:

1. You are unfortunate enough and let your Soldiers die, because of Enemy fire.
2. Your Soldier get paniced by Aliens Psionics (you can build up there morale, when you kill enemies with others or if not paniced with them, 1 kill really boost them up from 20 morale to 80 or 90)

Which are both liable to happen, leading to a squad of ten+ soldiers chain panicking and its "abort mission" from then on.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8597
    • View Profile
Re: "Sort by" combobox on Craft Soldiers page
« Reply #6 on: May 20, 2015, 09:09:01 am »
@myk002: I think it is OK as it is.

For the record, I sort mostly by:
1. Strength (heavy soldiers for terror missions)
2. Psionic strength (psi resistant guys for sectoid/ethereal missions)

Now when this is available I will maybe also start sorting by TUs and reactions a little bit.

For LP purposes it would be cool, if I could sort by number of missions... but including all clones, not only last incarnation ;-) But I guess that's too much to ask.

2. Reactions (everyone with reaction lower then 56-60 gets sacked automatically)
3. Firing Accuracy (everyone with accuracy lower then 52-70 get sacked automatically)

Chance to get 56-60 reactions is 16% (5 in 31) and chance for 52-70 firing accuracy is 55% (17 in 31). Together, the chance to get your soldier is less than 9% (roughly 1 in 11)... are you telling us that from each 11 hired soldiers you fire 10???

Offline myk002

  • Colonel
  • ****
  • Posts: 227
    • View Profile
Re: "Sort by" combobox on Craft Soldiers page
« Reply #7 on: May 20, 2015, 09:32:49 am »

Offline hellrazor

  • Commander
  • *****
  • Posts: 2013
  • Deep Ruleset Digger & Bughunter
    • View Profile
    • Github Account
Re: "Sort by" combobox on Craft Soldiers page
« Reply #8 on: May 20, 2015, 11:00:37 am »
Chance to get 56-60 reactions is 16% (5 in 31) and chance for 52-70 firing accuracy is 55% (17 in 31). Together, the chance to get your soldier is less than 9% (roughly 1 in 11)... are you telling us that from each 11 hired soldiers you fire 10???

Well basically yes. Sometimes it is 3 out of 10 anothertime 1 out of 50.
If i am short an manpower i also accept dudes with Reactions 45+ if their accuracy is 65+ (reactions will be trained with pistols).
My average recruiting cost is around ~380.000 for one soldier. But i like to have reliable shooters/scouts.
This also makes playing on Superhuman Difficulty or higher effectivly possible for me.

Offline redv

  • Colonel
  • ****
  • Posts: 335
    • View Profile
Re: "Sort by" combobox on Craft Soldiers page
« Reply #9 on: May 20, 2015, 03:57:09 pm »
For example, I prefer following template:
- first two place for rookies.
- next places for experienced soldiers.
- last positions for psionics.

I think, each player uses his own tactic. For this tactic need his own template.
This is not just a sorting by strength or reaction etc.

Therefore this addition is useless.

I suggest use another algorithm:
1. collect an statistics about the pattern of soldiers stats (place vs strength, experience, reaction, psi skill, etc)
2. each time when player pressed OK, the statistics will be updated with weight 10% (maybe other; need tests).
3. instead "sort by" use "auto-arrange". Which allows arrange available soldiers by pattern based on the collected statistic.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8597
    • View Profile
Re: "Sort by" combobox on Craft Soldiers page
« Reply #10 on: May 20, 2015, 05:21:28 pm »
For example, I prefer following template:
- first two place for rookies.
- next places for experienced soldiers.
- last positions for psionics.

I think, each player uses his own tactic. For this tactic need his own template.
This is not just a sorting by strength or reaction etc.

Therefore this addition is useless.

I use EXACTLY the same high-level template as you described above.

That however doesn't mean that the added functionality is useless. On the contrary, "experienced soldiers" for example is a very broad term... and sometimes I need "strong experienced soldiers", sometimes "accurate experienced soldiers" and sometimes "psi resistant experienced soldiers". And for that I use the added sorting functionality.

Edit: this would be a step-by-step example:
1. deselect everyone
2. sort by rank
3. select 2 rookies you like
4. sort by psi strength
5. select 2 psi guys you like
6. sort by strength
7. select 5 strong guys you like
8. sort by accuracy
9. select 5 accurate guys you like... now you have 14 soldiers selected
10. (optional step) select original order
11. use right-click to move two rookies on the top
12. use right-click to move two psi soldiers on the bottom
13. experienced soldiers are already on correct positions... done
« Last Edit: May 20, 2015, 05:28:35 pm by Meridian »

Offline hellrazor

  • Commander
  • *****
  • Posts: 2013
  • Deep Ruleset Digger & Bughunter
    • View Profile
    • Github Account
Re: "Sort by" combobox on Craft Soldiers page
« Reply #11 on: May 20, 2015, 05:29:24 pm »
I use EXACTLY the same high-level template as you described above.

That however doesn't mean that the added functionality is useless. On the contrary, "experienced soldiers" for example is a very broad term... and sometimes I need "strong experienced soldiers", sometimes "accurate experienced soldiers" and sometimes "psi resistant experienced soldiers". And for that I use the added sorting functionality.

Well i use my own Customized Statstring, and as soon as the soldiers names do have "SMR" behind them those dudes are experienced :). Psionics would be "pkSMR" or "PKSMR".

My setup is somewhat similar:
Early Game:
- Tank
- the two less experienced Soldiers
- 2 Rocketers
- 4 Normal Dudes
- 2 Snipers

Late Game: with #Avenger
- 3 Tanks (mostly 2 Plasma /laser ones and one Rocket tank)
- 6 normal dudes
- 3 Snipers
- 2 Blaster Launchers
- 3 Psi

Fits well together :)

Offline myk002

  • Colonel
  • ****
  • Posts: 227
    • View Profile
Re: "Sort by" combobox on Craft Soldiers page
« Reply #12 on: May 20, 2015, 05:37:27 pm »
1. deselect everyone
2. sort by rank
3. select 2 rookies you like
4. sort by psi strength
5. select 2 psi guys you like
6. sort by strength
7. select 5 strong guys you like
8. sort by accuracy
9. select 5 accurate guys you like... now you have 14 soldiers selected
10. (optional step) select original order
11. use right-click to move two rookies on the top
12. use right-click to move two psi soldiers on the bottom
13. experienced soldiers are already on correct positions... done
Yeah, this is exactly the kind of workflow I had in mind.  I also tend to sort by TUs so the low TU people can get more experience.

Offline hellrazor

  • Commander
  • *****
  • Posts: 2013
  • Deep Ruleset Digger & Bughunter
    • View Profile
    • Github Account
Re: "Sort by" combobox on Craft Soldiers page
« Reply #13 on: May 20, 2015, 05:39:04 pm »
Yeah, this is exactly the kind of workflow I had in mind.  I also tend to sort by TUs so the low TU people can get more experience.

hm.. maybe i should give this a try but i usually set up my team manually, and split them from time to time to mix in new Rookies.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8597
    • View Profile
Re: "Sort by" combobox on Craft Soldiers page
« Reply #14 on: May 20, 2015, 05:40:33 pm »
Well i use my own Customized Statstring, and as soon as the soldiers names do have "SMR" behind them those dudes are experienced :). Psionics would be "pkSMR" or "PKSMR".

You don't need to sort at all ;-)
From what I've seen and read all your soldiers are supermen and wonderwomen anyway.