Spoderthewhiteknight Posted August 5, 2016 Share Posted August 5, 2016 -can eat stale food without repercussions -levels up with wet goop -has a Huge stomach (600 when at max lvl) -can craft books like wickerbottom -is resistant to overheating -is completely resistant to rain and cannot drown if it rains too much -is week to cold weather (will lose health And sanity twice as fast when freezing) -is slower than average (0.8x speed) -all items in his inventory instantly become wet and slippery Link to comment Share on other sites More sharing options...
Andmann Posted August 5, 2016 Share Posted August 5, 2016 oh boy... well basically you just have to copy paste these perks from other characters except for the last one. that one is tricky depending on what you'd expect it to do Link to comment Share on other sites More sharing options...
Spoderthewhiteknight Posted August 5, 2016 Author Share Posted August 5, 2016 Cant find any with any of those. Maybe the leveling, i could replace whatever they put and replace it with wet goop. But thats what i can think up Link to comment Share on other sites More sharing options...
Serpens Posted August 5, 2016 Share Posted August 5, 2016 (edited) I just wrote a mod that handels the wetness and iswet from items and structures.  If you really want them to become wet instantly, I think you could give them the Tag "wet" if they enter the inventary of your char (and remove it as soon as they leave) Another better way I think would it be, if all items get slowly wet in the inventar of your char, and dry slowly if they leave it: AddComponentPostInit("inventoryitemmoisture", function(self) local _GetTargetMoisture = self.GetTargetMoisture self.GetTargetMoisture = function(self) if self.inst:HasTag("YourCharacterTag") then -- every item that has this tag, will get wetness 100 slowly return 100 end return _GetTargetMoisture(self) -- return old stuff end end) in addition give every item in inventory that Tag "YourCharacterTag" and remove it when it leaves the inventory. Edited August 5, 2016 by Serpens Link to comment Share on other sites More sharing options...
Spoderthewhiteknight Posted August 5, 2016 Author Share Posted August 5, 2016 (edited) Thank you, this helps. Although where exactly would i place this? Edited August 5, 2016 by Spoderthewhiteknight Link to comment Share on other sites More sharing options...
Andmann Posted August 5, 2016 Share Posted August 5, 2016 (edited) 22 minutes ago, Spoderthewhiteknight said: Cant find any with any of those. Maybe the leveling, i could replace whatever they put and replace it with wet goop. But thats what i can think up -can eat stale food without repercussions WX76 perk -levels up with wet goop -has a Huge stomach (600 when at max lvl) that needs extra impementation in the wet goop prefab or in one of its components. I suppose eating it to reap the benefits would be a grand idea. I suggest looking at how other foods are implemented. -can craft books like wickerbottom well.. wickerbottom -is resistant to overheating -is completely resistant to rain and cannot drown if it rains too much -is week to cold weather (will lose health And sanity twice as fast when freezing) probably look at player common - removing OnWet OnHeat functions or whatever their names would be for your character woudl do the trick as well for the freezing. All would only need intercepting exiting code -is slower than average (0.8x speed) no idea where that is written, but -all items in his inventory instantly become wet and slippery yep serpens is your man for that =D Edited August 5, 2016 by Andmann Link to comment Share on other sites More sharing options...
Spoderthewhiteknight Posted August 5, 2016 Author Share Posted August 5, 2016 (edited) Ive gotten crafting books and eating stale food and speed done. But not a clue about the inv wet, heat, cold, and rain. aswell as. I cant find where to put serpens code. Edited August 5, 2016 by Spoderthewhiteknight Link to comment Share on other sites More sharing options...
Serpens Posted August 5, 2016 Share Posted August 5, 2016 (edited) you put my code in the modmain.lua. (where else could it be?) But I don't know where to add the needed Tag, since I'm not familar with items entering and leaving inventory. Â And about being resistent to rain: AddComponentPostInit("moisture", function(self) local _GetMoistureRate = self.GetMoistureRate -- max is 0.75 self.GetMoistureRate = function(self) if self.inst:HasTag("YourCharacterTag") then -- self.inst is your character this time return(0) -- moisurerate always zero, so no wetness will be added else return _GetMoistureRate(self) end end end) Â Edited August 5, 2016 by Serpens Link to comment Share on other sites More sharing options...
Spoderthewhiteknight Posted August 5, 2016 Author Share Posted August 5, 2016 I cant get the inventory wetness to work. I added the tag to their prefab. And put that code in the modmain and everything. Link to comment Share on other sites More sharing options...
Spoderthewhiteknight Posted August 5, 2016 Author Share Posted August 5, 2016 I also dont know how to do the heat resistance or cold weakness. also when wet the character still losses sanity Link to comment Share on other sites More sharing options...
Andmann Posted August 5, 2016 Share Posted August 5, 2016 (edited) well serpends code sets moisture to 0Â so yeah your inventory never gets wet that way o.O Do I take it correctly that you actually want the items to be absolutely drenched with all its negative effects as a tradeoff for the othre benefits? - good and fun choice =D well in that case i think you want to return(0.75) -- moisurerate always zero, so no wetness will be added about heat and cold. check out how WX takes reduced damage from cold maybe you should be able to cause the reverse effect and do something similar for heat btw I know that there are player:PushEvent("hungerdelta") events for health, hunger, sanity, beaverness.... I'm almost positive that there is also a temperature delta. You could trace that and write your own function connected to the player PostInit with inst:ListenForEvent("", yourfunction) Edited August 5, 2016 by Andmann Link to comment Share on other sites More sharing options...
Serpens Posted August 5, 2016 Share Posted August 5, 2016 (edited) the inventory wetness function will set the "goal value" to 100. That means the item wetness should get 100 slowly (I don't know exactly how long it takes, could be some minutes) The moistureRate or the wetness of the character does not matter , because the original GetTargetMoisture asks for the character wetness, but with my code we don't use this. If you return(0.75) your character will get wet with the highest rate possible (so will get wet very fast, but you don't want your character to get wet) So my code should be correct, but you could try speed up the process with self.inst.components.inventoryitemmoisture.wetnessSpeed AddComponentPostInit("inventoryitemmoisture", function(self) local _GetTargetMoisture = self.GetTargetMoisture local OldwetnessSpeed = self.inst.components.inventoryitemmoisture.wetnessSpeed local OlddryingSpeed = self.inst.components.inventoryitemmoisture.dryingSpeed self.GetTargetMoisture = function(self) if self.inst:HasTag("YourCharacterTag") then -- every item that has this tag, will get wetness 100 slowly self.inst.components.inventoryitemmoisture.wetnessSpeed = OldwetnessSpeed * 100 -- default value is 1. the higher this value the faster an item will reach the TargetMoisture, if this is more wet self.inst.components.inventoryitemmoisture.dryingSpeed = OlddryingSpeed * 100 -- default value is 0.5 , the higher this value the faster an item will reach the TargetMoisture, if this is less wet return 100 end return _GetTargetMoisture(self) -- return old stuff end end) Decide wheter you also want to change the dryingSpeed or not and how much. But since the targetmoisture is 100 and as soon as the item leaves the inventory this function do not work anymore, it should not matter how you change the dryingSpeed. But... I think if it leaves the invontory we should set the value back to default... let me think about that... I think try out the code and see if it dries very fast after it leaves the inventory. Â Edited August 5, 2016 by Serpens Link to comment Share on other sites More sharing options...
Spoderthewhiteknight Posted August 5, 2016 Author Share Posted August 5, 2016 I dont know, its just not working. i cant be sure if its something wrong i did or if its the code. i dont even know if the tag belongs in the prefab. Id guess so Link to comment Share on other sites More sharing options...
Serpens Posted August 5, 2016 Share Posted August 5, 2016 (edited) you could try if the wetness modification itself works, if you remove the Tag restriction. So you always change wetnessspeed and return 100, regardless of the tag. Then every item on the map shoud,be instant wet. (this works here) If that works, it is the Tag that is wrong. If it does not work, it is the function. Edited August 5, 2016 by Serpens Link to comment Share on other sites More sharing options...
Spoderthewhiteknight Posted August 6, 2016 Author Share Posted August 6, 2016 I try taking the tag off the code and the character stops working all together. Its alright though. i guess i'll just make due without it. Thank you both for all the help, its really appreciated. Link to comment Share on other sites More sharing options...
Spoderthewhiteknight Posted August 6, 2016 Author Share Posted August 6, 2016 I suppose the only thing i need is Cold weakness and heat invulnerablity Link to comment Share on other sites More sharing options...
Andmann Posted August 6, 2016 Share Posted August 6, 2016 how about you upload your work far? =D it would be much easier to help you then =D Link to comment Share on other sites More sharing options...
Spoderthewhiteknight Posted August 6, 2016 Author Share Posted August 6, 2016 ITs no big deal, i got those two working now, thanks again for the help both of you. Link to comment 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