Pe Dabliu Posted January 24, 2021 Share Posted January 24, 2021 I'm new to modding, I only made one mod to make seeds disapear whe they spoil. I'm now trying to figure out how to make a mod that removes the twigs dropping when a twiggy tree grows, and maybe remove their cones. Based on what I could find, we can't remove tree drops, only add, is that true? i couldn't find anything that wasn't really old, so i'm not even sure if it's possible Link to comment https://forums.kleientertainment.com/forums/topic/126395-twiggy-tree-drops/ Share on other sites More sharing options...
SuperMeatGoy Posted January 24, 2021 Share Posted January 24, 2021 (edited) You should be able to override their loot table to get rid of the twiggy cone in a "postinit" function, but you would have to make one for each stage of the twiggy tree. Here's an example: GLOBAL.SetSharedLootTable( 'your_table_name', { {'prefab_name', 1.00}, {'prefab_name', 1.00}, {'prefab_name', 0.5}, }) AddPrefabPostInit("prefab_you_want_to_override", function(inst) if inst.components.lootdropper ~= nil then inst.components.lootdropper:SetChanceLootTable('your_table_name') end end) If you dont know how a loot table works, its a table with the entities drops & the number next to it is the percentage rate that it drops, 1.00 would be 100% and 0.5 would be 50%. You would put this in your modmain.lua. If you need any more help I would be glad to assist you Edited January 24, 2021 by SuperMeatGoy 1 Link to comment https://forums.kleientertainment.com/forums/topic/126395-twiggy-tree-drops/#findComment-1420778 Share on other sites More sharing options...
Pe Dabliu Posted January 27, 2021 Author Share Posted January 27, 2021 I'll try that when I have some time. Than you for the help Link to comment https://forums.kleientertainment.com/forums/topic/126395-twiggy-tree-drops/#findComment-1422176 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