Be sure to join the Klei team on our official Twitch channel, where we will be playing and talking about the recently released Update 217524 for Don't Starve Together! As always, the stream will be going live on Thursday, May 25th at 3:30 PM Pacific (10:30 PM UTC), only on the Rhymes with Play Dev Cast. Where is it?
On our official Twitch channel here:
10:30 PM UTC (Coordinated Universal Time)
6:30 PM ET (East)
5:30 PM CT (Central)
4:30 PM MT (Mountain)
When is it?
Thursday, May 25th at 3:30 PM Pacific (10:30 PM UTC). Here's a handy tool to figure out what time that means for you:
http://www.worldtimebuddy.com Check out the update thread for more details and for discussions!
Search the Community
Showing results for tags 'bernie'.
Found 6 results
So, I know that you need to have animation files imported and then selected when to play what. For the inactive bernie, things are laid out pretty straight forward, since him being inactive means only two animations (beaten up and normal idle). For the active version, you have multiple ones, like 5 or so, not entirely sure, yet, in the bernie_active.lua there is only one animation declared and it's in fn: inst.AnimState:PlayAnimation("idle_loop") So... where exactly is the code that applies all of the other animations including trottling taunt animation, walking animation, waking up animation, getting hit animation etc.?
Say I have 2 bernies and a player check that I am working with. I want to add a piece of code that would allow a bernie to check whether a player already has a bernie following (essentially trying to make it so that only one bernie can follow a player at a time). Any idea how I would create this check? I'm not sure how I would add that to this function exactly (this is in berniebrain.lua):
One of the strengths of Willow is nightmare farming. If you have few bernies (or I would preffer 10), have a hambat, couple of helms and a nightmare amulet, the profit for the fuel is huge compared to soloing without an amulet or soloing with it. I know some chars kills them in like few hits, the least you loose by using Bernie strat is just a small amount of helm (or not), some durabilily of Bernies (which are easilly fixable with sewing kits), and the amulet. This strat makes a use for regaining sanity fast, getting nightmare fuel without much cost and doing it alone. The preffered season would be spring, just having a fire large enough is fine (or a star), morning star just wrecks the nightmares one by one while they are wet. Takes as long as you want it to be, you can make a bunch of Bernies for other people to do that if, unless you solo as Willow, which will gonna make nightmare fuel rain for days, quite cheap for a strat too.
Trying to set it up so that the damage that Bernie gets from shadow creatures is also applied to shadow creatures themselves. And, subsequently so that they would also teleport within a radius of Bernie upon attacking him, just like they do when a player attacks them. I've looked through many OnBlocked functions, from scalemail, to cactus picking to even single player's SW cactus armor damage, but NOTHING works! This is my final code that I've come down to: local function OnAttacked(inst, data) if data.attacker ~= nil and data.attacker.components.combat and data.attacker:HasTag("shadow") then data.attacker.components.combat:GetAttacked(inst, data.attacker.components.damage) --data.attacker.components.health:DoDelta(data.attacker.components.damage) data.attacker.components.combat:SetTarget(data.attacker) data.attacker.components.combat:ShareTarget(data.attacker, 30, ShareTargetFn, 1) end end And it doesn't work. Does anybody have any idea as to why and how I could fix it? Mind you, I'm still using that "make a copy of an original file into the mod and edit it" strat, so this code is placed within berniebrain.lua.
I'm trying to make bernie activate and be active only when Willow is insane. I successfully made it so that he doesn't activate for characters that are now Willow, but there is a bug in relation to reanimating when Willow is insane. I added this code (with "end" being placed where appropriate): if v.prefab == "willow" then Underneath "for i, v in ipairs(AllPlayers) do" for both bernie_active.lua: local function tryreanimate(inst) local target = nil local rangesq = 256 --[[16 * 16]] local x, y, z = inst.Transform:GetWorldPosition() for i, v in ipairs(AllPlayers) do if v.prefab == "willow" then if v.components.sanity:IsCrazy() and v.entity:IsVisible() then local distsq = v:GetDistanceSqToPoint(x, y, z) if distsq < rangesq then rangesq = distsq target = v end end end end if target ~= nil then local active = SpawnPrefab("bernie_active") if active ~= nil then --Transform fuel % into health. active.components.health:SetPercent(inst.components.fueled:GetPercent()) active.Transform:SetPosition(inst.Transform:GetWorldPosition()) inst:Remove() end end end and berniebrain.lua: local function FindLeader(self) self._leader = nil local rangesq = LOSE_LEADER_DIST_SQ local x, y, z = self.inst.Transform:GetWorldPosition() for i, v in ipairs(AllPlayers) do if v.prefab == "wollow" then if v.components.sanity:IsCrazy() and v.entity:IsVisible() then local distsq = v:GetDistanceSqToPoint(x, y, z) if distsq < rangesq then rangesq = distsq self._leader = v end end end end end return self._leader end Yet, for some reason, Bernie wakes up for 2 - 3 seconds and then sits back down again and keeps doing that over and over, deactivating and activating when he should just be active. This code is written inside copied files of bernie_active.lua and berniebrain.lua from the actual game (there is a reason as to why I'm simplifying this for myself and not using modmain.lua almost at all, but that's besides the point). I also indented any functions and variables related to decaying for Bernie in bernie_inactive.lua. And yes, I was standing next to him when he did that, in fact he does that whilst I'm standing right on top of him as Willow!