Sweddy Posted December 10, 2015 Share Posted December 10, 2015 How do I add drops to things like Stalagmites?I've already modified a simular mod (Mineable Gems) that lets me change the drops of Boulders, Gold Veined Boulders, and Rocky Boulders. But I'd really like to be able to modify the drops of Stalagmites. Link to comment https://forums.kleientertainment.com/forums/topic/60571-quick-question/ Share on other sites More sharing options...
almightyjanitor Posted December 10, 2015 Share Posted December 10, 2015 Add the lootdropper component to the prefab. local loot = { "whatever", "whatever",}local function fn() --blah blah inst:AddComponent("lootdropper") inst.components.lootdropper:SetLoot(loot) --blah blahend Link to comment https://forums.kleientertainment.com/forums/topic/60571-quick-question/#findComment-695775 Share on other sites More sharing options...
Mobbstar Posted December 10, 2015 Share Posted December 10, 2015 For starters, find the prefab file for stalagmites. It's not rock.lua, but somewhere in the data/scripts/prefabs directory (aka folder). Opening said file will reveal loot tables like this:SetSharedLootTable( 'low_rock',{ {'rocks', 1.00}, {'flint', 1.00}, {'goldnugget', 0.25}, {'flint', 0.30},}) You should edit them in your modmain.lua using an AddSimPostInit() function: AddSimPostInit(function()--set the tables hereend) You can find out prefab names (like "goldnugget" or "stalagmite_tall" by going to the very end of the prefab files) Link to comment https://forums.kleientertainment.com/forums/topic/60571-quick-question/#findComment-695780 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