• Content count

  • Joined

  • Last visited

Community Reputation

4 Neutral

About Trololarion

  • Rank
    Junior Member
  1. No, you are mistaken, if I died from the hounds, this will be recorded in the cause of death. In addition, there were no dogs near me when I entered the server.
  2. When I heard the hounds barking and left the game, and then I came in I died and the cause of death was Shenanigans.
  3. Something wrong with secondary foodtype

    Bearger eat berries because main foodtype of berries its FOODTYPE.VEGGIE. FOODGROUP = { OMNI = { name = "OMNI", types = { FOODTYPE.MEAT, FOODTYPE.VEGGIE, FOODTYPE.INSECT, FOODTYPE.SEEDS, FOODTYPE.GENERIC, FOODTYPE.GOODIES, }, }, BERRIES_AND_SEEDS = { name = "BERRIES_AND_SEEDS", types = { FOODTYPE.SEEDS, FOODTYPE.BERRY, }, }, BEARGER = { name = "BEARGER", types = { FOODTYPE.MEAT, FOODTYPE.VEGGIE, -- <------ here FOODTYPE.BERRY, FOODTYPE.GENERIC, }, }, MOOSE = { name = "MOOSE", types = { FOODTYPE.MEAT, FOODTYPE.VEGGIE, FOODTYPE.SEEDS, }, }, } And small bird don't eat berries. I also tryed set secondary foodtype manualy and small bird dont eat it too. I think the problem is that the code generally does not take into account the secondary foodtype.
  4. Berries should have secondary foodtype, but when i check it using conslole, it returns nil.
  5. I'm not sure that my comment will affect anything, but I think it’s worth leaving the concept of “Beaver the Lumberjack” to Woody and leaving the opportunity to eat a tree and get reason when planting cones. And I hope that its forms will be close to the topic of beavers.
  6. I need to use my mod on dedicated server, but code dont works, code is here: TheInput=GLOBAL.TheInput TheNet=GLOBAL.TheNet TheFrontEnd=GLOBAL.TheFrontEnd DragObjects={} AddModRPCHandler(modname,"DRAG",function(player,down,entity,mx,mz) if TheNet:GetClientTableForUser(player.userid).admin then if down then local x,y,z=entity.Transform:GetWorldPosition() local offset={x=x-mx,z=z-mz} DragObjects[player.userid]={entity=entity,offset=offset} else DragObjects[player.userid]=nil end end end) AddModRPCHandler(modname,"MOVE",function(player,mx,mz) if TheNet:GetClientTableForUser(player.userid).admin and DragObjects[player.userid]~=nil then local entity=DragObjects[player.userid].entity if not entity:IsValid() then return end local offset=DragObjects[player.userid].offset local x,y,z=entity.Transform:GetWorldPosition() entity.Transform:SetPosition(mx+offset.x,y,mz+offset.z) end end) local function IsHUDScreen() local screen=TheFrontEnd~=nil and TheFrontEnd:GetActiveScreen() or nil return screen and and type( == "string" and == "HUD" end DragKeyHandler = Class(function(self) self.last_isdown=false self.mousemove_handler_active=false self.handler = TheInput:AddKeyHandler(function() local down=TheInput:IsKeyDown(306) and TheInput:IsKeyDown(308) if not (self.last_isdown and down) and IsHUDScreen() then self.last_isdown=down if down and not self.mousemove_handler_active then local ent=TheInput:GetWorldEntityUnderMouse() if ent~=nil and ent:IsValid() then local pos=TheInput:GetWorldPosition() self.mousemove_handler_active=true SendModRPCToServer(MOD_RPC[modname]["DRAG"],down,ent,pos.x,pos.z) end elseif not down and self.mousemove_handler_active then self.mousemove_handler_active=false SendModRPCToServer(MOD_RPC[modname]["DRAG"],down) end end end) self.mousemove_handler=TheInput:AddMoveHandler(function() if self.mousemove_handler_active then local pos=TheInput:GetWorldPosition() SendModRPCToServer(MOD_RPC[modname]["MOVE"],pos.x,pos.z) end end) end) if TheNet:GetIsServerAdmin() and not TheNet:IsDedicated() then DragKeyHandler() end This code works on server with caves.
  7. How to check the player for administrator, this should be checked on the server.
  8. Okay i understand how do this. local function IsHUDScreen() local screen=GLOBAL.TheFrontEnd:GetActiveScreen() return screen and and type( == "string" and == "HUD" end
  9. I try to check the keystroke, but when I press the desired key on the text field, it works, IsPaused () determines only the pause, but not the presence of the text field.
  10. How to send entity to server

    Oh, it’s just that RCP does not transmit tables in its pure form, but I thought that if an entity is a table, then RCP will not transfer it either. Thanks.
  11. How to send entity to server

    I mean, how to let the server understand which object the client is referring to when sending the RPC.
  12. I need to send entity to server using RPC. How i can do this? Please help!
  13. inst.components.sanity.neg_aura_mult -- multiplier of negative aura inst:ListenForEvent("inducedinsanity", function(inst,val) --removing amulet effect if val then inst.components.sanity:SetInducedInsanity(inst, false) end end)
  14. I think you can make it using werebeast component. inst:AddComponent("werebeast") inst.transformthreshold=10 inst.components.werebeast:SetOnWereFn(function(inst) inst.transformthreshold=50 end) inst.components.werebeast:SetOnNormalFn(function(inst) inst.transformthreshold=10 end) inst:ListenForEvent("sanitydelta", function(inst, data) if inst.components.sanity.current<=inst.transformthreshold then --Do transform end end) Of course, you can implement it differently and maybe even do better, but I am not doing a full-fledged mod and it is not for me to think about it.
  15. Fixed boat radius

    I can't be sure it's bug or not, but boat radius fixed and this interfere to make moded boat with other radius.