Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - karadoc

Pages: [1] 2 3 ... 15
1
I've made the changes so that the items arrive instantly. I'll guess I'll post it as a pull-request in a few days after I've done a bit more testing to make sure there's no glitches. (My first attempt looked like it was working, but actually had the items not arrive at all! So I also made a couple of tweaks reduce the risk of coding errors like that in the future.)

While I'm looking at it though, is there any special reason why soldiers, scientists, and engineers are all given a 24 hour arrival time from events (whereas everything else was 1 hour)? I don't really care much about the 24 hour arrival time for people. It's not relevant to the thing I'm trying to fix; but it just seems a bit odd to me, so I wondered if there was a reason for it.

--
(@TBeholder - the difference is that if the items don't arrive straight away, then you can't get rid of them when you run out of space.)

2
Ok. Lets put aside the idea of delaying the storage check - because that kind of just shifts the problem somewhere else (which may look better to me, but look like a bug to someone else).

But I still think it is ... awkward and 'ungood' that the new items arrive one-hour later - mostly because of the storage issue. If I get an event like "someone just dumped 100 units of rubbish in your base", I shouldn't have to clear out 100 units of my high quality valuable gear to make room for that rubbish to arrive. The idea of a option to sell the stuff from the event screen itself would work; but the items aren't currently listed on the event screen anyway. I still think the best solution is if the items arrive immediately after the event screen; and *then* do the storage check. That way players could sell any combination of new and old stuff they like to make it work.

I've been bothered by this event storage thing for awhile now - and I have glanced at the relevant bits of the code in the past and concluded this isn't going to easy to fix...    so I'm not surprised that there was some kind of problem in a previous implementation. I still think it's worth another look though. Or am I basically the only one who cares about this? If there was a patch that changed it to arrive instantly, is that something we'd want in the main OXCE?  (I don't intend to work on it right now - but if it's something people actually want, then I might do it sometime in the future.)

3
OXCE Suggestions WIP / Re: [SUGGESTION] Alternate loadout system #2
« on: January 21, 2023, 01:20:45 am »
Thanks for checking it out, Scamps.

And R1dO,
All of that UI work looks quite good to me. I like that the < and > buttons effectively have normal vanilla functionally, but with a clear and intuitive 'interpretation' in terms of soldier equipment & craft equipment. That similar to what I had in mind earlier, but perhaps better. I also like that the inventory button had a visual indicator for when it going to screw up my soldiers' inventories. The "!!!" doesn't look super attractive - but at least it is a clear warning, and I don't have a better idea. On the combo box, I don't know how 'claimed by soldiers' is different from 'equipped' (but I don't tend to use the 'equipped' thing, so maybe I'm wrong about what it does).

In any case, I'd pleased to see all of those challenges implemented alongside the alternative inventory system. I like it. But for the original equipment system (i.e. normal / 'option 1' / 'ignore soldier equipment'), I don't think there is a concept of soldiers claiming equipment - so I'd only want the additional visual information and warnings about claimed equipment to be activated when using the alternative system.

4
OXCE Support / Re: HK soft lock
« on: January 20, 2023, 03:56:13 pm »
My mistake. I misremembered the withdrawal thing as a time counter when it is actually a shot counter. And I certainly wasn't trying to correct you about anything. I was just trying to contribute a snippet of info that I thought was interesting and relevant. Apparently I'd got the info wrong, and misinterpreted the mood of the thread too. Sorry.

5
OXCE Support / Re: HK soft lock
« on: January 20, 2023, 02:37:07 pm »
Although UFOs have unlimited ammo... I believe there is already code which tells hunter-killer AI to withdraw from combat after a certain time - which makes it look like they've run out of ammo. In fact, the entire reason that timed-withdraw exists in the code is to avoid this kind of softlock!  So... if you are being attacked by a hunter-killer with no weapons, you can just wait it out. (And it sounds like a mod-rules bug to have a hunter killer with no weapons.)

6
When a random event creates items, those items are currently set to transfer to the base arriving at the next hour.

