Search the Community
Showing results for tags 'modmain'.
Found 2 results
20 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.
Hi, I put a basic config in the modinfo.lua but game crashes when I put GetModConfigData(...) in mycharacter.lua. Does it only work if it's in modmain.lua? How does one create configurable starting inventory? Thanks.