Author Topic: [Fixed] Menu erases content of the backpack on the floor  (Read 12686 times)

ushas

  • Hero Member
  • *****
  • Posts: 661
[Fixed] Menu erases content of the backpack on the floor
« on: August 25, 2017, 12:31:42 PM »
(v19, linux)

Problem: If you escape to the menu while the current unit was standing over a backpack with some stuff in it, the game will erase its content.

I don't know what happens at that point if we will get some of those items back in the post battle loot, but for sure I haven't gotten back my own items I dropped this way. 

How to reproduce: drop something to the ground, then espape to the menu and back and go to the inventory again. Now you see no items on the ground and they won't come back. The backpack is still on the floor though.

As far as I've tested it erases items under the foot only for the currently active unit, any other items that were dropped anywhere else will stay.

There are no errors reported in the log, however when menu-escaping some suspicious lines appear:
Code: [Select]
GameOptions.SwitchOffMenuCanvas. (In combat)
UIManagerScript.HandleBackButtonPressInCombatScene. Method called
UIManagerScript.SwitchOnCombatUI. Method called. Yielding for: 0 seconds
BattleControlScript.CheckIfLootContainerNeedsToBeDestroyed. Method called
BattleControlScript.CheckIfLootContainerNeedsToBeDestroyed. This tile has No Loot container script.
BattleControlScript.CheckIfLootContainerNeedsToBeInstantiated. Method called
BattleControlScript.CheckIfLootContainerNeedsToBeInstantiated. There are NO items left on the ground. A loot container does not need to be instantiated. Setting tile's reference to loot container to null
CharMainScript.CheckIfSelectedItemRemoved. Method called
Lies! There were items, I saw them... really, could've almost swear.

Additionally, there might be some bigger stopper possible. Once, after tinkering with this issue and spending all Sam's AP on inventory operations I got him into the state where the game wouldn't let me end the turn (tried both, shortcut and button). So it was restart. But wasn't able to reproduce since.
« Last Edit: September 05, 2017, 07:48:28 PM by Daithi »

Daithi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1250
Re: Menu erases content of the backpack on the floor
« Reply #1 on: August 25, 2017, 04:05:04 PM »
Will check this out - cheers!

Daithi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1250
Re: Menu erases content of the backpack on the floor
« Reply #2 on: September 05, 2017, 07:47:58 PM »
Fixed!

Nomad

  • Sr. Member
  • ****
  • Posts: 453
Re: [Fixed] Menu erases content of the backpack on the floor
« Reply #3 on: September 06, 2017, 03:29:55 AM »
Ahh.... That's what happened...

I had an enemy shoot at me with a rifle of some kind.
At the end of the battle, there was no rifle in any loot whatsoever. I never noticed it happen again... so I didn't report it (it was an observation and of little help unless I could recreate it or at least give some valid information).

I must have checked my inventory or something during the fight. I don't believe I was over the ememy's backpack at the time... so Daithi... the fix you did... would that account for my vague experience?

Daithi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1250
Re: [Fixed] Menu erases content of the backpack on the floor
« Reply #4 on: September 06, 2017, 09:53:55 AM »
Hey Nomad - it could, but there's another possibility. Some of the loot that's dropped is considered out of sight (maybe the owner has fallen on it, has fallen in storm drain etc) and are added to the items that can be found in post missions looting. Typically these items are in the first and second containers.

Nomad

  • Sr. Member
  • ****
  • Posts: 453
Re: [Fixed] Menu erases content of the backpack on the floor
« Reply #5 on: September 07, 2017, 03:20:24 AM »
Oooh... no kidding...
Ok. That might have been it. I guess that means that any time I see a weapon I want, I'll have to go retrieve it before the map ends. Keep a pleb alive while someone runs over and gets it.  =)

Daithi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1250
Re: [Fixed] Menu erases content of the backpack on the floor
« Reply #6 on: September 07, 2017, 10:40:32 AM »
Some of the items don't drop... they are squirreled away for the loot containers at the end. This is basically stuff you can't see immediately, and have to look around for. If the item does drop, you'll automatically get it when you leave, if not, it will be in one of the first two loot containers (1 is created if there are just a few, 2 loot containers if there are more).

ushas

  • Hero Member
  • *****
  • Posts: 661
Re: [Fixed] Menu erases content of the backpack on the floor
« Reply #7 on: September 07, 2017, 02:30:56 PM »
Hmm Edit: Apologies, forgot to put thoughts into words.

