Stardew Valley
0 of 0

File information

Last updated

Original upload

Created by

RunoV

Uploaded by

RunoV

Virus scan

Safe to use

About this mod

Force a random nighttime event of your choice (e.g. meteorite, stone owl, animal birth, giant crops) to occur that night via command line.

Requirements
Permissions and credits
Changelogs
This is intended as a debugging tool for modders, but it can also be used a cheat tool. This should theoretically be safe for use in actual gameplay (as long as you keep EnforceEventConditions set to true; see below), but it hasn't been tested extensively.

Usage

Adds the following SMAPI console commands:

set_farmevent <event_type>

If you use this command any time before going to bed, an event of the type you specified will occur that night. Only one event can occur each night, so if you use this command twice, the second event will override the first.

Accepted event types:

  • capsule - a strange capsule will spawn on your farm
  • meteorite - a meteorite will spawn on your farm
  • wild_animal_attack - wild animals will kill one of your livestock trapped outside at night (this does nothing if you have no livestock trapped outside)
  • owl_statue - a stone owl statue will spawn on your farm
  • fairy - a fairy will grow some of your crops to maturity
  • witch - a witch will curse one of your coops or slime hutches
  • NPC_child_request - your NPC spouse will ask you if you want to have a child
  • PC_child_request - your PC spouse in a multiplayer game will ask you if you want to have a child
  • animal_birth - one of your livestock will give birth

spawn_giantcrop <x> <y> [<crop_ID>] [now]

Spawn a giant crop at a specified tile overnight, or immediately if you add now to the end of the command. You can use this command multiple times throughout the day, and all the giant crops will attempt to spawn overnight.

  • x and y are the tile coordinates that the giant crop will spawn at. (Giant crops take up 3x3 tiles; these are the coordinates of the center tile.) To find the coordinates of a tile, you can use the mod Debug Mode. Unless you add a crop_ID (see below), only a tile that contains a crop will be accepted, and the giant crop will be the same type as that preexisting crop.
  • crop_ID (optional) - The item ID of the base crop. You can find item IDs on the Modding:Object Data page of the wiki under "Raw Data" (it's the first number in quotation marks for each entry). For example, the item ID for pumpkin is 276. If you specify an item ID, you can spawn a giant crop anywhere, even where there isn't any normal crop growing.

    Note that CRFE does not check whether the item has a valid giant crop version; you can actually create a giant crop from most of the vanilla items (it will look like a cauliflower but produce the item you specified when destroyed). You can also create giant crops from crops added with Json Assets (use the command ja_summary to find the item ID (NOT the crop ID; the ID of the item the crop produces)), but if the crop does not have a giant version added by JA, you will get errors.

    crop_ID is only accepted if EnforceEventConditions is set to false, and the mod will not check for any existing objects or characters in the place the giant crop will spawn; it will simply spawn on top of any if they exist.
  • Add now to the end of the command to spawn the giant crop immediately instead setting it up to spawn overnight.

clear_giantcrops <from_when>

Clears all giant crops added by this mod within a certain time frame. Giant crops spawned naturally by the game are left alone.

Accepted values for from_when:
  • all - clears all giant crops ever added by this mod
  • yesterday - clears all giant crops spawned yesterday (including overnight)
  • today - clears all giant crops already spawned today
  • tonight - clears the list of giant crops set to spawn overnight

Config

EnforceEventConditions
: allowed values true, false; default true

If true, you are only allowed to set events that could naturally occur under the current game conditions (e.g. you can only use NPC_child_request if you are actually married to an NPC, you can only use capsule if you haven't gotten the strange capsule event before, you can only spawn giant crops in the middle of a 3x3 square of crops where the middle one is fully grown), and any game progression events (such as weddings and community center bundle completion) will override whatever custom event you set for the day. If the event you specify cannot occur, you will get a message explaining why in the SMAPI console.  See the random events page of the Stardew Valley wiki for info about the conditions under which each event can occur.

If false, this mod will try to execute the event you specify without checking any of the normal game conditions for the event, and override any other event that would have happened that night. If you set this to false, you may run into errors or miss important game progression events.

Notes

  • Works in multiplayer, but only set_farmevent commands from the host will actually do anything.
  • The event you choose for the day is guaranteed to occur that night (unless overriden by a game progression event), but some events may still fail to actually do anything when they occur. For example, the meteorite event randomly chooses a square of tiles and only actually spawns a meteorite there if that square is free of water, buildings, etc.; if the square it randomly chooses doesn't fulfill those requirements, nothing will happen. See the random events wiki page for more information.
  • This mod can spawn giant crops added by More Giant Crops and Json Assets, but it cannot check which crops have non-vanilla giant versions. Even if you have EnforceEventConditions set to true, if you have More Giant Crops or Json Assets installed, CFRE can't stop you from trying to spawn a crop that has no giant version, and if you do so, you may run into errors. You can use the clear_giantcrops command to clear any giant crops added by this mod that are giving you problems. (If you're getting a constant stream of errors to the SMAPI console, you may have to move to a different area in the game before you can use the command.)
  • This mod uses Harmony, so you will see a "These mods directly change the game code" warning when you start up SMAPI.


Source

Github