Enhanced Loot Bags API 1.0.1 (AKI 3.7.X)

Please do not ask when mod authors will update their mods to 3.9.X
Bothering mod authors will lead to warnings and repeat offenses will lead to eventual bans.

API for mods that want more in depth options for loot bags.

THIS (AND MY OTHER MODS) WILL NOT GET UPDATED ANYMORE ON ACCOUNT ME (JustNU) LEAVING THE SPT-AKI COMMUNITY

ALL OF MY MODS ARE UNLICENCE AKA PUBLIC DOMAIN, SO ANYONE WHO WISHES TO UPDATE/IMPROVE/TAKE OVER THE DEVELOPMENT IS FREE TO DO SO

I HAVE ALSO UPDATED SOURCE ENTRY FOR EVERY MOD OF MINE, IN CASE YOU WANT THE GITHUB REPOS

Replaces default "openRandomLootContainer" function to allow for more in depth customization of loot bag/container loot and its amount. For an example of this mod in action, take a look at this mod.

  • https://prnt.sc/MYWFuySSd1R1 i dont understand ??

    • Opening mre, makes game unresponse in terms of moving anything or trying to move or manipulate anything in menus after opening mre ( which will just buffer and never open ) the rest of the items will also just start load like connection lost type ..

    • what is your modlist, if i may ask?

    • and obv, what item were you trying to open

    • {"order":["AAAArtemTrader","aaMFACSHOP","aCivicPainter","ACOG4Life-OpticRework","aFannyPack","ArtemEquipment","aSmallCases","AWM","b Miraport","BoopsQuestAPI-1.1.1","Carl-STAR15","Choccy-93Raffica-1.0.0","Choccy-Hultafors-1.1.2","Choccy-Uzi-1.1.0","CivicBlackCore","CivicGreenCore","CivicMagTape","CivicRedCore","CivicSandCore","CivicWhiteCore","CNN-Container","ColetteBlackpaw-drip","DewardianDev-AlgorithmicBarterRandomizer","DoorBreacher","Dushaoan-AlgorithmicQuestRandomizer","EnhancedLootBagsAPI","Fifty-Shades-Of-Boomer","Fifty-Shades-Of-Boomer-Triggers","Fontaine-FOV-Fix","friendlyPMC","GaaxWeapons","hephaestus","InsurancePlus","JustNUCore","KACPDW","Lua-CustomSpawnPoints","luxuryfromtarkov","Lyconox-g36ex-1.2.0","Lyconox-shak12ex-1.2.0","Lyconox-tt33k-2.2.0","Mass_JAK12","Mass_M14","Mass_QBZ03","Mass_type64smg","MC-AK12","MC-LMG","MC-SAWEDOFF","MC-SVT40","MFAC Eyewear","Mira-M16A4","MusicManiac-WeaponsAndAttachmentsCustomizer","paydaymask","ProfileEditorHelper","Realistic-FLIR-RS32-1.4.2","Realistic-Night-Vision-Goggles-1.1.1","Realistic-Reap-ir-1.0.2","RealisticMREs","refringe-openextracts-1.2.0","RepairConfig","SamSWAT-FAMAS","SamSWAT-L85A2","Jiro-BatterySystem","SamSWAT-M1014","SamSWAT-VALMOD3","SamSWAT-Vepr12","BrammerN-NoFilters-0.1.0","scavequipplus","Skwizzy-NoDiscardLimit","StalkerVoices","streetfashionoftarkov","SWAG","TheEyeOfAres-FullAutoSTM-1.0.0","TheLittleDrummerBoy","Virtual\u0027s Custom Quest Loader","y1305 items preview","yzzz SightsAdjustmentSystem","zAdditionalGear-VanillaExtended","zDBALA3","zExtra RM Ammo","zHALO","zLCO","zM900V","zMEPRO21","zMFAC PLAP AMMO","zRainbowPC-LotsOfLoot-2.1.0","zSamSWAT-C79A2","zSamSWAT-SUSAT","zSolarint-SAIN-ServerMod","zzDrakiaXYZ-Waypoints","zzzzThermal-bundle","Z_USECAdditionalClothing","LOTW-LightsAutomaticArmbandAssistant-1.0.0","NPCspamRemover","RaiRaiTheRaichu-AllTheClothes-1.3.0","SPT-Realism-Mod","ServerValueModifier"]}

    • Hey this probably doesn't help much but are you sure you have the latest version installed?

      The other day I tried running realistic MRE's and another lootbox mod that required this mod as a dependency, they both worked flawlessly. I also had another similar gambling mod that didn't call for the API and it threw me the same error but was fixed when I uninstalled the API. If I had to guess with my limited understanding of coding this redefines one of the already in-game functions for loot boxes so when you have this mod and don't need it or vice versa it gives you an undefined error.

  • oh i am using 3.5.5

    • 3.5.5 server? if so, then its most likely not compatible

  • TypeError: Cannot read properties of undefined (reading 'getItems')

    TypeError: Cannot read properties of undefined (reading 'getItems')

    at Function.customOpenRandomLootContainer (I:\New folder (4)\user\mods\EnhancedLootBagsAPI\src\mod.js:26:46)

    at InventoryCallbacks.result.openRandomLootContainer (I:\New folder (4)\user\mods\EnhancedLootBagsAPI\src\mod.js:14:16)

    at InventoryItemEventRouter.handleItemEvent (C:\snapshot\project\obj\routers\item_events\InventoryItemEventRouter.js)

    at ItemEventRouter.handleEvents (C:\snapshot\project\obj\routers\ItemEventRouter.js)

    at ItemEventCallbacks.handleEvents (C:\snapshot\project\obj\callbacks\ItemEventCallbacks.js)

    at RouteAction.action (C:\snapshot\project\obj\routers\static\ItemEventStaticRouter.js)

    at ItemEventStaticRouter.handleStatic (C:\snapshot\project\obj\di\Router.js)

    at HttpRouter.handleRoute (C:\snapshot\project\obj\routers\HttpRouter.js)

    at HttpRouter.getResponse (C:\snapshot\project\obj\routers\HttpRouter.js)

    at AkiHttpListener.getResponse (C:\snapshot\project\obj\servers\http\AkiHttpListener.js)

    TypeError: Cannot read properties of undefined (reading 'getItems')

    TypeError: Cannot read properties of undefined (reading 'getItems')

    at Function.customOpenRandomLootContainer (I:\New folder (4)\user\mods\EnhancedLootBagsAPI\src\mod.js:26:46)

    at InventoryCallbacks.result.openRandomLootContainer (I:\New folder (4)\user\mods\EnhancedLootBagsAPI\src\mod.js:14:16)

    at InventoryItemEventRouter.handleItemEvent (C:\snapshot\project\obj\routers\item_events\InventoryItemEventRouter.js)

    at ItemEventRouter.handleEvents (C:\snapshot\project\obj\routers\ItemEventRouter.js)

    at ItemEventCallbacks.handleEvents (C:\snapshot\project\obj\callbacks\ItemEventCallbacks.js)

    at RouteAction.action (C:\snapshot\project\obj\routers\static\ItemEventStaticRouter.js)

    at ItemEventStaticRouter.handleStatic (C:\snapshot\project\obj\di\Router.js)

    at HttpRouter.handleRoute (C:\snapshot\project\obj\routers\HttpRouter.js)

    at HttpRouter.getResponse (C:\snapshot\project\obj\routers\HttpRouter.js)

    at AkiHttpListener.getResponse (C:\snapshot\project\obj\servers\http\AkiHttpListener.js)

    • were you trying to open MREs or something else? are you on the latest version? what is your mod list?

  • Doesn't appear to be working after 3.5.7+

  • This will be insane once devs start utilizing this