I've seen backpacks fall on the same tile as enemy's bodies. Now realizing may sometimes lead to clipping issues. As you said such things are to be expected, I haven't reported them (apologies if should). There were bigger fish to fish. Other is when a part of body falls inside a building or other structure.

Is dropping given by map structure, can we influence it, or is it random? In other words, what do you mean by "Some of the items don't drop".

A few side-notes:
1. In case we can't influence this, I must say that would undermine tactical possibilities. Also you've put effort into graphical representation of weapons and this looting system. When seeing something I want, by a smart play can get and use it within the same mission. When the game says - too bad, see post-mission looting -> I won't bother anymore.
2. But the most important are allies. I often don't get a backpack for when they are KOed. If you don't want to encourage save-scumming I would say this is a fairly important. When they go down, it can significantly up the difficulty, letting us loot them would help survivors to survive.
3. I think I've seen an enemy eliminated early, with a pistol but no ammo in the backpack but his friends were reloading like 2-3x later on. Perhaps they get uneven distribution. But I may be mistaken.
4. That said, regardless if during or after mission, we are looting a lot of items. I guess this is part of the WYSIWYG approach. But maybe still something can be done about this - for example, via balancing durability & rate of deterioration, and money for an item depending on its state...
« Last Edit: September 08, 2017, 02:55:20 AM by ushas »

Daithi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1250
Re: [Fixed] Menu erases content of the backpack on the floor
« Reply #8 on: September 08, 2017, 10:09:19 AM »
Hmm Edit: Apologies, forgot to put thoughts into words.

I've seen backpacks fall on the same tile as enemy's bodies. Now realizing may sometimes lead to clipping issues. As you said such things are to be expected, I haven't reported them (apologies if should). There were bigger fish to fish. Other is when a part of body falls inside a building or other structure.

Is dropping given by map structure, can we influence it, or is it random? In other words, what do you mean by "Some of the items don't drop".

A few side-notes:
1. In case we can't influence this, I must say that would undermine tactical possibilities. Also you've put effort into graphical representation of weapons and this looting system. When seeing something I want, by a smart play can get and use it within the same mission. When the game says - too bad, see post-mission looting -> I won't bother anymore.
2. But the most important are allies. I often don't get a backpack for when they are KOed. If you don't want to encourage save-scumming I would say this is a fairly important. When they go down, it can significantly up the difficulty, letting us loot them would help survivors to survive.
3. I think I've seen an enemy eliminated early, with a pistol but no ammo in the backpack but his friends were reloading like 2-3x later on. Perhaps they get uneven distribution. But I may be mistaken.
4. That said, regardless if during or after mission, we are looting a lot of items. I guess this is part of the WYSIWYG approach. But maybe still something can be done about this - for example, via balancing durability & rate of deterioration, and money for an item depending on its state...

A certain amount of clipping will be hard to avoid. Will have to live with things like this if want to finish before 2020 :) Though, will probably add option to fade out bodies. As to what drops, it's random, only a fairly small % of items.

1. It may change, but right now, don't see it as huge issue. This was added to improve char system balancing (by increasing the usefulness of bypass & surveillance). Can't give away too many items. I think the amount of times an enemy has better equipment than you, and it's worth AP cost to move to bag and equip is going to be small.

2. Will look at this.

4. and money for an item depending on its state... -> this will probably happen

ushas

  • Hero Member
  • *****
  • Posts: 661
Re: [Fixed] Menu erases content of the backpack on the floor
« Reply #9 on: September 08, 2017, 04:34:14 PM »
Regardless how it will be in the end, you can also have more rules at play. For example, (a) having rank 2+ & allies always drop their items (though perhaps damaged based on number of turns/use), (b) but rank 1 troops randomized as needed, (c) and further rules for post-mission looting based on S&B skills.  (the first may make specialists feel even more special, whereas b+c can easily be used to balance and scale difficulties).  But that is only, as I said - just an example of more looting rules at play. Not that it has to be like that.

worth AP cost to move to bag and equip is going to be small.
Well, suppose I'm still naively dreaming about encumbrance and money and ammo scarcity on higher difficulties, broken items and reload. But even then it may still be unfeasible to tune it all well for "worth" to become worth, so yeah...

Daithi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1250
Re: [Fixed] Menu erases content of the backpack on the floor
« Reply #10 on: September 08, 2017, 05:08:30 PM »
Good point concerning forcing more valuable loot carried by specialists to drop... now, where is that EA image again : )