Jump to content

Recommended Posts

Hey,

 

I'm trying to make some pickables (bushes, saplings, etc) give you rare additional loot, but as of right now, I'm kinda failing.

 

Now, I studied the different original lua files, like "pickable.lua" or "lootdropper.lua", to see if I can't figure it out myself, after all heir functions get called by the pickable objects (I didn't change any of the original files). But I just can't seem to make it work. If it doesn't crast, I mostly just get no loot at all.

 

Does anyone know if it works at all, or do I have to make the additional loot drop into the world, like when chopping down a tree? I'd like to avoid that and just give it to the player directly though...

Link to comment
https://forums.kleientertainment.com/forums/topic/38131-pick-multiple-items/
Share on other sites

One world of advice: set the drop chance to 100% for testing purposes. I bet you already thought of that though :razz:

Yes of course, I am actually not new to coding/scripting, just some of DS's stuff... confuses me.

 

I actually did get it working by just spawning the items in your inventory with a loottable, with them "flying" into your inventory and all that snazz, looks just like if it had been picked and intended to be like that.

But in reality I disabled the loot from "pickable" and gave the item(s) to the player via the "onpicked" function.

 

Now though, for some reason I can't make some (existing) item stackable... adding a "PrefabPostInit" to the modmain.lua just doesn't work... which confuses the hell out of me, because I did it exactly like other mods and even the original files do, but it won't do it. :(

(just to be clear: that item was not stackable before, I'm trying to get it to be)

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...