Mitos_krabik Posted January 7, 2025 Share Posted January 7, 2025 I'm trying to figure out the lootdropper, I'm trying to add a log to the bees as a drop. nothing is working. below is the code: local SetSharedLootTable = GLOBAL.SetSharedLootTable local MODBEE = GetModConfigData("MODBEE") if MODBEE then local function updateLootTableBee(inst) local loot = { "honey", "stinger", } SetSharedLootTable('bee', { {'log', 1}, }) if(inst.components.lootdropper) then inst.components.lootdropper:SetLoot(loot) inst.components.lootdropper:SetChanceLootTable('bee') end end AddPrefabPostInit("bee", updateLootTableBee) end Link to comment https://forums.kleientertainment.com/forums/topic/163020-help-with-modding/ Share on other sites More sharing options...
Haruhi Kawaii Posted January 9, 2025 Share Posted January 9, 2025 On 1/8/2025 at 2:41 AM, Mitos_krabik said: I'm trying to figure out the lootdropper, I'm trying to add a log to the bees as a drop. nothing is working. below is the code: local SetSharedLootTable = GLOBAL.SetSharedLootTable local MODBEE = GetModConfigData("MODBEE") if MODBEE then local function updateLootTableBee(inst) local loot = { "honey", "stinger", } SetSharedLootTable('bee', { {'log', 1}, }) if(inst.components.lootdropper) then inst.components.lootdropper:SetLoot(loot) inst.components.lootdropper:SetChanceLootTable('bee') end end AddPrefabPostInit("bee", updateLootTableBee) end Not tested yet AddPrefabPostInit("bee", function(inst) if not TheWorld.ismastersim then return inst end if inst.components.lootdropper then inst.components.lootdropper:AddChanceLoot("log", 1) end end) Link to comment https://forums.kleientertainment.com/forums/topic/163020-help-with-modding/#findComment-1784760 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