Blueprint Name: Farming Blueprint
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
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.
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.
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.
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.
The package has two config scripts. Hover over a property to read the explanation tooltip.
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.
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)
- 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