aliens

Author Topic: [Documentation] Multiple inventory templates  (Read 22741 times)

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9101
    • View Profile
[Documentation] Multiple inventory templates
« on: July 15, 2016, 11:22:50 am »
Hi,

so I'm working on a feature, which will allow you to have multiple (permanent) inventory templates.
For example, you can have one template for your melee guys, one for snipers, one for weak soldiers, one for heavy soldier, one for meat shields, and so on...

I have two possible UI ideas in my mind:

1. limited number of templates (let's say up to 10), no UI, just shortcuts... for example Shift+F1 to Shift+F10 to save templates on positions 1 to 10 and then shortcuts F1 to F10 to apply the template saved on corresponding position. The hotkeys would be configurable of course.

Advantages: very quick management, no extra clicks, no extra files (everything saved within the main save file)
Disadvantages: not enough slots?, no possibility to name templates

2. unlimited number of templates, saved on file system in the save directory (but not within the save file)... hotkeys to save/load templates... which open UI similar to save/load game

Advantages: unlimited slots (maybe first 10 could even have hotkeys to improve speed), templates can have names
Disadvantages: slower management (too many clicks :) ), more files in the save directory, templates are not part of the save file

Let me know, which one you like better... or if you have a better idea...

M.

Offline ivandogovich

  • Commander
  • *****
  • Posts: 2381
  • X-Com Afficionado
    • View Profile
    • Ivan Dogovich Youtube
Re: Multiple inventory templates
« Reply #1 on: July 15, 2016, 01:47:42 pm »
I think Option 1 is probably better, personally.  I like that its more streamlined.

Offline Stoddard

  • Colonel
  • ****
  • Posts: 485
  • in a fey mood
    • View Profile
    • Linux builds & stuff
Re: Multiple inventory templates
« Reply #2 on: July 15, 2016, 02:29:55 pm »
Do them templates include armor?

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9101
    • View Profile
Re: Multiple inventory templates
« Reply #3 on: July 15, 2016, 02:41:21 pm »
Do them templates include armor?

No, but it's an interesting idea.
(I probably would prefer if they didn't.)

You can still easily change the armor by pressing 'A' (or 'M' ... I don't remember) and selecting from a list.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11730
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Multiple inventory templates
« Reply #4 on: July 15, 2016, 03:11:04 pm »
You can still easily change the armor by pressing 'A' (or 'M' ... I don't remember) and selecting from a list.

It's A :)

Offline Stoddard

  • Colonel
  • ****
  • Posts: 485
  • in a fey mood
    • View Profile
    • Linux builds & stuff
Re: Multiple inventory templates
« Reply #5 on: July 15, 2016, 07:20:49 pm »
2. unlimited number of templates, saved on file system in the save directory (but not within the save file)... hotkeys to save/load templates... which open UI similar to save/load game

I think that would be too much code complexity wrt saves not having relevant items/armors (for the inv layout) researched. Also I know I will make a horrible mess of those saved layouts and won't ever know how I named the one I need right now. Not to mention the clicks.

So please no.

No, but it's an interesting idea.
(I probably would prefer if they didn't.)

Having thought about it I can't quite think of how it could be done acceptably UX-wise. I guess that should left for the future.

You can still easily change the armor by pressing 'A' (or 'M' ... I don't remember) and selecting from a list.

Thanks for the heads-up.

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Re: Multiple inventory templates
« Reply #6 on: July 15, 2016, 09:15:59 pm »
I feel like option 1 is the more elegant and it should be sufficient. 10 roles is a fair amount and your 11th most common role should be getting into the rather uncommon, so dealing with it by hand isn't too much of a pain.

Would we keep the quick loadout create/apply as well? ie have F1 to F10 for saved permanent loadouts, and then the create/apply template on the go that's not saved anywhere, which can be defined on the fly?

I find the quick create/apply convenient for things like mansion missions: Define a "gal in maid armor with the best she can get" template, paste on pretty much everyone, then upon return from missions, the F1-10 keys would be used for reassigning proper raiding gear. It's not worth saving a mansion loadout permanently, because the missions are rare and gear evolves between them, but it's very convenient to quickly apply the same to all the gals that go on the mission.

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9101
    • View Profile
Re: Multiple inventory templates
« Reply #7 on: August 09, 2016, 04:34:39 pm »
OK, so I have decided for a hybrid solution.

Implemented so far:
- there will be 9 templates
- templates are global and saved within the save file (nodes "globalEquipmentLayout0" to "globalEquipmentLayout8")
- templates will survive also mod upgrades... if modder removes a weapon, ammo or inventory slot, the removed object in the save will be ignored (i.e. won't crash)
- hotkeys are fixed
- ctrl+1 to ctrl+9 to save template 1 to 9
- shift+1 to shift+9 to load template 1 to 9

I will publish this soon.

In second phase I will implement also GUIs, which:
- will allow to name individual templates
- ctrl+0 to save under a selected template (1 to 9) with option to name the template
- shift+0 to load from a selected named template

- ctrl+0 and shift+0 may be replaced by existing quick load and quick save configurable hotkeys... not decided yet

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11730
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Multiple inventory templates
« Reply #8 on: August 09, 2016, 04:44:19 pm »
It's great news, except for this part:

- hotkeys are fixed
- ctrl+1 to ctrl+9 to save template 1 to 9
- shift+1 to shift+9 to load template 1 to 9

Honestly, I will be erasing my templates half the time I'm trying to use them. I assure you I won't be able to remember what is activated by Ctrl and what by Shift. It's the same for any game (except action games where you mostly keep your hand in the same place). Which is probably why no game, as far as I know, uses such a system.
Why not do like others do (say, Starcraft for example) and assign Shift+0...9 for saving a template and just 0...9 for recalling them?

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9101
    • View Profile
Re: Multiple inventory templates
« Reply #9 on: August 09, 2016, 04:58:50 pm »
Honestly, I will be erasing my templates half the time I'm trying to use them. I assure you I won't be able to remember what is activated by Ctrl and what by Shift. It's the same for any game (except action games where you mostly keep your hand in the same place). Which is probably why no game, as far as I know, uses such a system.
Why not do like others do (say, Starcraft for example) and assign Shift+0...9 for saving a template and just 0...9 for recalling them?

I was inspired by Ctrl+insert and Shift+insert for copy/paste in many applications... but you have a point.

Let's do:
- Ctrl+0...9 for saving
- 0...9 for loading

Offline CanadianBeaver

  • Colonel
  • ****
  • Posts: 184
    • View Profile
    • AwesomeGuns
Re: Multiple inventory templates
« Reply #10 on: August 09, 2016, 09:56:47 pm »
It will be great, if different types of armors can have different layouts in inventory screen. I don't know, maybe this opinion has been proposed before.

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9101
    • View Profile
Re: Multiple inventory templates
« Reply #11 on: August 09, 2016, 10:02:44 pm »
It will be great, if different types of armors can have different layouts in inventory screen. I don't know, maybe this opinion has been proposed before.

They already have, if you look for example at PirateZ mod.

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9101
    • View Profile
Re: Multiple inventory templates
« Reply #12 on: August 10, 2016, 07:13:12 pm »
Loading GUI is done, now saving :)

Offline Starving Poet

  • Colonel
  • ****
  • Posts: 265
    • View Profile
Re: Multiple inventory templates
« Reply #13 on: August 10, 2016, 09:38:49 pm »
Oh this is going to be such a time-saver.

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Re: Multiple inventory templates
« Reply #14 on: August 11, 2016, 12:29:27 am »
I am so looking forward to that! Woot!