Gilamex Posted December 9, 2017 Share Posted December 9, 2017 I've made a character mod for DST, and it's currently almost complete, yet I know nothing about code... My friend recommended I asked here because he said he asked for help and someone was willing to type the code for him. If this is at all possible, that would be fantastic. The stats I'm wanting are something as follows (If possible. If not, then something close to): Perk 1: No sanity drain AND gain from passive things. (dark flowers, monster, night drain etc. Glommer or clothing gain etc. Also no sanity from picking flowers. She's meant to only get sanity from eating, so perhaps a 2x sanity gain from food.) Perk 2: Runs fast, hits hard, but has a fragile body. (The damage and health has already been tweaked, I just need movement speed changes.) Perk 3: Loves to eat. (Max hunger already increased, I only need code for only gaining sanity from food--and if possible--a sanity ONLY multiplier of 2x from food.) Link to comment Share on other sites More sharing options...
K1NGT1GER609 Posted December 10, 2017 Share Posted December 10, 2017 (edited) Here's a start, perk 1: inst.components.sanity.night_drain_mult = 0 --put this in the master_postinit inst.components.sanity.neg_aura_mult = 0 Perk 2 (put this in the master_postinit): --speed inst.components.locomotor.walkspeed = 4 --increase it or multiply it to your number inst.components.locomotor.runspeed = 6 --ditto for this one --attack power inst.components.combat.damagemultiplier = 1--its a percent so two for double but crashes at four(DO NOT PUT IT AT FOUR) inst.components.health.absorb = -.5 --50 percent extra damage from enemies. note this may or may not work perk 3: local function eatsanity(inst) --this however put it out side of master_postinit inst.components.sanity:DoDelta(5)--customizable number end inst:ListenForEvent("oneaten", eatsanity) --put this in your master_postinit And that's just a start I'm not very knowledgeable about hunger logic or math that deals with it. Edited December 10, 2017 by K1NGT1GER609 Link to comment Share on other sites More sharing options...
Gilamex Posted December 10, 2017 Author Share Posted December 10, 2017 47 minutes ago, K1NGT1GER609 said: Here's a start, perk 1: inst.components.sanity.night_drain_mult = 0 --put this in the master_postinit inst.components.sanity.neg_aura_mult = 0 Perk 2 (put this in the master_postinit): --speed inst.components.locomotor.walkspeed = 4 --increase it or multiply it to your number inst.components.locomotor.runspeed = 6 --ditto for this one --attack power inst.components.combat.damagemultiplier = 1--its a percent so two for double but crashes at four(DO NOT PUT IT AT FOUR) inst.components.health.absorb = -.5 --50 percent extra damage from enemies. note this may or may not work perk 3(its missing something...): local function eatsanity(inst) --this however put it out side of master_postinit inst.components.sanity:DoDelta(5)--customizable number end inst:ListenForEvent("oneaten", eatsanity) --put this in your master_postinit And that's just a start for now. Gave me an error... Link to comment Share on other sites More sharing options...
K1NGT1GER609 Posted December 10, 2017 Share Posted December 10, 2017 (edited) What at line 48 of the character lua file? (Posting a picture of the file or copy n paste the code if u could) Edited December 10, 2017 by K1NGT1GER609 Link to comment Share on other sites More sharing options...
Gilamex Posted December 10, 2017 Author Share Posted December 10, 2017 Alright, uh, turns (for some stupid reason) I had the line of code for "listenforevent" COPIED outside of where it was supposed to go, meaning I already had it where it belonged, but for some reason copied it outside of where it was supposed to go? I dunno, but I deleted the copy and it works now. Thanks so much! 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