Modding:Modder Guide/Get Started

From Stardew Valley Wiki
< Modding:Modder Guide
Revision as of 16:17, 27 May 2018 by Pathoschild (talk | contribs) (move content from Modding:Creating a SMAPI mod (main author is Pathoschild, with note about VS for Mac by Hawkfalcon))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Modding:Modder Guide/Get Started/header

Do you want to create SMAPI mods for Stardew Valley? This guide is for you! For using mods, see Modding:Player Guide.

Intro

  • What is SMAPI?
    A SMAPI mod uses the SMAPI modding API to extend the game logic. You can run code when something happens (e.g. mouse clicked or menu opened), or periodically (e.g. once per game tick). SMAPI mods are written in C# using the .NET Framework. Stardew Valley also uses XNA (on Windows) or MonoGame (on Linux and Mac) for the fundamental game logic (drawing to the screen, user input, etc).
  • Can I make a mod?
    The next few sections will walk you through creating a very simple mod. If you follow along, you'll have created a mod! All that will be left is making it do what you want.
    • Scenario A: you're new to programming.
      Many mod developers start with little or no programming experience. You can certainly learn along the way if you're determined, but you should be prepared for a steep learning curve. Don't be too ambitious at first; it's better to start with a small mod when you're figuring it out. It's easy to become overwhelmed at first and give up. The modding community is very welcoming, so don't be afraid to ask questions!

      Since mods are written in C#, it's a good idea to get acquainted with it first. Some good resources are C# Quickstarts and C# Fundamentals for Absolute Beginners, will walk you through the basics of C# needed to write SMAPI mods, from the basic concepts to event-driven programming (which is what SMAPI mods use).

    • Scenario B: you already have programming experience.
      You should be fine. Programming experience in C# or Java will make things easier, but it isn't critical. If you're unfamiliar with C#, you can skim through C# Quickstarts and C# Fundamentals for Absolute Beginners to fill in any gaps.
  • Where can I get help?
    The Stardew Valley modding community is very welcoming; feel free to ask the community for help.

Requirements

Before you start:

  1. Read the player FAQs which answer common questions about Stardew Valley mods and troubleshooting.
  2. Install Stardew Valley.
  3. Install SMAPI.
  4. Install the IDE (integrated development environment):
    OS what to install notes
    Linux MonoDevelop
    Mac Visual Studio 2017 for Mac This is essentially MonoDevelop, don't be confused by the labeling.
    Windows Visual Studio 2017 Community When the installer asks about workloads, enable .NET Desktop Development.
    If you're not familiar with Visual Studio 2017 (on Windows/Mac) or MonoDevelop (on Linux), Modding:IDE reference explains how to do the important stuff you need for this guide.