Nanoko Posted June 27, 2022 Share Posted June 27, 2022 Hey all, I tried to search through the forums+ google a bit but wasn't finding any answers, or anything that was making any sense to me really. I'm trying to add an item from the They Knew Mod to the loot tables, specifically trying to add Zomboxcycline onto the loot table. From what I've seen from how other mods add items to the loot tables, and from what I read it should look something like this DropsDistribution.lua local function preDistributionMerge() ProceduralDistributions.list.TheyKnewItem = { rolls = 6, items = { "Zomboxycycline", 50, "Zomboxivir", 50, }, } end Events.OnPreDistributionMerge.Add(preDistributionMerge); DropsProcedualDistribution.lua local DropDistTable = { pharmacystorage = { metal_shelves = { procedural = true, procList = { {name="TheyKnewList", min=1, max=6}, } }, } } table.insert(Distributions, 2, customDistTable); I am a totally code amateur, so any help would be appreciated. Link to comment Share on other sites More sharing options...
RingoD123 Posted June 29, 2022 Share Posted June 29, 2022 here: local DropDistTable = { pharmacystorage = { metal_shelves = { procedural = true, procList = { {name="TheyKnewList", min=1, max=6}, You are referencing a definition called "TheyKnewList" but here: ProceduralDistributions.list.TheyKnewItem = { rolls = 6, items = { "Zomboxycycline", 50, "Zomboxivir", 50, }, } end the definition is called "TheyKnewItem". Also here: table.insert(Distributions, 2, customDistTable); you are trying to add "customDistTable" to the Distributions table, but here: local DropDistTable = { pharmacystorage = { metal_shelves = { you named the table "DropDistTable". Also, a full guide on customizing loot can be found here: Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now