Line 1: |
Line 1: |
| ←[[Modding:Index|Index]] | | ←[[Modding:Index|Index]] |
| | | |
− | <div style="border: 1px solid red; background: #FCC; padding: 1em;">'''Warning: These commands are intended for testing and troubleshooting rather than general playing. Some have permanent side effects and may cause crashes or other problems.'''</div>
| + | SMAPI provides access to hundreds of console commands with a wide variety of effects, ranging from useful tools to cheats to specialized test commands. These are documented on this page. |
| + | |
| + | ==Format used on this page== |
| + | To avoid repeating text, this page uses a few conventions to convey common information: |
| + | |
| + | * Required parameters are listed in angle brackets, and optional parameters are listed in square brackets. For example, <code>speed</code> {{t|I:value}} {{o|I:duration}} means the command requires an integer value parameter and has an optional integer duration parameter. Details such as default values should be listed in the description. |
| + | * The command names are case-insensitive, but their parameters might be case-sensitive. |
| + | * If a command description says that a parameter uses "fuzzy" match, that means that it can match on a case-insensitive partial name. For example, <code>abi</code> would match Abigail if it's fuzzy. |
| + | |
| + | ==Console commands== |
| + | ===How to enter console commands=== |
| + | You must have the Console Commands mod installed to use the commands listed below. That mod is bundled with SMAPI; if you deleted it, just [[Modding:Player Guide|reinstall SMAPI]] to get the mod back. |
| | | |
− | Stardew Valley has hundreds of hidden debug commands which the developers use to test the game, documented on this page.
| + | You can enter console commands directly into the SMAPI console window (or into the in-game chat if you have {{nexus mod|2092|Chat Commands}} too). You can type <code>help</code> to get a list of console commands (including commands added by other mods). |
| | | |
− | ==Entering debug commands== | + | ==Debug commands== |
− | ===Individual commands=== | + | <div style="border: 1px solid red; background: #FCC; padding: 1em;">'''Warning: These commands are intended for testing and troubleshooting rather than general playing. Some have permanent side effects and may cause crashes or other problems.'''</div> |
− | To enter debug commands, you must install SMAPI (and not delete its bundled Console Commands mod). You can also install the {{nexus mod|2092|Chat Commands}} mod to use debug commands through the in-game chat (trying without it will either silently fail, or show the response ''ConcernedApe: Nice try...'').
| |
| | | |
− | Once that's done, you can type commands directly into the SMAPI console window (or chat if using Chat Commands). All of them should be prefaced with <code>debug </code> like this:
| + | ===How to enter debug commands=== |
| + | The game itself has hundreds of hidden debug commands used to test the game. These [[#Console commands|require the Console Commands mod]] too, but '''every command should be prefixed with <code>debug</code>''' like this: |
| <pre> | | <pre> |
| debug where Robin | | debug where Robin |
Line 18: |
Line 29: |
| | | |
| ===Macros=== | | ===Macros=== |
− | Multiple commands can be executed at once using the <tt>[[#runmacro|runmacro]]</tt> command:
| + | Instead of entering each command directly into the SMAPI console, you can also use the <tt>[[#runmacro|debug runmacro]]</tt> command to a list of debug commands from a text file. (This doesn't work with the non-debug commands.) Here's how to use it: |
− | # Create a text file in the [[Modding:Player Guide/Getting Started#Find your game folder|game folder]] (with a <tt>.txt</tt> extension). | + | |
| + | # Create a text file in [[Modding:Player Guide/Getting Started#Find your game folder|your game folder]] (with a <tt>.txt</tt> extension). |
| # Type commands in this file, one command per line. Each command should start with a slash character (<tt>/</tt>), but should not include <code>debug </code>. | | # Type commands in this file, one command per line. Each command should start with a slash character (<tt>/</tt>), but should not include <code>debug </code>. |
| # To run the macro, type <code>debug runmacro <filename></code> in the SMAPI console, replacing <tt><filename></tt> with the name of your command file without the <tt>.txt</tt> extension. | | # To run the macro, type <code>debug runmacro <filename></code> in the SMAPI console, replacing <tt><filename></tt> with the name of your command file without the <tt>.txt</tt> extension. |
Line 32: |
Line 44: |
| | | |
| Entering <code>debug runmacro quickstart</code> in the SMAPI console will execute all the commands, resulting in a backpack upgrade, money set to 10000g, farming skill set to level 1, and a [[Bone Sword]] added to the player's inventory. (Note: <tt>Money</tt> is capitalized in this example because if it is all lowercase it triggers a [[Secrets#Chat|special chat response]] instead of executing the command.) | | Entering <code>debug runmacro quickstart</code> in the SMAPI console will execute all the commands, resulting in a backpack upgrade, money set to 10000g, farming skill set to level 1, and a [[Bone Sword]] added to the player's inventory. (Note: <tt>Money</tt> is capitalized in this example because if it is all lowercase it triggers a [[Secrets#Chat|special chat response]] instead of executing the command.) |
− |
| |
− | ==Commands==
| |
− | All known commands are listed below. Required parameters are listed in angle brackets and optional parameters are listed in square brackets. For example, the speed command is listed as <code>speed</code> {{t|I:value}} {{o|I:duration}}, which means the command requires an integer value parameter and optionally has another integer duration parameter. Details such as default values should be listed in the description.
| |
− |
| |
− | The commands themselves are case-insensitive, but parameters may still be case-sensitive. If the description mentions that a parameter uses a "fuzzy" match, that means that it can match on a case-insensitive partial name. For example, any of the following 3 commands will set the player's [[friendship]] with [[Abigail]] to 500 points (2 hearts):
| |
− | * <code>friend Abigail 500</code>
| |
− | * <code>friend abi 500</code>
| |
− | * <code>friend gail 500</code>
| |
− |
| |
− | Many of the commands which accept an NPC name can also accept <tt>farmer</tt> to reference the player instead.
| |
| | | |
| ===Items and inventory=== | | ===Items and inventory=== |