OpenXcom Forum

Modding => OpenXcom Extended => OXCE Suggestions DONE => Topic started by: Solarius Scorch on March 31, 2022, 03:16:54 pm

Title: [DONE][SUGGESTION] Alternate loadout system
Post by: Solarius Scorch on March 31, 2022, 03:16:54 pm
EDIT: documentation here: https://openxcom.org/forum/index.php/topic,10452.msg149914.html#msg149914

I would like to suggest a new, alternative system for equipment handling (similar to how X-Com Apocalypse did it):
1. You equip soldiers from BASE storage, not SHIP's.
2. If you put a soldier on ship, all stuff this soldier has equipped is moved onto that ship.
3. If you take a soldier off a ship, everything they carry is removed from the ship as well.
4. (optional) An option to limit craft inventory by weight or/and number of items, NOT counting items equipped on soldiers.

The reason I'm requesting this is that mods like Piratez or (to a lesser degree) XCF are fundamentally different from the original game model. In vanilla, your soldiers are highly interchangeable: while they gain stats, they still have the same unit profile. These mods on the other hand - and probably others too - shift their focus more on individual units with specific roles, which begs for a different approach to equipping them.
Saving equipment templates is already very helpful, but the proposed model would further improve the UI.
Title: Re: [SUGGESTION] Alternate loadout system
Post by: Alex_D on March 31, 2022, 05:28:08 pm
Interesting. So, let me see if I got it right:
1. You would preload the soldiers from the Agent screen (pressing I, for example).
2. You go on to a craft and load it with soldiers.
3. Then on craft inventory, you press a button (or something) and essentially load the craft with whatever else is needed to complete the soldiers load out.

For example: Two soldiers each preloaded with one pistol, one clip, and one knife.
Craft is only loaded with 2 knives and a medkit.
Soldiers are assigned to craft.
Craft is forced to add to the inventory two pistols and two clips, on top of the existing knives and medikit.

Sol, Is this what you had in mind?
Title: Re: [SUGGESTION] Alternate loadout system
Post by: Yankes on March 31, 2022, 05:48:56 pm
From my perspective this will be pain in ass to implement correctly as we still need have current inventory handling.
This mean we will have two inventory systems that need live together and as always we will have multiple corner cases to handle.

Question is can we solve this problem without overhauling current system? Like options to clean all inventory in craft and loading items based on templates of selected soldiers in given craft? Could this solve problem?
Title: Re: [SUGGESTION] Alternate loadout system
Post by: Alex_D on March 31, 2022, 06:59:16 pm
Like options to clean all inventory in craft and loading items based on templates of selected soldiers in given craft? Could this solve problem?
Or to "append" items to the craft inventory based on the templates? One could always press CTRL+ALT+X (?) to unload unequipped items from the craft afterwards.
Title: Re: [SUGGESTION] Alternate loadout system
Post by: Yankes on March 31, 2022, 08:04:41 pm
"append" have one problem that will duplicate items or will miss some items.
This depend on what exactly will be algorithm used to deciding what item to load and when.
Title: Re: [SUGGESTION] Alternate loadout system
Post by: R1dO on March 31, 2022, 10:09:09 pm
From my own tinkering with OXC code most of the information needed for points 2 and 3 is already present in the item equipscreen of a vehicle.

Once equipped a soldier remembers it's load-out till the next time you visit the (fake) battlescape inventory screen.
This means one can iterate over all assigned soldiers on a craft and (temporally) store the total amount of each "requested" item.
Afterwards one can compare this with the items currently on base and use existing mechanisms to add/substract the amount of a specific item to the craft till it is in balance.

Equipping all soldier can be done using a temporal overflow of all base items on the craft and visiting the inventory screen from that place (as in the current situation) for all soldiers currently on that craft.

Problems with this approach:
1) How to make the balancing functionality available to a player (a button or some global increase/decrease arrows which allows for balancing using some modifier plus mouseclick combo)?
2) Determining how to act on extra items which the player probably put in the craft on purpose.
3) What to do when too little items are available on base to satisfy demand of all soldiers (on the first time you enter the inventory screen afterwards some soldiers will lose their loadout preference)
4) How to communicate to the player when point 2 and/or point 3 is happening on the current ship (item).

Unfortunately i do not think this is possible to do outside the equipment screen unless the add/substract methods become 'shared'. And even then one needs access to information if the amount of items are still below the craft limit, so one can devise a way to prevent such an aircraft to launch.

P.s. If i am correct such a system is already mostly in place (at least the decrease items part) in OXCE, available via some shortcut. This assumption is based on some of Meridian's (older) youtube videos, so i might be incorrect here.
Title: Re: [SUGGESTION] Alternate loadout system
Post by: Solarius Scorch on April 01, 2022, 01:52:13 pm
Many thanks for the initial responses, guys.

