Mod Details

MergeConsumables

MergeConsumables 1.3.1

Created by  Lacyway

26.5K Downloads

SPT 3.11.4 Compatible

Tired of not being able to merge your medical items or food? Now you can!

Latest Version 1.3.1
SPT 3.11.4

Updated Mar 20, 7:15 AM

Version Notes

- Possible nullref fix

This download is externally hosted.
Always scan for viruses.

What is MergeConsumables?

MergeConsumables lets you merge (not stack!) any consumable item with a limited amount of uses, such as a bottle of water or an AFAK. Simply drag and drop one item on top of another item of the same type! For example, dragging an AFAK with 200/400 on to an AFAK with 50/400 would result in one item with 250/400!

What do I do if it didn’t work or want to report a bug/incompatibility?

Report the exact steps to reproduce the bug, and provide log files. I’ve tried as many cases as I can to find limitations, but it’s hard to find them all! A detailed report makes them easier to fix.

How do I install the mod?

Extract the contents of the .zip to your SPT install

Incompatible Mods

These mods do not work with this mod:

None so far

Version 1.3.1
Download Mod Version
SPT 3.11.4
Latest Compatible SPT Version

12.7K Downloads

Created Mar 20, 7:15 AM

Updated Mar 20, 7:15 AM

Virus Total Results

- Possible nullref fix

Version 1.3.0
Download Mod Version
SPT 3.11.4
Latest Compatible SPT Version

1.1K Downloads

Created Mar 15, 7:36 PM

Updated Mar 15, 7:36 PM

Virus Total Results

- Updated for 3.11

Version 1.2.0
Download Mod Version
SPT 3.10.5
Latest Compatible SPT Version

7.0K Downloads

Created Nov 26, 2024 at 3:18 PM

Updated Nov 26, 2024 at 3:18 PM

Virus Total Results

Updated for 3.10

(thanks Archangel for the update)

Version 1.1.0
Download Mod Version
SPT 3.9.8
Latest Compatible SPT Version

4.4K Downloads

Created Aug 30, 2024 at 8:59 PM

Updated Aug 30, 2024 at 8:59 PM

Virus Total Results

- Added UIFixes compatibility (thanks to Tyfon! Requires UIFixes >2.4.3)

Version 1.0.0
Download Mod Version
SPT 3.9.8
Latest Compatible SPT Version

1.4K Downloads

Created Aug 19, 2024 at 2:30 PM

Updated Aug 19, 2024 at 2:30 PM

Virus Total Results
CptShadows

It might be a fika thing, but I find it bugs the game when merging meds in-raid. is this supposed to be the case? example: when I move IFAK A to IFAK B, the slot IFAK A was in is now bugged and can’t have anything in it. if I merge them in a backpack and just find a new backpack, the new backpack isn’t bugged. If IFAK A is in an enemy’s gear and I drag it over to IFAK B on my character, the enemy is now bugged so that kinda solves it too :d

0 Likes
lex_murden

I hope he still plays the game. This mod is fundamental.

0 Likes
CptShadows

Omg I love this so much, tarkov has desperately needed this ever since it came out

0 Likes
Draelthalas

would you consider adding the ability to right click things and select “top up” like with stacks of ammo?

0 Likes
Klinical

would you consider adding an option to only allow merging consumables out of raid?

0 Likes
MrBlu1911

When I first installed this mod, the “organize items in container” button stacked everything that could be stacked at the same time. It doesn’t do that anymore. hasn’t for a while.

0 Likes
20fpsguy

there is a weird bug when u merge medkits in raid a white squar appears and dissapears when restarting the game

2 Likes

Not only in raid, in stash as well

0 Likes

I realize the problem is when you merge item and it doesn’t merge(maybe server response or something) then you do it again , then it will show the white square .

0 Likes

Also having this problem, seems to happen more when trying to merge food/drink items that don’t typically have multiple uses

0 Likes

Can you check your logs for errors? Both server and client.

0 Likes

sry for the late response here is the log

2025-03-17 19:09:12.258 +01:00|0.16.1.3.35392|Error|Default|

EXCEPTION: System.Exception: Trying to get parent of an item that doesn’t have a parent: Car

