自定义坐骑
为自定义马厩生成自定义坐骑提供框架。玩家安装后,可支持其他模组添加自定义坐骑;内容创作者可使用 Content Patcher 配置坐骑数据、马厩、动画和相关属性。
本模组为自定义马厩生成自定义坐骑提供框架。普通玩家像安装其他模组一样安装即可,让依赖本框架的自定义坐骑模组运行。
**版本信息:**0.6.4。文件说明提及修复非模组马匹的帽子绘制问题。
创建自定义坐骑
创建者需要先准备一个自定义建筑,并将其 BuildingType 设为 StardewValley.Buildings.Stable。随后使用 Content Patcher,将坐骑数据添加到 aedenthorn.CustomMounts/dict。
以下为原说明中的 Pinkie 坐骑和马厩配置示例:
{
"Format": "2.7.0",
"Changes": [
{
"LogName": "Pinkie",
"Action": "EditData",
"Target": "aedenthorn.CustomMounts/dict",
"Entries": {
"{{ModId}}/Pinkie": {
"Name": "Pinkie",
"Stable": "{{ModId}}_PinkieHouse",
"SpawnOffset": { "X": 2, "Y": 3 },
"Speed": 3,
"FrameWidth": 48,
"FrameHeight": 48,
"FootstepSound": "Duggy",
"FootstepSoundStone": "hammer",
"FootstepSoundWood": "explosion",
"FluteItem": "(O)123",
"FluteSound": "drumkit0",
"EatItem": "(O)233",
"EatSound": "gulp",
"EatSpeedBonus": 0.6,
"HatScale": 1.5,
"HatOffsets": [
{ "X": 16, "Y": -16 },
{ "X": 32, "Y": -32 },
{ "X": 16, "Y": 0 },
{ "X": 0, "Y": -32 }
],
"CustomAnimations": {
"Left": {
"FacingDirection": 3,
"Chance": 0.002,
"Frames": [
{ "Frame": 21, "Flip": true, "MinLength": 100, "MaxLength": 100 },
{ "Frame": 22, "Flip": true, "MinLength": 100, "MaxLength": 100 },
{ "Frame": 23, "Flip": true, "MinLength": 100, "MaxLength": 100 },
{ "Frame": 24, "Flip": true, "SoundChance": 1, "Sound": "harvest", "MinLength": 100, "MaxLength": 100 },
{ "Frame": 23, "Flip": true, "MinLength": 100, "MaxLength": 100 },
{ "Frame": 24, "Flip": true, "MinLength": 100, "MaxLength": 100 },
{ "Frame": 23, "Flip": true, "MinLength": 100, "MaxLength": 100 },
{ "Frame": 22, "Flip": true, "MinLength": 100, "MaxLength": 100 },
{ "Frame": 21, "Flip": true, "MinLength": 100, "MaxLength": 100 }
]
},
"Right": {
"FacingDirection": 1,
"Chance": 0.002,
"Frames": [
{ "Frame": 21, "MinLength": 100, "MaxLength": 100 },
{ "Frame": 22, "MinLength": 100, "MaxLength": 100 },
{ "Frame": 23, "MinLength": 100, "MaxLength": 100 },
{ "Frame": 24, "SoundChance": 1, "Sound": "harvest", "MinLength": 100, "MaxLength": 100 },
{ "Frame": 23, "MinLength": 100, "MaxLength": 100 },
{ "Frame": 24, "MinLength": 100, "MaxLength": 100 },
{ "Frame": 23, "MinLength": 100, "MaxLength": 100 },
{ "Frame": 22, "MinLength": 100, "MaxLength": 100 },
{ "Frame": 21, "MinLength": 100, "MaxLength": 100 }
]
},
"Down": {
"FacingDirection": 2,
"Chance": 0.002,
"Frames": [
{ "Frame": 25, "MinLength": 0, "MaxLength": 250 },
{ "Frame": 25, "SoundChance": 1, "Sound": "harvest", "MinLength": 250, "MaxLength": 250 },
{ "Frame": 25, "MinLength": 0, "MaxLength": 250 }
]
}
},
"TexturePath": "{{InternalAssetKey: assets/pinkie.png}}"
}
}
},
{
"LogName": "Pinkie House",
"Action": "EditData",
"Target": "Data/Buildings",
"Entries": {
"{{ModId}}_PinkieHouse": {
"Name": "Pinkie House",
"Description": "Pinkie's stable.",
"Texture": "{{InternalAssetKey: assets/pinkie_house.png}}",
"BuildingType": "StardewValley.Buildings.Stable",
"MagicalConstruction": true,
"BuildCost": 15000,
"Size": { "X": 6, "Y": 3 },
"BuildMaterials": [
{ "ItemId": "(O)709", "Amount": 100 },
{ "ItemId": "(O)335", "Amount": 5 }
]
}
}
}
]
}
示例中,建造 Pinkie House 后会在建筑旁出现 Pinkie,一匹粉色大马。
配置说明
Stable:坐骑对应马厩在Data/Buildings中的字典键。SpawnOffset:坐骑相对马厩左上角格子的生成偏移,默认值为(1, 1)。Speed:必须是整数;原版数值为 2。EatSpeedBonus:喂食坐骑特殊食物后获得的速度加成;原版数值为 0.4。FrameWidth、FrameHeight:精灵帧的像素尺寸;原版均为 32。HatOffsets和HatScale:用于调整比例与默认马匹不同的坐骑,可省略。FluteItem和FluteSound:自定义召唤笛子的物品与声音,可省略。EatItem和EatSound:自定义“胡萝卜”类物品与声音,可省略。CustomAnimations:可覆盖随机吃草动画,并可在特定帧播放声音。Chance:取值应在 0 到 1 之间,1 表示 100%。每个朝向可以配置多个动画,但动画名称应各不相同,例如Right1、Right2。
其他说明
原说明提到可选文件中有示例内容包。
默认情况下,单人玩家可以拥有多个马厩和不同种类的坐骑。原版游戏不允许这样做;作者不确定原因。若担心可能产生后果,可在配置中禁用多坐骑所有权。仍可拥有不同种类的多匹坐骑,但只有一匹归玩家所有;至少会影响使用笛子召唤它们。
按住模组按键与坐骑互动可以为其改名,默认按键为 LeftAlt,可在配置中更改。
源码:GitHub 项目页 **作者/上传者:**aedenthorn
来源与文件
- 原作者:aedenthorn
- 原项目:Custom Mounts
- 文件:Custom Mounts(ID:161922)
文件说明
Changes:
Fix for not drawing non-modded horse hats
前往 N 网打开所选文件。安装与下载要求以原作者及平台说明为准。
<!-- aoe-mods-source:nexusmods:stardewvalley:35810 -->
下载模块
共 1 个来源立即下载推荐来源