Admittedly I have expected it to be a pain in the ass, so I wasn't in a hurry to post this suggestion, but it's something that has bothered me for so many years that I decided to give it a try. It's just too good to pass. :)
Title: Re: [SUGGESTION] Alternate loadout system
Post by: Delian on April 01, 2022, 03:54:22 pm
If I understand correctly, this suggestion is about not needing to mange the equipment section for crafts anymore, because all the craft items would passively be the ones that are equipped on the soldiers.

In general I don't like this suggestion because, the amount of different weapons and items you have in the base's inventory can be staggering, at least in some large mods like xpz, so when in the inventory screen, it would be a pain in the ass to scroll through all the base items to find the one you want to put on a soldier. The second issue is that, at least in xpz, you would still need to manage craft equipment anyway, because you'd want to bring protective, utility, and other backup items with you, without wearing them by default on any soldier. The third reason is that this would be difficult to implement, as Yankes said, two systems would have to work side-by-side in the mod.

The first issue could be solved with some sort of filtering, hidden items, perhaps.
The second issue could be solved by... not sure. Would have to change the way craft equipment list works, so it would function as a simple "extra equipment list" to bring on the craft.

Hmm... not sure how to solve this.
Title: Re: [SUGGESTION] Alternate loadout system
Post by: yergnoor on April 01, 2022, 05:03:38 pm
I have read all of the previously proposed options for the alternative soldier equipment system and thought about how the changes could be minimized so that the new system would be as close to the old system as possible.

So, what is the biggest inconvenience, in my opinion - despite the fact that each soldier now remembers the equipment issued to him (that is, the rudiments of the personal equipment system already exist), when he is assigned to another transport plane, it may not have the right amount of equipment for all soldiers. And if you open the outfitting screen, you see the operatives not fully equipped.
That is, simply assigning soldiers to transport is not enough, because among them there may be specialists who require special equipment.

So I propose that the game itself checks whether there is enough equipment on board, after assigning the crew, based on their previously assigned equipment (summing up their personal equipment and comparing it with what they already have), and asks if they need to supplement the onboard supplies. If there's something missing from the base, it tells what and how much - similar to the lack of equipment screen after the battle. At the same time, if there is a surplus in the transport, it stays there. Also later you can additionally load the necessary reserve ammo and weapons in the usual way.

It would also be good to have a separate option to equip a soldier not yet assigned to the transport. To do this, there should be a separate equip button in his profile. If a soldier is already assigned to a transport, he will be equipped from the stocks of that transport, but if he's still free, he will be equipped from the base's store.
That is, if you want, you can give him rare equipment at the base, and then assign him to the transport and then the game will ask whether to load his necessary equipment after him, if it does not appear on board a free replacement.

I understand that my option does not cover all possible situations.
For example, I do not propose to unload rare equipment in the warehouse base, following the departed fighter. This would have to do manually.
But this semi-automatic loading transport necessary equipment, as I think should make the game with mods, where there is a lot of different equipment.

P.S. There may be inaccuracies in the text as it is a machine translation. Sorry.
Title: Re: [SUGGESTION] Alternate loadout system
Post by: Meridian on April 01, 2022, 05:28:42 pm
Hard to believe this is a machine translation.
Machines are getting too smart :)

Anyway, this is so far the most painless proposal.
We could start here and see if that's enough.

It would also be good to have a separate option to equip a soldier not yet assigned to the transport. To do this, there should be a separate equip button in his profile.

There is a "hidden" button for this already.
Press `I` in the Soldier List UI.
Title: Re: [SUGGESTION] Alternate loadout system
Post by: yergnoor on April 01, 2022, 05:52:26 pm
There is a "hidden" button for this already.
Press `I` in the Soldier List UI.
Thanks for the advice. Yes, it works, although it is not so convenient to do it on Android, you need a special keyboard, which can be called on the screen at any time.
Title: Re: [SUGGESTION] Alternate loadout system
Post by: Dioxine on April 13, 2022, 11:21:43 pm
I fully support Solar's request - the Apocalypse system is simply better. But I see the problem with code implementation and too drastic changes which could make UFO into not-UFO (which we don't want), so let's break it to bare bones - what I'd consider "minimum" implementation that'd make me happy:

An option selectable per mod or per user, which causes:
1) When you move a soldier onto a craft, the game automatically loads equipment on craft to be able to fill that soldier's autosaved loadout;
2) When you remove soldier from a craft, the game removes all the items they were carrying (in other words, their autosaved loadout) from the craft.

Prompt optional but there should be warning popup if base stocks are insufficient (with options to cancel, proceed, and cancel+ go to buy/manufacture screen like after-battle)?