I think this is a bit confusing, and sometimes annoying and frustrating. It's confusing because many things could happen in between the event and when the item arrive on the next hour - which might make it harder for the player to connect the two ideas. Immediately after the event, the player might wonder where the items are. And when they arrive, the player might be confused about what the items are for or where they came from. It can also be annoying / frustrating if the items take up a lot of storage space - triggering the base-overfull forced sell screen. This is bad because the forced-sell screen is set to appear immediately after the event. The space requirements of the new items are counted, but those items haven't arrived yet - and so they cannot be sold / transferred on the force-sell screen.


In my opinion it would be much better if the new items arrived immediately after the event, rather than at the usual 1-hour for items transferred. A secondary less-good option would be to just remove the immediate storage space check on the event screen - leaving only the normal 1-hour storage after the items actually arrive.

7
OXCE Suggestions WIP / Re: [SUGGESTION] Alternate loadout system #2
« on: January 16, 2023, 07:02:40 am »
What I want to say is, original requirement and your requirement are not compatible.
What you are proposing is not an improvement of an existing system, it is a different system.
To be honest, when I first read this post I was a bit unsure what you thought the original requirements were. Since the original request was marked as 'complete', I thought the feature was already working as intended, and that we were just trying to refine it a bit.

But after talking to UchuuKaizoku, I realise that that you weren't just going for a system loosely inspired by apoc. It was literally meant to have soldier equipment strictly reserved so that items were effectively stored on the soldier rather than in the base or the craft. I didn't realise that was the aim, because I don't think the current implementation achieves it - and I prefer the current implementation compared to that strict goal anyway!

So Meridian, you were right. I probably was proposing a different system. A system that is very similar to what is currently implemented, but not the same as the 'apoc' idea that was originally intended. I think this whole discussion is a bit foggy, with different people having different understandings of how things currently work, and different ideas of how things should ideally work.

I've taken a bit of time to write some notes about what I think the three different systems are. Option 1 being standard xcom, option 2 being something close to what we have currently, and option 3 being the strictly reserved soldier equipment system. I'll paste those details in a moment. But let me just say I thought option 2 was more-or-less what everyone was aiming for here and I was enjoying using that system. I'm reasonably happy with what we have currently implemented. But I have no interest in using option 3 whatsoever, and I think it could be a bit of a nightmare to implement and maintain. So although the original idea might have been something closer to option 3, I'd urge people to think carefully about what they actually want. It would be a shame to spend a lot of effort 'fixing' discrepancies in the current system only to end up with something less useful.


Here's are the details that I've written down for the three options:
(`*` means implemented already. `#` means currently unimplemented. `?` means the current implementation is ok, but I have a suggested change.)


Option 1: standard
aka: ignore soldier equipment
-------------------------------------------------------------
* (Standard original OXCE behaviour)
* Soldiers' remember what items they last used, but do not bring any items with them or reserve items for any reason.
? Inventory changes from the base screen, the craft screen, or pre-battle are saved - updating the soldier's remembered items list. (Although, perhaps it would be better to not save pre-battle changes - just for consistency with the other options.)

* Items can be sold, transferred, or used in any way - as normal - with no special restrictions.

* Moving soldiers does not trigger any movement of items.
* Craft item template save/load affects all items on the craft, including any items equipped by the soldiers.
* Craft inventory screen shows only the items that are currently in the craft.




Option 2: the currently implemented 'alternative system'. (This is my preference.)
aka: request soldier equipment

-------------------------------------------------------------
* Soldiers' remember what items they last used. This is their 'preferred equipment' list.
* Inventory changes from the base screen or the craft screen are saved as the soldiers' current 'preferred' equipment. Changes made in pre-battle, or during battle, are not saved.

* Items can be sold, transferred, or used in any way - as normal - with no special restrictions.

