New Animal Tracks Won't Spawn Unless The Player Murders Said Animal Or Server Restarts

  • Pending

New animal tracks will not spawn unless these two actions occurs:

  1. The animal at the end of the track is murdered.
  2. The server shutdowns, "restarting" the hunter component, which may not be possible on dedicated servers OR you just don't do this cause you never knew.

This is an issue for people who like to make pens/zoos (like Koalefant, Ewecus, Vargs, and now Volt Goat pens/zoos), where unless you knew this information, you might wonder why new tracks weren't spawning for you. 

The cause of this is I believe is the SpawnHuntedBest function in hunter.lua [located at lines 367-402], where the respawn timer for the tracks (aka StartCooldown) will not occur unless the animal is murdered (the OnBeastDeath function).

if hunt.huntedbeast ~= nil then
            --print("Kill the Beast!")
            hunt.huntedbeast.Physics:Teleport(spawn_x, spawn_y, spawn_z)
            local function OnBeastDeath()                       <------------- THIS FUNCTION RIGHT HERE?
                inst:RemoveEventCallback("onremove", OnBeastDeath, hunt.huntedbeast)
                hunt.huntedbeast = nil
                StartCooldown(inst, hunt)                         <-------------- COOLDOWN ONLY STARTS AFTER MURDERING THE ANIMAL

            inst:ListenForEvent("death", OnBeastDeath, hunt.huntedbeast)
            inst:ListenForEvent("onremove", OnBeastDeath, hunt.huntedbeast)

            return true

One concern is that a potential fix may make it so that its only one animal tied to each unique player & that no more tracks would spawn for that player, which would not be so great because of zoos/pens, as mentioned above.

My suggestion, if possible, is to instead just check if the animal was successfully spawned & then start the dirtpile cooldown rather than having to murder the animal to initiate said cooldown. That way the server doesn't have to be shutdown for new tracks to spawn & animals can be saved for zoos/pens (if possible of course).

I never knew this until a few days ago & it made total sense why I was struggling with getting new tracks to spawn, so much thanks to @splorange, @HobNob, & @Sunset Skye for making me aware of this issue.



Steps to Reproduce

LongUpdate(480*2)  --This is to ensure the animal tracks spawn, timer-wise. LongUpdates do properly spawn new tracks, so that's not a concern.

Walk around a little bit until new tracks spawn. c_gonext("dirtpile") till you get the animal, and then pen it.

Do another LongUpdate(480*2) and see that no matter how long you wait or walk around, a new track won't spawn.

Shutdown the server, do another LongUpdate(480*2) to ensure the track spawn, see that you've got a new track.

  • Like 3

User Feedback

.... ....

I was was hunting for vargs recently and couldn't find a single track all day so this makes sense. Turns out it was because i had a few Koalefants in my world already from previous hunts. Thanks for the post, until it's fixed i at least know how to work around it.

  • Like 1

Share this comment

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now