Craftomation 101

Craftomation 101

View Stats:
MrSkinny Feb 23, 2024 @ 11:24pm
Can't "Find" on a tree?
I want to program a robot to search for a tree and then have a function to water it if needed. I can use the "Find" to search for a seed, but not a tree. Does this mean the only way to create a gardener bot is to manually store all the tree locations in variables and have him loop through them?
< >
Showing 1-5 of 5 comments
AEliasThorn Feb 24, 2024 @ 3:31am 
Currently this is similar to bonfires I suppose. Tree also needs a check if it is starving or not but except that its same as bonfire in terms of supply.

I created a function to feed two bonfires which accepts two coordinates as inputs. And have mates with 2-6 of these commands depending of distance between their targets and fire storage.
Azazel's Echo Feb 24, 2024 @ 4:08am 
Originally posted by MrSkinny:
manually store all the tree locations in variables and have him loop through them?

Pretty much yes, you can have bots look for wood only from sources but since furnaces also count as sources they will also pick wood from furnaces. So the only solution is to give them the exact coordinates of the trees and make them loop around those.

As an alternative I made a function that contains the coordinates of all the furnaces I've placed so that bots can compare the coordinates they're trying to pick the wood from and if it's the same as the furnaces coordinates then they move on to the next action preventing them from picking wood from the furnaces. But in this case there's a problem, when all wood has been harvested from trees they will get stuck comparing coordinates with the furnaces.

So far the only solution I've found is to actually store the coords of the trees and simply make them loop around those, but since you're not going to plant that many trees anyway it doesn't seem like a big deal anyway, in my case I used the visual capabilities of the game to place the trees coordinates variables in the same pattern as I planted the trees in the ground so it's easier for me to recognize which tree the bot is going to chop down next.

https://steamcommunity.com/sharedfiles/filedetails/?id=3167228018
rGlory Mar 19, 2024 @ 11:15am 
I just wrote a function with tree location and output storage as inputs, inside function it checks tree if it requires water feeds it, if it grown picks and place it into output or exit otherwise. So I repeat that function three times for a robot and pass three different three coords to it, works flawlessly.
Joman Mar 21, 2024 @ 11:10am 
For me it looks like the find function is not complete for now. Finding trees is a must, I think.
Joman Mar 21, 2024 @ 12:09pm 
No, "find tree" wouldn't help at all. The bot would find the nearest tree and then would ignore all other trees!
< >
Showing 1-5 of 5 comments
Per page: 1530 50