at EFT.InventoryLogic.Item.get_Parent () [0x00020] in <be6ce3dcc829433799e39408270e30ef>:0

at MergeConsumables.InteractionsHandlerClassExtensions.MergeMeds (MedsItemClass item, MedsItemClass targetItem, System.Single count, TraderControllerClass itemController, System.Boolean simulate) [0x00144] in <6e3962a4e26f45cfbf83ee3c95c41db8>:0

at MergeConsumables.MC_Meds_Operation.Execute () [0x00000] in <6e3962a4e26f45cfbf83ee3c95c41db8>:0

at MergeConsumables.MC_Patches+RunNetworkTransaction_Patch.Prefix (TraderControllerClass __instance, IRaiseEvents operationResult, Comfort.Common.Callback callback) [0x0005b] in <6e3962a4e26f45cfbf83ee3c95c41db8>:0

at (wrapper dynamic-method) TraderControllerClass.DMD<TraderControllerClass::RunNetworkTransaction>(TraderControllerClass,IRaiseEvents,Comfort.Common.Callback)

at EFT.UI.DragAndDrop.GridView.AcceptItem (ItemContextClass itemContext, ItemContextAbstractClass targetItemContext) [0x00206] in <be6ce3dcc829433799e39408270e30ef>:0

2025-03-17 19:09:13.319 +01:00|0.16.1.3.35392|Error|Default|

EXCEPTION: System.Exception: Trying to get parent of an item that doesn’t have a parent: Car

at EFT.InventoryLogic.Item.get_Parent () [0x00020] in <be6ce3dcc829433799e39408270e30ef>:0

at EFT.UI.DragAndDrop.DraggedItemView.method_0 (ItemContextAbstractClass originalItemContext, ItemRotation itemRotation, UnityEngine.Color imageColor, EFT.UI.ItemUiContext itemUiContext) [0x0003c] in <be6ce3dcc829433799e39408270e30ef>:0

at EFT.UI.DragAndDrop.DraggedItemView.Create (ItemContextAbstractClass originalItemContext, ItemRotation itemRotation, UnityEngine.Color imageColor, EFT.UI.ItemUiContext itemUiContext) [0x0000a] in <be6ce3dcc829433799e39408270e30ef>:0

at (wrapper dynamic-method) EFT.UI.DragAndDrop.ItemView.DMD<EFT.UI.DragAndDrop.ItemView::OnBeginDrag>(EFT.UI.DragAndDrop.ItemView,UnityEngine.EventSystems.PointerEventData)

at UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IBeginDragHandler handler, UnityEngine.EventSystems.BaseEventData eventData) [0x00007] in <50bf18be30e1484e89a90f050977b4c4>:0

at UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) [0x00067] in <50bf18be30e1484e89a90f050977b4c4>:0

2025-03-17 19:09:13.319 +01:00|0.16.1.3.35392|Error|Default|Exception: Trying to get parent of an item that doesn’t have a parent: Car

EFT.InventoryLogic.Item.get_Parent () (at <be6ce3dcc829433799e39408270e30ef>:0)

EFT.UI.DragAndDrop.DraggedItemView.method_0 (ItemContextAbstractClass originalItemContext, ItemRotation itemRotation, UnityEngine.Color imageColor, EFT.UI.ItemUiContext itemUiContext) (at <be6ce3dcc829433799e39408270e30ef>:0)

EFT.UI.DragAndDrop.DraggedItemView.Create (ItemContextAbstractClass originalItemContext, ItemRotation itemRotation, UnityEngine.Color imageColor, EFT.UI.ItemUiContext itemUiContext) (at <be6ce3dcc829433799e39408270e30ef>:0)

(wrapper dynamic-method) EFT.UI.DragAndDrop.ItemView.DMD<EFT.UI.DragAndDrop.ItemView::OnBeginDrag>(EFT.UI.DragAndDrop.ItemView,UnityEngine.EventSystems.PointerEventData)

UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IBeginDragHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at <50bf18be30e1484e89a90f050977b4c4>:0)

UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) (at <50bf18be30e1484e89a90f050977b4c4>:0)

UnityEngine.DebugLogHandler:LogException(Exception, Object)

