Aquaterion Posted June 1, 2016 Share Posted June 1, 2016 (edited) 4 minutes ago, mranon245 said: Amazing, works like a charm. It's a shame that a tophat and a tam give the same amount of sanity now though but I'm really happy with the code. Thank you so much. you can change "TUNING.DAPPERNESS_MED" to either any value or other dappernes values. current yours is 0.0556 which can go up to 1.668(with 3 items) On 5/30/2016 at 5:24 PM, DrSmugleaf said: print("TUNING.DAPPERNESS_TINY is " .. TUNING.DAPPERNESS_TINY) print("TUNING.DAPPERNESS_SMALL is " .. TUNING.DAPPERNESS_SMALL) print("TUNING.DAPPERNESS_MED is " .. TUNING.DAPPERNESS_MED) print("TUNING.DAPPERNESS_MED_LARGE is " .. TUNING.DAPPERNESS_MED_LARGE) print("TUNING.DAPPERNESS_LARGE is " .. TUNING.DAPPERNESS_LARGE) print("TUNING.DAPPERNESS_HUGE is " .. TUNING.DAPPERNESS_HUGE) [00:00:40]: TUNING.DAPPERNESS_TINY is 0.022222222222222 [00:00:40]: TUNING.DAPPERNESS_SMALL is 0.033333333333333 [00:00:40]: TUNING.DAPPERNESS_MED is 0.055555555555556 [00:00:40]: TUNING.DAPPERNESS_MED_LARGE is 0.074074074074074 [00:00:40]: TUNING.DAPPERNESS_LARGE is 0.11111111111111 [00:00:40]: TUNING.DAPPERNESS_HUGE is 0.33333333333333 Edited June 1, 2016 by Aquaterion Link to comment https://forums.kleientertainment.com/forums/topic/67764-help-with-a-custom-code-and-tips-on-character-creation/page/2/#findComment-778724 Share on other sites More sharing options...
mranon245 Posted June 1, 2016 Author Share Posted June 1, 2016 1 hour ago, Aquaterion said: you can change "TUNING.DAPPERNESS_MED" to either any value or other dappernes values. current yours is 0.0556 which can go up to 1.668(with 3 items) I did set it to SMALL but I feel like I want to keep it to MED. Is there a code for just making the tam give a bit more sanity than usual? So that it is a bit more useful? Something like 8 sanity per minute or something like DAPPERNESS_MED_LARGE? If not I will happily stick to my TUNNING.DAPPERNESS_SMALL. 11 hours ago, DarkXero said: I used local function sanityfn(inst) for k, v in pairs(inst.components.inventory.equipslots) do if AllRecipes[v.prefab] and AllRecipes[v.prefab].tab == RECIPETABS.DRESS then return TUNING.DAPPERNESS_SMALL end end return 0 end local function master_postinit(inst) inst.components.sanity.custom_rate_fn = sanityfn end and it worked. Items from the dress tab give some sanity, although it doesn't stack. (It's the same to equip 1 or 3 items from the dress tab.) If you are testing during dusk/night, then that sanityfn isn't enough to counteract the drain, so if may seem like it doesn't work. I forgot to thank you for pointing out the time of a ingame day, I wasn't paying attention to it. And thank you for the code (: Link to comment https://forums.kleientertainment.com/forums/topic/67764-help-with-a-custom-code-and-tips-on-character-creation/page/2/#findComment-778733 Share on other sites More sharing options...
Aquaterion Posted June 1, 2016 Share Posted June 1, 2016 (edited) 5 minutes ago, mranon245 said: I did set it to SMALL but I feel like I want to keep it to MED. Is there a code for just making the tam give a bit more sanity than usual? So that it is a bit more useful? Something like 8 sanity per minute or something like DAPPERNESS_MED_LARGE? If not I will happily stick to my TUNNING.DAPPERNESS_SMALL. in modmain you could do; AddPrefabPostInit("walrushat", function(inst) if not GLOBAL.TheWorld.ismastersim then return inst end inst.components.equippable.dapperness = TUNING.DAPPERNESS_LARGE -- dapperness_large is what it currently has end) walrus hat already seems like it has dapperness_large used. But remember if you want to change the walrushat code with the above code, you'll be nerfing/buffing the hat for every character, and I don't think its that much of a good idea. Edited June 1, 2016 by Aquaterion Link to comment https://forums.kleientertainment.com/forums/topic/67764-help-with-a-custom-code-and-tips-on-character-creation/page/2/#findComment-778734 Share on other sites More sharing options...
mranon245 Posted June 1, 2016 Author Share Posted June 1, 2016 5 minutes ago, Aquaterion said: in modmain you could do; AddPrefabPostInit("walrushat", function(inst) if not GLOBAL.TheWorld.ismastersim then return inst end inst.components.equippable.dapperness = TUNING.DAPPERNESS_LARGE -- dapperness_large is what it currently has end) walrus hat already seems like it has dapperness_large used. But remember if you want to change the walrushat code with the above code, you'll be nerfing/buffing the hat for every character, and I don't think its that much of a good idea. Oh it applies to everyone. Yeah, I shall keep it to small then. Thank you for your amazing support Link to comment https://forums.kleientertainment.com/forums/topic/67764-help-with-a-custom-code-and-tips-on-character-creation/page/2/#findComment-778735 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