Jump to content

Making non-diggable turf diggable


Recommended Posts

I've been exploring the code, to make mods and such, and I can't seem to find where it is that turfs are declared diggable or not with a pitchfork. Does anyone know where that could be done? I've checked the terrain, turfs, and terraforming lua files and none seem to be the right one.

Link to comment
Share on other sites

They aren't declared anywhere, because all turfs are meant to be diggable. That being said, the check for making sure a turf is diggable can be found in scripts/components/terraformer.lua:32 -> Terraformer:CanTerraformPoint(pt). You'll likely have to modify the function if you want to restrict turfs from being dug. 

Link to comment
Share on other sites

7 hours ago, penguin0616 said:

They aren't declared anywhere, because all turfs are meant to be diggable. That being said, the check for making sure a turf is diggable can be found in scripts/components/terraformer.lua:32 -> Terraformer:CanTerraformPoint(pt). You'll likely have to modify the function if you want to restrict turfs from being dug. 

What I want to do is actually the opposite: I want to unrestrict turfs. There's something about the DEEP rainforest turf (the red one with the canopy) that does not allow for it to be dug. There's a craftable version of the turf but with no canopy that can be both planed and dug, which makes me think it is possible to unrestrict the one with the canopy, in theory.

EDIT: I've spent the whole day trying to find out how to make this happen, to no avail. I found, however, a mod that allows me to edit and replace the terrain with other terrains (which are diggable) and at this point I think that's the best solution to get rid of unwanted terrains. Thanks anyway for the help!

Link to comment
Share on other sites

I'm assuming you're talking about Hamlet, and that "turf" you might be talking about is near pig ruins (looking at hamlet's terraformer "getbasetile"). That's most likely base tile, which is similar to "sand turf" in shipwreck and "no turf" in the base game. Put simply, it's just what the ground looks like with no turf object. An example:
A base tile would be equal to a tool with its base skin (shovel, gun, who knows?).
A turf tile would be equal to a tool with a skin on it.

Anyway, good thing you found that alternate route.

Link to comment
Share on other sites

On 5/12/2020 at 9:46 PM, penguin0616 said:

I'm assuming you're talking about Hamlet, and that "turf" you might be talking about is near pig ruins (looking at hamlet's terraformer "getbasetile"). That's most likely base tile, which is similar to "sand turf" in shipwreck and "no turf" in the base game. Put simply, it's just what the ground looks like with no turf object. An example:
A base tile would be equal to a tool with its base skin (shovel, gun, who knows?).
A turf tile would be equal to a tool with a skin on it.

Anyway, good thing you found that alternate route.

Yeah, I was referring to Hamlet. Sorry if I wasn't specific enough!

I figured that much in terms of how it works, but noticed the difference in tool behavior (the pitchfork won't show an action over sand/dirt whereas with the deep rainforest it has an action, animation, and even ''uses'' the tool and triggers dialog). That's why I thought it could be changed, somehow, to behave like a ''skinned'' tile as you accurately call it, but unfortunately couldn't figure out how to do it. Appreciate the help though!

Link to comment
Share on other sites

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...