Sign in to follow this  

Loot tables for Marble Shrubs aren't changing...

Recommended Posts

EuedeAdodooedoe    1187

Here is the code I edited and wrote for changing marble shrub loot tables, but it doesn't work. I can't spot anything wrong with it, and neither could a programmer I talked to, so I thought I'd ask here (the code is place within modmain.lua):

local statedataW =
	{ -- short
		idleanim    = "idle_short",
		hitanim     = "hit_short", 
		breakanim   = "mined_short",
		growanim    = "grow_tall_to_short",
		growsound   = "dontstarve/common/together/marble_shrub/wilt_to_grow", 
		loot        = function() return {"marble", "marblebean"} end,
	{ -- normal
		idleanim    = "idle_normal",
		hitanim     = "hit_normal", 
		breakanim   = "mined_normal",
		growanim    = "grow_short_to_normal", 
		growsound   = "dontstarve/common/together/marble_shrub/grow", 
		loot        = function() return {"marble", "marble", "marble", "marblebean"} end,
	{ -- tall
		idleanim    = "idle_tall",
		hitanim     = "hit_tall", 
		breakanim   = "mined_tall",
		growanim    = "grow_normal_to_tall", 
		growsound   = "dontstarve/common/together/marble_shrub/grow", 
		loot        = function() return {"marble", "marble", "marble", "marble", "marblebean"} and math.random() < 0.95 and {"marble"} or {"marblebean"} end,

local function MarbleLootW(prefab)
	prefab.components.lootdropper.statedata = statedataW

 AddPrefabPostInit("marbleshrub", MarbleLootW)


Edited by EuedeAdodooedoe
Added tags to the topic

Share this post

Link to post
Share on other sites

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
Sign in to follow this