生产者框架 Mod 封面

生产者框架 Mod

星露谷物语模组工具

为生产物品添加自定义规则的框架。支持代码和内容包接口。

预览

前置 Mod

详情

目标:

创建一个简单的方法来向游戏中添加新的生产规则。

安装:

  1. 安装最新版本的 SMAPI。
  2. 将生产者框架 Mod 解压到 /Stardew Valley/Mods。

更新日志:

1.9.8

  • 修复了当鼠标悬停在由 PFM 生成的物品上时,由于内容包被移除而缺少翻译键导致的错误。

1.9.7

  • 修复了当输入不是对象或机器不可见时,不允许任何其他 mod 补丁工作的问题。

1.9.6

  • 禁用了在 SV 1.6.9 中损坏的光源功能。
  • 修复了加载没有名称的生产者时的异常。

1.9.5

  • 修复了上一版本的空引用错误。

1.9.4

  • 法语 i18n -(感谢 Caranud)
  • 修复了带有 ShowNextIndexWhileWorking 的原版机器在加载 PFM 规则时未显示适当帧的问题,即使它们没有覆盖它的 ProducerConfig。
  • 修复了带有 ClearContentOvernightCondition 的原版机器如果具有 NoInputStartMode 配置,则不会在夜间清除的问题。

1.9.3

  • 修复了料斗与原版和 PFM 机器的行为。
  • 移除了某些原版机器的 PFM 默认配置,这些配置会导致意外行为。
  • 修复了蘑菇箱和蘑菇原木在添加某些类型的配置后未按预期给予经验的问题。
  • 所有具有特定行为的可制作物都被标记为不支持。(例如:锻造台、室内植物等)
  • 修复了当加载名称为 null 的对象时的空引用错误。

1.9.2

  • 修复了在机器上使用仙尘时不消耗物品的问题。
  • 修复了生产彩色物品和火把时的警告。
  • 可能修复了自动化时声音不当的问题。

1.9.1

  • 修复了纹理宽度与原版 bigcraftable 文件不同时动画无法正确显示的问题。

1.9.0

  • 支持原版和 Content Patcher 机器的自动化,无需 PFMAutomate。
  • 新增属性以启用或禁用机器上的仙尘。
  • 支持料斗。
  • 修复了 SV 1.6 后仙尘未应用于 PFM 机器的问题。
  • 修复了规则在物品之前加载的问题。
  • 更改了一些警告消息,以免用户将其报告为错误。
  • 修复了堆叠为 0 的物品会留在库存中的错误。
  • 对燃料消耗进行了多项修复。

1.8.0

  • 更新 mod 以兼容星露谷物语 1.6。
  • 支持所有标识符上的限定物品 ID。
  • 新增生产者限定物品 ID 和附加生产者限定物品 ID 的属性。
  • 添加对蜂蜜作为保存类型的支持。
  • 添加对新 PreserveTypes 的支持。
  • 修复了价格增量和倍数属性组合的问题。

剧透

1.7.4

1.7.3

  • 匈牙利语 i18n。(感谢 martin66789)
  • 修复了当输出具有保存类型且输入也具有 preservedParentIndex 时物品无法正确堆叠的问题。

1.7.2

  • 修复了与之前翻译工作方式不兼容的问题。

1.7.1

  • 修复了当名称没有 i18n 键时某些输出名称无法正常工作的问题。

1.7.0

  • 现在可以根据机器内的输出(通过名称、索引或类别识别)使用不同的动画。
  • 输出名称的国际化不再限制为每个索引一个。将仅适用于新生产的物品。
  • 新的规则属性,使输出索引可以被保存的父索引替换,因此你可以反向生产物品。(例如:从鱼籽生产鱼)
  • 新增属性以增加输入和输出上的统计数据标签。状态标签可以是任何字符串,并可与 Mail Framework Mod 一起使用。
  • 新增属性 AdditionalProducerNames,让规则和配置适用于多个生产者名称。
  • 韩语 i18n。(感谢 wally232)
  • 土耳其语 i18n。(感谢 KeDili)