This, combined with the already existing option to equip soldiers at base, not at craft (it does exist, right?), would allow to move soldiers between crafts freely, without all the annoying and time consuming micro associated with manually loading up the crafts (and unloading them).

Maybe we can thus achieve the desired effect with minimum interference in the existing code, and with maximum reuse of already existing OXCE elements.
Title: Re: [SUGGESTION] Alternate loadout system
Post by: Yankes on April 13, 2022, 11:48:21 pm
Could be this function enabled when you assign soldier to craft using some modifier?
Like if you click `shift` when you assign/remove solder then game try add/remove items from load.
Without it game behave same way as it now work.
Title: Re: [SUGGESTION] Alternate loadout system
Post by: Solarius Scorch on April 14, 2022, 12:32:29 am
Could be this function enabled when you assign soldier to craft using some modifier?
Like if you click `shift` when you assign/remove solder then game try add/remove items from load.
Without it game behave same way as it now work.

From the player's perspective, it would be just tedious...
If I (as a player) want to use this system (and why wouldn't I?), then this Shift would always need to be pressed.
Title: Re: [SUGGESTION] Alternate loadout system
Post by: Meridian on April 14, 2022, 09:28:27 am
I'll give it a try.

Removing things from the craft may be tricky in corner cases though.
For example from soldiers who are not at base, e.g. wounded after mission.
Title: Re: [SUGGESTION] Alternate loadout system
Post by: Yankes on April 14, 2022, 12:44:56 pm
From the player's perspective, it would be just tedious...
If I (as a player) want to use this system (and why wouldn't I?), then this Shift would always need to be pressed.
Then add another user option that invert default behavior aka without shift move/remove solder inventory, with shift only move soldier to/out craft.

Options for both have interesting consequence that you can fill whole craft of 10x of given inventory layout using only 20 clicks.

This give me Idea, why not make "inventory layout" a item in craft loadout? Some kind of meta-item that have linked list of items with some amounts.
Like:
Code: [Select]
StandardLayout:
  Grenade: 2
  Gun: 1
  Clip: 3
Utils:
  StunRod: 1
  PsiAmp: 1
  MedKit: 2
And on craft inventory we have:
Code: [Select]
StandardLayout + - 0
Utils          + - 0
Gun            + - 3
Grenade        + - 1
Clip           + - 1
And when you add `StandardLayout` it will increase matching real items count.
Like:

Code: [Select]
StandardLayout + - 1
Utils          + - 0
Gun            + - 4
Grenade        + - 3
Clip           + - 4
When you leave this screen game can forget how many you have this "meta-item" selected.
If you want redone it you can simply clear whole inventory and add again this "meta-item", lot of clicking but if your want you can have
one "meta-item" that cover whole craft inventory.



[ps]

Another possible stateless solution:

When you empty whole craft inventory button "unload" change into "auto load", when you click it game will iterate for each solder and try add items that he have in default inventory layout.
Title: Re: [SUGGESTION] Alternate loadout system
Post by: R1dO on April 14, 2022, 05:07:34 pm
From the player's perspective, it would be just tedious...
If I (as a player) want to use this system (and why wouldn't I?), then this Shift would always need to be pressed.

This is actually a good argument for making it an user option toggle.
If the user wants it, it is always on. If not it is always off.
Title: Re: [SUGGESTION] Alternate loadout system
Post by: Solarius Scorch on April 14, 2022, 08:52:23 pm
Then add another user option that invert default behavior aka without shift move/remove solder inventory, with shift only move soldier to/out craft.

Yeah, that would be OK.

Options for both have interesting consequence that you can fill whole craft of 10x of given inventory layout using only 20 clicks.

What makes you think that you can just leisurely load 20x of any item? :P

This give me Idea, why not make "inventory layout" a item in craft loadout? Some kind of meta-item that have linked list of items with some amounts. (...)

Sorry, I have no idea what you're talking about.

Are items loaded/unloaded with the relevant soldier or not?

Another possible stateless solution:

When you empty whole craft inventory button "unload" change into "auto load", when you click it game will iterate for each solder and try add items that he have in default inventory layout.

I guess it's a solution... But not one I like. The point is to not care about equipment loadouts other than by soldier.
Title: Re: [SUGGESTION] Alternate loadout system
Post by: Delian on April 16, 2022, 01:13:53 am
I think've come up with a perfect (and simple) solution.

Currently, when you're editing soldier inventories, you can use the hotkeys 1-9 to load a soldier with a saved global equipment layout, or press L to load a personal template, right? But if you don't have the required items on the craft, you get an error "Not enough items to copy template!".

What if we simply changed it so that instead of the error "Not enough items to copy template!", you would get an info message "Template items added to craft!"? In other words, when loading a template, the missing items would be automatically added to the craft as necessary (or give you an error if not enough items in the base).

Personally, I change soldier equipment very often. I optimize to bring specific items for the specific enemies I'll be facing, rather than using personal templates. That is, I don't ever use L to load a personal template, only 1-9 to load a saved global template, because cookie-cutting is easily punished in piratez. So to me saved equipment layout and personal equipment layout are basically useless and solutions that would load the craft using either of these two aren't very useful. But the above solution allows for easy exchange of any template/layout which is why I think it would be the best. It would also be compatible with other solutions, like Dio's.

Oh and, for Scorch's 3rd point, currently if you press X, all the items are removed from the soldier. We could make it so that if you press Shift+X, the items would be removed from the soldier AND removed from the craft.
Title: Re: [SUGGESTION] Alternate loadout system
Post by: Yankes on April 16, 2022, 02:40:18 am
Sorry, I have no idea what you're talking about.

Are items loaded/unloaded with the relevant soldier or not?
No, this more orthogonal feature that could partially reduce work you need do each time you reload craft inventory.
Image that is not per soldier but per soldier "class" like "items required by melee solder" or "items required by sniper".



Title: Re: [SUGGESTION] Alternate loadout system
Post by: Dioxine on April 17, 2022, 12:37:24 am
This give me Idea, why not make "inventory layout" a item in craft loadout? Some kind of meta-item that have linked list of items with some amounts.
Like:
Code: [Select]
StandardLayout:
  Grenade: 2
  Gun: 1
  Clip: 3
Utils:
  StunRod: 1
  PsiAmp: 1
  MedKit: 2
And on craft inventory we have:
Code: [Select]
StandardLayout + - 0
Utils          + - 0
Gun            + - 3
Grenade        + - 1
Clip           + - 1
And when you add `StandardLayout` it will increase matching real items count.
Like:

Code: [Select]
StandardLayout + - 1
Utils          + - 0
Gun            + - 4
Grenade        + - 3
Clip           + - 4
When you leave this screen game can forget how many you have this "meta-item" selected.
If you want redone it you can simply clear whole inventory and add again this "meta-item", lot of clicking but if your want you can have
one "meta-item" that cover whole craft inventory.

Sorry I didn't understand any of it. And if I can't even understand explanation, I can much less imagine using it. What I understand it's just another layer of micro, which is contrary to the original idea (which is removal of micro, because in this proposed concept, game remembers how you outfitted the soldiers last time and moves their stuff automatically - so it does exactly the same thing as you would do - or more realistically, you'd use an alternative of "load every frigging thing I have on the craft, and move everything from craft to craft when moving soldiers"; it's crappy method, especially due to huge losses in equipment when you lose craft, but it's the least painful way). I want to reduce the overall usage of UI, not add more of it.

Oh and, for Scorch's 3rd point, currently if you press X, all the items are removed from the soldier. We could make it so that if you press Shift+X, the items would be removed from the soldier AND removed from the craft.

I hate this keyboard playing with secret key combos and this proposition would allow to omit it almost completely. I.e. the proposition Solar is making is to EMPOWER existing UI to carry better, instead of adding more and more mystery layers on top of it.
Title: Re: [SUGGESTION] Alternate loadout system
Post by: Solarius Scorch on April 18, 2022, 12:34:25 am
No, this more orthogonal feature that could partially reduce work you need do each time you reload craft inventory.
Image that is not per soldier but per soldier "class" like "items required by melee solder" or "items required by sniper".

To be blunt, I am not personally interested in this feature. Not saying it's bad, but it's different from what I requested, and doesn't even seem closely related.

But I'm still very much interested in the original idea :)
Title: Re: [SUGGESTION] Alternate loadout system
Post by: Scamps on August 21, 2022, 02:52:02 pm
One could always press CTRL+ALT+X (?) to unload unequipped items from the craft afterwards.
Is this a feature or a suggestion?

press L to load a personal template
How did I live without this feature before?! It definitely lacks promotion!!!

Anyway, will try my hand at it. If CTRL+ALT+X thing is already implemented, the rest is a piece of cake. If not... well, amount of exploring and new code is going to be somewhat large.
Title: Re: [SUGGESTION] Alternate loadout system
Post by: Scamps on August 21, 2022, 07:29:07 pm
So here is my attempt at it. Lets call it a proof of concept. In craft equip window:
- press "1" to clear unused items (kind of Ctrl+Alt+X)
- press "2" to add missing items.

Problems:
- HWP ammo is not supported. Needs a bit more time/understanding of code.
- Did not test items with multiple ammo (underslug grenades). They likely don't work. Needs a bit more time/understanding of code.
- Did not test item limit, but copied the code.
- I don't like hotkeys, but did not explore this issue. Probably Ctrl+Alt+X anf F5 are preferrable?
- Code might be messy and unlinted. Sorry. Not much, though  :-X
- 2lazy2upload executable.
Title: Re: [SUGGESTION] Alternate loadout system
Post by: Scamps on August 28, 2022, 07:38:29 pm
Spent a bit more time on this.
- Turns out "master" branch is OXC, not OXCE, oops!
- HWP ammo works without code modification
- Multiple ammo was fixed after rebase to oxce-plus branch
- NEW: pressing "I" in base soldier list takes you to that soldier, not first one. Still would like more testing.

Build for Windows https://drive.google.com/file/d/11fY6AeNJqd1fEYGKL-u_CvodE7Uix3-D/view?usp=sharing
Diffs attached to post.

So, "Equipping" part of request should work, requires one keypress in craft inventory though. Workflow is:
1. Equip soldiers from base
2. Assign to craft
3. Go to craft inventory and press "2"
"Unequip" part works to a degree, it does not support leaving extra equipment in craft inventory (that fire extinguisher that is lying just in case)
Go to craft inventory and press "1" to remove unequipped items.

I am not comfortable with adding options and item transfers on soldier assignment myself. So I made this uninvasive. Please test and share your opinions!

A question about desired behavior: if craft does not have enough ammo, and one of the soldiers using it gets removed, what is expected behavior?
Title: Re: [SUGGESTION] Alternate loadout system
Post by: Scamps on September 22, 2022, 09:25:14 am
One more quesion came up playing with the patch.
Currently, "I" in base soldier list works only for soldiers not assigned to craft. I intended to add functionality to rest of soldiers. Now in case you want to change equipment of an assigned soldier under new system, craft will likely not have desired equipment. So, what equipment should be displayed in that case? 1) craft, 2) base, 3) base+craft?
Other option is to do a 3-step process (on different screens): 1) deassign soldier, 2) change equipment, 3) assign soldier. Makes me think about implementing "I" on craft soldier screen...
Title: Re: [SUGGESTION] Alternate loadout system
Post by: Meridian on October 21, 2022, 06:23:13 pm
Done.

