This wiki is a read-only version of the Stardew Valley Wiki. The official editable wiki maintained by ConcernedApe can be found at stardewvalleywiki.com

Changes

Jump to: navigation, search

Modding:Modder Guide/APIs/Utilities

41 bytes removed, 00:56, 28 May 2018
tweak structure for new page, rm old version note
{{../../header}}
==Utilities==
SMAPI provides some C# objects you can use to simplify your code.
===Constants===
The <tt>Constants</tt> class provides metadata about SMAPI and the game.
|}
===Context===
The <tt>Context</tt> class provides information about the game state and player control:
|}
===Dates===
Use <tt>SDate</tt> for calculating in-game dates. You start by creating a date:
<source lang="c#">
|-
| <tt>DaysSinceStart</tt>
| '''[SMAPI 2.2+]''' The number of days since the first day, inclusively (i.e. 01 spring Y1 = 1).
|}
===Semantic versions===
Use <tt>SemanticVersion</tt> to manipulate and compare versions per the [http://semver.org/ Semantic Versioning 2.0 standard]. Example usage:
<source lang="c#">
Protected, translators
5,421
edits

Navigation menu