Leonardo Cox

  • Content Count

    432
  • Joined

  • Last visited

 Content Type 

Profiles

Forums

Downloads

Klei Bug Tracker

Game Updates

Hot Lava Bug Reporter

Everything posted by Leonardo Cox

  1. Oh derp, again I can't read. Try data.target or data.other. If those don't work, I'll run some quick tests.
  2. I made a mistake, try data.char instead. Also added a print, check your log to see if it came up as DEFAULT. If not then change MALE to whatever that says (assuming its not nil). inst:ListenForEvent("onattackother", function(inst, data) local gender = GetGenderStrings(data.char) print(gender) --Lets see if it comes up as "DEFAULT". If it did, that means it didn't work! if data.target:HasTag("player") and inst.components.sanity:IsSane() then inst.components.talker:Say(GetString(inst, "ANNOUNCE_HITPLAYER")) inst.components.sanity:DoDelta(-10) if gender == "MALE" then target.components.health:DoDelta(-9999) end elseif data.target:HasTag("player") and not inst.components.sanity:IsSane() then inst.components.talker:Say(GetString(inst, "ANNOUNCE_HITPLAYER")) end end)
  3. Try this: local gender = GetGenderStrings(data.char) --Edit: I made a mistake. if gender == "MALE" then inst.components.health:DoDelta(-9999) end
  4. --Noticed that elseif check for the hunger was >= 40 and >= 100. You should probably just do > instead. It could cause a chance of nothing happening. --For the meantime I just made it else. --Sorry if this doesn't fix it, but I added some prints to let you know if the function is running properly when you don't say anything. local SACRIFICE = GLOBAL.Action() SACRIFICE.str = "Sacrifice" SACRIFICE.id = "SACRIFICE" SACRIFICE.fn = function(act) local saychance = math.random(1,4) if act.target.components.hunger.current <= 40 or act.target.components.health.currenthealth <= 100 then print("hunger values and health values met") if act.target.components.sanity:IsSane() and saychance == 1 then act.target.components.talker:Say("Uh–uh!") elseif act.target.components.sanity:IsSane() and saychance == 2 then act.target.components.talker:Say("I can't believe you!") elseif act.target.components.sanity:IsSane() and saychance == 3 then act.target.components.talker:Say("You're joking, right?!") act.target:PushEvent("emote", { anim = "emoteXL_facepalm", mounted = true }) elseif act.target.components.sanity:IsSane() and saychance == 4 then act.target.components.talker:Say("What are you, an sadist?") elseif not act.target.components.sanity:IsSane() then act.target.components.talker:Say("We pReSeRvE oUr LiFe, NoT eNd It, fOoL!!!") end else print("hunger values and health values NOT met") if act.target:HasTag("playerghost") or act.target.components.health:IsDead() or act.target.sg:HasStateTag("giving") or act.target.sg:HasStateTag("busy") or act.target.sg:HasStateTag("working") or act.target.sg:HasStateTag("fishing") or act.target.sg:HasStateTag("doing") or act.target.sg:HasStateTag("playing") or act.target.sg:HasStateTag("running") or act.target.components.inventory:IsHeavyLifting() then return end act.target.sg:GoToState("sacrifice") end end AddAction(SACRIFICE)
  5. Try this. local saychance = math.random(4) if act.target.components.sanity:IsSane() and saychance == 1 then act.target.components.talker:Say("Uh–uh!") elseif act.target.components.sanity:IsSane() and saychance == 2 then act.target.components.talker:Say("I can't believe you!") elseif act.target.components.sanity:IsSane() and saychance == 3 then act.target.components.talker:Say("You're joking, right?!") act.target:PushEvent("emote", { anim = "emoteXL_facepalm", mounted = true }) elseif act.target.components.sanity:IsSane() and saychance == 4 then act.target.components.talker:Say("How dare you!") elseif not act.target.components.sanity:IsSane() then act.target.components.talker:Say("RaRArGH, NOoOooO!!!") end
  6. This probably isn't exactly what you want but here is how spiders drop their random loot: inst.components.lootdropper:AddRandomLoot("monstermeat", 1) inst.components.lootdropper:AddRandomLoot("silk", .5) inst.components.lootdropper:AddRandomLoot("spidergland", .5) inst.components.lootdropper.numrandomloot = 1 the 2nd value being chance of the item dropping.
  7. have something = math.random() local dropchance = math.random() Also you're probably getting nothing because you have nothing set for when math.random goes over these numbers. Are you trying to make something drop random loot?
  8. If you want to just edit the textures without using a mod, you need to take the wathgrithr.zip from the anims folder of your Don't Starve Together folder. Unzip it the contents, use TexTools to convert it to .png (or find a character template, but you'll need to use TexTools to revert it back to .tex). Zip it back up (make sure all the files are in there and named the same as it was originally) and put it back in the anim folder. With this, only you will be able to see the new textures. However, updates to the game but reset the textures to what it was originally, so you have to keep overwriting the textures. If you want to do it with modding (and are new to it) I recommend looking at a character mod tutorial. Or in your modmain.lua you could probably overwrite the build used for wigfrid with this : (note: I can't test to see if this code works right now, but it should just replace her skin after she spawns) AddPrefabPostinit("wathgrithr", function(inst) local function SetNewWigfrid(inst) inst.AnimState:SetBuild("wathgrithr2_build") -- you need to make your own build for this to work. end inst.DoTaskInTime(1, SetNewWigfrid) end)
  9. I'm not 100% sure what you're wanting here but if you want it to read whats in your handslot then heres this: local handslot = inst.components.inventory:GetEquippedItem(EQUIPSLOTS.HANDS) or nil if handslot ~= nil and handslot.components.tool ~= nil and handslot.components.tool:CanDoAction(ACTIONS.CHOP) then end
  10. I don't mean to make a double post, but to make up for my inability to read, I did some testing. The only way I found to be completely immune to coldness completely is just removing the freezable component with this: inst:RemoveComponent("freezable") Otherwise if you set the resistance high enough (I tested 500) you won't even get the coldness tint.
  11. It seems like changing it worked for others as well. Thank you very much for your help and the extra information. I really appreciate it.
  12. ...this seems to have fixed my version of Cave Pets. I haven't confirmed it with other people who've had the issue yet, so I'll update this post when I get confirmation. I don't really understand it. My other mods of Playable Pets work just fine and they don't have integers as well. I don't suppose you would know why this is?
  13. Bump. I'm not sure if bumping is allowed here or not, sorry if it isn't. It still occurs, I checked both version number of the mod and the api version and they're still up to date. Would there be anything else that would make the game think the mod is out of date? Because I'm all out of ideas here.
  14. A little bump with some more information. Even though the out of date message states that no players can join me, players still can. Some players don't have this issue and they share the some version numbers as mine. Some people who had this problem before with this mod somehow fixed itself when DST updated the other day. So is this just some sort of bug with DST then?
  15. I'm aware that the api_version is the API of DST. Which is why I inspected the API when I got into the newreignsbeta, expecting the API to have changed causing the out of date message. (which happened once before). The version number of the actual mod matches with the workshop version (both are version 1.2c). Or what is this version key if its not that and are there any other defining factors that could list the mod of being out of date?
  16. This only happened after the newreignbeta became a thing. One of my mods will get the server announcement that "Mod is out of date", however I checked the api version (which is 10) and it matches the one in listed in the modsutil.lua file. My other mods have the same api version and don't get this error. I've tried adding a "dummy" update to get it to refresh on the workshop and I've tried reinstalling the game/mod, and it doesn't want to go away. Other people are having this problem with this one mod as well. Any sort of help would be greatly appreciated. Playable Pets -Cave.zip
  17. Sounds a lot like a weird experience I had when testing one of my mods on a dedicated server. If you joined too early (when the server is join-able but isn't actually up yet), you'll get pretty much what you described. I don't know if this is root of the problem as I only had it happen twice, both times is when I joined a server before it was actually up. Once I waited a little bit or got confirmation the server was indeed up, I never got the issue again.
  18. Helloooo. I was attempting to update on of my mods through the DS mod tools and while updating mod data, I accidentally closed the mod tools. Now whenever I attempt to update the mod, I get an error message stating: failed sharing mod data. How would I go about fixing this? Also can anyone help me find the log file, I don't mean to be that guy but I honestly don't know where it is.