Author Topic: New feature discussion: inventory templates  (Read 35152 times)

Offline myk002

  • Colonel
  • ****
  • Posts: 227
    • View Profile
New feature discussion: inventory templates
« on: April 02, 2014, 01:08:57 am »
I love this game (and especially this implementation of it), but one thing that always bugged me was all the clicking I had to do to get my soldiers' inventories set up.  Granted, with the saved equipment layouts in OpenXcom, you only have to do this once per soldier, but the first mission is always a pain, having to click click click to prepare 10 soldiers (or so) for their first battle.

What I thought would be most convenient was to set up one soldier the way I want as a template, then tab through the other soldiers and apply the template, using free items from the ground.  That way my setup before a mission would be:
  • set up a soldier the way I want (or select a soldier that's already set up the way I want)
  • hit [c] (the new default hotkey for "create template") or click the button
  • [tab] to another soldier that isn't set up
  • hit [v] (the new default hotkey for "apply template") or click the button
then just repeat the last two steps for any other soldiers that aren't set up.  The UI might look something like this:


This is pretty simple and easy to use, but is it enough?

Another option would be to have a list of layouts that you can edit, create, individually name, and save.  This is more complex and "busier" on the screen, and may take more clicks to use, but has more functionality.  The UI might look like this:


A third option would be to keep the inventory screen fairly clean, but have a separate "Layout Manager" screen that you can get to from the inventory screen.  This would have the greatest amount of functionality, but also take the most amount of clicks to use, even for simple things.  It might look like this:



So what do you guys think?  Is this a feature that you'd like to see?  How simple/complex should it be?  What do you think your common use cases would be?
« Last Edit: April 03, 2014, 07:53:11 pm by myk002 »

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11721
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: New feature discussion: inventory templates
« Reply #1 on: April 02, 2014, 01:45:06 am »
I never felt equipping soldiers was tedious in OpenXCom (in the OG, yes, a little bit). However, your ideas certainly have potential.

Offline myk002

  • Colonel
  • ****
  • Posts: 227
    • View Profile
Re: New feature discussion: inventory templates
« Reply #2 on: April 02, 2014, 02:50:37 am »
I should really give credit where credit is due.  The third option is entirely fenyo1's work, and the second screenshot was put together by SupSuper as an alternate take on option3.  I did option 1, but the icon graphics are by redv.  I'm just trying to get a feel for what the community wants so we know which implementation (if any) to move forward with.
« Last Edit: April 03, 2014, 07:54:04 pm by myk002 »

Offline hszp

  • Captain
  • ***
  • Posts: 64
    • View Profile
    • szabopeter@github
Re: New feature discussion: inventory templates
« Reply #3 on: April 02, 2014, 10:26:33 am »
I have fenyo's modification (option 3) in my custom build but I did not make much use of it during actual gameplay, it felt like I would need to learn and practice a radically new way of equipping the soldiers. I would prefer option 2 by just looking at the sketches.

Offline redv

  • Colonel
  • ****
  • Posts: 335
    • View Profile
Re: New feature discussion: inventory templates
« Reply #4 on: April 02, 2014, 11:49:20 am »
My vote for first option.

Several improvements.
Place for buttons:


If you hold rifle, then screen will be looks like that:


Buttons:
1. Default template is empty
2. Layout stored in the default template
3. Apply empty template (just clears current layout of current soldier)
4. Apply stored layout

These buttons should be displayed only before mission, when you equip your soldiers.
Buttons added to attachment.

Offline BlackLibrary

  • Colonel
  • ****
  • Posts: 133
    • View Profile
Re: New feature discussion: inventory templates
« Reply #5 on: April 03, 2014, 06:49:28 am »
I love the options...anything that makes it easier, but not complicated.  So options 1 and 2 and variants are good.

Personally, I think I'd also prefer to not have the "names" on their like rifleman, or whatever.  But allowing a custom set of templates to use, or better still, name the templates ourselves is preferred.

volutar

  • Guest
Re: New feature discussion: inventory templates
« Reply #6 on: April 03, 2014, 06:56:26 am »
The only viable in long-term and lying in the "oldschool" concept is having loadout "copy" and "paste" buttons (plus ctrl+c/ctrl+v shortcuts). Anything beyond that is too much.

Offline myk002

  • Colonel
  • ****
  • Posts: 227
    • View Profile
Re: New feature discussion: inventory templates
« Reply #7 on: April 03, 2014, 09:36:45 am »
Personally, I think I'd also prefer to not have the "names" on their like rifleman, or whatever.  But allowing a custom set of templates to use, or better still, name the templates ourselves is preferred.
yeah -- that's the idea of option 2.  it needs a few more buttons to make those options clear, I think, but what you said is what was intended.

The only viable in long-term and lying in the "oldschool" concept is having loadout "copy" and "paste" buttons (plus ctrl+c/ctrl+v shortcuts). Anything beyond that is too much.
ctrl combination hotkeys aren't supported in OpenXcom, but the default shortcuts for option 1 are indeed 'c' and 'v'.  if you'd like to try it out to see if it is really what you'd like to use, the code is complete at https://github.com/myk002/OpenXcom/tree/loadout_copy_paste
« Last Edit: April 03, 2014, 07:59:57 pm by myk002 »

Offline Fenyő

  • Colonel
  • ****
  • Posts: 423
    • View Profile
Re: New feature discussion: inventory templates
« Reply #8 on: April 06, 2014, 10:44:02 pm »
Guys, let me explain some arguments.

When i first implemented the Layout Manager (which is completely ready for use, only SupSuper has to click for merge, and you can use it), i also had the idea of this:

But look at this, and think!
How can you type a name for a layout in this version? Where is the Editbox for that?
How can you even create a new layout? Where would you put a new "Create" button?
And how can you erase a Layout if you don't need that anymore?
And if you want to apply a single layout for about 16 soldiers, you have to click to "next soldier button" then Load, then "next soldier button" then Load, and so on. That's too complicated! With Layout manager you just have to click each soldier only, and they are close to each other (I mean the name list).
Oh, and the Layout Manager has a feature: "Newly recruited soldiers" if you want a layout to be automatically applied to every new soldier.

I admit myk002's version is much simpler, but also think about it a little deeper.
If a soldier dies with an only layout, you have to make that Layout again with a new soldier.
And if you use 2 or more Skyrangers on more bases, how can you copy layouts between them?
And with this version you also have to click twice for each soldier! ("next soldier button" then Paste,  then "next soldier button" then Paste, and so on. And these two buttons are not exactly next to each other on the screen)
And what if you don't want to use a Layout for any of your soldiers temporarily? (because there is night now, and you want to use Incendiary bullets for your auto-cannons for this mission only) Then you have to remake that Layout again when you need it again.
Again, you have to click much more with this version.

With a lot of soldiers, you have to click least only with the Layout Manager.

And one more important thing.
As you can see on the above picture of the Layout Manager, there is a place on the screen with "OUTSIDE BRIGHTNESS".
You can see what situation are you getting into by this little feature!
I think this is very useful. You can decide what layout you want to use according to the outside brightness/darkness conditions! (perhaps I will rename it to OUTSIDE DARKNESS to be consistent with the string in New Battle mode)

I have a final argument, which i hope all (or at least the most) people will agree:
Since both my version and myk002's version is complete, i think the best would be to merge both! AND of course have a new option in the Advanced Options, which is: "Inventory Layout Mode" which would have two settings: "Layout Manager" and "Copy/Paste Mode".
Then everybody would be happy, since everyone can choose which version he/she prefers!
I offer that i will implement the Advanced Options chooser, if we come down to that. (so SupSuper only has to click to the Merge buttons (on Github) only, he does not need to implement anything about this :) )

