Birdskull

  • Content Count

    52
  • Joined

  • Last visited

Community Reputation

14 Good

About Birdskull

  • Rank
    Junior Member
...

Recent Profile Visitors

764 profile views
  1. Thank you. That does seem to be what I'm missing, but now I'm having a problem of I can get the actions to occur OR I can have the animation play, but not both. Animation only plays if I also change the AddStategraphState to "wilson_client" but that doesn't work with the actions. Including AddStategraphActionHandler for both "wilson" and "wilson_client" results in neither working. Animation plays: Action occurs: Nothing happens: modmain.lua
  2. I borrowed the solution from this thread here: and it works just fine for the most part, but the animations only play for other players, not the one controlling the relevant character. Can anyone tell me why this is?
  3. Nah, you're good. It's not a separate file. common_postinit is local inside your character .lua. In the extended character template, you can find it under this comment: -- This initializes for both the server and client. Tags can be added here. I don't know off the top which line it's on in the unedited template, but here's a screenshot of what you're looking for
  4. No, I'm not using any other mods. I switched to a periodic spawner and that works a lot better. Any idea why it's still duplicating itself, though? I've tried both inst:RemoveComponent("periodicspawner") and inst.components.periodicspawner:Stop() but all I've managed to do is figure out several different ways to code the exact same failure. Still having issues with the jump animation not playing (though "jumpout" seems to work fine?). As you can see I tried StopMoving to pause and give the animation time to play, but nothing came of it so I think I'm doing something wrong. The character still only reappears part of the time. Tree shadows still force a reappearance. I feel like I'm running in circles. Current iteration: --Tunnelling local function Dig(inst) if inst:HasTag("playerghost") then return end inst:AddComponent("periodicspawner") inst.components.periodicspawner:SetPrefab("mole_move_fx") inst.components.periodicspawner:SetRandomTimes(.05, .1) inst.components.periodicspawner:SetDensityInRange(.05, .1) inst.components.periodicspawner:Start() end local function StopDig(inst) if inst:HasTag("playerghost") then return end inst:RemoveComponent("periodicspawner") end local function NotTunnelTime(inst, self) if inst:HasTag("playerghost") then return end SpawnPrefab("dirt_puff").Transform:SetPosition(inst.Transform:GetWorldPosition()) inst.components.locomotor:StopMoving(2) inst.AnimState:PlayAnimation("jumpout") inst.components.locomotor:SetExternalSpeedMultiplier(inst, "demogorgon_speed_mod", 1) inst:RemoveTag("tunnelling") inst:AddTag("untunnelling") inst.DynamicShadow:Enable(true) inst:Show() ChangeToCharacterPhysics(inst) end local function TunnelTime(inst, self) if inst:HasTag("playerghost") then return end SpawnPrefab("dirt_puff").Transform:SetPosition(inst.Transform:GetWorldPosition()) inst.components.locomotor:StopMoving(2) inst.AnimState:PlayAnimation("jump") inst.components.locomotor:SetExternalSpeedMultiplier(inst, "demogorgon_speed_mod", .25) inst:RemoveTag("untunnelling") inst:AddTag("tunnelling") inst.DynamicShadow:Enable(false) inst:Hide() inst.Physics:SetCollisionGroup(COLLISION.CHARACTERS) inst.Physics:ClearCollisionMask() inst.Physics:CollidesWith(COLLISION.WORLD) inst.Physics:CollidesWith(COLLISION.OBSTACLES) end local function OnKeyPressed(inst, data) if data.inst == ThePlayer then if data.key == KEY_T and inst:HasTag("tunnelling") then NotTunnelTime(inst) StopDig(inst) elseif data.key == KEY_T and inst:HasTag("untunnelling") then TunnelTime(inst) Dig(inst) end end end
  5. I have not tried it on a cave world yet, but I decided to try without SendRPCToServer and removed the aforementioned from my modmain entirely. Here's what I have in the character file, now. It's... almost working. Problems: - My speed modifiers aren't applying - "jump" animation doesn't appear to play - "inst:Hide()" is overridden any time the character walks under a tree. - The "mole_move_fx" prefab only spawns consistently if the character is in constant motion at the time of and following keypress - Sometimes the character just doesn't reappear I'm attaching the full WIP to this post. If anyone has the time and inclination to take a look at it in action, I'd be much obliged. I think I'm in need of a fresh pair of eyes more than anything. --Tunnelling local function NotTunnelTime(inst, self) if inst:HasTag("playerghost") then return end SpawnPrefab("dirt_puff").Transform:SetPosition(inst.Transform:GetWorldPosition()) inst.AnimState:PlayAnimation("jumpout") inst:RemoveTag("tunnelling") inst:AddTag("untunnelling") inst.DynamicShadow:Enable(true) inst:Show() end local function Dig(inst) if inst:HasTag("playerghost") then return end if inst:HasTag("tunnelling") then SpawnPrefab("mole_move_fx").Transform:SetPosition(inst.Transform:GetWorldPosition()) else return end end local function TunnelTime(inst, self) if inst:HasTag("playerghost") then return end SpawnPrefab("dirt_puff").Transform:SetPosition(inst.Transform:GetWorldPosition()) inst.AnimState:PlayAnimation("jump") inst:RemoveTag("untunnelling") inst:AddTag("tunnelling") inst.DynamicShadow:Enable(false) inst:Hide() inst:DoPeriodicTask(2, Dig) end local function OnKeyPressed(inst, data) if data.inst == ThePlayer then if data.key == KEY_T and inst:HasTag("tunnelling") then inst.components.locomotor:SetExternalSpeedMultiplier(inst, "demogorgon_speed_mod", 1) NotTunnelTime(inst) elseif data.key == KEY_T and inst:HasTag("untunnelling") then inst.components.locomotor:SetExternalSpeedMultiplier(inst, "demogorgon_speed_mod", .25) TunnelTime(inst) end end end local common_postinit = function(inst) -- Minimap icon inst.MiniMapEntity:SetIcon( "demogorgon.tex" ) inst:AddTag("monster") inst:AddTag("demogorgon") inst:AddTag("untunnelling") inst:AddComponent("keyhandler") inst:ListenForEvent("keypressed", OnKeyPressed) end Demogorgon.zip
  6. --I put in the purple moon overlay, but you can navigate to C:\Program Files (x86)\steam\steamapps\common\Don't Starve Together\data\images\colour_cubes and replace it with whatever best fits. local BEAVERVISION_COLOURCUBES = { night = "images/colour_cubes/purple_moon_cc.tex", } --Add these lines to your existing common_postinit inst.components.playervision:ForceNightVision(true) inst:AddTag("nightvision") inst.components.playervision:SetCustomCCTable(BEAVERVISION_COLOURCUBES)
  7. Hello. I'm working on a character that is supposed to be able to tunnel. I'm getting nowhere. Here's the current iteration of my efforts, but it does nothing. Modmain: Character: Component I haven't added the timer or effects yet, but my idea was to render the character sprite invisible at a key press and add an event that would create a trail of "mole_move_fx" following its movements until either the exit key was pressed or a timer ran out. Can anyone point out what I'm doing wrong, or suggest a better way of executing this?
  8. I'm trying to fix a bug in one of my mods, but I keep getting this error on the mod uploader. I thought maybe it was just a connection problem, and maybe it still is, but I'm not experiencing any other connection problems and have been trying to update at random intervals throughout the past two days with no changes. What I've tried so far: - "updating" my other mods by just changing the version number. Got the same error across the board. - restarting both my computer and steam, updating steam - verifying integrity of program files - uninstalling and reinstalling Don't Starve Mod Tools Any ideas? ModUploader.log
  9. Yes, I understand that, but I don't want the revived ghost animation to play at all. Instead I want the build to switch immediately upon haunting the deer, and then for the character build play the "wakeup" animation - like they do when haunting a touchstone. There's the haunt, a lightning strike, and then the player character stands up with the "wakeup" animation. These are the animations that play through when a ghost is revived: inst.AnimState:PlayAnimation("shudder") inst.AnimState:PushAnimation("brace", false) inst.AnimState:PushAnimation("transform", false) But I don't know how to tell it not to play these animations, and I'm failing to see what does so in resurrectionstone.lua resurrectionstone.lua possessed_deer.lua ghost_transform_overlay_fx.lua
  10. Thanks! After some digging I found the relevant animation (wakeup) in player_actions. Here's what I tried, but there's no change. local function OnHaunt(inst, haunter) if inst._task == nil and haunter:HasTag("oracle") then SpawnPrefab( "shadow_despawn").Transform:SetPosition(inst:GetPosition():Get()) haunter.AnimState:PlayAnimation("wakeup") inst:Remove() return true end end Log message: [00:02:59]: Could not find anim [wakeup] in bank [ghost] So, I guess the question is, how can I force it to skip the transformation animation and switch from the ghost to player build straightaway? Here's what it looks like right now...
  11. Hi there. One of the characters I have coded can attune deer to possess later as a resurrection option. Works great. The problem I'm stumped on is how to switch out the player animations. Right now it plays the ghost received heart transformation. I'd prefer the dazed corpse revival that results from using a touchstone. Can anyone point me in the right direction? How do I re-assign the correct animation? local function OnHaunt(inst, haunter) if inst._task == nil and haunter:HasTag("oracle") then SpawnPrefab( "shadow_despawn").Transform:SetPosition(inst:GetPosition():Get()) inst:Remove() return true end end inst:AddComponent('hauntable') inst.components.hauntable:SetHauntValue(TUNING.HAUNT_INSTANT_REZ) inst.components.hauntable:SetOnHauntFn(OnHaunt)
  12. Hi. The idea here is for the character - Wort - to be able to "infect" trees by giving them spores, resulting in them being replaced by mushroom trees. Everything was going according to plan until the transformation itself. I've colored the problem lines red. They're copied from beequeenhive, and searching the forum brought me to an older thread suggesting the very same code for a similar goal. I've tried phrasing it so many ways and no dice. Hoping some fresh eyes might lend their wisdom. Thanks for reading. Ah, the dangers of working into the small hours of the morning. The code is fine. The problem is the prefab name for the red mushtree is "mushtree_medium", not "mushroom_tree_medium." I just didn't notice because the line telling me so was above the error message, and my sleep deprived self never looked up. local function TradeSporesPostInit(inst) if not inst.components.tradable then inst:AddComponent("tradable")end end AddPrefabPostInit("spore_medium", TradeSporesPostInit) local function FungalInfectionPostInit(inst) local function ShouldAcceptItem(inst, item, giver) return item.prefab == "spore_medium" and giver.prefab == "wort" end local function OnGetItem(inst, giver, item) if item ~= nil and item.prefab == "spore_medium" then item:Remove() SpawnPrefab("spat_splash_fx_full").Transform:SetPosition(inst:GetPosition():Get()) inst.SoundEmitter:PlaySound("dontstarve/creatures/spat/spit_hit") inst.SoundEmitter:PlaySound("dontstarve/cave/mushtree_tall_grow_2") local x, y, z = inst.Transform:GetWorldPosition() inst:Remove() local infection = SpawnPrefab("mushroom_tree_medium") infection.Transform:SetPosition(x, y, z) end end inst:AddComponent("trader") inst.components.trader:SetAcceptTest(ShouldAcceptItem) inst.components.trader.onaccept = OnGetItem end AddPrefabPostInit("evergreen", FungalInfectionPostInit)