Search the Community
Showing results for tags 'needhelp'.
-
Hello everyone, I am currently working on a emote mod where you hug your friends either for comfort or sanity purposes. I had an issue while working on the mod where I had the code become recognizable to the game, but the images/animation became blank. I tried to fix that but I made the situation way worse than it should be. It introduced the label "crashed" under it and i couldn't open the world anymore with the mod enabled. I have the animation already down and build to a specific folder, and I have already decided to start over on the coding aspects for the mod. I just really need help with the coding for the mod, this is my first time creating a emote mod ever. I just wanna say first, yes I have used another mod for this. It was the default dance mod (yea I know cringe) I use Visual Studio Code for this mod the image below was the old code for my first try its a modinfo.lua The second one was my mod main again I used the default dance mod to help me out with this please don't lash on me about it. but this is really what I had including the anim build. I would really love some help on this mod, if anyone knows how to do this please let me know
-
-
I would like to know how to translate a modinfo.lua, in a French patch I made, I managed to translate all the content by putting modimport("stringsFR.lua") in the modmain.lua and now I would like to translate the modinfo, and if I activate my patch I see the content I wrote in French in the configuration of the mod in question I have to use variables? please explain to me
-
I am trying to get this code to work, while it does, one part of the code just wont work AddComponentPostInit("combat", function(Combat)-- place in modmain local OldCalcDamage = Combat.CalcDamage Combat.CalcDamage = function(self, target, weapon, ...) local old_damage = nil local crit = 1 --crit chance (e.g. this is 50%) local critdmg = 50 --crit damage (x2) if math.random() <= crit and target and self.inst.prefab == "esctemplate" then --change to your prefab if weapon then -- if its a weapon old_damage = weapon.components.weapon.damage weapon.components.weapon.damage = old_damage * critdmg inst.components.talker:Say("CRIT") else -- if we attack with something not using the weapon component old_damage = self.defaultdamage self.defaultdamage = old_damage * critdmg inst.components.talker:Say("CRIT") end end local ret = OldCalcDamage(self, target, weapon, ...)-- returning crit damage if old_damage then-- reseting back to non crit damage if weapon then weapon.components.weapon.damage = old_damage else self.defaultdamage = old_damage end end return ret end Does anyone have a fix to my little problem? the code works if i remove "inst.components.talker:Say("CRIT") " plz HELP