diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-11-01 17:42:18 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-11-01 17:42:18 -0400 |
commit | e0b72374cd14298aacc6f71dc391fdc9814be37c (patch) | |
tree | 2e5d85937c34539c1a0df48423b5136508693ca8 /docs | |
parent | 79118316065a01322d8ea12a14589ec016794c32 (diff) | |
parent | 089e6de749ae7cb109af00164d2597c6644c255e (diff) | |
download | SMAPI-e0b72374cd14298aacc6f71dc391fdc9814be37c.tar.gz SMAPI-e0b72374cd14298aacc6f71dc391fdc9814be37c.tar.bz2 SMAPI-e0b72374cd14298aacc6f71dc391fdc9814be37c.zip |
Merge branch 'develop' into stable
Diffstat (limited to 'docs')
-rw-r--r-- | docs/release-notes.md | 30 | ||||
-rw-r--r-- | docs/technical-docs.md | 107 |
2 files changed, 126 insertions, 11 deletions
diff --git a/docs/release-notes.md b/docs/release-notes.md index 99e771ce..1a9e4681 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -1,4 +1,32 @@ # Release notes +## 2.1 +* For players: + * Added a log parser at [log.smapi.io](https://log.smapi.io). + * Added better Steam instructions to the SMAPI installer. + * Renamed the bundled _TrainerMod_ to _ConsoleCommands_ to make its purpose clearer. + * Removed the game's test messages from the console log. + * Improved update-check errors when playing offline. + * Fixed compatibility check for players with Stardew Valley 1.08. + * Fixed `player_setlevel` command not setting XP too. + +* For modders: + * The reflection API now works with public code to simplify mod integrations. + * The content API now lets you invalidated multiple assets at once. + * The `InputEvents` have been improved: + * Added `e.IsActionButton` and `e.IsUseToolButton`. + * Added `ToSButton()` extension for the game's `Game1.options` button type. + * Deprecated `e.IsClick`, which is limited and unclear. Use `IsActionButton` or `IsUseToolButton` instead. + * Fixed `e.SuppressButton()` not correctly suppressing keyboard buttons. + * Fixed `e.IsClick` (now `e.IsActionButton`) ignoring custom key bindings. + * `SemanticVersion` can now be constructed from a `System.Version`. + * Fixed reflection API blocking access to some non-SMAPI members. + * Fixed content API allowing absolute paths as asset keys. + * Fixed content API failing to load custom map tilesheets that aren't preloaded. + * Fixed content API incorrectly detecting duplicate loaders when a mod implements `IAssetLoader` directly. + +* For SMAPI developers: + * Added the installer version and platform to the installer window title to simplify troubleshooting. + ## 2.0 ### Release highlights * **Mod update checks** @@ -18,7 +46,7 @@ SMAPI 2.0 adds several features to enable new kinds of mods (see [API documentation](https://stardewvalleywiki.com/Modding:SMAPI_APIs)). - The **content API** lets you edit, inject, and reload XNB data loaded by the game at any time. This let SMAPI mods do + The **content API** lets you edit, inject, and reload XNB data loaded by the game at any time. This lets SMAPI mods do anything previously only possible with XNB mods, and enables new mod scenarios not possible with XNB mods (e.g. seasonal textures, NPC clothing that depend on the weather or location, etc). diff --git a/docs/technical-docs.md b/docs/technical-docs.md index d37d327d..37ec7f69 100644 --- a/docs/technical-docs.md +++ b/docs/technical-docs.md @@ -3,16 +3,25 @@ This file provides more technical documentation about SMAPI. If you only want to use or create mods, this section isn't relevant to you; see the main README to use or create mods. -## Contents -* [Development](#development) - * [Compiling from source](#compiling-from-source) - * [Debugging a local build](#debugging-a-local-build) - * [Preparing a release](#preparing-a-release) -* [Customisation](#customisation) - * [Configuration file](#configuration-file) - * [Command-line arguments](#command-line-arguments) - * [Compile flags](#compile-flags) - +# Contents +* [SMAPI](#smapi) + * [Development](#development) + * [Compiling from source](#compiling-from-source) + * [Debugging a local build](#debugging-a-local-build) + * [Preparing a release](#preparing-a-release) + * [Customisation](#customisation) + * [Configuration file](#configuration-file) + * [Command-line arguments](#command-line-arguments) + * [Compile flags](#compile-flags) +* [SMAPI web services](#smapi-web-services) + * [Overview](#overview) + * [Log parser](#log-parser) + * [Mods API](#mods-api) + * [Development](#development-2) + * [Local development](#local-development) + * [Deploying to Amazon Beanstalk](#deploying-to-amazon-beanstalk) + +# SMAPI ## Development ### Compiling from source Using an official SMAPI release is recommended for most users. @@ -135,3 +144,81 @@ SMAPI uses a small number of conditional compilation constants, which you can se flag | purpose ---- | ------- `SMAPI_FOR_WINDOWS` | Indicates that SMAPI is being compiled on Windows for players on Windows. Set automatically in `crossplatform.targets`. + + +# SMAPI web services +## Overview +The `StardewModdingAPI.Web` project provides an API and web UI hosted at `*.smapi.io`. + +### Log parser +The log parser provides a web UI for uploading, parsing, and sharing SMAPI logs. The logs are +persisted in a compressed form to Pastebin. + +The log parser lives at https://log.smapi.io. + +### Mods API +The mods API provides version info for mods hosted by Chucklefish, GitHub, or Nexus Mods. It's used +by SMAPI to perform update checks. The `{version}` URL token is the version of SMAPI making the +request; it doesn't do anything currently, but lets us version breaking changes if needed. + +Each mod is identified by a repository key and unique identifier (like `nexus:541`). The following +repositories are supported: + +key | repository +------------- | ---------- +`chucklefish` | A mod page on the [Chucklefish mod site](https://community.playstarbound.com/resources/categories/22), identified by the mod ID in the page URL. +`github` | A repository on [GitHub](https://github.com), identified by its owner and repository name (like `Zoryn4163/SMAPI-Mods`). This checks the version of the latest repository release. +`nexus` | A mod page on [Nexus Mods](https://www.nexusmods.com/stardewvalley), identified by the mod ID in the page URL. + + +The API accepts either `GET` or `POST` for convenience: +> ``` +>GET https://api.smapi.io/v2.0/mods?modKeys=nexus:541,chucklefish:4228 +>``` + +>``` +>POST https://api.smapi.io/v2.0/mods +>{ +> "ModKeys": [ "nexus:541", "chucklefish:4228" ] +>} +>``` + +It returns a response like this: +>``` +>{ +> "chucklefish:4228": { +> "name": "Entoarox Framework", +> "version": "1.8.0", +> "url": "https://community.playstarbound.com/resources/4228" +> }, +> "nexus:541": { +> "name": "Lookup Anything", +> "version": "1.16", +> "url": "http://www.nexusmods.com/stardewvalley/mods/541" +> } +>} +>``` + +## Development +### Local development +`StardewModdingAPI.Web` is a regular ASP.NET MVC Core app, so you can just launch it from within +Visual Studio to run a local version. + +There are two differences when it's run locally: all endpoints use HTTP instead of HTTPS, and the +subdomain portion becomes a route (e.g. `log.smapi.io` → `localhost:59482/log`). + +Before running it locally, you need to enter your credentials in the `appsettings.Development.json` +file. See the next section for a description of each setting. This file is listed in `.gitignore` +to prevent accidentally committing credentials. + +### Deploying to Amazon Beanstalk +The app can be deployed to a standard Amazon Beanstalk IIS environment. When creating the +environment, make sure to specify the following environment properties: + +property name | description +------------------------------- | ----------------- +`LogParser:PastebinDevKey` | The [Pastebin developer key](https://pastebin.com/api#1) used to authenticate with the Pastebin API. +`LogParser:PastebinUserKey` | The [Pastebin user key](https://pastebin.com/api#8) used to authenticate with the Pastebin API. Can be left blank to post anonymously. +`LogParser:SectionUrl` | The root URL of the log page, like `https://log.smapi.io/`. +`ModUpdateCheck:GitHubPassword` | The password with which to authenticate to GitHub when fetching release info. +`ModUpdateCheck:GitHubUsername` | The username with which to authenticate to GitHub when fetching release info. |