Psychomaniac Posted November 6, 2020 Share Posted November 6, 2020 I Looked at Warbucks Lua file and found some lines: Spoiler local function sanityfn(inst) local delta = 0 local oinc_amount = inst.components.inventory:Count("oinc") + (inst.components.inventory:Count("oinc10") * 10) + (inst.components.inventory:Count("oinc100") * 100) if oinc_amount >= 200 then delta = TUNING.SANITYAURA_MED elseif oinc_amount >= 50 then delta = TUNING.SANITYAURA_SMALL elseif oinc_amount >= 20 then delta = TUNING.SANITYAURA_TINY * 2 elseif oinc_amount >= 10 then delta = TUNING.SANITYAURA_TINY end return delta end -- and this lineunder local fn = function(inst) inst.components.sanity.custom_rate_fn = sanityfn Then i made some change then copy to woodie (DST) Lua file (oh, i used a Woodie mod called Woodie Unchained. I copy the code to that woodie lua file not the original DST lua file) Spoiler local function sanityfn(inst) local delta = 0 local log_amount = inst.components.inventory:Count("log") + (inst.components.inventory:Count("livinglog") * 10) if log_amount >= 200 then delta = TUNING.SANITYAURA_HUGE elseif log_amount >= 100 then delta = TUNING.SANITYAURA_LARGE elseif log_amount >= 50 then delta = TUNING.SANITYAURA_MED elseif log_amount >= 20 then delta = TUNING.SANITYAURA_SMALL elseif log_amount >= 10 then delta = TUNING.SANITYAURA_TINY end return delta end --And copy this line under: local function master_postinit(inst) inst.components.sanity.custom_rate_fn = sanityfn and it's crashed the game (It's not that SIMPLE :D) PLEASE, HELP! if you can, much appreciated!!! Thanks for reading. Link to comment Share on other sites More sharing options...
penguin0616 Posted November 6, 2020 Share Posted November 6, 2020 You should attach the crash log, so we can see what the issue is. 2 Link to comment Share on other sites More sharing options...
Psychomaniac Posted November 6, 2020 Author Share Posted November 6, 2020 10 minutes ago, penguin0616 said: crash log Where can i find that file? Sorry Here is what happen: after copy those code to the lua file, i create a new world with only that mod active, world generated > chose Woodie > proceed to the Florid Postern, game frozen for like a minute then this appeared: And i was send back to the menu, the login phase. Link to comment Share on other sites More sharing options...
penguin0616 Posted November 6, 2020 Share Posted November 6, 2020 Press the picture of a folder in your world selection screen, open up the "Master" folder in the popup, and send the server_log.txt 2 Link to comment Share on other sites More sharing options...
Psychomaniac Posted November 6, 2020 Author Share Posted November 6, 2020 (edited) Hope it's what you loking for. Found it under the Cluster_1\Master in the popup folder. Thanks!!! server_log.txt Edited November 6, 2020 by Psychomaniac Link to comment Share on other sites More sharing options...
penguin0616 Posted November 6, 2020 Share Posted November 6, 2020 There's no "Count" method for inventories. 2 Link to comment Share on other sites More sharing options...
Psychomaniac Posted November 6, 2020 Author Share Posted November 6, 2020 2 minutes ago, penguin0616 said: There's no "Count" method for inventories. Ok, i guess that is for DS only. Thank for you help. Link to comment Share on other sites More sharing options...
AndRay Posted November 6, 2020 Share Posted November 6, 2020 Bit late to the party but I think you can use the Has method. (line 972 of components/inventory.lua) 1 Link to comment Share on other sites More sharing options...
Psychomaniac Posted November 7, 2020 Author Share Posted November 7, 2020 (edited) 9 hours ago, AndRay said: use the Has method Thanks for your suggestion. I now settle with the idea of "Plant Trees - Gain Sanity" (Evergreen, Birchnut, Twiggy Tree & Lune Tree), because simple code , and it kinda fit Woodie too. P/s: I mod this because when i play Woodie (as my main now), i always in Insanity stage (Transfrom too much :D), need a way to get back to normal, and i don't want to just tune the Dapperness to HUGE, because you still need nightmare fuel & Beard Hair sometime :D. Edited November 7, 2020 by Psychomaniac Link to comment Share on other sites More sharing options...
TheTruth Posted November 29, 2020 Share Posted November 29, 2020 On 11/7/2020 at 1:49 PM, Psychomaniac said: Thanks for your suggestion. I now settle with the idea of "Plant Trees - Gain Sanity" (Evergreen, Birchnut, Twiggy Tree & Lune Tree), because simple code , and it kinda fit Woodie too. P/s: I mod this because when i play Woodie (as my main now), i always in Insanity stage (Transfrom too much :D), need a way to get back to normal, and i don't want to just tune the Dapperness to HUGE, because you still need nightmare fuel & Beard Hair sometime :D. Sorry for necroing, bit isn't better for you to just eat roasted green mushroom? I mean the ruin got plenty of it and you may set up green mushroom farm. Link to comment Share on other sites More sharing options...
Psychomaniac Posted November 29, 2020 Author Share Posted November 29, 2020 (edited) 33 minutes ago, TheTruth said: Sorry for necroing You're well come :D!!! It's just a point of view matter, you can play DST as Wes with no up-side and still fine because there 're are always ways to get things done. But since i'm a F.A.S or F.A.P (Forever Alone Survivor, Forever Alone Player, i like to play ALONE) and i don't wan to switch my main, so i try to mod them to have all the up- side of every char, i currently play Woodie with the Woodie unchained mod, and i added some more ability that i feel needs, like : Wicker's book stuff, Wormwood's ability to plant seed into the ground and gain sanity when planting, ability to fertilizer in winter, a custom crafting tab with new recipe to craft the un-craftable stuff like berry bush, twig bush, juicy berry bush, fire fly, living wood.... you name it. I just want a jack-of-all-trades char P/s: and tree a like every where, so when i want sanity just chop down some, get the woods, plant the seed > stop tree guard, reproduce forest, gain sanity. Edited November 29, 2020 by Psychomaniac 1 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