* Moving soldiers on / off a craft will also move their preferred equipment list with them (if the items are available in the base).
* Equipment of the soldiers on the craft cannot be separately moved off the craft. (They must be either unequipped first, or the soldier must be moved off the craft.)
* Items in the base's storage can be added to the craft, regardless of whether they are equipped by other soldiers in the base.
# Craft item templates save/load affects only the unequipped items on the craft. (i.e. templates refer to the craft's extra items, not including the preferred inventory of soldiers currently on the craft.) (Edit: I've got other thoughts about this now, so it might be worth ignoring this one, or discussing further).
* Craft inventory screen shows all items available in the base - including items by soldiers not on the craft. (Items can therefore be 'shared' by multiple soldiers. i.e.  Two or more soldiers can have the same unique item in their preferred equipment list.)
* Changes made to soldiers' equipment from the base screen or the craft inventory screen will result in equivalent changes to craft items.
? When a soldier is moved onto a craft, if there were not enough items in the base to add the full equipment list to the craft, the missing items should not be removed from the craft when the soldier is removed. i.e. Adding a soldier to the craft then immediately removing the soldier should not have any net effect on the craft's equipment list.




Option 3: strict apoc
aka: reserve soldier equipment

-------------------------------------------------------------
* Soldiers' remember what items they last used; and they are treated as literally 'holding' these items at all times. The items are strictly reserved, preventing for all other uses.
* Inventory changes from the base screen or the craft screen are saved as the soldiers' current 'reserved' equipment. Changes made in pre-battle, or during battle, are not saved.

# Equipment held by soldiers cannot be sold, transferred, researched, or used in manufacturing. Items held by soldiers should not appear in the base storage screen, with the exception of the 'force sell' screen when storage is overfull.
# Transferring a soldier to another base also transfers their held items.
# When a soldier is injured, they drop all items. (This is a technical issue only. The inventory screen is unavailable for injured soldiers.)

* Moving soldiers on / off a craft will also move their equipment with them.
* Equipment of the soldiers on the craft cannot be separately moved off the craft. (They must be either unequipped first, or the soldier must be moved off the craft.)
# Equipment of the soldiers not of the craft cannot be added to the craft. (The items are reserved by the soldiers still in the base, and therefore should be unavailable for the craft. We cannot share or steal the equipment of other soldiers.)
# Craft item templates save/load affects only the unequipped items on the craft. (i.e. templates refer to the craft's extra items, not including the preferred inventory of soldiers currently on the craft.)
# Craft inventory screen shows all items available in the base - excluding any items held by soldiers not on the craft. (Items can not be shared by multiple soldiers. If a soldier has a unique item in their equipment list, then no other soldier can equip that item.)
* Changes made to soldiers' equipment from the base screen or the craft inventory screen will result in equivalent changes to craft items.


----

Implementation notes:

* The current version of the game stores an inventory list for every soldier, but these items are not actually stored by the soldier. The soldier's items are always stored by the craft or base. Therefore, the 'strict apoc' setting must explicitly check the items list of each soldiers to manually reserve those items from other usages. This makes implementing the strict setting (option 3) a bit tricky, and potentially creates a code maintance issue - since every type of item usage / transfer must always check these item lists.

* Regarding the last dot-point in option 2, about moving soldier on and off craft. This is what we were discussing earlier in this thread. For me, it is important that moving a soldier onto a craft and then off the craft again should not result in any net change. And to ensure this, we might need to store the craft's "extra" items as a separate list, so that they can be remembered even when some of those items are currently being used for a soldier's inventory. We could simply ignore this, and the result would be a bit of minor inconvenience in the craft inventory changing sometimes due to not enough spare items; but I think it would be nice to fix it. The issue doesn't happen in option 1, because soldier's don't bring their equipment; and it doesn't happen in option 3 because the items on the craft would not be allowed to include missing items from the soldier's inventory in the first place.



And finally, let me just clarify that I'm not really requesting that we have a three-option system implemented in the game. We could do that and it might be good, but I don't really mind what happens. I'm just trying to clear up some confusion about what I was aiming for and what other people might be aiming for. If the goal is just to have the standard system and 'reserved soldier equipment' as an alternative system, then that's fine - but I'll just stay out of it. I'm only really interested in using option 1 or 2.

8
OXCE Suggestions DONE / Re: [DONE][SUGGESTION] Alternate loadout system
« 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.)

