___________________________________________________________________________________________________________________________
Console Code lets you write and execute C# code from the SMAPI console.
Install
Use
Short snippets
You can run code directly in the SMAPI console using the cs command. You can separate multiple expressions with ;. If the last expression returns a value, it'll be shown in the SMAPI console.
For example:
cs Game1.player.Money = 5000; Game1.player.currentLocation.Name <br />> Output: "FarmHouse"
You can't use double quotes (") directly in the console (due to the SMAPI command parser), but you can replace them with backticks (`).
Script files
You can load a block from a file in Console Code's folder. The script must not include using statements, class declarations, etc.
For example, let's say you have this sell-items.cs file in the mod folder:
foreach (var item in Game1.player.items) <br />{ <br /> if (item == null) <br /> continue; <br /> Game1.player.money += item.salePrice(); <br /> Game1.player.removeItemFromInventory(item); <br />}
You can execute it like this:
cs --script sell-items.cs
Compatibility
Compatible with Stardew Valley 1.5+ on Linux/macOS/Windows, both single-player and multiplayer.
See also
About Project
Created: September 8th 2023
Updated: September 8th 2023
Project ID: 58506
License: All Rights Reserved
__________________________________________
Game Versions:
1.01.03
1.01.03
1.01.03
1.01.03
1.01.03
__________________________________________
Flavors:
WoW Retail
__________________________________________
Categories
Companions
Battle
__________________________________________
Main File
September 8th 2023
__________________________________________
Recent File
September 8th 2023
__________________________________________
Members
__________________________________________
Report