Changes

Jump to navigation Jump to search
→‎Console commands: + items, money, and player
Line 15: Line 15:     
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).
 
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).
 +
 +
===Items & money===
 +
{| class="wikitable"
 +
|-
 +
! command
 +
! description
 +
! &nbsp;
 +
|-
 +
{{/cmd
 +
  |command = list_items
 +
  |params  = {{o|S:search text}}
 +
  |desc    = Shows a list of every item in the game (including those added by mods). The optional search text limits results to those which have all of the search words somewhere in their ID + type + name.
 +
 +
  |example =
 +
<pre>
 +
> list_items iridum object
 +
 +
  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 <tt>list_items</tt> and <tt>player_add</tt> commands.
 +
 +
  |example =
 +
<pre>
 +
> list_item_types
 +
 +
        type
 +
------------
 +
BigCraftable
 +
      Boots
 +
    Clothing
 +
    Flooring
 +
  Furniture
 +
        Hat
 +
      Object
 +
        Ring
 +
        Tool
 +
  Wallpaper
 +
      Weapon
 +
</pre>
 +
}}
 +
{{/cmd
 +
  |command = player_add name
 +
  |params  = {{t|S:item name}}, {{o|I:count}}, {{o|I:quality}}
 +
  |desc    = Adds an item to your inventory based on its name.
 +
 +
Parameters:
 +
* {{t|S:item name}} is the default or translated item name to spawn.
 +
* {{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 <tt>0</tt> (normal), <tt>1</tt> (silver), <tt>2</tt> (gold), or 4 (<tt>iridium</tt>).
 +
  |example = <code>player_add name "Galaxy Sword"</code> will create a Galaxy Sword.; <code>player_add name "Stir Fry" 10 4</code> will create 10 iridium-quality [[Stir Fry|stir fry]] dishes.
 +
}}
 +
{{/cmd
 +
  |command = player_add
 +
  |params  = {{t|S:item type}}, {{t|I:item ID}}, {{o|I:count}}, {{o|I:quality}}
 +
  |desc    = Adds an item to your inventory based on its type and ID.
 +
 +
Parameters:
 +
* {{t|S:item type}} is one of <tt>BigCraftable</tt>, <tt>Boots</tt>, <tt>Clothing</tt>, <tt>Flooring</tt>, <tt>Furniture</tt>, <tt>Hat</tt>, <tt>Object</tt>, <tt>Ring</tt>, <tt>Tool</tt>, <tt>Wallpaper</tt>, or <tt>Weapon</tt>.
 +
* {{t|I:item ID}} is the integer item ID (as shown by the <tt>list_items</tt> command).
 +
* {{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 <tt>0</tt> (normal), <tt>1</tt> (silver), <tt>2</tt> (gold), or 4 (<tt>iridium</tt>).
 +
  |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]].
 +
}}
 +
{{/cmd
 +
  |command = player_setmoney
 +
  |params  = {{t|I:amount}}
 +
  |desc    = Changes the player's total money to the given amount of gold.
 +
  |example = <code>player_setmoney 5000</code> will change your total money to 5000g.
 +
}}
 +
|}
 +
 +
===Player===
 +
{| class="wikitable"
 +
|-
 +
! command
 +
! description
 +
! &nbsp;
 +
|-
 +
{{/cmd
 +
  |command = player_changecolor
 +
  |params  = {{t|S:feature}}, {{t|S:color}}
 +
  |desc    = Sets a color for your character's sprite.
 +
 +
Parameters:
 +
* {{t|S:feature}} is one of <tt>hair</tt>, <tt>eyes</tt>, or <tt>pants</tt>.
 +
* {{t|S:color}} is an RGB color, specified as three comma-separated channels from 0 (no color) to 255 (max color).
 +
 +
  |example = <code>player_changecolor eyes 255,0,0</code> would make your character's eyes red.
 +
}}
 +
{{/cmd
 +
  |command = player_changestyle
 +
  |params  = {{t|S:target}}, {{t|I:style ID}}
 +
  |desc    = Sets a style for your character's sprite.
 +
 +
Parameters:
 +
* {{t|S:target}} is the part of the player's style to change. This is one of <tt>hair</tt>, <tt>shirt</tt>, <tt>skin</tt>, <tt>acc</tt> (accessory), <tt>shoe</tt>, <tt>swim</tt> (whether the player is wearing a swim suit), or <tt>gender</tt>.
 +
* {{t|I:style ID}} is the integer ID for the style to use. For <tt>swim</tt>, this can be <tt>0</tt> (not in a swim suit) or <tt>1</tt> (in a swim suit). For <tt>gender</tt>, this can be <tt>0</tt> (male) or <tt>1</tt> (female).
 +
 +
  |example = <code>player_setstyle swim 1</code> would change the player into their swim suit.
 +
}}
 +
{{/cmd
 +
  |command = player_sethealth
 +
  |params  = {{t|I:amount}}
 +
  |desc    = Sets the player's current [[health]].
 +
  |example = <code>player_sethealth 200</code> would give you 200 health points.
 +
}}
 +
{{/cmd
 +
  |command = player_setimmunity
 +
  |params  = {{t|I:amount}}
 +
  |desc    = Sets the player's total [[immunity]]. This is permanent and is affected by immunity buffs. For example, if you set immunity 10 while [[Genie Shoes]] (+6 immunity) are equipped, removing the shoes would set your immunity to 4 (10 - 6). You can reset immunity to normal by removing everything that improves immunity, then entering <code>player_setimmunity 0</code>.
 +
  |example = <code>player_setimmunity 10</code> would you 10 immunity points, or a 100% chance of avoiding buff effects.
 +
}}
 +
{{/cmd
 +
  |command = player_setmaxhealth
 +
  |params  = {{t|I:amount}}
 +
  |desc    = Sets the player's maximum [[health]]. This permanently changes the baseline; for example, if you set your max health to 500 and then drink [[Iridium Snake Milk]], your max health will increase to 525.
 +
  |example = <code>player_setmaxhealth 500</code> would give you a maximum of 500 health points.
 +
}}
 +
{{/cmd
 +
  |command = player_setmaxstamina
 +
  |params  = {{t|I:amount}}
 +
  |desc    = Sets the player's maximum [[energy|stamina]]. This permanently changes the baseline; for example, if you set your max stamina to 300 and then collect a [[Stardrop]], your max stamina will increase to 334.
 +
  |example = <code>player_setmaxhealth 500</code> would give you a maximum of 500 health points.
 +
}}
 +
{{/cmd
 +
  |command = player_setname
 +
  |params  = {{t|S:target}},{{t|S:name}}
 +
  |desc    = Sets the name of the current player or their farm, depending on the {{t|S:target}} value (<tt>player</tt> or <tt>farm</tt>).
 +
  |example = <code>player_setname player Malon</code> would change your player name to Malon.;<code>player_setname farm "Lon Lon"</code> would change your farm name to Lon Lon Farm.
 +
}}
 +
{{/cmd
 +
  |command = player_setstamina
 +
  |params  = {{t|I:amount}}
 +
  |desc    = Sets the player's current [[energy|stamina]].
 +
  |example = <code>player_setstamina 200</code> would give you 200 stamina points.
 +
}}
 +
|}
    
==Debug commands==
 
==Debug commands==
translators
8,447

edits

Navigation menu