Nickcooldad Posted February 13, 2013 Share Posted February 13, 2013 (edited) I feel like bedrolls and tents should not be used up when you sleep/use them.I would love a mod to be made that allows them to be used multiple/infinite times.Thoughts? Edited March 20, 2013 by WrathOf Link to comment https://forums.kleientertainment.com/forums/topic/8983-request-bedrolls-and-tents/ Share on other sites More sharing options...
BarovSoap Posted February 13, 2013 Share Posted February 13, 2013 Over powered. Link to comment https://forums.kleientertainment.com/forums/topic/8983-request-bedrolls-and-tents/#findComment-78308 Share on other sites More sharing options...
w00tyd00d Posted February 13, 2013 Share Posted February 13, 2013 ^^^^(10 char) Link to comment https://forums.kleientertainment.com/forums/topic/8983-request-bedrolls-and-tents/#findComment-78336 Share on other sites More sharing options...
Snob Posted February 13, 2013 Share Posted February 13, 2013 There should be a mod that tweaks the way tents work:1) You can use the tent multiple times2)Does not fill health or hunger, only causes the players to "sleep"3)Acts similarly to the sleeping bag, but it takes away half of hunger Link to comment https://forums.kleientertainment.com/forums/topic/8983-request-bedrolls-and-tents/#findComment-78346 Share on other sites More sharing options...
TylerTheDragon Posted February 13, 2013 Share Posted February 13, 2013 If I manage to make a mod , The Mod will probably have a feature where the tent won't be used up and just make you sleep , though you lose alot of hunger... Link to comment https://forums.kleientertainment.com/forums/topic/8983-request-bedrolls-and-tents/#findComment-78390 Share on other sites More sharing options...
cejoga Posted February 13, 2013 Share Posted February 13, 2013 (edited) Without any tests (any at all).You guys can do this by adding a few lines of code. There is a function that add components. What's the name? Humm. Ok, I will open the file for a bit so I can tell you guys what to do.- Open the file scripts/prefabs/bedrow_straw.lua- Find the fn function- Add the component "finiteuses" and configure it- Humm. I think you have to remove the component "stackable" here- Add the function "onfinished"- Test itAdding the component finiteuses to the fn function and configure it-- cejoga inst:AddComponent("finiteuses") inst.components.finiteuses:SetMaxUses(10) inst.components.finiteuses:SetUses(10) inst.components.finiteuses:SetOnFinished(onfinished) --/cejogaRemoving the stackable component--inst:AddComponent("stackable") --inst.components.stackable.maxsize = TUNING.STACK_SIZE_LARGEITEMAdding the function onfinished (line 38 to 42) and outside fn function--cejogalocal function onfinished(inst) inst:Remove()end--/cejogaRun the game and try it out. Did it work?--EDIT--Ops! I made a mistake. From the comment above make the changes below.- Remove the lines from the component "finiteuses"- Remove the function onfinished- Uncomment the lines from stackable component- Comment the lines bellow from the onsleep function-- cejoga --[[local br = nil if inst.components.stackable then br = inst.components.stackable:Get() else br = inst end if br then br.persists = false br:Remove() end ]] -- /cejoga Edited February 13, 2013 by cejoga Link to comment https://forums.kleientertainment.com/forums/topic/8983-request-bedrolls-and-tents/#findComment-78791 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