XCOM 2
Item Durability
RedDobe Nov 12, 2019 @ 2:40pm
Possible bug
@Reality Machina - Items are going back into inventory even though the body was not recovered. I think it is related to this section of the mod in downloadablecontentinfo. The game by default puts all recovered items back into inventory. But doesn't do anything when the body is not recovered. So when an item is damaged and the body is not recovered the item is still going back into inventory, because there is not a check here to determine if the body was not recovered. I might be wrong...

if(RepairComponent.IsDamaged) { if (UnitState.RemoveItemFromInventory(ItemState, NewGameState)) // possible we'll have some items that cannot be removed, so don't remove them { ItemState.OwnerStateObject = XComHQ.GetReference(); //`log("Are we crashing here #2?"); XComHQ.PutItemInInventory(NewGameState, ItemState, false); // Recovered items from recovered units goes directly into inventory, doesn't show on loot screen ModifiedInventory = true; //BattleData.CarriedOutLootBucket.AddItem(ItemState.GetMyTemplateName()); } }
Last edited by RedDobe; Nov 13, 2019 @ 12:39pm
< >
Showing 1-2 of 2 comments
RedDobe Nov 12, 2019 @ 2:50pm 
Second Possible Bug

I am having another issue where items are being duplicated. I have like 15 frost axes from the Children of the King mod and an extra Frost Sniper rifle. I think that this is related to the bug mentioned above.
Last edited by RedDobe; Nov 12, 2019 @ 3:38pm
RedDobe Nov 22, 2019 @ 3:59am 
It turns out indeed that this is causing items to be put back in inventory that were damaged on dead soldiers and not recovered or soldiers that were captured. But the other issue that I reported with the duplicates is caused by primary secondaries.
< >
Showing 1-2 of 2 comments
Per page: 1530 50