Stardew Valley

[Forgive the awful title name, Nexus does not allow me to have commas in the title]

As a map maker, you may want to have the ability to have ores, berries, stumps, logs, and more to spawn on your custom farm map. This can be done within MTN by setting the "ResourceClumps" tag for Stumps, Logs, and Boulders, the "Foraging", for berries, mushrooms and various other natural items, and the "Ores" for Ores and Geodes to spawn on your custom farm map.

All three tags share very similar layout configuration in the farmType.json file. However, slight variations and functions do exists. I will provide an example for a few, and cover the (oh so slight) differences between foraging, ores, and resource spawning in terms of functionality. Afterwords, I will provide an ID list for everything. Take note that this may feel like a lot, as the spawning rules are very flexible.

Lets say I want to have my custom farm spawn Red Mushrooms completely across the map once every 5 in-game days, and only during the Fall. I want it to guarantee to spawn, with a range of 5 to 10 mushrooms. In addition, I want the spawn amount to double when it rains. The json entry would look like this:

  "Foraging": {
"ResourceList": [
{
  "ItemId": 420,
  "Seasons": "Fall",
  "Boundary": "areaBound",
  "MapWide": true,
  "Chance": 1.0,
  "AmountMin": 5,
  "AmountMax": 10,
  "RainAmount": {
"Additive": 0.0,
"Multipler": 2.0
  },
  "CooldownMin": 5,
  "CooldownMax": 0,
  "SkillLevel": 0
}
],
  }


With this example, there is quite a few fields. Much more than the other articles you've seen. This is just one of the many possibilities of spawning rules on your custom farm. The json tag break down is as such:

