Jump to content

Treeguard Question


Recommended Posts

First off, why isn't there a thread for "ask questions that require one reply and don't justify their own thread"?

 

Second, I am unsure of how treeguard behavior works. I want to get a pacified treeguard trapped in the same area as my evil flowers so I can have a safe sanity drain on my Maxwell world. Maybe a second treeguard in my base with a Koalefant so it can have a friend as well.

 

If I have a treeguard and pacify it with pinecones, is it permanently pacified? What about reloading the game? Will it break walls in a pacified state? 

Link to comment
https://forums.kleientertainment.com/forums/topic/30208-treeguard-question/
Share on other sites

to pacify it lure it to a spot place pinecones and viola, a tree thats actually a treeguard in disguise

 

i don't think It will break walls when pacified it'll just look for a possible exit

 

I do believe it gets up after a while but I'm unsure, if you are wondering if it will attack you then nope, only if you cut a tree within view of it

to pacify it lure it to a spot place pinecones and viola, a tree thats actually a treeguard in disguise

 

i don't think It will break walls when pacified it'll just look for a possible exit

 

I do believe it gets up after a while but I'm unsure, if you are wondering if it will attack you then nope, only if you cut a tree within view of it

Once you plant enough pinecone in an area it ill plant itself down and never move from it's spot until you either attack it or chop a tree down.

to pacify it lure it to a spot place pinecones and viola, a tree thats actually a treeguard in disguise

 

i don't think It will break walls when pacified it'll just look for a possible exit

 

I do believe it gets up after a while but I'm unsure, if you are wondering if it will attack you then nope, only if you cut a tree within view of it

 

 

Once you plant enough pinecone in an area it ill plant itself down and never move from it's spot until you either attack it or chop a tree down.

 

 

When you reload the game he will start walking around so make sure to wall him in.

 

 

I can vouch if you don't plan enough pine cones/reload they did get up and walk...anybody know though what that "enough" amount is initially for planting (before reloading) is? 

I can vouch if you don't plan enough pine cones/reload they did get up and walk...anybody know though what that "enough" amount is initially for planting (before reloading) is? 

Each planted pine cone has a random chance to pacify it if that's what you're asking...

Guess I gotta do trial and error figuring out the amount to plant to keep them rooted, here's hoping for a Treeguard setpiece then...

1000 seconds, also known as 16 minutes and 40 seconds.

 

Oh, well. It never gets up for me unless reloading, so I can't say...

Based on the code for the treeguard, it was supposed to keep sleeping after reloading the save. It stores how long it should keep sleeping in the save file and all. However, the "OnLoad" callback for the treeguard is bugged, restoring the sleep time the wrong way.

For the ones who know Lua, the current code is

local onloadfn = function(inst, data)    if data and data.hibernate then        inst.components.sleeper.hibernate = true    end    if data and data.sleep_time then         inst.components.sleeper.testtime = data.sleep_time    end    if data and data.sleeping then              inst.components.sleeper:GoToSleep()    endend

while the correct way would be

local onloadfn = function(inst, data)    if data and data.hibernate then        inst.components.sleeper.hibernate = true    end    if data and data.sleeping then              inst.components.sleeper:GoToSleep(data.sleep_time or 0)    endend

It's possible that the Sleeper component changed across updates and they forgot to update the treeguard code.

1000 seconds, also known as 16 minutes and 40 seconds.

 

Based on the code for the treeguard, it was supposed to keep sleeping after reloading the save. It stores how long it should keep sleeping in the save file and all. However, the "OnLoad" callback for the treeguard is bugged, restoring the sleep time the wrong way.

For the ones who know Lua, the current code is

local onloadfn = function(inst, data)    if data and data.hibernate then        inst.components.sleeper.hibernate = true    end    if data and data.sleep_time then         inst.components.sleeper.testtime = data.sleep_time    end    if data and data.sleeping then              inst.components.sleeper:GoToSleep()    endend

while the correct way would be

local onloadfn = function(inst, data)    if data and data.hibernate then        inst.components.sleeper.hibernate = true    end    if data and data.sleeping then              inst.components.sleeper:GoToSleep(data.sleep_time or 0)    endend

It's possible that the Sleeper component changed across updates and they forgot to update the treeguard code.

 

Got it, thanks....never had a problem admitting my code inquiries stunk, so you're a lifesaver! 

When Treeguards are pacified, they'll stay planted until the next morning and wake up. They'll get up during the day and replant during the night. Only after you've p***ed it off and pacified it, this is.

 

Source: For the last 100 days or so before I deleted my save, I had a pet Treeguard.

When Treeguards are pacified, they'll stay planted until the next morning and wake up. They'll get up during the day and replant during the night. Only after you've p***ed it off and pacified it, this is.

 

Source: For the last 100 days or so before I deleted my save, I had a pet Treeguard.

Staying planted is their sleep animation, so that makes sense...

The easy way to drop sanity is simply to wander in darkness. When it's pitch black put some log armour on and walk away from / towards a fire. Each time you enter pitch darkness your sanity plummets. As soon as you hear Grue, run back to the fire. Even if Grue hits you you'll be ok for at least one hit with armour on and full health.

 

One important detail of pacifying Treeguards that no-one's mentioned: the closer you are to the treeguard, the greater the chance of pacifying it. I usually run to only a couple of yards away from the Treeguard then keep planting pinecones until he's pacified. It takes only 1 or 2 pinecones this way ?every? time.

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...