Farming Blueprint

Blueprint Name: Farming Blueprint
Creator: Vilva#9953
Itch Page: Farming Blueprint by Vilva for Crayta $50,000 Build Jam - THEME: LIVING CITY - itch.io

Plant crops and watch them grow. Harvest plants and sell them in the shop. Includes an optional water system, which will make unattended crops wither. Plants grow (and wither) while the user is away.

This package is based on the Tycoon blueprint. New scripts and templates are prefixed with “Farming”. Tycoon entities that weren’t relevant for this type of game have been removed.

🛠 INSTALLATION INSTRUCTIONS
  • Create a new game and search for “Farming Blueprint”

💡 PACKAGE OVERVIEW
Player Areas

Each player has an area assigned to them. You can only plant crops and harvest plants in your own area. You can however water other players plants.

In your area you can purchase soil entities. This Blueprint supports setting different prices for each soil, to enable a more natural player progression.

To get started purchase the soil in the top left corner of your area.

Planting Crops

Buy a seed from the shop and select the seed in your inventory. Then interact with one of your empty soil entities. If you are near a crop a widget will show the current status of the plant.

Watering Crops

You start the game with a Watering Can item in your inventory. Select the Watering Can and hold Left-Click near a crop to distribute water. At the bottom left you can see how much water is left in the can. If you run out of water you have to go near the Watering Tank to refill your water.

Withering System

Crops have an optional property “needsWater”. If this property is set they have a water bar displayed. If the water runs out they will wither and you won’t earn any rewards for harvesting them.

Harvesting Crops

Crops will keep growing until they reach a mesh scale of 1. Then they are ready to harvest and you will be rewarded with an item. You can sell these items in the shop.


⚙️CONFIGURATION GUIDE

The package has two config scripts. Hover over a property to read the explanation tooltip.

FarmingConfig

FarmingConfig is a general config. Here you can specify the starting size of crops “startPlantScale”. You can also specify how much water the watering can hold. Additionally you can change effects, sounds and UI messages.

FarmingPlantConfigs

This config is to specify the different crop types. Each crop has a “FarmingPlantConfig” script attached.

Crops consist of 3 stages

  • Seed - The seed you buy in the shop
  • Plant - The plant that grows from the seed
  • Fruit - The item you get after you harvest the plant

Below I show you how to add a new crop type.

Configuration: Adding a new crop type

Select “FarmingPlantConfigs” and add a new “FarmingPlantConfig” script

  • Set the plant name (must be unique)
  • Set the plant icon by dragging a mesh from the left side to the script property
  • Drag the “SeedCorn” template into your game. Break the template link and change the following properties: MeshAsset, friendlyName, iconAsset. Make a new template and reference it in your “FarmingPlantConfig”
  • Drag the “PlantCorn” template into your game. Break the template link and change the MeshAsset property. Make a new template and reference it in your “FarmingPlantConfig”
  • Drag the “FruitCorn” template into your game. Break the template link and change the following properties: MeshAsset, friendlyName, iconAsset, SellPrice. Make a new template and reference it in your “FarmingPlantConfig”
  • If you want to use the water system, make sure to set a “witheredMesh”. The other properties should be self explanatory

Select the shop and add a new “shopBuyItemScript”

  • Select the seed template you just created
  • This enables players to buy the new plant seed and use it in the game

ℹ️ Creator Challenges and Activities
  • farming-crop - Called when you plant a crop
  • farming-collect - Called when you harvest a plant (not withered)

©️ CREDITS
  • Special thanks to cykocys for making the “Stamina Plus” package. The UI bars in this blueprint are based on that package
  • Special thanks to Russ for the “Grow Gun” Livestream which inspired the plant growth mechanic

If you have any questions or feedback, reach out to me (Vilva#5980) in the Crayta Discord :slight_smile:

Screenshots

3 Likes

Yay! Thank you for this Vilva! It’s good busy work in-game. Plant care, selling, buying. Wonderful useful package! I am picking places to deploy this for players!

2 Likes