下载客户端

如何让物品在手中显示

2026-02-14 13:00:23
转载

AI智能总结导读

这是一篇《僵尸毁灭工程》(Project Zomboid)的模组制作教程,针对B42版本中多数原版物品手持时不可见的问题,详细讲解了通过修改物品定义、添加手持模型定义及调优模型参数,让物品在手中显示的方法,不涉及基础模组创建内容。

Most vanilla items are not visible when hold in hands in B42. Most of the time, the 3D objects exist to be visible on ground (as a WorldStaticModel) but are just not configured to be displayed when hold in hand (as a StaticModel) This guide gives you the snippets and process to make those objects visible in hand too. Introduction This guide does NOT address basic mod creation process. There are plenty of guides and tutorial out there for that. As always, your questions about Project Zomboid modding should be asked on PZ Discord[discord.gg]. Item definition override SnippetYou need to adds the following lines to the item definition: primaryAnimMask = HoldingTorchRight, secondaryAnimMask = HoldingTorchLeft, StaticModel = <InHandModelDefinition>, Example Before (Vanilla)module Base { item Spiffo { DisplayCategory = Raccoon, ItemType = base:normal, Weight = 0.8, Icon = PlushSpiffo, WorldStaticModel = SpiffoPlushie, Tags = base:ignorezombiedensity;base:isfirefuel;base:isfiretinder;base:ismemento, FireFuelRatio = 0.25, } Example After (Modded)module Base { item Spiffo { DisplayCategory = Raccoon, ItemType = base:normal, Weight = 0.8, Icon = PlushSpiffo, WorldStaticModel = SpiffoPlushie, Tags = base:ignorezombiedensity;base:isfirefuel;base:isfiretinder;base:ismemento, FireFuelRatio = 0.25, primaryAnimMask = HoldingTorchRight, secondaryAnimMask = HoldingTorchLeft, StaticModel = SpiffoPlushie_Hand, } In Hand Model definition SnippetYou need to create a new model definition with attachements relative to the correct bones (right and left hand prop bones) attachment Bip01_Prop1 { offset = -0.02 -0.06 -0.08, rotate = 60.0 180.0 0.0, scale = 1.0, } attachment Bip01_Prop2 { offset = 0.02 -0.06 -0.08, rotate = 60.0 180.0 0.0, scale = 1.0, } Example Reference (World Static Model, Vanilla) model SpiffoPlushie { mesh = WorldItems/SpiffoPlushie, scale = 0.4, } Your reference model name is the value of the WorldStaticModel parameter of your Item. Make your model in the same module as your reference (most likely Base module). If the reference model has a mesh line, a texture line, or a scale line, copy those too. If the reference model has an "attachment world" node, do NOT copy it. Example Added (Static Model, Modded) model SpiffoPlushie_Hand { mesh = WorldItems/SpiffoPlushie, scale = 0.4, attachment Bip01_Prop1 { offset = -0.02 -0.06 -0.08, rotate = 60.0 180.0 0.0, scale = 1.0, } attachment Bip01_Prop2 { offset = 0.02 -0.06 -0.08, rotate = 60.0 180.0 0.0, scale = 1.0, } } The name of that new model needs to be the value of StaticModel you added in the item definition. Keeping the same name as the world item and adding "_Hand" suffix is just a preference for clarity. Values to use for offset and rotate are discussed later in this guide. Value for scale in attachment nodes should remain 1 to keep the same ratio as the world item (unless their attachment world node has also a scale different from 1). In hand model tuning Tuning StartUse a default value set that worked for a similar object if you have one. If not, set everything to 0.0 initially except scale that should be 1.0. Start the game, spawn the item from vanilla debug Item List tool and equip it. To save time, make it a new game with no zombie and no other mod. attachment Bip01_Prop1 { offset = 0.0 0.0 0.0, rotate = 0.0 0.0 0.0, scale = 1.0, } attachment Bip01_Prop2 { offset = 0.0 0.0 0.0, rotate = 0.0 0.0 0.0, scale = 1.0, } Tuning LabourNow is the waste of time. Do the tuning for attachment Bip01_Prop1 only until you are satisfied, testing by equipping the item in primary hand only. Quit the game save, change one parameter at a time, then continue on that save. Start with tuning roughly offset values (in apparition order). The first one is lateral. Then change rotate values. Then fine tune offset values. attachment Bip01_Prop1 { offset = -0.02 -0.06 -0.08, rotate = 60.0 180.0 0.0, scale = 1.0, } Prop1 to Prop2Copy the values from Bip01_Prop1 to Bip01_Prop2 and change the sign of the first offset value (it is the lateral offset). I suppose there could be a need for mirroring on the rotation too, but I was lucky not to need it. Test one more time. attachment Bip01_Prop2 { offset = 0.02 -0.06 -0.08, rotate = 60.0 180.0 0.0, scale = 1.0, } Result Example You can use My Spiffo mod as an exemple of a functional result.

评论

共0条评论
face
inputImg
最新更新

地段,地段

《僵尸毁灭工程》42.17不稳定版更新内容 各位幸存者,希望你们的避难所能为你们遮风挡雨、带来温暖! 我们计划不久后发布42.17不稳定版,其中包含一些新的沙盒…

2026-04-17 19:110赞 · 0评论

慈善周边更新

大家好! 感谢《僵尸毁灭工程》社区的大力支持,我们成功筹集到了超过18万美元(美元),用于支持无国界医生组织开展卓越且重要的工作!此外,我们的周边合作伙伴Mak…

2026-04-14 15:180赞 · 0评论

修复零日漏洞

4月7日,我们收到了多名用户的报告,称有一个模组在运行时涉嫌生成恶意代码。我们立即对该模组展开调查,发现其包含高度混淆的代码,并确认它会在《僵尸毁灭工程》目录外…

2026-04-08 15:550赞 · 0评论

《僵尸毁灭工程》Stable(41.78.19)及UNSTABLE(42.16.3)热修复补丁发布

《僵尸毁灭工程》稳定版(41.78.19)更新内容 1. 安全漏洞更新 《僵尸毁灭工程》不稳定版(42.16.3)更新内容 1. 修复服务器浏览器中的异常问题 …

2026-04-08 13:490赞 · 0评论

《僵尸毁灭工程》42.16.2 不稳定版热修复补丁发布

《僵尸毁灭工程》手柄与控制优化内容 1. 右键不再因与右键菜单冲突而切换强制瞄准。现在会稍作延迟再激活,以避免右键菜单弹出。 2. 手柄与用户界面及载具的交互优…

2026-04-08 09:480赞 · 0评论

炖肉荞麦饭

小米粥搭配炖猪肉和炒洋葱一起煮。小米事先用黄油煸炒,这样煮出来的小米粥松散又香浓。试试用新方法做肉小米粥吧! 食材(3人份) 猪肉 - 300克 小米 - 18…

2026-04-05 19:000赞 · 0评论

《僵尸毁灭工程》42.16.1 不稳定版热修复公告

《僵尸毁灭工程》修复公告 温馨提示:感谢大家反馈最新补丁中的控制器问题及漏洞!我们已记录所有反馈,虽然无法在复活节假期前完成所有修复,但相关工作已在进行中,将尽…

2026-04-02 15:490赞 · 0评论

《僵尸毁灭工程》专用服务器模组与设置助手

《僵尸毁灭工程》服务器管理员二合一工具包:包含一个模组管理器和一个可视化沙盒变量配置生成器。模组管理器可自动解析创意工坊和模组ID,让你无需再费力翻阅描述;可视…

2026-04-02 04:000赞 · 0评论

基地建设基础

在数百小时的游戏时间里,我学到了一些关于基地建造的知识。如果你想要一份关于如何选择基地以及找到基地后该做什么的半详细指南,那么这份指南或许适合你。【注意】本指南…

2026-03-31 19:000赞 · 0评论

《僵尸毁灭工程》Build 42.16.0 不稳定版发布

一如既往,建议您在更新后创建一个无模组的新存档。更新会修复漏洞并引入新的改动,这些可能与旧存档不兼容,尤其是早于上一个补丁的存档。 如何订阅不稳定测试版分支? …

2026-03-31 11:000赞 · 0评论
暂无更多