Test build was here:
EDIT: use official build OXCE v7.8 or higher

Please test and provide feedback.

Features implemented:
- everything enabled/disabled by a user option (in Advanced tab) called "Alternate craft equipment management"
- the Soldiers screen now has an "Inventory" button (inside the actions combobox)... until now there was only a hotkey 'I' to open the inventory
- when moving (assigning/deassigning/reassigning) soldiers from and to a craft, they take their inventory (or as much as possible of it) with them
- the Craft Equipment screen shows more detailed info about how many items are in soldiers' inventory (i.e. reserved) and how many are extra and/or missing
- the Craft Equipment screen shows also items that are not in the base, not on the craft, but only reserved by the soldiers' inventory templates
- the Craft Equipment screen automatically adds more items from the base onto the craft (when the screen is opened), if there were some items missing and are now available (e.g. purchase/transfers have arrived recently)
- when removing items from the Craft Equipment screen, you can only remove the extra items... items reserved for soldiers can only be removed by removing the soldiers
  * EDIT: this doesn't apply when loading a global craft equipment layout (F9)
- the soldiers' inventory templates are only saved/updated in the following situations:
  1. in the base, via Soldiers > Inventory (or I hotkey)
  2. in the base, via Craft Equipment > Inventory
They are NOT saved/updated anymore in these situations:
  3. after the Briefing (before the first mission stage)
  4. in-between mission stages (for multi-stage missions)