What do you think, guys?

Offline Fenyő

  • Colonel
  • ****
  • Posts: 423
    • View Profile
Re: New feature discussion: inventory templates
« Reply #9 on: April 06, 2014, 10:53:19 pm »
Oh, and one more thing about the Layout Manager:
I had an idea which may further reduce the number of clicks:
I could erase those two big-ass buttons up, and only two label would be on their places, and they would be:
"To set the selected layout to a soldier, LEFT-click on that soldier."
and:
"To save the layout of a soldier to the selected layout, RIGHT-click on the soldier."

This way the use of Layout Manager would be much quicker, with much less clicks.

What do you think, guys?
« Last Edit: April 06, 2014, 10:55:27 pm by Fenyő »

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3349
    • View Profile
Re: New feature discussion: inventory templates
« Reply #10 on: April 06, 2014, 11:18:13 pm »
I doubt that you can add both mods without lot of work.
Is possible that both modes edit same lines of code and resolve same problems using different, incompatible solutions.
I think that both mods should be merged first, all internal mechanic should be same but interface will be different.
Without it maintaining OX code base with this two mods will be nightmare because it will increase work two times (you will need made separate changes for both mods if something change in inventory code).
If this common part will be implement right then you could rewrite half of it without breaking UI. However, if it isnt do in proper way then this will be not different to case of two separate mods.

Offline myk002

  • Colonel
  • ****
  • Posts: 227
    • View Profile
Re: New feature discussion: inventory templates
« Reply #11 on: April 07, 2014, 12:13:13 am »
It really wouldn't be technically difficult to merge the two options.  The code for each implementation is largely self-contained, and the button positions don't even conflict.  The decision is really up to the central devs whether anything is accepted into the codebase.

Another option is to merge options 1 and 3 -- and make them /both/ active.  Their functionality is complementary.  That way both the "simple" workflow is available from the inventory screen itself and more complex workflows (though, as you brought up, complex doesn't always mean more clicks).

Offline Fenyő

  • Colonel
  • ****
  • Posts: 423
    • View Profile
Re: New feature discussion: inventory templates
« Reply #12 on: April 07, 2014, 12:26:10 am »
Well, if almost all of the code have to be rewritten to avoid code duplicates by the two features, then i will do that.
I agree, code duplicates have to be avoided.
If it is needed, i can take one of my weekends (or more) to complete this.

myk002: Or we could merge options 1 & 3, and the Advanced Options could have three settings: "Copy/Paste", "Layout Manager", and "BOTH" :D

Offline redv

  • Colonel
  • ****
  • Posts: 335
    • View Profile
Re: New feature discussion: inventory templates
« Reply #13 on: April 07, 2014, 12:29:08 am »
Will the save, made with one option work with another option?

Offline Fenyő

  • Colonel
  • ****
  • Posts: 423
    • View Profile
Re: New feature discussion: inventory templates
« Reply #14 on: April 07, 2014, 12:31:35 am »
Will the save, made with one option work with another option?
Merging both only have a sense if they work with each other...
So, yes of course they will work. (I guarantee this)