Changes

Jump to navigation Jump to search
→‎Relationships: note that you should run `debug houseUpgrade` with `debug marry` if needed
Line 1: Line 1:  
←[[Modding:Index|Index]]
 
←[[Modding:Index|Index]]
   −
<div style="border: 1px solid red; background: #FCC; padding: 1em; "><h4>Warning: Console commands can have permanent side effects on your save and are not meant for general use. If you do not understand the command, do not use it on a save you care about.</h4> <h3>You can permanently break your save.</h3></div>
+
{{note box|type=warning|text=<span style="font-size: larger;">'''Console commands aren't meant for general use. Be very careful using them.'''</span>
<br />
+
<br />They can have permanent side-effects on your save data, break your save, or have other unintended effects. If you don't understand the command, don't use it on a save you care about.'''
 +
}}
    
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.
 
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.
 +
 +
{{TOC}}
    
==Format used on this page==
 
==Format used on this page==
Line 33: Line 36:  
   |example =
 
   |example =
 
<pre>
 
<pre>
> list_items iridum object
+
> list_items iridium
 
  −
  type |              name |  id
  −
------ | ----------------- | ----
  −
Object |      Iridium Bar |  337
  −
Object |      Iridium Milk |  803
  −
Object |      Iridium Ore |  386
  −
Object | Iridium Sprinkler |  645
  −
</pre>
  −
}}
  −
{{/cmd
  −
  |command = list_item_types
  −
  |params  =
  −
  |desc    = Shows a list of item types that can be used with the <samp>list_items</samp> and <samp>player_add</samp> commands.
  −
 
  −
  |example =
  −
<pre>
  −
> list_item_types
     −
        type
+
                name |                    id
------------
+
-------------------- | ---------------------
BigCraftable
+
   Iridium Fireplace |              (F)1796
      Boots
+
       Iridium Krobus |              (F)2396
    Clothing
+
        Iridium Pan |      (H)IridiumPanHat
    Flooring
+
         Iridium Band |                (O)527
   Furniture
+
        Iridium Bar |                (O)337
        Hat
+
...
       Object
  −
        Ring
  −
         Tool
  −
  Wallpaper
  −
      Weapon
   
</pre>
 
</pre>
 
}}
 
}}
Line 80: Line 61:  
{{/cmd
 
{{/cmd
 
   |command = player_add
 
   |command = player_add
   |params  = {{t|S:item type}}, {{t|I:item ID}}, {{o|I:count}}, {{o|I:quality}}
+
   |params  = {{t|I:item ID}}, {{o|I:count}}, {{o|I:quality}}
   |desc    = Adds an item to your inventory based on its type and ID.
+
   |desc    = Adds an item to your inventory based on its item ID.
    
Parameters:
 
Parameters:
* {{t|S:item type}} is one of <samp>BigCraftable</samp>, <samp>Boots</samp>, <samp>Clothing</samp>, <samp>Flooring</samp>, <samp>Furniture</samp>, <samp>Hat</samp>, <samp>Object</samp>, <samp>Ring</samp>, <samp>Tool</samp>, <samp>Wallpaper</samp>, or <samp>Weapon</samp>.
+
* {{t|I:item ID}} is the unique ID for the item to add (as shown by the <samp>list_items</samp> command).
* {{t|I:item ID}} is the integer item ID (as shown by the <samp>list_items</samp> command).
   
* {{o|I:count}} is how many items to add to your inventory (defaults to 1).
 
* {{o|I:count}} is how many items to add to your inventory (defaults to 1).
 
* {{o|I:quality}} is the quality of the item to create (defaults to normal). This can be one of <samp>0</samp> (normal), <samp>1</samp> (silver), <samp>2</samp> (gold), or 4 (<samp>iridium</samp>).
 
* {{o|I:quality}} is the quality of the item to create (defaults to normal). This can be one of <samp>0</samp> (normal), <samp>1</samp> (silver), <samp>2</samp> (gold), or 4 (<samp>iridium</samp>).
   |example = <code>player_add object 246</code> will create a [[Wheat Flour]] item.;<code>player_add object pufferfish 10 4</code> would create 10 iridium-quality [[pufferfish]].
+
   |example = <code>player_add (O)246</code> will create a [[Wheat Flour|wheat flour]] item.;<code>player_add (O)128 10 4</code> would create 10 iridium-quality [[pufferfish]].
 
}}
 
}}
 
{{/cmd
 
{{/cmd
Line 262: Line 242:  
   |desc    = Provides documentation for console commands. If called without an argument, shows general help text and a list of available commands. If called with a command name, shows the documentation for that command.
 
   |desc    = Provides documentation for console commands. If called without an argument, shows general help text and a list of available commands. If called with a command name, shows the documentation for that command.
 
   |example =  
 
   |example =  
 +
}}
 +
{{/cmd
 +
  |command = log_context
 +
  |params  =
 +
  |desc    = Enables logging more contextual info like buttons pressed, menus changed, etc. For example, it can be used to get [[Modding:Player Guide/Key Bindings|key binding codes]] or to simplify troubleshooting. This is enabled until you restart the game, or run the command again to disable it.
 +
  |example =
 
}}
 
}}
 
{{/cmd
 
{{/cmd
Line 279: Line 265:  
   |params  =  
 
   |params  =  
 
   |desc    = Opens the [[Modding:Player Guide/Getting Started#Find your game folder|game folder]].
 
   |desc    = Opens the [[Modding:Player Guide/Getting Started#Find your game folder|game folder]].
  |example =
  −
}}
  −
{{/cmd
  −
  |command = test_input
  −
  |params  =
  −
  |desc    = Logs the [[Modding:Player Guide/Key Bindings|key codes]] for all button presses to the console for 30 seconds.
   
   |example =
 
   |example =
 
}}
 
}}
 
|}
 
|}
 +
 +
Mods may also add their own commands. For example, Content Patcher adds the <samp>patch</samp> command, documented [https://github.com/Pathoschild/StardewMods/blob/develop/ContentPatcher/docs/author-guide/troubleshooting.md here].
    
===Advanced===
 
===Advanced===
Line 324: Line 306:     
==Debug commands==
 
==Debug commands==
<div style="border: 1px solid red; background: #FCC; padding: 1em; "><h4>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.</h4>
+
{{note box|type=error|text=<span style="font-size: larger;">'''Don't use these commands unless you're aware of the possible consequences.'''</span><br />These are meant for the game developers, not players. They may crash your game, permanently corrupt or break your save, or cause other problems. Using these in a save you care about is not recommended.}}
 
  −
<h3>You can permanently break your save.</h3></div>
      
===How to enter debug commands===
 
===How to enter debug commands===
Line 414: Line 394:  
   |desc    = Outputs the parent sheet index (''i.e.,'' ID) of the specified object to the SMAPI console. Accepts only object names; this is not a fuzzy match but is case-insensitive and spaces should still be included (see examples below). If the requested name is not unique, all matching objects will be included in the output.
 
   |desc    = Outputs the parent sheet index (''i.e.,'' ID) of the specified object to the SMAPI console. Accepts only object names; this is not a fuzzy match but is case-insensitive and spaces should still be included (see examples below). If the requested name is not unique, all matching objects will be included in the output.
 
   |example = <code>debug lookup diamond</code> would output ''diamond 72''.; <code>debug lu strange doll</code> would output ''strange 126'' and ''strange 127''.
 
   |example = <code>debug lookup diamond</code> would output ''diamond 72''.; <code>debug lu strange doll</code> would output ''strange 126'' and ''strange 127''.
}}
  −
{{/cmd
  −
  |command = resource
  −
  |params  = {{o|I:type}},{{o|I:amount}}
  −
  |desc    = Marks specified amount of specified resource item as collected. This does not actually add any items but does increment some collection stats and may be useful for completing gathering quests. Valid types are 0 (copper), 2 (iron), 4 (coal), 6 (gold), 8 (coins), 10 (iridium), 12 (wood), and 28 (lantern fuel). Type 8 will increase your money by a random amount (rolls 10-49 and multiplies by the amount specified). {{upcoming|1.6.0|This command no longer exists.}}
  −
  |example =
   
}}
 
}}
 
{{/cmd
 
{{/cmd
Line 556: Line 530:  
{{/cmd
 
{{/cmd
 
   |command = pan
 
   |command = pan
   |desc    = Adds a [[Copper Pan]] to your inventory.
+
   |desc    = Adds a [[Pans|Copper Pan]] to your inventory.
 
}}
 
}}
 
{{/cmd
 
{{/cmd
Line 855: Line 829:  
   |command = profession
 
   |command = profession
 
   |params  = {{t|I:ID}}
 
   |params  = {{t|I:ID}}
   |desc    = Gives you the specified profession. Valid profesion IDs from the base game are shown below.
+
   |desc    = Gives you the specified profession. Note that this just hard adds the profession, it's not a way to switch skill trees. Valid profession IDs from the base game are shown below.
 
<table class="wikitable"><tr><th>Farming</th><th>Fishing</th><th>Foraging</th><th>Mining</th><th>Combat</th></tr>
 
<table class="wikitable"><tr><th>Farming</th><th>Fishing</th><th>Foraging</th><th>Mining</th><th>Combat</th></tr>
 
<tr><td>0 - Rancher</td><td>6 - Fisher</td><td>12 - Forester</td><td>18 - Miner</td><td>24 - Fighter</td></tr>
 
<tr><td>0 - Rancher</td><td>6 - Fisher</td><td>12 - Forester</td><td>18 - Miner</td><td>24 - Fighter</td></tr>
Line 1,248: Line 1,222:  
   |command = marry
 
   |command = marry
 
   |params  = {{t|S:npcName}}
 
   |params  = {{t|S:npcName}}
   |desc    = Increases your friendship with specified NPC by 2500 points (10 hearts) and sets relationship status to <samp>Married</samp> with an anniversary of today. Name is a fuzzy match. The spouse room generally appears empty on the first day and you'll need to sleep for it and your spouse to spawn properly. For non-vanilla marriage candidates:
+
   |desc    = <p>Increases your friendship with the specified NPC by 2500 points (10 hearts), and sets your relationship status to <samp>Married</samp> with an anniversary of today. Name is a fuzzy match.</p>
 +
 
 +
Notes:
 +
* If you haven't upgraded your farmhouse, also run <code>debug houseUpgrade 1</code> to avoid errors.
 +
* The spouse room generally appears empty on the first day and you'll need to sleep for it and your spouse to spawn properly.
 +
 
 +
For non-vanilla marriage candidates:
 
<ul><li>Trying to <samp>debug marry Krobus</samp> will work, but will set him as a spouse rather than a roommate. Most of his dialogue and actions remain the same, but he will use some hardcoded spouse lines where he would otherwise have his own version, have a heart instead of a smiley face for his hug/kiss sprite, and the social menu will list him as your spouse. It's unclear if you're able to have children this way.</li>
 
<ul><li>Trying to <samp>debug marry Krobus</samp> will work, but will set him as a spouse rather than a roommate. Most of his dialogue and actions remain the same, but he will use some hardcoded spouse lines where he would otherwise have his own version, have a heart instead of a smiley face for his hug/kiss sprite, and the social menu will list him as your spouse. It's unclear if you're able to have children this way.</li>
 
<li>For other non-marriageable villagers, an empty spouse room will spawn and the NPC will move in. They will follow a basic hardcoded spouse schedule and can be kissed (although they won't have a kiss sprite), but they will rarely have dialogue.</li></ul>
 
<li>For other non-marriageable villagers, an empty spouse room will spawn and the NPC will move in. They will follow a basic hardcoded spouse schedule and can be kissed (although they won't have a kiss sprite), but they will rarely have dialogue.</li></ul>
Line 1,528: Line 1,508:  
{{/cmd
 
{{/cmd
 
   |command = runtestevent,rte
 
   |command = runtestevent,rte
   |desc    = Runs an event from the file <code>test_event.txt</code> in the root game folder. The first line of the file should specify the location where the event takes place, and the rest of the file should be the same as a normal event script except that line breaks will be treated as <code>/</code> delimiters.
+
   |desc    = Runs an event from the file <code>test_event.txt</code> in the root game folder. The first line of the file should specify the location where the event takes place, and the rest of the file should be the same as a normal event script except that line breaks will be treated as <code>/</code> delimiters.<br />'''Note: this file must use CRLF (Windows-style) line breaks, or it will fail to parse.''' If you are on Mac or Linux, make sure you convert when saving (any text editor should be able to do this).
 
}}
 
}}
 
|}
 
|}
Line 1,596: Line 1,576:  
! &nbsp;
 
! &nbsp;
 
|-
 
|-
{{/cmd
  −
  |command = addquartz
  −
  |params  = {{t|I:number}}
  −
  |desc    = Spawns the specified amount of ''Quartz'' terrain features on the Farm. The locations are randomly chosen and no checking is done on the underlying tiles, so they may wind up in impassable areas.
  −
}}
   
{{/cmd
 
{{/cmd
 
   |command = clearfarm
 
   |command = clearfarm
Line 1,831: Line 1,806:  
   <li>Spawns a large field of random spring crops (force-grown for 8 days) with a wooden path through it and 4 junimo huts to the south.</li>
 
   <li>Spawns a large field of random spring crops (force-grown for 8 days) with a wooden path through it and 4 junimo huts to the south.</li>
 
   <li>Spawns two large patches of grass and 18 random fruit trees (cherry and apricot)</li>
 
   <li>Spawns two large patches of grass and 18 random fruit trees (cherry and apricot)</li>
   <li>Spawns large groups of torches, furnaces, preserve jars, cheese presses, and kegs; the kegs are full of ancient fruit to make wine</li></ul>
+
   <li>Spawns large groups of torches, furnaces, preserves jars, cheese presses, and kegs; the kegs are full of ancient fruit to make wine</li></ul>
 
}}
 
}}
 
{{/cmd
 
{{/cmd
Line 2,019: Line 1,994:  
   |params  = {{t|I:value}}
 
   |params  = {{t|I:value}}
 
   |desc    = Sets current time to the specified value. This is essentially 24-hour time without a colon, although the stardew clock keeps running until 2600. See examples.
 
   |desc    = Sets current time to the specified value. This is essentially 24-hour time without a colon, although the stardew clock keeps running until 2600. See examples.
   |example = <code>debug tme 2040</code> would set the time to 20:40 or 8:40pm.; <code>debug tme 2550</code> would set the time to 1:50am.
+
   |example = <code>debug time 2040</code> would set the time to 20:40 or 8:40pm.; <code>debug time 2550</code> would set the time to 1:50am.
 
}}
 
}}
 
{{/cmd
 
{{/cmd
Line 2,133: Line 2,108:  
{{/cmd
 
{{/cmd
 
   |command = netjoin
 
   |command = netjoin
   |desc    = Details unknown.
+
   |desc    = Calls up the farmhand menu. Details unknown.
 
}}
 
}}
 
{{/cmd
 
{{/cmd
Line 2,249: Line 2,224:  
{{/cmd
 
{{/cmd
 
   |command = sprinkle
 
   |command = sprinkle
   |desc    = Shows an animation of a sprinkle effect around the farmer. Unsure if the animation is used.
+
   |desc    = Shows an animation of a sprinkle effect around the farmer. (It's the animation used while fairy-dusting a machine).
 
}}
 
}}
 
{{/cmd
 
{{/cmd
Line 2,342: Line 2,317:  
! &nbsp;
 
! &nbsp;
 
|-
 
|-
{{/cmd
  −
  |command = bluebook
  −
  |desc    = Adds a "Farmer's Catalogue" to your inventory which looks like an axe and opens up a partially-implemented menu when used.
  −
}}
  −
{{/cmd
  −
  |command = blueprint
  −
  |params  = {{t|s:ID}}
  −
  |desc    = Adds the specified blueprint to the "Farmer's Catalogue" menu. IDs seem to be buildings and animals from <samp>Data/Blueprints</samp>.
  −
}}
  −
{{/cmd
  −
  |command = end
  −
  |desc    = Attempts to warp the player to town and start the "Stardew Hero Celebration" event but appears to crash due to missing music cues.
  −
}}
   
{{/cmd
 
{{/cmd
 
   |command = lantern
 
   |command = lantern
Line 2,366: Line 2,328:  
   |command = stoprafting
 
   |command = stoprafting
 
   |desc    = Sets an internal <samp>isRafting</samp> flag to false. As rafting was not fully implemented, this doesn't do much.
 
   |desc    = Sets an internal <samp>isRafting</samp> flag to false. As rafting was not fully implemented, this doesn't do much.
}}
  −
{{/cmd
  −
  |command = upgradebarn, barn
  −
  |desc    = {{upcoming|1.6.0|This command no longer exists.}} Increments an unused barn upgrade level variable (max 3).<br />'''Warning: This feature was not completely implemented and the game will crash on new day due to missing textures after using it.'''
  −
}}
  −
{{/cmd
  −
  |command = upgradecoop, coop
  −
  |desc    = {{upcoming|1.6.0|This command no longer exists.}} Increments an unused coop upgrade level variable (max 3).<br />'''Warning: This feature was not completely implemented and the game will crash on new day due to missing textures after using it.'''
   
}}
 
}}
 
|}
 
|}
translators
8,437

edits

Navigation menu