Ugly boy Posted December 20, 2020 Share Posted December 20, 2020 (edited) Hello, i believe this is my first time posting here. forgive me for any further mistakes i make (sorry if my English is a little weird too) I've recently decided that i wanted to make a custom character on DST, been working on it for a few days with my free time. i managed to add a few things that have been what i've been looking for with the extended sample character, however i still have a few perks that i want to add. i'm trying to make my character benefit from the winter season (regen sanity, take longer to starve, defense boost if possible) and struggle a little during other seasons (sanity drain, hunger drain). I've only added few things currently; resistance to solid freezing, slow to reach low temperature, quick to reach high temperatures and additional dmg taken from lighting I'm fairly new to coding, so i don't exactly know what i'm doing but its been working so far. i'd like some help with adding certain things since i'm not well known with coding. Here's what i want to add if its possible: * Gain sanity regen, take longer to starve, attack and defense boost (if possible) only during the winter. * Drain more sanity and hunger if the season is either Summer/spring. * Chance of freezing mobs on-hit (not including bosses) (optional, i'm not sure if this would be possible to code in). * Sanity gain after killing a mob * Movement speed increased during winter, or when wet (optional) * Benefit more from eating Fish tacos (Fav food) Any help with coding at least one of these would be much appreciated, if possible, i'd like to be able to customize the numbers/stats to my liking. it would also be helpful if anyone could suggest options similar to what i would like to add, just in case. again, i'm new to coding so i might not know where exactly the codes should go and where to put them. so far most of the codes that i have added are in the prefabs>main.lua file. kodomo.lua temperature.lua Edited December 21, 2020 by Ugly boy Link to comment Share on other sites More sharing options...
DieAnywhereElse Posted December 20, 2020 Share Posted December 20, 2020 To set a favorite food, you have to add this under the [master_postinit = function] section in the prefabs > character.lua file: inst.components.foodaffinity:AddPrefabAffinity("meatballs", TUNING.AFFINITY_15_CALORIES_HUGE) Change "meatballs" for whatever food you want, in this case it would be "fishtacos" 1 Link to comment Share on other sites More sharing options...
Yakuzashi Posted December 20, 2020 Share Posted December 20, 2020 Hi. I will need your whole mod in .zip, it's just a lot easier for me if you want my help. Cheers! Link to comment Share on other sites More sharing options...
Ugly boy Posted December 20, 2020 Author Share Posted December 20, 2020 48 minutes ago, Yakuzashi said: Hi. I will need your whole mod in .zip, it's just a lot easier for me if you want my help. Cheers! alright, here you go Kodomo the Koppen.zip Link to comment Share on other sites More sharing options...
Yakuzashi Posted December 20, 2020 Share Posted December 20, 2020 Well. I have a problem with this .zip. It asks me for the next volume Link to comment Share on other sites More sharing options...
Ugly boy Posted December 20, 2020 Author Share Posted December 20, 2020 14 minutes ago, Yakuzashi said: Well. I have a problem with this .zip. It asks me for the next volume oh sorry, that's my bad. i couldn't drag the whole thing before because of the "max file size", seems i'm able to do it now though Kodomo the Koppen.zip Link to comment Share on other sites More sharing options...
Yakuzashi Posted December 21, 2020 Share Posted December 21, 2020 (edited) Howdy. I have implemented changes inside this file. kodomo.lua Quote * Gain sanity regen, take longer to starve, attack and defense boost (if possible) only during the winter. * Drain sanity and hunger during both Summer/spring. * Sanity gain after killing a mob * Movement speed increased during winter, or when wet (optional) I have marked things you can modify, but they are quite visible (as numbers ofc). Let me know if you will have any questions. Cheers! Edit: Quote * Chance of freezing mobs on-hit (not including bosses) (optional, i'm not sure if this would be possible to code in). I will try to do this tomorrow or later this night. I know how to add freezing perk to the weapon/handslot item only Edited December 21, 2020 by Yakuzashi 1 Link to comment Share on other sites More sharing options...
DecDuck Posted December 21, 2020 Share Posted December 21, 2020 Maybe this isn’t helpful, but there is a global variable called TheWorld where you can access what season you are in. You could then listen for the season change event, and then update all the modded characters in the world in accordance with the new season 1 Link to comment Share on other sites More sharing options...
Ugly boy Posted December 21, 2020 Author Share Posted December 21, 2020 (edited) 3 hours ago, Yakuzashi said: Let me know if you will have any questions. Cheers! Thank you so much! i've been looking to add these perks in specific for a while, now my character finally has them. there's a bit of an issue though. when my sanity starts to drain during the summer/spring, the draining seems to stack on itself somehow, it does the same for the sanity gain during winter, draining/gaining more sanity than its supposed to. also, is there a way to remove the sound and flashy red/green when the sanity is being drained or gained from the season? i was more thinking that it would go down similar like hunger but slower Edited December 21, 2020 by Ugly boy Link to comment Share on other sites More sharing options...
Yakuzashi Posted December 21, 2020 Share Posted December 21, 2020 kodomo.lua I have fixed sound and flash issue with every sanity tick. The inst:DoPeriodicTask method is not 100% accurate in terms of time, so with every tick you have some leftover of decimals and hundredths, which overtime lead to stacking problem. I'll try to find any workaround...but it might be quite hard. Cheers! 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