9
OXCE Suggestions WIP / Re: [SUGGESTION] Alternate loadout system #2
« on: January 09, 2023, 12:36:14 am »
is this effectively the same as this: https://openxcom.org/forum/index.php/topic,10984.0.html

if yes, I have already implemented that, please have a look: https://github.com/MeridianOXC/OpenXcom/commit/cd932f6885fb86ae9ef4763ca75f15399472713d

Yes. That's what I was thinking about; and at a glance, the implementation looks good. (I don't like the variable name `_backup` though. I'd go with `_soldierCraftMap` or something like that.)

So I guess everyone will be very happy. :)

10
OXCE Suggestions WIP / Re: [SUGGESTION] Alternate loadout system #2
« on: January 08, 2023, 12:41:20 pm »
In terms of the craft inventory screen, the only additional change I'd want to make is that the pre-existing (extra) craft equipment should stay on the craft when soldiers are added or removed - but I don't think we've reached an agreement on that yet. So I guess I'll leave that part alone for now. For what we've agreed on, I think the feature is probably ready to go as is. I've been playing with it over the last few days and I haven't noticed any bugs. And I think it is high value enough that I'd like to get it out to other people sooner rather than later.

There are two other things I think are worth mentioning though:
  • There is an additional 'feature' that turns out to be a side effect of my implementation...  it's actually something that I'd thought about adding deliberately - so it's pretty funny to me that I'd done it accidentally. Here's how it works:  as you know, when you go into the inventory screen from a craft, my code temporarily moves all base equipment into the craft so that you can equip your soldiers from anything that's in the base. That's normal. But the accidental 'feature' is that if you have a filter applied on the craft equipment screen (such as 'underwater items') and then you click the inventory button, then it only moves items matching the filter. Items that were already on the craft will still be there; but only items matching the filter will be available from the rest of the base's items. In my view, this is something I like - because I think its sometimes helpful to show only the items that match certain conditions; and showing the items that are already on the craft is good too, so that it doesn't mess up the soldiers' saved equipment by removing what they are holding. It's an accidental feature, but I like it. It happens for the same reason why saving an equipment template while a filter is on only saves the items matching the filter. We could easily fix it by clearing the filter automatically - but I'd prefer to leave it as is!
  • The other thing is only indirectly related to my changes. It's about the base inventory screen rather than the craft inventory screen. In my changes to the craft inventory screen, equipping items will add those items to the craft. So I think it would be good if the base inventory screen did the same thing. i.e. if you add items to the equipment of a soldier from the base inventory screen, then those items should be added to whichever craft the soldier is currently on (if they are on any craft at all). I have a vague sense that Meridian was going to implement this himself; but maybe I imagined that. In any case, I think it would be an improvement consistent with the changes that I already made.


So I'd suggest just merging the craft inventory patch as is; and then follow up with the base inventory change afterward if we're in agreement about that. As for my suggested craft-extras changes... we can just shelve that idea for now. Maybe when people have played a bit with the new patch they'll see why I wanted it - or maybe not. It's a minor tweak in terms of functionality, but it could be quite a bit of work to implement. So I don't really want to do that if it just going to get rejected.

11
OXCE Suggestions WIP / Re: [SUGGESTION] Alternate loadout system #2
« on: January 08, 2023, 12:02:17 am »
If that patch (or something equivalent) is implemented, I'll be pretty content. For me that's the big improvement that the system needs; and this current argument about what should happen when there isn't enough equipment is, although contentious, less important.