ItemId - The Item ID pertaining to the item you want to spawn. A list of all IDs are included at the bottom. (In Alpha 7, you'll be able to use the names instead, if you want).
Seasons - One of the 15 possible seasonal combinations. A list of all the season combinations will be listed at the bottom.
Boundary - The main rule set the item will follow. Either pathTileBound, areaBound, or noSpawn.
MapWide - Allows the item to spawn in any "legal" tile (clear, and does allow spawning). 
Chance - The probability the item may spawn. 1.0 represents 100%. 0.15 would represent 15%. 0.0333 would represent 3.33%.
AmountMin - The minimum amount that will spawn. 
AmountMax - The maximum amount that will spawn. If set to 0, then the value stored in AmountMin will always occur.
RainAmount : Additive - Adds a set amount to both AmountMin and AmountMax when rain occurs the next day.
RainAmount : Multipler - Multiples the set amount to both AmountMin and AmountMax when rain occurs the next day.
CooldownMin - The minimum amount of in-game days that must pass for the spawn to trigger again.
CooldownMax - The maximum amount of in-game days that must pass for the spawn to trigger again. If set to 0, then the value stored in CooldownMin MUST pass before the spawn triggers again.
SkillLevel - The level a particular skill must be at for the item to spawn. For Foraging and Resource, this relates to the skill "Foraging". For Ores, this relates to the skill "Mining".

Now, for a second item, lets say I want logs to spawn within a particular area of the farm. This area starts at [20, 20], and ends at [75, 45]. It is NOT Mapwide (as mapwide would cause MTN to ignore the area boundary), and it occurs all year long. The probability is 60% chance to spawn, and the Cooldown is 2 to 4 days. In addition, the player must have a Foraging level of 5. It will always*** spawn 6 when it does occur. On the new year, the spawn rate should quadruple. On the new month, 4 more stumps should spawn. The json entry for ResourceClumps would look like this:

(*** In the case that a lot has been built on the spawning area, or the player did not chop the logs that previously spawned. MTN will try certain amount of attempts in spawning the items. After awhile, it will give up and continue on. This is to prevent obnoxious amount of wait time for the players. The default setting is 10 tries times the amount to be spawned.)

"ResourceClumps": {
"ResourceList": [
{
  "ItemId": 602,
  "Seasons": "allYear",
  "Boundary": "areaSpawn",
  "AreaBinding": {
"X": 20,
"Y": 20,
"Width": 55,
"Height": 25
  },
  "Chance": 0.6,
  "AmountMin": 6,
  "AmountMax": 0,
  "NewMonthAmount": {
"Additive": 4.0,
"Multipler": 0.0
  },
  "NewYearAmount": {
"Additive": 0.0,
"Multipler": 4.0
  },
  "CooldownMin": 2,
  "CooldownMax": 4,
  "SkillLevel": 5
}
],
  },


Breaking over the json tags, and not repeating myself from the previous example:

AreaBinding - The Area the spawn is restricted to. If set, and if not set to MapWide, it may not spawn outside this area.
NewMonthAmount : Additive - Adds a certain amount to AmountMin and AmountMax. Occurs on the turn of a new month (ie Spring, to Summer). If AmountMax is set to 0, it will only add to AmountMin.
NewMonthAmount : Multipler - Multiples by a given value to AmountMin and AmountMax. Occurs on the turn of a new month. If AmountMax is set to 0, it will only multiply AmountMin.
NewYearAmount : Additive - Adds a certain amount to AmountMin and AmountMax. Occurs on the turn of a new year. If AmountMax is set to 0, it will only add to AmountMin.
NewYearAmount : Multipler - Multiples by a given value to AmountMin and AmountMax. Occurs on the turn of a new year. If AmountMax is set to 0, it will only multiply AmountMin.

Take note, ResourceClumps will assume the item needs a 2 by 2 grid area to spawn, unlike Ores and Foraging which only need a single tile. This is the last minor difference between the three sets, excluding the valid Item Ids and what SkillLevel looks at. Also, it should go without saying that you cannot put an item id of an ore into foraging. It will be ignored.

For my last example, I want Iridium Nodes to spawn at specific tiles in the path layer. The player must also have a mining skill of 10. The chance the item will spawn is 30%. But on the turn of a new month, the chance is bumped to 50%. This occurs all year long. The tile in path is must spawn on goes by the Id of "20" on the tilesheet. It also spawns every 10 days.

  "Ores": {
"ResourceList": [
{
  "ItemId": 765,
  "Seasons": "allYear",
  "Boundary": "pathTileBound",
  "TileBinding": 20,
  "Chance": 0.3,
  "NewMonthModifier": {
"Additive": 0.2,
"Multipler": 1.0
  },
  "CooldownMin": 10,
  "CooldownMax": 0,
  "SkillLevel": 10
}
],
  }

The json tag breakdown:
NewMonthModifier : Additive - Adds to the value of Chance on the turn of a new month.
NewMonthModifier : Multipler - Multiples the value of Chance on the turn of a new month. (Be sure to do your math right with this one!)

There are a few json tags I did not use in the options. But to cover them all, a brief descriptions of the ones not used in the three examples is listed:

  "RainModifier": {
"Additive": 0.0,
"Multipler": 1.0
  "NewYearModifier": {
"Additive": 0.0,
"Multipler": 1.0
  },


RainModifier : Additive - Adds to the value of Chance when it rains.
RainModifier : Multipler - Multiples the value of Chance when it rains.
NewYearModifier : Additive - Adds to the value of Chance on the turn of a new year.
NewYearModifier : Multipler - Multiples the value of Chance on the turn of a new year.

***NOTE: Modifiers and Amount Additives/Multipliers are scheduled to be in MTN2-Alpha7, which will be released shortly. Implementing them now will automatically enable them when its released.

The options avilable for "Seasons". There are 15 possible values:

allYear,
springOnly,
summerOnly,
fallOnly,
winterOnly,
notWinter,
notFall,
notSummer,
notSpring,
firstHalf,
secondHalf,
springFall,
summerWinter,
springWinter,
summerFall

Item Ids:

Resource:

600 = Stump
602 = Log
672 = Rock

Ores:

Diamond = 2
Ruby = 4
Jade = 6
Amethyst = 8
Topaz = 10
Emerald = 12
Aquamarine = 14
Gem Node = 44
Mystic Stone = 46
Geode Node = 75
Frozen Geode Node = 76
Magma Geode Node = 77
Steel Node = 290
Copper Node = 751
Gold Node = 764
Iridium Node = 765

Foragable:

16: Wild Horseradish
18: Daffodil
20: Leek
22: Dandelion
88 : Coconut
90 : Cactus Fruit
257: Morel
259: Fiddlehead Fern
281: Chanterelle
283: Holly
396: Spice Berry
398: Grape
402: Sweet Pea
404: Common Mushroom
406: Wild Plum
408: Hazelnut
410: Blackberry
412: Winter Root
414: Crystal Fruit
416: Snow Yam
418: Crocus
420: Red Mushroom
422: Purple Mushroom

Article information

Added on

Edited on

Written by

Deleted54100067User

0 comments