Display of the items in craft equipment screen:
1. HWPs - no change
2. exact amount of items necessary - no change
3. more items than necessary - displayed as X/+Y (where X is the number of necessary/reserved items and Y is the number of extra items; X plus Y is the number of items on the craft)
4. less items than necessary - displayed as X/-Y (where X is the number of items on the craft and Y is the number of items missing)


Items are explicitly moved together with soldiers in the following cases:
a/ when assigning/deassigning/reassigning soldiers on the Craft Soldiers screen
b/ when assigning/deassigning/reassigning soldiers on the Craft Armor screen - using CTRL+click
c/ when a soldier is removed from a craft automatically due to soldier being wounded during a mission
d/ when a soldier is removed from a craft automatically due to soldier transformation starting

Items are also moved together with soldiers in the following cases (not explicitly, but as a side effect of other standard xcom behavior):
e/ when completely unloading a craft due to selling a craft in the Sell screen
f/ when completely unloading a craft due to "consuming" a craft during the Manufacturing (e.g. craft upgrade)
g/ when a non-empty hangar is destroyed => (only the first) craft in the hangar is destroyed, but the crew and the items are saved

Items are not moved (intentionally) in the following cases:
h/ when evacuating the crew / ejecting the pilots - the soldiers are allowed to survive (depending on the modder's taste), but the items on the craft will be destroyed
i/ when an empty hangar is destroyed => (all) crafts being transferred into this empty hangar are destroyed including the items; TODO: the crew is saved, but probably in a buggy state... to be tested

Items are also not moved (because it is not required/desired/supported) in the following cases:
j/ when starting a new game (the soldiers don't have any inventory template yet, so there's nothing to move!)
k/ when loading a saved game and soldier-to-craft links are built (this is just a technicality)
l/ when importing saves from the original UFO/TFTD (this is just a technicality)
m/ in the "New Battle" mode
n/ in the "Craft Preview" and "Base Preview" modes


Disclaimer: when automatically moving items:
- there is no check for items not allowed on crafts (e.g. corpses, geoscape items, items without a bigsprite, fixed items, alien artifacts, explicitly disabled items, items that don't exist in the mod anymore, etc.) -- most of these should hopefully never be saved in a soldier's template, but if they somehow manage to get there, they will be used as is
- there is no check for craft item number limit
- there is no check for craft item weight limit
Don't ask for this, it will not be done. I'm not willing to spend the next 5+ years fixing it!
(The checks will still work for any extra items you'd want to add manually.)


Last thing: this is a PLAYER option, it cannot be fixed by a modder. It can be recommended though.
Title: Re: [SUGGESTION] Alternate loadout system
Post by: Dioxine on October 21, 2022, 07:54:21 pm
It's a dream come true! Thank you!
Title: Re: [SUGGESTION] Alternate loadout system
Post by: Vakrug on October 22, 2022, 11:05:29 am
I can't say that I fully understand the significance of this innovation, but it looks like it will help greatly with craft replenishment in such scenario: used some grenades on a mission, not enough grenades in stock, buy missing, after 3 days grenades arrives and are automatically put into craft. Earlier a player should remember to put them back manually.
Title: Re: [SUGGESTION] Alternate loadout system
Post by: psavola on October 22, 2022, 11:16:01 am
The apparent difficulty comes from cases where you alternate between land-based and underwater missions, where you would also need to use very different equipment. (Of course, there are also missions where you specifically want non-standard equipment.) Yet in the loadout phase you don't know which kind of mission you're going to go next. You'll usually want to use different templates. But I'm not sure if this makes the current situation any worse and it could make it better.
Title: Re: [SUGGESTION] Alternate loadout system
Post by: Alex_D on October 22, 2022, 08:38:44 pm
I'll have to give it a try on my next campaign, to see how it changes my gameplay.

As per gameplay, I found myself using pretty much all 20 soldier loadout templates. There is where I save typical roles and assignments  for land, sea, space, and special mission loadouts that require specific gear set. I don't use a lot the individual soldier saved template precisely for the multiple mission scenarios.
I also use pretty much all 10 craft loadout templates, for about the same reasons.

If I were to be granted a wish, I'd ask for 10 or 20 more soldier templates (for a total of 30 to 40), with hotkeys to match for the first 20 or so. Same for crafts, 10 more for a total of 20 (or more), also with hotkeys.
Title: Re: [SUGGESTION] Alternate loadout system
Post by: Meridian on October 22, 2022, 08:49:08 pm
If I were to be granted a wish, I'd ask for 10 or 20 more soldier templates (for a total of 30 to 40), with hotkeys to match for the first 20 or so.

Wish already granted in OXCE 7.7: https://openxcom.org/forum/index.php/topic,10734.0.html
Title: Re: [SUGGESTION] Alternate loadout system
Post by: Vakrug on October 22, 2022, 08:55:00 pm
 :'( 
Something is not right with this Alternate loadout system. Or maybe this is a problem with XPiratez mod that just got updated...
In either case items gets duplicated when you save and load craft inventory (F5 / F9). Only items that are on hand behave such way.

A also witnessed problems with debriefing selling screen. There appeared items that was with me during the start of the mission. (Accidentally sold some stuff.) Maybe this was due to save from previous version. After some refreshing everything was OK after the next mission.
Title: Re: [SUGGESTION] Alternate loadout system
Post by: Meridian on October 22, 2022, 09:00:24 pm
It's a test build for feedback.
I expect issues, it's a big change.
Keep the reports coming, I'll have a look at it asap.
Title: Re: [SUGGESTION] Alternate loadout system
Post by: Vakrug on October 22, 2022, 09:19:19 pm
A also witnessed problems with debriefing selling screen. ... After some refreshing everything was OK after the next mission.
No. I got duplicated some items during the following mission. I cannot figure out the logic behind why exactly these items were duplicated and why in such weird quantity.

Sadly, have to disable this system for now.
Title: Re: [SUGGESTION] Alternate loadout system
Post by: Meridian on October 23, 2022, 07:38:26 pm
Both issues solved.

New test build: link removed, you can download official OXCE v7.8 or higher

Please test.

1/ Solution to issue 1: Loading a craft equipment with F9 is now allowed to remove even the reserved items from the craft.

2/ Solution to issue 2: Handling of wounded soldiers has been moved to much later in the Debriefing so that it doesn't affect Craft Reequip algorithm, Missing Items algorithm and Purchase Missing Items algorithm.
Title: Re: [DONE][SUGGESTION] Alternate loadout system
Post by: Meridian on October 29, 2022, 07:28:45 pm
I haven't found any more issues, and no more issues were reported either.

Considering this done and ready to use in OXCE v7.8.
Title: Re: [DONE][SUGGESTION] Alternate loadout system
Post by: psavola on November 23, 2022, 08:16:35 pm
Noticed with TFTD TWoTS. When you assign a person to an interceptor (one that cannot land on missions, so the equipment cannot be used), the pilot appears to take his gear with him.

This might be intentional, given the feature "h/ when evacuating the crew / ejecting the pilots - the soldiers are allowed to survive (depending on the modder's taste), but the items on the craft will be destroyed" (which might not make sense if this was not the case). But possibly not, as this also affects the behavior which items are/can be loaded on interceptors and thus reserved or possibly lost on crash. So the alternative loadout system is not just an interface change but also a very minor behavior change.
Title: Re: [DONE][SUGGESTION] Alternate loadout system
Post by: Meridian on November 27, 2022, 10:35:03 am
I'll check.
Title: Re: [DONE][SUGGESTION] Alternate loadout system
Post by: Scamps on December 16, 2022, 04:33:20 pm
Thoughts on new system (beside huge thanks for hard work)!!!

Due to diversity of missions (looking at you, Dioxine), player sometimes has to change soldier equipment. This presents following problems:

- If you change equipment of a soldier assigned to craft from soldier list, you need to go to craft inventory for equipment to be stored on craft. I keep forgetting it. Is it possible to auto-update craft equipment?

- Finding required soldier on soldier list can be a pain. List is not filtered/sorted by craft and there is no way I know to go to specific soldier inventory from the list.
Solution a) Is it possible to incorporate something like my earlier path (pressing I goes to soldier in question)?
Solution b) Is it possible to show all equipment (craft+base) in craft soldier inventory screen? (and add selected equipment to craft afterwards)
Title: Re: [DONE][SUGGESTION] Alternate loadout system
Post by: Meridian on December 29, 2022, 01:54:20 pm
- If you change equipment of a soldier assigned to craft from soldier list, you need to go to craft inventory for equipment to be stored on craft. I keep forgetting it. Is it possible to auto-update craft equipment?

Proposal here: https://openxcom.org/forum/index.php/topic,10984.0.html

- Finding required soldier on soldier list can be a pain. List is not filtered/sorted by craft and there is no way I know to go to specific soldier inventory from the list.
Solution a) Is it possible to incorporate something like my earlier path (pressing I goes to soldier in question)?