Class405:UnityEngine.ILogHandler.LogException(Exception, Object)

UnityEngine.EventSystems.EventSystem:Update()

0 Likes

Same issue

0 Likes

Thank you. What were the stats on each item? E.g. 140/220

I’ll try to reproduce. any errors on the server?

0 Likes

For me it was when merging 1/2 bandages and 1/3 + 2/3 Calok

0 Likes

Thanks, I’ll try to get some time to investigate this week.

0 Likes

Same here. i’m combining 2 AFACs 51 and 267, I expect them to merge in 1 but nothing happens and the one i try to add (51) just blinks in slot and square appears. After restart they both are reverted. I can give u logs, Where do you want them?

0 Likes

Try the latest version and see if it still happens.

0 Likes

I gotthis sometimes in the 3.10 version as well. Almost 100% chance if playing with something that modifies the amount of hp consumable has, like VAI NRTP making things be like 2000. I’ll try updating now tho

0 Likes

Update fixed it for me, thanks a lot! love the mod btw

0 Likes
Shturman

can you make in future a feature to stack other things like screws and nails

0 Likes

i think there was a mod that lets you have for example more than one AA battery in one slot, but i dont remember what its called really sorry

0 Likes

Better stack size

1 Like
lele

it would be cool if this mod worked with the “top up” keybind from the UI fixes mod, so i can press a button and top up my meds, big QoL

2 Likes

i imagine this would be easy to add too! i second this

0 Likes
bepis69

FYI there’s a glitch when this mod interacts with Stash Search. Searching for an item and merging something in your inventory from the stack will not save the change in the searched item’s hp permanently. After exiting the game or leaving a raid, the consumable that was searched for will reset to its original hp if it was not consumed.

0 Likes
Rairiku07

I have the same bug but I don’t have Stash Search. Server client spits out error “MedKit was missing on source or target item!” It will combine the 2 items and work when you go into raid like you said. but once you leave the raid, your stash item goes back to amount it was at before the merge. So you can buy 1 Salewa and keep replacing and it will always get full after a raid.

0 Likes
Lacyway

Can you get a screenshot of the error? It might be after SPT’s recent change to med handling.

0 Likes
Rage4556

I have a similar issue where before I go into a raid and merge stuff, then come back, it’s all reset to how it was previously. Though, I am not getting any errors.

0 Likes
Lacyway

The server is most likely not saving before you go into raid, you can do similar things by drinking / healing. Are you getting any errors?

0 Likes

In case you didn’t already get the screenshot of the error, this is what shows up in the server console when merging.

https://postimg.cc/NKszRkGY

0 Likes

Issue seems to be the “source” item loses an item property when the client sends info about it to the server through the object the router receives. Specifically sItem.upd.MedKit.HpResource and sItem.upd.FoodDrink.HpResource get stripped.

Replacing lines 52-61 in CustomItemEventRouter.ts with the following helped resolve the issue for medical item statuses not saving to the server:

case “medical”: if (sItem.upd?.MedKit && tItem.upd?.MedKit) { sItem.upd.MedKit.HpResource = sourceAmount; tItem.upd.MedKit.HpResource = targetAmount; } else if ( (sItem._tpl === tItem._tpl)) { if (!sItem.upd) { sItem.upd = {}; } if (!sItem.upd.MedKit) { sItem.upd.MedKit = {HpResource: sourceAmount} } else { sItem.upd.MedKit.HpResource = sourceAmount; } if (!tItem.upd) { tItem.upd = {}; } if (!tItem.upd.MedKit) { tItem.upd.MedKit = {HpResource: targetAmount}; } else { tItem.upd.MedKit.HpResource = targetAmount; } this.logger.warning(“MedKit was missing on source or target item – attempted resolve with item _tpl”) } else { this.logger.error(“MedKit was missing on source or target item!”); this.logger.error(“tItem: “ + JSON.stringify(tItem)); this.logger.error(“sItem: “ + JSON.stringify(sItem)); return; } break;

0 Likes

Hey bepis,

Would you be willing to PR this? I haven’t touched the server code and a majority of it was written with a friend who helped me, I mainly deal with client mods. That would ensure that it gets properly added and I don’t screw something up!

Thanks!

0 Likes

Details