Jump to content

Recommended Posts

I have an issue with equippable items (weapons and tools).

 

 

Case 1: Axe

AddPrefabPostInit("axe",function(inst)	inst:AddComponent("fuel")	inst.components.fuel.fuelvalue = TUNING.SMALL_FUELend

​It works fine on host. But client can't use it as fuel. Client starts action, trying, trying, trying and then axe fall back in inventory.

 

 

​Case 2: Ham Bat 

AddPrefabPostInit("hambat",function(inst)	inst:AddComponent("edible")	inst.components.edible.hungervalue = 12end)

Same thing. Host can easily eat it (put on character). But client is trying for 2 seconds and then stops.

 

There are following steps:

1) Client takes item into cursor of the mouse.

2) Then put it on target. On himself or on firepit.

3) Then item auto equips.

4) Then character is keeping his hand in fire pit (or in mouth while eating) for 2-3 seconds.

5) Then nothing happens. Action fails and item is returned into inventory.

 

Probably it's action mechanics issue. Someone knows how to fix this?

 

 

Finally I fixed it. However it seems that is't a Klei bug.

3279257.jpg

 

And it's not accurate fix. Just before eat Ham Bat charater takes it to hands. Or just before cook it, he takes it into the hand. Looks strange.

2 actions in 1.

 

Also I added only 3 actions that I need. But there may be more actions wich conflict with equippable items.

 

Now I don't know what to do. I can easily replace whole function from my mod. But it's a bug! And it should be fixed officially. Right?

 

Ot it's not a bug? And I'm missing something? Probably there is another API way to add cookable, eatable and burnable items which are equippable?

Edited by Maris

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...