Stardew valley type till soil

Godot Version

v4.2.2.stable.official

Question

hello, im looking to get some help on a problem im having with my game, im very new to godot and fairly new to coding in general, i have a character that can move around and pickup berrys off bushes, but im trying to create a farming game, would anyone be able to help explain or point me in the direction of how i could go about detecting the tile infront of the player and changing it to create tilled soil? i assume it would also require setting up some sort of auto tile that way the plot actually has the proper borders around it, would this even be feesable for someone as new as me? should i just stick with placing the plots for the player right now? thanks for the help, Cheers!

Edit: forgot to mention i only would want the soil to be tilled once the player presses the correct action button

There’s a tilemap function local_to_map() that lets you convert from local coords to tilemap coords. I learned this recently from a YT video by Jackie Codes. Episode 4 of her tilemap tutorial has somethign similar to what you want except she’s using the mouse coords. But it shouldn’t be too much trouble to follow along and modify to do similar with player position instead. The series covers autotiles, and creating soil and planting seeds.

1 Like

awesome ill look into this, thank you