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/Get Started

25 bytes added, 22:11, 9 August 2020
Decompile the game code: expand intro, copyedit a bit
===Decompile the game code===
When you start working on more complex mods, you may need It's often useful to look at see how the game code works.The game code is compiled into the <tt>StardewValley.exe</tt> (i.e. converted to a machine-readable format), but you can decompile it get a mostly-readable approximation of the original code. (This won't be fully functional due to decompiler limitations, but you'll be able to see what it's doing.) To decompile the game code:
To decompile the game code so you can read it (though it won't be fully functional due to decompiler limitations):
* On Windows:
*# Open <tt>StardewValley.exe</tt> in [https://www.jetbrains.com/decompiler/ dotPeek].
*# Right-click on ''Stardew Valley'' and choose ''Export to Project''. Accept the default options to create a decompiled project you can open in Visual Studio.
* On Linux/Mac:
*# Install [https://code.visualstudio.com/download Visual Studio Code] for your Operating System.
*# Get the [https://marketplace.visualstudio.com/items?itemName=icsharpcode.ilspy-vscode ILSpy .NET Decompiler] plugin for VSCode.
*# Open the Visual Studio Code Command Palette (<code>(Command+Shift+P)</code> ), then type <code>ilspy</code> to show the two commands.*# The <code>Choose ''Decompile IL Assembly (pick file)</code> command allows choosing an assembly using '', then choose the file picker dialog. The dialog should also allow one to type in the full path. Navigate to <tt>StardewValley.exe</tt> in your StardewValley Game Folder[[Modding:Player Guide/Getting Started#Find your game folder|game folder]].*# If the file is a valid .NET assembly, a A tree view named <tt>ILSPY DECOMPILED MEMBERS</tt> is added into should appear in the Explorer view. It allows expanding This lets you expand and selecting select various nodes, whose to see the decompiled C# code is shown in the editor.
To unpack the XNB data/image files, see [[Modding:Editing XNB files]].
Protected, translators
5,421
edits

Navigation menu