Skip to content

ThatNorthernMonkey/Stardew-Revolution

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project Details

Stardew Revolution is the new in-development API intended to replace SMAPI!

##My First Build

Building the project for the first time can seem a little daunting given the number of projects and no doubt countless missing references you'll see but be unable to resolve. Fear not, it only takes about as many steps as SMAPI to be up and running! :)

  1. Fix missing references to Stardew Valley (do not touch the Stardew Revolution references) and xTile. These will be located in: Libraries/Revolution, Mods/ModLoaderMod (xTile only)

  2. Build the project "BuildTasks/BuildRevolutionFinal", this should have fixed all reference errors and built the API in /WorkingDirectory. Intermediate build binaries will be in /Bin

  3. To ease your workflow, copy the Stardew Valley Contents folder into /WorkingDirectory. You are now ready to start working on the API! :)

  4. For your reference, Stardew Revolution.int1.dll is generated by BuildRevolutionIntermediate. This bundles together the Revolution core code into Stardew Valley. This is then used by second pass build libraries such as Revolution UI so it can take advantage of methods injected into Stardew during the first pass.

##Working on the core API

The core API is located inside Libraries/Revolution. For changes to this library to be reflected, you'll need to manually trigger BuildRevolutionFinal. Alternatively you can add BuildRevolutionFinal as a build dependency to Tools/RevolutionDebugger. This is not done as default as it would lower iteration times for developers working on mods - who do not need to constantly rebuild the API.

Note, that if you are working on both Revolution and a second-pass API library (Revoluton UI), you will need to manually build BuildRevolutionIntermediate to fix intellisence reference warnings. However, these warnings can just be ignored and will do away upon trigging a final build if the code is correct.

##Build Tasks

These projects are responsible for handling build flow.

  • BuildRevolutionIntermediate packages Revolution Core into Stardew and applies the appropriate hooks. This is the project you should click "Rebuild" on when altering the engine, as it will force all builds to trigger in the correct order.

  • BuildRevolutionFinal packages the projects dependent on the results of BuildRevolutionIntermediate into Stardew and produces the final Stardew Revolution.exe

##Installers

  • Revolution Installer - Console (EXE). This runs RevolutionPatcher, expecting the Stardew Valley and Stardew Revolution files to be adjacent to it.

  • Revolution Installer - UI (EXE). This runs RevolutionPatcher too. Once it's complete, this will be the file we actually distribute out. It should automatically bundle the required binaries (Revolution, RevolutionUI, RevolutionPatcherCommon, RevolutionPatcherFirstPass, RevolutionPatcherSecondPass) and extract them at runtime. At the final stages, this should allow for updated binaries to be fetched from the internet.

##Mods

  • Logging Mod (DLL). A mod, just used to log events when they fire

  • Mod Loader Mod (DLL). A mod which will provide ingame loading and unloading of other mods.

  • Test Content Mod (DLL). This mod demonstrates using manifests to make a content only mod. As I wanted it to automatically put it's files in the right place, it's a class library with a post-build action to delete the empty .DLL and .PDB

  • Jumino Deposit Mod (DLL). A test functional mod. This is mainly used to test UI event callbacks, and address crash issues.

##Libraries

  • RevolutionPatcherCommon/FirstPass/SecondPass. These are used by the installer.They are separated into their own libraries to prevent conflicts due to the missing (not yet built) Stardew Revolution intermediate

  • Revolution (DLL). The core code which is injected into Stardew

  • RevolutionUI (DLL). This is an extension of Revolution which provides easy to use overrides for the inbuild UI classes.

##Tools

  • Revolution Debugger (EXE). Just serves as an entry point for me to step through and debug StardewR code in the event I inject something incorrectly. This should be set as your startup project when not debugging the build process.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%