Any idea how one might make a Harvest Moon game?

I have a general idea about how I want to do it, but there are some problems with the way I’m thinking about doing it. I was planning on have an FFarmTile struct that contained the functions to effect it, like till, water, harvest, etc. but you can’t make functions on a struct BlueprintCallable. I thought maybe I could make a BlueprintFunctionLibrary with the same functions that takes a pointer to a FFarmTile and just calls the function on it, but it seems you can’t take a pointer to struct in blueprints either.

The reason I want it to be a struct is to make it easier to save, and I want to be able to call the functions even if the level with the farmtiles isn’t open. So like, I was hoping to make a savegame class that just saves the array of farmtiles, and if it starts raining in the middle of the day or something, i could load the save, call the water function, and then save it again.

Also, the farmtiles need to know stuff about the crop they are growing, so I was planning on using a csv file as like a database of the crops and stuff, and saving the FName of the crop in the FFarmTile struct. But I’m not too sure how to pass the data to the struct.

I could just have the functions that need it accept the FCropData struct, but that seems like it would be kind of a pain. I’d need the actor that calls the function on the FFarmTile to get the FName of the crop it’s growing, look up the FCropData, then pass it into the function, so I’d rather the FFarmTile just look it up itself. So I was wondering if anyone might have any idea about how to give the FFarmTile easy access to the crop database?

Or if there’s like, a better way of storing the FarmTile data other than using a struct, that would be cool too. Thanks in advance for any help

I’d say a struct is the right way to go. You should make a manager class, maybe called FarmTileManager, that is responsbile for executing functions on tiles.

It could story a 2d array of farm tiles that represents the farmable area.

And instead of passing in a pointer to a struct, pass it by value, for example, UFarmTileManager::ModifyTile(FFarmTile& modifiedTile, modificationData);

I see. Thanks, I’ll take that into consideration clarkelapraire