Maris Posted January 19, 2015 Share Posted January 19, 2015 I have an issue with equippable items (weapons and tools). Case 1: AxeAddPrefabPostInit("axe",function(inst) inst:AddComponent("fuel") inst.components.fuel.fuelvalue = TUNING.SMALL_FUELendIt 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? Link to comment https://forums.kleientertainment.com/forums/topic/49407-question-about-equippable-items/ Share on other sites More sharing options...
rezecib Posted January 19, 2015 Share Posted January 19, 2015 (edited) @Maris, What happens on clients if you turn off action prediction? Edited January 19, 2015 by rezecib Link to comment https://forums.kleientertainment.com/forums/topic/49407-question-about-equippable-items/#findComment-603839 Share on other sites More sharing options...
Maris Posted January 19, 2015 Author Share Posted January 19, 2015 (edited) @rezecib, how and where can I do it?.. Should I do it as client or as a host?.. P.S. The mod is already on Steam. But only host can eat Ham Bat ("hambat" prefab) or cook it in campfire. Edited January 19, 2015 by Maris Link to comment https://forums.kleientertainment.com/forums/topic/49407-question-about-equippable-items/#findComment-603853 Share on other sites More sharing options...
rezecib Posted January 20, 2015 Share Posted January 20, 2015 @Maris, on the console: ThePlayer:EnableMovementPrediction(false) Link to comment https://forums.kleientertainment.com/forums/topic/49407-question-about-equippable-items/#findComment-603891 Share on other sites More sharing options...
Maris Posted January 20, 2015 Author Share Posted January 20, 2015 @rezecib I did it for client but he still can't do custom actions with equippable items. Host even don't see that client is trying. It looks like he is staying and do nothing (just coming to and from campfire). Link to comment https://forums.kleientertainment.com/forums/topic/49407-question-about-equippable-items/#findComment-603985 Share on other sites More sharing options...
Maris Posted January 20, 2015 Author Share Posted January 20, 2015 (edited) Finally I fixed it. However it seems that is't a Klei bug. 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 January 20, 2015 by Maris Link to comment https://forums.kleientertainment.com/forums/topic/49407-question-about-equippable-items/#findComment-604015 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