Pressing a key does not have a context (the selected soldier), pressing a R/M mouse button (while being over the desired soldier) would be a better option. At least on PC.

- Finding required soldier on soldier list can be a pain. List is not filtered/sorted by craft and there is no way I know to go to specific soldier inventory from the list.
Solution b) Is it possible to show all equipment (craft+base) in craft soldier inventory screen? (and add selected equipment to craft afterwards)

Possible, yes. Feasible, probably not, hard to say.
Title: Re: [DONE][SUGGESTION] Alternate loadout system
Post by: Vakrug on January 04, 2023, 11:48:50 am
I have read this documentation several times (https://openxcom.org/forum/index.php/topic,10452.msg149914.html#msg149914), performed some thought experiments and even tried this thing in game. My conclusion is -- IT IS UNUSABLE!

In moded game (in unmoded game you don't need an advanced inventory management system at all) basically each new mission requires from player to change crew on a craft (novice/veterans) and their inventory (above water / under water / stealth / ... ). This can be relatively easy done using saving/loading craft equipment, saving/loading soldier's named equipment (F5/F9) and even saving/loading soldier's unnamed equipment (s/l). With this alternative loadout system it is impossible, documentation explicitly says that it is incompatible with F9.

I don't even understand what this alternative loadout system tries to accomplish. Transferring soldiers form one craft to another with their inventory? This can be easily done old fashion way -- save old craft's inventory, clear old craft's inventory, move soldiers, load inventory on new craft, done! Transferring individual soldier from one craft to another? In 99% this transferred soldier would require different weapons than he is carrying now!

Can I ask at least some usage examples of this alternative loadout system?
Title: Re: [DONE][SUGGESTION] Alternate loadout system
Post by: Meridian on January 04, 2023, 01:44:35 pm
I guess it depends on playstyle?

I also cannot imagine using this feature myself, at all.
For the same reasons you mentioned, plus more.

Some players probably just prefer role-playing their soldiers and want them to carry always the same equipment... regardless of mission, terrain, time of the day, environment, regardless of what other soldiers carry, etc.
Or maybe somebody is using it in a way we can't even imagine.

But everyone is free to play as they like...
Title: Re: [DONE][SUGGESTION] Alternate loadout system
Post by: Meridian on January 05, 2023, 11:59:38 am
By the way, on a semi-related note, on my own personal OXCE version I've implemented a way to load craft equipment without removing current equipment. Here (https://github.com/karadoc/OpenXcom/commit/e51e9a78bb23305e96584abe3fbc599482fb2222). I'm not sure if this is interesting to anyone else. The main use-case is when you have a template saved for general additional craft gear that you want to add after you've already put your soldier on-board. (I went for the easiest implementation I could think of. Holding ctrl when clicking the template makes it add rather than replace the equipment; but maybe a 'nicer' implementation would have a toggle button on the load window.)

I tried this, but it breaks the reporting of missing items.
Any good/easy idea how to fix that?

EDIT: ok, I think I have a solution
Title: Re: [DONE][SUGGESTION] Alternate loadout system
Post by: karadoc on January 05, 2023, 12:54:28 pm
I tried this, but it breaks the reporting of missing items.
Any good/easy idea how to fix that?

EDIT: ok, I think I have a solution
Hmm. You're right. It was still reporting missing items when there isn't enough for the template on its own; so I hadn't noticed that it doesn't report the extra missing items.

I think I know what to do to fix it - but it sounds like you already did it.
Title: Re: [DONE][SUGGESTION] Alternate loadout system
Post by: Meridian on January 08, 2023, 10:10:03 am
The discussion about a new loadout system proposed by karadoc has been moved here: [SUGGESTION] Alternate loadout system #2 (https://openxcom.org/forum/index.php/topic,10998.0.html)
Title: Re: [DONE][SUGGESTION] Alternate loadout system
Post by: Meridian on January 08, 2023, 12:42:40 pm
Noticed with TFTD TWoTS. When you assign a person to an interceptor (one that cannot land on missions, so the equipment cannot be used), the pilot appears to take his gear with him.

Yes, this is consistent with the requirement that soldiers always take equipment with them. (it's "on them", simulating Xcom:Apoc)
(Pilots in OXCE are soldiers.)

This might be intentional, given the feature "h/ when evacuating the crew / ejecting the pilots - the soldiers are allowed to survive (depending on the modder's taste), but the items on the craft will be destroyed" (which might not make sense if this was not the case).

It is intentional, but not for the reason you mentioned.
The intention is to not make any difference between pilots boarding a transporter and pilots boarding an interceptor.

But possibly not, as this also affects the behavior which items are/can be loaded on interceptors and thus reserved or possibly lost on crash. So the alternative loadout system is not just an interface change but also a very minor behavior change.

I don't understand this... what behavior exactly is changed?
It was possible to load items on interceptors before and it is still possible now.
There's no difference between transporters and interceptors... as far as I can say.
Title: Re: [DONE][SUGGESTION] Alternate loadout system
Post by: psavola on January 08, 2023, 03:10:37 pm
I don't understand this... what behavior exactly is changed?
It was possible to load items on interceptors before and it is still possible now.
There's no difference between transporters and interceptors... as far as I can say.

Sorry, I missed that. I had never (manually) loaded equipment on interceptors before so I hadn't even realized it's possible. I suppose some mod might use it for something, AFAIK it would not have a purpose in vanilla.
Title: Re: [DONE][SUGGESTION] Alternate loadout system
Post by: karadoc on January 09, 2023, 01:45:57 pm
Sorry, I missed that. I had never (manually) loaded equipment on interceptors before so I hadn't even realized it's possible. I suppose some mod might use it for something, AFAIK it would not have a purpose in vanilla.
You can transfer items from one base to another by loading the items on the interceptor, and then flying the interceptor to the other base. It's cheaper and faster than the normal transfer method. (But it's only possible for items that can be loaded onto the craft.)
Title: Re: [DONE][SUGGESTION] Alternate loadout system
Post by: Meridian on April 14, 2023, 03:17:05 pm
Thread locked as this solution is obsolete and has been replaced by a new solution.

Original: https://openxcom.org/forum/index.php/topic,10452.msg149914.html#msg149914

Improvement 1 (base equipment): https://openxcom.org/forum/index.php/topic,10984.0.html

Improvement 2 (load on top): https://openxcom.org/forum/index.php/topic,10851.0.html

New solution (craft equipment): https://openxcom.org/forum/index.php/topic,10998.0.html