I disagree about it being inconsistent with the original requirements about soldiers bringing their equipment with them. (I started typing some explanation for why not, but decided it was just going to be a long boring rant that is tangential to what people actually care about. So I'll skip that.)

If the existing equip-from-craft patch is implemented, then more people will use that and get a feel for what is good about it and what is not. At that point, I think the conversation about follow-up details will be more meaningful. At the moment I'm literally the only person in the world who has used the version of the system that I'm asking to change!

So yeah, I'm pleased that Dioxine approves of the equip-from-craft changes. Hopefully Solarius and Meridian will also approve of that. Then that's good enough for me - even though it isn't yet my ideal end-point.

12
OXCE Suggestions WIP / Re: [SUGGESTION] Alternate loadout system #2
« on: January 07, 2023, 01:47:10 pm »
In the current system as it is, I can accidentally mess up my craft equipment simply by adding a soldier and then immediately removing it. I think this is an unnecessary pitfall. Adding a soldier and then removing it should result in the same equipment setup as if you'd clicked nothing at all; and that's one of the things my suggested change aims for.

In terms of the GUI, I imagined is that would look identical to how it does currently. It's slightly tricky, because there are effectively *three* important numbers: held items, extra items, and actual total items; and we're effectively trying to represent those three with just two numbers; but I think the cases where total ≠ held + extra aren't important enough to put in a third number. The left arrows and right arrows would do just what they do now: i.e. attempt to take an item off the craft, or attempt to add an item to the craft. This is effectively done by increasing the 'extra' items. In cases where we attempt to add an item when there is not enough available, the extras does not increase; but in cases where we attempt to take away an item that is reserved by a soldier, the extras *does* (silently) decrease. When the craft has no soldiers, whatever items are in the craft should match the 'extras' list exactly. (I hope this would be clear and intuitive enough without the need for any extra buttons or numbers on the screen.)

I'll say a bit more about why I'd want this. I agree with you that when a soldier is removed from the craft, items have to either go to the craft or the soldier. You've said that they should go with the soldier. That's interesting to me, and obviously I disagree (otherwise I wouldn't be suggesting all this). From my point of view, whenever a craft leaves the base to go a mission, we're splitting our soldiers and equipment into two disjoint sets: those who are staying in the base, and those who are going to the mission. And I think the ones going on the missions need to be given priority. I want those ones to have exactly the right soldiers and exactly the right equipment. The ones staying behind can have whatever is left over.

I'd say that it is totally normal to not have enough equipment for every soldier to have their desired gear at all times. For example I might have 5 soldiers who are longbow specialists, but I only have 2 longbows. If I don't put more than two of those soldiers on a mission at the same time, they get their loadout. But if all three are on at once, then someone misses out and has to equip something else.  That kind of thing happens a lot. I assume it happens to everyone for different types of equipment at different times. It's most obvious when there is a base defence mission. When every soldier is on the mission all at the same time, the player often finds that there are some gaps in what they'd like to equip.

In any case, like I said, I think it's normal for there to not be enough equipment to fully outfit every soldier in the base all at once. And I think the soldiers on the craft on their way to a mission should be the ones gives priority. If I'm putting gear explicitly on the craft, then it's because I think I might want it on a mission. I want that equipment to stay on the craft rather than stay with some soldier who is just resting in the base. The soldier can have the equipment when the craft gets back.

Note: in this suggested system, although the soldier may not bring the reserved extra items with them off the craft, the items are still on the soldier's loadout. They certainly aren't forgetting that they want that those items, and they will still equip them automatically at the start of any mission when the items are available.

13
OXCE Suggestions WIP / Re: [SUGGESTION] Alternate loadout system #2
« on: January 07, 2023, 10:36:13 am »
I've been playing with the craft screen inventory changes that I made, and I'm pretty happy with how it works. For me, this is the change that pushes the new equipment system from being an ok alternative, to being a superior system. For how I use the equipment screens, this is a necessary upgrade.  However, there is still one minor annoyance that I'd like to fix up. Unfortunately, it might take a bit of rewriting to resolve. It's about what happens when there is not enough equipment for the 'extra' craft gear (i.e. items that are on the craft, but not assigned to any soldier on the craft).

When there is plenty of equipment, moving a soldier onto the craft will move their equipment with them, and moving them off the craft moves their equipment off too - leaving exactly the same 'extra' equipment on the craft as when you first started. That's good. But if there is not enough items in the base for both the soldier's equipment and the extra equipment, it's different. The soldier claims ownership of the equipment so that they can complete their loadout; and so when they leave the craft they take the equipment with them.

For example, suppose you have 2 laser rifles available in your base and you want to bring them on every mission, so you assign them as 'extra' equipment on the craft. If you then equip the laser rifles in your soldiers' loadouts, those laser rifles will be taken off the craft when the soldiers are swapped out. This probably isn't what you want.

---
What I'd like is for the craft to remember the extra equipment assigned, so that when soldiers leave the craft, that amount of extra equipment remains unchanged - even if it was used in some soldiers loadout. As for how to implement it... my immediate idea involves heaps of changes - which I'd probably just go ahead and do if it was my project; but I suspect you'd be relucted to accept the changes. You might prefer it to be done in a different way.

Here's an outline of what I have in mind: the craft's `_tempSoldierItems` list that is currently used for soldier equipment should be replaced with `_extraCraftItems` to store the extras list instead of the in-use list. I figure that the total soldiers' equipment can be calculated at any time, and so we don't really need to store it. Whereas the extra items is not always inferrable; it must be recorded if we want to remember it. `calculateTotalSoldierEquipment` would remain, because it is useful - but instead of storing the results in a member variable, it would simply return the entire vector. The calling function can store that vector for however long it needs it. (Returning a vector in C++ was once a bad thing to do, for efficiency reasons. But that's no longer an issue, thanks to the magic of `std::move`.)

Anyway, that would be a significant amount of stuffing around with the API of the new code, but the logic is pretty much unchanged. Currently (without these API changes) we have total equipment on the craft, and a calculated list of what the soldiers are using; and we use `extras = total - used` to work out the leftovers. The problem is that the leftovers may only be a subset of what we want to reserve to stay on the craft. By storing the actual list of items that we want to keep on the craft we avoid that problem. Incidentally, I think it's a bit weird that `_items` and `_tempSoldierItems` are dynamically allocated rather than just being on the stack. I guess maybe there is some legacy reason for `_items`, and the new one is done that way for consistency? I guess it isn't important enough to change that now.


In any case, that's my current thinking of how it should work. I'm just not sure whether or not everyone is on the same page about the desired behaviour, or the implementation.

14
OXCE Suggestions DONE / Re: [DONE][SUGGESTION] Alternate loadout system
« 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.

15
OXCE Suggestions WIP / Re: [SUGGESTION] Alternate loadout system #2
« on: January 05, 2023, 06:42:36 am »
Ok. I've made the changes I was talking about. I've only barely tested that it is working correctly, but I'm expecting this to be a major improvement to the new system.
Here is the patch: https://github.com/karadoc/OpenXcom/commit/b64c4fd23ef1eb59a57acfd3aa4441a06c79effd

The behaviour is what I described earlier (also described in the commit message on github).
The gist of it is that if go into the inventory screen from a particular craft, you'll see *all* of your base items. And if you change any soldier's equipment from that screen, those changes will be reflected in the items that are loaded onto the craft.

The way this is implemented is by temporarily moving all base equipment on the craft, and then moving it off again after the changes have been made.

There are a couple of things that still need to be improved:
  • The code currently assumes no items limit on the craft. If there is an item limit, then it may not be able to fit all of the base's items - and so... that will be kind of annoying. I thought about temporarily repressing the item limit; but I'm not sure how best to re-impose the limit afterwards. So I'm just leaving it on the 'todo' list for now.
  • Changing soldiers' equipment from the craft inventory screen changes the items on that craft. Which is good... but unfortunately there is now an inconsistency. Because if the soldiers' items are changed from the base inventory screen instead, then it *doesn't* change the items on the craft that those soldiers are assigned to. Ultimately I think it should... but I haven't looked at that part of the code, so I haven't implemented it. (and also, I don't care that much - other than it being potentially confusing for other people.)

One last thing:  while making these changes, I noticed and fixed a minor bug in the existing code:  When loading an equipment list for a craft, if a warning box was triggered due to missing items then the item list would not be correctly updated to show which items are equipped by the crew. (The bug was that the warning box caused the list update to be suppressed.)

Pages: [1] 2 3 ... 15