ADVANCED

Harvest Seasons DLC

Make a farming game: how the Harvest Seasons sample project works, from tools and crops to days, seasons and fishing.

Harvest Seasons is a DLC with a complete farming game sample: a farm, a house, tools, crops that grow day after day, trees, ores, fishing, seasons and a day and night cycle. This page shows how to play it, then how its events and data work, so you can use the same techniques in your own games.

Install the DLC#

  • Get Harvest Seasons Complete Edition (the project and graphics pack exist separately, but then you miss the musics and other content).
  • On Steam, enable the DLC: right click RPG Paper Maker in your library, Properties, DLC, and check it.
  • Other installations: put the DLC in the DLCs folder, or use Import DLC(s) on the home screen.

Then New project and choose Harvest Seasons as project type: the editor copies the sample project for you.

doc73.png

Playing#

The farm is the playable area, with a house to sleep in. A new game sets up the character (male or female), gives starting seeds and silver tools, and explains the controls:

  • Move with W A S D (or Z Q S D).
  • Left / Right arrows cycle through the tools; Enter uses the tool in the direction you face.

doc74.png

  • Hoe: clears the ground into tilled soil.
  • Seeds: plant on tilled soil. The choices depend on the current season, and planting uses a seed packet from the inventory.
  • Watering can: water the planted plots.
  • Sleep in the house to go to the next day. A watered seed grows at each day change, so keep watering it. Once ripe, use your hand to harvest it and collect what it drops. Some crops, like strawberries, keep producing after a harvest.
  • Axe: chop trees for wood. Pickaxe: mine ores. New ores appear while you sleep.
  • Fishing: face the water and wait for a bite. Success gives you a fish; a failure shows a miss.
  • The screen colors change smoothly through the day, and the textures change with the seasons. A shop sells seeds.

How it works#

Map startup and the HUD#

Open the farm's map properties, Map startup reactions:

  • A variable stores whether the farmer is male or female as 0 or 1. The male farmer graphics are ID 70 and the female ones ID 71, so 70 + variable always gives the right graphics, without conditions. This trick is used all over the project to keep things short.
  • The HUD common reaction updates what is shown on screen. It uses a few main variables: the tool type (a number for the selected tool), the time in seconds, the day number and the season. Display a picture/text shows the season, day and time (hours and minutes calculated from the time variable), and conditions show the equipped tool.

Changing tools#

In the Keyboard controls, the Left and Right keys are the "left tool" and "right tool" controls. In Systems manager > Models > Hero, the hero reacts to these key presses: it increases or decreases the tool type (looping between 0 and 6), then calls the HUD common reaction.

Using the hoe#

The hero's reaction to the Action key:

  1. It first sends the Hero action event to the front detection, with Store last object ID in variable. If something received it (an NPC), the hoe is not used. If the stored ID is -1, nothing was reached: the hoe can be used.
  2. It checks the terrain in front of the hero: terrain 0 is farmable ground (some autotiles have terrain 2 to forbid it).
  3. It animates the hero. The graphics ID is calculated from the gender variable and the tool level (0 copper, 1 silver, 2 gold, 3 diamond): the pictures are ordered in the Pictures manager so that a single Move object change graphics does it.
  4. Create object in map makes a tilled soil object from its model. It is marked Permanent, so it is saved and still there after leaving the map.

Using the hoe again on tilled soil removes it. Using the watering can changes the hero's graphics and creates a watered soil on top. The IDs of created objects are stored in the map properties, so they can be removed properly later.

doc75.png

Seeds and growth#

With seeds selected, the choices depend on the season, and the item IDs are ordered so the needed seed is found with a simple calculation. A seed object is created with its seed type, which gives its growing graphics.

The seed model has two properties, age and watered, and reacts to a user event Day passed, sent when the player sleeps: if watered, its age increases, then watered goes back to off, and the graphics are updated for the new age.

In its Hero action reaction, harvesting is only possible with the hand and a ripe plant. Plants that produce again go back to a younger age instead of being removed. A Loop creates as many drop objects as the seed type gives, bouncing out of the plant. The drop model is simple: it shows the item and adds it to the inventory when picked.

Sleeping and days#

The bed calls the Sleep common reaction:

  1. The time is set to 360 minutes (6:00 AM) and the day increases. After day 30, the season changes and the day goes back to 1.
  2. The screen fades to black and the hero is teleported to the farm, where the Day passed event is sent to every seed.
  3. The HUD and the music are updated for the new day.

A variable blocks the time updates during this transition. The farmhouse door object handles the transition between the two maps.

Trees, ores and random generation#

Trees work like seeds: Day passed makes them grow, and the axe changes the hero's graphics, then creates wood drops depending on the tree type.

When a new game starts, the farm's startup reactions place 20 random trees: random positions in local variables, a check that the terrain is right and that no object is already there, then Create object in map with a random age and type, in a loop until 20 trees are placed.

Ores use the same process in a Generate ores common reaction, called at the start of a new game and in the Sleep common reaction (two new ores each day).

Fishing#

Fish spots are objects placed in specific areas. On Day passed, each spot has a 50% chance to have a fish, of a random type. When fishing, the hero's graphics change, the game waits a random time, then a random number between 0 and 100 decides: lower than 80 means success (80% chance). The fish is shown on screen and added to the inventory.

Day and night, seasons#

  • The Screen color common reaction calculates the screen tone from the time variable: night colors from 8:00 PM to 6:00 AM, a transition to day between 6:00 and 8:00 AM, and to night between 6:00 and 8:00 PM. The night colors are variables with default values you can adjust.
  • Each map calls it every 2 seconds (a Time event with repeat), and also adds 5 minutes to the in-game time.
  • The Update seasons textures common reaction uses Switch texture depending on the season variable. It is called when entering each map, in the startup reactions.

Make it yours#

You now have a solid base to understand farming systems. Try adding:

  • crops that die when the season changes,
  • farm animals,
  • buildings to construct,
  • more shops, festivals, characters to befriend…