Search the Community
Showing results for tags 'postinit'.
Found 2 results
Last time I made a thread, it was about the woodie rework, a user named serpens pointed to me out I should use modmain whenever directly changing a pre-existing game file, in this case woodie scripts; However I have no clue how to do so, I'm gonna post some code that it's in the woodie and that I want it to be in the modmain, if someone could help me, because I had to redo my whole mod because a new update bricked it, I don't wanna be updating each time they update the woodie script. I used a compare plugin on notepad +++ to easily spot these changes from the woodie original script to my modded one. woodie.lua lucy.lua modmain.lua
16 downloadsThis code is designed for Don't Starve Together to allow for critical hits and items with critical hit properties. By design this allows all mobs the potential to be able to crit if they have crit chance greater than 0 Using inst.components.combat:SetCrit(critchance, critdmg, critfn) we can define a basic crit settings for a mob. Currently equipment have crit variables as inst.variables rather than component ones. Some fun examples if you have a hat that has crit chance, we can give it to a pigman and he'll be able to crit. Currently tested on a caves enabled server and works as advertised. Suggestions and bugs found for improvements welcome.