• Content Count

  • Joined

  • Last visited

Community Reputation

17 Good

About Fancy_Fox_Pers

  • Rank
    Senior Member


Recent Profile Visitors

1769 profile views
  1. The birchnut trees became monsters, everything was fine the first time but they turned into monsters the next day again and during their fight with pig guards the crash happened. Log: deciduoustree bug.txt
  2. Not much, just plucking it in the mods folder and seeing what the log says. I was just trying to get some basic information, so I knew how to start. Thank you for the clear answer! I think I'll finalize my characters before porting them, then
  3. I made some characters in DST with special perks. What do I need to do to port them to DS? If there are issues with perks I should be able to work through them, but I have no idea how to even get the character to show up on the character select menu. Thank you in advance.
  4. Oh of course! Should've checked if I could find something with CTRL + F "" in the game files. And you're right about the error, seems really obvious now =) Thanks!
  5. I want a character to become mighty/wimpy depending on health (mighty on low health, wimpy on high health). I tried doing the following: but that gives me a crash upon spawning, I included the error ("attempt to compare nil with number") in the code, commented next to the relevant line. The function gets called and mentioned the following way, in case you're worrying about that: I expected the code to work since the following, using sanity and changing "health" to "sanity" accordingly, does work perfectly:
  6. DarkXerox basically did 95% of the code for this particular character. I mean I tried but I didn't know much and I still know only the minimum. iirc I had the idea and he happened to know about a DS mod that did it that way. It replaced the original mob with a new one, that would become the befriended version. Since there was that DS mod, there was less worrying about making this work Plus I got to easily change things like health, damage and for some mobs things like cutting down trees when running towards one (like bearger). Helped a ton for the brain too. I guess it could work differently too, but I wouldn't be really excited about starting from scratch at this points
  7. Thanks! Removed. Also, I noticed my "OnGetItemFromPlayer2" wasn't commented out either, so I fixed that. So quick update: beefalo domestication process now starts as usual but beefalo befriending with the animalfood doesn't work. I don't know what's wrong this time honestly.As a reminder, this is the (relevant) code currently being used:
  8. I just think it's weird because the problem doesn't occur when deleting the (your) same code. Let me provide you the full .lua (warning, it's a bit messy at the moment, but everything important is at the bottom) modmain.lua
  9. Thank you for the explanation. Really helps out. I tried your code but the game is expecting a ')' somewhere around this line: self.test = function(self, self.inst, item, giver) -- then change it And I am baffled that I can't find where to put the missing ')'. I tested my game some more to make sure it wasn't any other code than yours. Also, if I try the second code (because why not) it gives me the same error and the "same" line (well this time it says line 243 instead of 242 but that's only because there is one more line in your second code, it does indicate the same line I gave above).
  10. So sorry about the late reply. Have been having some pc issues that needed maintenance. Mods are fine though! Thanks for the replies. Edit: how do you remove spoilers without removing the content, when editing? I accidentally made one for the entire rest of my reply.Edit 2: the reason for my second if is that I found this in beefalo.lua's original ShouldAcceptItem: local function ShouldAcceptItem(inst, item) return inst.components.eater:CanEat(item) and not inst.components.combat:HasTarget() end
  11. So, an awesome person a long time ago gave me this code that allows me to give items to mobs: (the ultimate goal being befriending them) for k, v in pairs(creatureprefabs) do AddPrefabPostInit(v, function(inst) inst:AddComponent("trader") inst.components.trader:SetAcceptTest(ShouldAcceptItem) inst.components.trader.onaccept = OnGetItemFromPlayer inst.components.trader:Enable() end) AddPrefabPostInit(v.."follower", function(inst) inst:AddComponent("trader") inst.components.trader:SetAcceptTest(ShouldAcceptItem) inst.components.trader.onaccept = OnGetItemFromPlayerLeader inst.components.trader:Enable() end) end I have noticed that this mod makes the Beefalo unwanting to accept food like grass and twigs (when this was written you couldn't feed them grass or twigs in the first place, no taming yet). It will still take the item but it won't start following, the taming process (it does without the mod). I think that's due to this code that states what items the mobs can accept: local function ShouldAcceptItem(inst, item, giver) if giver.prefab == "mimi" then if item.components.edible and item.components.edible.foodtype == GLOBAL.FOODTYPE.ANIMALFOOD then if not inst.components.follower or inst.components.follower:GetLoyaltyPercent() < 0.5 then return true end end end end What's the best strategy here? Is there a way I can add in the ShouldAcceptItem function something like and not receiver.prefab == "Beefalo" ? Also, Beefalos won't accept grass or twigs from other characters than "mimi" either. So I am not entirely certain about the cause
  12. Hi I have a mob that can pick up basic resources. Here's the (relevant to my question) code for it in its brain: The mob can pick the planted carrot but gives cutgrass instead of carrot. Interestingly, when picking up carrot, it does give me a carrot as it should. Edit: full code just in case