1.6.0

  • 输出现在可以具有输入堆叠的限制。所需堆叠将是消耗的值。
  • 新属性兼容 Lookup Anything。
  • 修复了当找不到“保存物品”父索引时的错误。
  • 修复了输入堆叠在 Lookup Anything 上无法正确显示的问题。
  • 日语 i18n。(感谢 TwelveYOhttps://github.com/D0n-A)
  • 中文 i18n。(感谢 irischerish)

1.5.0

  • 输出现在可以具有邮件和事件的限制。
  • 新的 API 方法,让 SMAPI mod 可以直接加载内容包。(感谢 Amy Nagle)
  • 俄语 i18n。(感谢 Dmitrey Kupcov)
  • 生产者规则上的新属性,让创建者定义用于警告玩家规则冲突的日志级别。
  • 新的 config.json 文件,让你可以更改所有生产者规则的冲突警告默认日志级别。
  • 季节条件和需求现在使用机器放置位置的季节。
  • 在某些情况下悬停在机器上时的性能改进。

1.4.2

  • 修复了在星露谷物语 1.5 上动画无法正常工作的问题。
  • 修复了 SubtractTimeOfDay 属性未按预期工作的问题。
  • 修复了加载第一个存档时光源未启动的问题。
  • 修复了如果生产因季节、天气或时间条件而暂停,动画不会停止的问题。

1.4.1

  • 修复了蜂房即使配置为室内也能工作的问题。
  • 德语 i18n。(感谢 zirolive69)

1.4.0

  • 生产者现在可以生产彩色输出。例如陈酿鱼籽。
  • 颜色可以根据输入颜色、输入染料颜色或输出配置中定义的颜色来选择。
  • 生产者现在可以为输出保留输入“父级”。例如鲑鱼籽变成陈酿鲑鱼籽。
  • 输出现在可以基于输入父级具有限制。例如鲟鱼籽变成鱼子酱而不是陈酿鲟鱼籽。
  • 生产者现在可以查找附近的物体来影响名称、价格和父级。例如蜂蜜受到蜂房中的花朵影响。
  • 查找的物体可以是田地或花园盆中作物的收获产品、树上的水果或机器内的物体。
  • 生产者光源现在可以基于输出颜色或染料颜色。
  • 光源颜色定义现在反转以反映实际光照颜色。
  • 石头名称现在固定到正确的索引。
  • 加载规则和配置时更好的日志消息。
  • 生产者现在可以在生产时或就绪时拥有动画。(需要 Json Asset 或 Content Patcher 1.6.2 版本以在精灵表中加载纹理)
  • 修复了生产者配置覆盖属性。
  • 修复了原版机器上的条件验证。
  • 修复了光源配置上的 AlwaysOn 属性。

1.3.2

  • 修复了价格倍数未应用于输出的问题。
  • 更好的随机多样性。

1.3.1

  • 修复了生产者灯始终亮着的问题。
  • 新属性让生产者灯始终亮着。

1.3.0

  • 生产者现在可以设置为无输入启动。(放置时或一天开始时)
  • 生产者现在可以有一系列生产条件。(时间、位置、天气和季节)
  • 生产者现在可以配置生产时的光源。
  • 生产者现在可以在生产时禁用弹跳动画。
  • 生产者现在可以在移除产品时按输出增加游戏统计数据。
  • 输出现在可以具有生产限制。(燃料、位置、天气和季节)
  • 每个输出现在可以有不同的生产时间,覆盖规则的默认值。
  • 生产时间可以从一天中的时间中减去。
  • 规则现在需要声明它们可以覆盖特定 mod。
  • Mod 文件现在应该无论大小写和操作系统都能加载。

1.2.0

  • 修改以支持新的 PFMAutomate。
  • 使用 PFMAutomate,通过框架添加的生产者规则将与 Automate mod 集成。

1.1.0

  • 木炭窑烟雾的新动画。
  • 新的偏移属性以更好地定位动画。
  • 添加带延迟声音的属性。
  • 在输入时增加游戏统计数据的属性。
  • 支持创建火把作为输出。
  • 修复了最大堆叠比应该少一个数量的问题。

1.0.0

  • 初始发布。
  • 支持内容包配置。
  • 支持方法调用配置。
  • 所有基本的原版规则已实现用于从输入生产。

供 Mod 开发者使用内容包:

  • mod 文件夹内有一个模板,其中包含注释说明每个属性的作用。
  • 内容包使用的同一对象也用于框架中的方法。使用方法或创建内容包之间应该没有区别。
  • 有两个配置文件。一个用于规则,另一个用于添加的新生产者。规则文件涵盖大部分内容,但诸如机器生产或就绪时应显示的精灵帧之类的内容,应按机器配置,而不是按生产规则配置。原版机器已默认配置,但可以更改。
  • 以下是 mod 文件中添加的自定义规则模板(ProducerRules.json):

剧透

[
    { // All lines that have a default value can be removed and that value will be used.
        "ProducerName": "ProducerName", //Name of the producer to look for. It will match the first big craftable it finds. Will be ignored if ProducerQualifiedItemId is defined. It's a legacy property, you should use ProducerQualifiedItemId instead.
        "ProducerQualifiedItemId": "(BC)12", //The QualifiedItemId of the producer. It's required if no ProducerName is defined.
        "AdditionalProducerNames": [ "ProducerName2", "ProducerName3" ], //Additional names of the producer. The rule will be completely copied to the producer names in the list.
        "AdditionalProducerQualifiedItemId": [ "(BC)15", "(BC)16" ], //Additional qualified item ids of the producer. The rule will be completely copied to the producer qualified item ids in the list.
        "InputIdentifier": "fruit_tree_item", //The identifier of the input. Can be the Qualified Item Id, Index of the object, the category of the object if it's a negative value. Can be the name of the object, or a context_tag of the object. Can be null only if there is a NoInputStartMode for the producer. Default is null.
        "InputStack": 2, //The required stack of the input. Default value is 1.
        "ExcludeIdentifiers": [ "Peach" ], //List of identifiers to exclude from the rule. Follow the same rules for InputIdentifier. Default value is null.
        "FuelIdentifier": "Coal", //The identifier of the Fuel. Fuel is the extra item used when producing. Can be the Qualified Item Id, Index, the Name or the category of the object. Default is null.
        "FuelStack": 4, //The required stack of the Fuel. Only used if fuel is not null. Default is 1.
        "AdditionalFuel": {
            "-6": 2,
            "Coal": 1,
            "246": 5
        }, //Additional fuel if needed. You don't need to set a Fuel to use AdditionalFuel. The format is a pair of identifier and stack amount, following the same rules of the other fuel property. Default is null.
        "MinutesUntilReady": 120, //The amount of minutes it takes to produce. Stardew days have 1600 minutes. 1200 minutes from 6 am to 2am and 400 minutes from 2am to 6am. Should be divisible by 10. Required.
        "SubtractTimeOfDay": true, //If MinutesUntilReady should be subtracted by the current time of day. It always add 360 to the formula, since the day start at 6 am. So if you set MinutesUntilReady to 1600, it will always produce at 6 am of the next day. Never set to true if MinutesUntilReady is smaller than 1600.
        "OutputIdentifier": "Beer", //The identifier of the output. Can be the Qualified Item Id, Index or the Name of the object. Required.
        "OutputName": "{farmerName}'s {inputName} {outputName} from {farmName}", //The Name of the object. This will replace the basic output name. It accepts 4 tags that are dynamically replaced. Default is null.
        "OutputTranslationKey": "MyMod.MyOutput", //The translation key. This is the key in the i18n file where the mod will look for the format of the OutputName in other languages. The value of this key follows the same rules of the OutputName property above. Default is null.
        "OutputGenericParentName": "Wild", //The generic parent name is for when there is no parent name for the object that needs a parent, like Wild for Honey. Default is blank.
        "OutputGenericParentNameTranslationKey": "MyMod.MyOutput", //The translation key. This is the key in the i18n file where the mod will look for the OutputGenericParentName in other languages. Default is null.
        "PreserveType": "Wine", //[Wine|Jelly|Pickle|Juice|Roe|AgedRoe|Honey|Bait|DriedFruit|DriedMushroom|SmokedFish] - If the output is one of the vanilla game Preserves Type. Default is null. Using this will override the OutputName property.
        "KeepInputParentIndex": true, // When true the input of the preserved parent index will be used as the parent index of the output.
        "ReplaceWithInputParentIndex": true, // When true the input of the preserved parent index will be used as the output index.
        "InputPriceBased": true, //If the base price of the output should be replaced with the base price of the input. Default is false.
        "OutputPriceIncrement": 200, //Increment the base price by this amount. Default is 0.
        "OutputPriceMultiplier": 2.5, //Multiply the base price by this amount. Default is 1.
        "KeepInputQuality": false, //If the output should have the same quality as the input. Default is false.
        "OutputQuality": 2, //Set the output quality. Default is 0.
        "OutputStack": 2, //Set the output stack. Default is 1.
        "OutputMaxStack": 2, //Set the max output stack, if you want a random output stack. It'll be ignored if smaller than OutputStack. Default is 1.
        "SilverQualityInput": { //Define an alternative stack if they input is silver quality. Removing will ignore this since probability will be 0.
            "Probability": 0.2, //Probability to use the alternative stack. Default is 0.
            "OutputStack": 2, //Same as others.
            "OutputMaxStack": 4 //Same as others.
        },
        "GoldQualityInput": { //Define an alternative stack if they input is gold quality. Removing will ignore this since probability will be 0.
            "Probability": 0.4, //Same as others.
            "OutputStack": 3, //Same as others.
            "OutputMaxStack": 4 //Same as others.
        },
        "IridiumQualityInput": { //Define an alternative stack if they input is iridium quality. Removing will ignore this since probability will be 0.
            "Probability": 1, //Same as others.
            "OutputStack": 4, //Same as others.
            "OutputMaxStack": 4 //Same as others.
        },
        "OutputColorConfig": { // If set, the output will be a Colored Object. Remember that colored objects need the next sprite in the sheet to be a pallet for the color. Default is null.
            "Type": "DefinedColor", // [ObjectColor|ObjectDyeColor|DefinedColor] If ObjectColor and the input is a colored object, it will use the color of the input. If ObjectDyeColor and the input has a dye color, it will use this color. If DefinedColor or it does find the color on the other options, it will create the color based on the Red, Green and Blue values. Default is DefinedColor.
            "Red": 255, // The red value of the color. Default is 255.
            "Green": 255, // The green value of the color. Default is 255.
            "Blue": 255 // The blue value of the color. Default is 255.
        },
        "AdditionalOutputs": [ // Define a list of additional outputs. You don't need to set a default output to use the additional ones, the first additional output will be the default in that case. Only one output is given, randomly chosen between the options. Default is an empty list.
            {
                "OutputProbability": 0.2, //The absolute probability of getting that output, from 0 to 1. Default is 0. If 0 the remain percent not defined will be equally divided between all outputs with 0 probability. Probability are checked from the first to the last output, so with the total is bigger than 1, the remaining outputs will be ignored.
                "OutputIdentifier": "Apple", //This is required. Works the same as the OutputIdentifier described in the rule.
                "MinutesUntilReady": 100, //The amount of minutes it takes to produce this output. This will override the default MinutesUntilReady set in the rule. Should be divisible by 10.
                "RequiredInputQuality": [ 0, 1 ], // Required input quality for the output to be possible. Default is no required quality.
                "RequiredInputStack": 8, // Required input stack to be equal or greater to this value for the output to be possible. This amount will be consumed instead of InputStack value. It can be less than the InputStack value, but the player still need to have at least the value set on InputStack for the rule to be triggered. Default is no required stack.
                "RequiredFuel": { "Coal": 1 }, //Required fuel for the output to be possible. These fuels will be consumed in additional to the rule defined fuels. The format is a pair of identifier and stack amount, following the same rules of the other fuel property. Default is no required fuel.
                "RequiredSeason": [ "spring", "summer" ], // Required season for the output to be possible. Default is no required season.
                "RequiredWeather": [ "Sunny", "Windy" ], // [Sunny|Rainy|Stormy|Snowy|Windy] Required weather for the output to be possible. Default is no required weather.
                "RequiredLocation": [ "Cellar", "FarmCave" ], // Required location for the output to be possible. Default is no required location.
                "RequiredMail": [ "BackpackTip" ], // Required one of the mails to have been received by the player for the output to be possible. Default is no required mail.
                "RequiredEvent": [ 611439 ], // Required one of events to have been seen by the player for the output to be possible. Default is no required event.
                "RequiredOutdoors": true, // [true|false|null] If true, the output can only be produced outdoors. If false, the output can only be produced indoors. If the line is removed or the value is null, it there is no restriction.
                "RequiredInputParentIdentifier": [ "22", "-80" ] // Required input parent for the output to be possible. Parent is the item that originated the input.(ex. Salmon Roe has Salmon as parent) The identifier is compared with the input parent on this order: Index, Name, Category, Context_Tag.
                // All other properties that refer to the output can be used in the AdditionalOutputs. Remember to use commas to separate properties.
            }
        ],
        "Sounds": [ "furnace" ], //List of sound to make when an input is placed. Default is an empty list.
        "DelayedSounds": [ { "bubbles": 50 } ], //List of sounds to make after a delay. Default is an empty list.
        "PlacingAnimation": "Fire", //[Bubbles|Fire|CharcoalKilnSmoke] //Animation to make when placing the input. Default is null.
        "PlacingAnimationColorName": "White", //The color of the animation.[http://www.foszor.com/blog/xna-color-chart/] Default White.
        "PlacingAnimationOffsetX": 0, //The offset of the X axis. The offset is relative to the animation default location, not the position of the machine. Default is 0.
        "PlacingAnimationOffsetY": -32, //The offset of the Y axis. The offset is relative to the animation default location, not the position of the machine. Default is 0.
        "IncrementStatsOnInput": [ "PiecesOfTrashRecycled" ], // Game stats to increment when a input is placed. Will increment the stats by the amount of the stack. Vanilla machines already increment stats when an item is removed from the machine. Only the Recycle Machine increment the stats on input. Default is an empty list.
        "IncrementStatsLabelOnInput": [ "ModId.MyCustomProduct" ], // Game stats label to increment when a input is placed. Will increment the stats by the amount of the stack. Can be any label text you want. MFM also support stats label for conditions. Check vanilla stats label at the end of the file. Default is an empty list.
        "OverrideMod": [ "IdOfTheMod.ToOverride" ], //If defined, this rule can override rules with the same producer/input combination from the mods in the list. Otherwise the first one to be loaded will be used.
        "LookForInputWhenReady": { // Set this config if you want to look for a specific object when ready. If the rule has an input, it will consume the input on placement, check restrictions to choose the output, but won't apply name, price, quality and similar modifications based on that input. The found object when ready will be used for these modifications instead.
            "Range": 5, //Max range the input will be looked for. A negative number will be considered no limit (will stop at 150 to avoid crash). Default is -1.
            "InputIdentifier": [ "Orange", "-80" ], //Identifier of the input. Can be the Qualified Item Id, index, name or category.
            "Crop": true, //If should look up for crops. The identifier will be compared with the harvest object. Default is false.
            "ExcludeForageCrops": true, //If it should ignore Forage crops. Default is false.
            "GardenPot": true, //If it should look for crops inside garden pots. Default is false.
            "FruitTree": true, //If it should look up for fruit trees. The identifier will be compared with the fruit. Default is false.
            "BigCraftable": false //If it should look up for BigCraftables. The identifier will be compared with the held object. Default is false.
        },
        "WarningsLogLevel": "Warn" //[Warn|Info|Debug|Trace] Log level of messages warning the player that something was missing when loading the rule. Default is what is set on the content pack config.
    }
]
/* Additional Notes
 * Possible stats: [SeedsSown|ItemsShipped|ItemsCooked|ItemsCrafted|ChickenEggsLayed|DuckEggsLayed|CowMilkProduced|GoatMilkProduced|RabbitWoolProduced|SheepWoolProduced|CheeseMade|GoatCheeseMade|TrufflesFound|StoneGathered|RocksCrushed|DirtHoed|GiftsGiven|TimesUnconscious|AverageBedtime|TimesFished|FishCaught|BouldersCracked|StumpsChopped|StepsTaken|MonstersKilled|DiamondsFound|PrismaticShardsFound|OtherPreciousGemsFound|CaveCarrotsFound|CopperFound|IronFound|CoalFound|CoinsFound|GoldFound|IridiumFound|BarsSmelted|BeveragesMade|PreservesMade|PiecesOfTrashRecycled|MysticStonesCrushed|DaysPlayed|WeedsEliminated|SticksChopped|NotesFound|QuestsCompleted|StarLevelCropsShipped|CropsShipped|ItemsForaged|SlimesKilled|GeodesCracked|GoodFriends|IndividualMoneyEarned]
 * Vanilla stats label: [exMemoriesWiped|childrenTurnedToDoves|trashCansChecked|boatRidesToIsland|beachFarmSpawns|hardModeMonstersKilled|timesEnchanted]
 * Note that not all stats are correctly counted by the game.
 */[/spoiler]
  • 以下是 mod 文件中添加的生产者模板(ProducersConfig.json):

剧透

[
    {
        "ProducerName": "ProducerName", //Name of the producer
        "AdditionalProducerNames": [ "ProducerName2", "ProducerName3" ], //Additional names of the producer. The config will be completely copied to the producer names in the list.
        "AlternateFrameProducing": true, //If the producer should use the alternate frame when producing.
        "AlternateFrameWhenReady": true, //If the producer should use the alternate frame and ready for harvest.
        "DisableBouncingAnimationWhileWorking": false, // If the producer bouncing animation while working should be disabled.
        "NoInputStartMode": "Placement", // [Placement|DayUpdate] //If the machine has a value for this property, it can only have one ProducerRule without a InputIdentifier. If Placement, the machine will start on placement, and will restart every time the produced object is taken out. If DayUpdate, the machine will start at the begin of the day. Default is null.
        "IncrementStatsOnOutput": { //Pairs of "stats:object" that identify what should be incremented.
            "GoatCheeseMade": "Goat Cheese", //First value is the stats to be incremented, second value is which output should be produced for the stat to be incremented. The identifier can be the index, name, category or context tag of the output. Will increment the stats by the amount of the stack.
            "CheeseMade": null //If the identifier is null, any output will match.
        },
        "IncrementStatsLabelOnOutput": { //Pairs of "statsLabel:object" that identify what should be incremented. You can add your own custom stats label. MFM also support stats label for conditions. Default is null.
            "timesEnchanted": "Magic Bait", //First value is the stats label to be incremented, second value is which output should be produced for the stat to be incremented. The identifier can be the index, name, category or context tag of the output. Will increment the stats label by the amount of the stack.
            "modId.myItemProduced": null //If the identifier is null, any output will match.
        },
        "MultipleStatsIncrement": true, //If all stats that match should be incremented. If false, just the first match will be increased. Default is false.
        "LightSource": { // Defines the light source the producer should use when working. Default is null.
            "TextureIndex": 4, // Shape of the light source. All vanilla machines uses "sconceLight". 1=lantern, 2=windowLight, 4=sconceLight, 5=cauldronLight, 6=indoorWindowLight, 7=projectorLight. Default is 4.
            "Radius": 1.5, // The actual size of the light source depends on the texture used. Default is 1.5 (the size of the furnace light source with the sconceLight texture)
            "OffsetX": 0, // The horizontal offset from the center of the producer tile. Default is 0.
            "OffsetY": 0, // The vertical offset from the top of the producer tile. Default is 0.
            "ColorType": "DefinedColor", // [ObjectColor|ObjectDyeColor|DefinedColor] If ObjectColor and the output is a colored object, it will use the color of the output. If ObjectDyeColor and the output has a dye color, it will use this color. If DefinedColor or it doesn't find the color on the other options, it will create the color based on the Red, Green and Blue values.
            "ColorRed": 255, // The red value of the light color. Default is 255.
            "ColorGreen": 255, // The green value of the light color. Default is 255.
            "ColorBlue": 255, // The blue value of the light color. Default is 255.
            "ColorAlpha": 255, // The transparency value of the light color. 0 is fully transparent, 255 is fully opaque. Default is 255.
            "ColorFactor": 0.75, // The factor that will multiply all other colors parameters. Default is 1.
            "AlwaysOn": true // If true, the light source will be lit even while not producing. Default is false.
        },
        "WorkingTime": { // If a value is defined, the machine will only produce during this period. Production will be on hold out of this period. Default is working any time.
            "Begin": 600, //Format [HHmm]. The time from which the machine can start producing. Default is 0
            "End": 1800 //Format [HHmm]. The time at which the machine stop producing. Default is 0
        },
        "WorkingWeather": [ "Rainy", "Stormy" ], // [Sunny|Rainy|Stormy|Snowy|Windy] The weathers in which the machine works. Default is working in any weather.
        "WorkingLocation": [ "Barn", "Big Barn", "Deluxe Barn" ], // The locations in which the machine will work. Can be any map of building. Default is working in any location.
        "WorkingOutdoors": true, // [true|false|null] If true, the machine will only work outdoor. If false, the machine will only work indoor. If the line is removed or the value is null, it will work on both kind of location.
        "WorkingSeason": [ "spring", "summer", "fall" ], // The seasons in which the machine will work. Different than other conditions, season clean the machine at the start of the day if in a not working season. The default is working in any season.
        "OverrideMod": [ "IdOfTheMod.ToOverride" ], //If defined, this config can override the configs for the same producer from the mods in the list. Otherwise the first one to be loaded will be used.
        "ProducingAnimation": { // Set a configuration for animating the producing state of the machine. Default is null.
            "RelativeFrameIndex": [ 2, 3, 4, 5, 6, 7 ], //Index and order of the frames that should be used for the animation. Index start at zero, the base frame and index of the non producing state. Extra frames are content from that frame. Extra frames can be added with Json Assets or Content Patcher.
            "FrameInterval": 10, // Amount of game ticks between frames. Default is 10
            "AdditionalAnimations": { //Animation that should be played depending on the object inside the machine. Pair of output identifier and list of frames. Identifier can be Name, Index or Category. Default is null.
                "Salmon": [ 8, 9, 10 ],
                "131": [ 8, 11, 12 ],
                "-4": [ 8, 13, 14 ]
            }
        },
        "ReadyAnimation": null //Set a configuration for animating the ready state of the machine. Same format of configuration as WorkingAnimation. Default is null.
    }
]
/* Additional Notes
 * Possible stats: [SeedsSown|ItemsShipped|ItemsCooked|ItemsCrafted|ChickenEggsLayed|DuckEggsLayed|CowMilkProduced|GoatMilkProduced|RabbitWoolProduced|SheepWoolProduced|CheeseMade|GoatCheeseMade|TrufflesFound|StoneGathered|RocksCrushed|DirtHoed|GiftsGiven|TimesUnconscious|AverageBedtime|TimesFished|FishCaught|BouldersCracked|StumpsChopped|StepsTaken|MonstersKilled|DiamondsFound|PrismaticShardsFound|OtherPreciousGemsFound|CaveCarrotsFound|CopperFound|IronFound|CoalFound|CoinsFound|GoldFound|IridiumFound|BarsSmelted|BeveragesMade|PreservesMade|PiecesOfTrashRecycled|MysticStonesCrushed|DaysPlayed|WeedsEliminated|SticksChopped|NotesFound|QuestsCompleted|StarLevelCropsShipped|CropsShipped|ItemsForaged|SlimesKilled|GeodesCracked|GoodFriends|IndividualMoneyEarned]
 * Vanilla stats label: [exMemoriesWiped|childrenTurnedToDoves|trashCansChecked|boatRidesToIsland|beachFarmSpawns|hardModeMonstersKilled|timesEnchanted]
 * Note that not all stats are correctly counted by the game.
 */
  • 以下是 mod 文件中添加的配置属性模板(Config.json):

剧透

{

"DefaultWarningsLogLevel": "Warn" //[Warn|Info|Debug|Trace] Default log level of messages warning the playing that something was missing when loading the rule. Default is Warn.

}

供 Mod 开发者编码:

  • 在你的 SMAPI 项目中引用 ProducerFrameworkMod.dll。
  • 使用 ProducerController 类来添加规则和配置。
  • 参数具有与内容包模板相同的属性。
  • 你也可以调用 API 方法 "AddContentPack",传入你的内容包文件所在目录,它们将被 mod 加载。

特别感谢:

  • minervamaga, SpringsSong, ParadigmNomad, Trent, spacechase0 - 他们直接参与了这个框架的制作。

  • 星露谷物语 Discord #modding 频道的所有人 - 他们都非常支持,并且是这个项目的灵感来源。

我的其他 Mod: