Barotrauma 潜渊症

Barotrauma 潜渊症

326 个评价
Lua For Barotrauma (with xpath patch)
2
2
2
2
2
   
奖励
收藏
已收藏
取消收藏
文件大小
发表于
更新日期
169.181 MB
2022 年 8 月 31 日 上午 6:21
7 月 8 日 上午 9:16
61 项改动说明 ( 查看 )

订阅以下载
Lua For Barotrauma (with xpath patch)

在 shangjiaxuan 的 1 个合集中
Project Harmony
14 件物品
描述
这是一个修改版本的Lua mod ( https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2559634234 ),合并了github上的增加部分重载物品功能的pr:
https://github.com/Regalis11/Barotrauma/pull/9779

可以作为合并之前先体验功能的版本。本mod需要用和客户端lua一样的安装方法(或者自己复制所有dll和需要的json到游戏目录)。

这个mod合并的pr增加了如下写mod物品的功能:

<override>
<item identifier="screwdriver">
<inherit identifier="screwdriver" package="">
<replace sel="./Price/@baseprice">100</replace>
<del sel="./Fabricate"/>
<add sel=".">
<!-- original uranium rod -->
<Fabricate suitablefabricators="fabricator" requiredtime="15">
<RequiredSkill identifier="electrical" level="25" />
<RequiredItem identifier="uranium" />
<RequiredItem identifier="steel" />
<RequiredItem identifier="lead" />
</Fabricate>
</add>
</inherit>
</item>
</override>
<override>
<item identifier="wrench" inherit="wrench">
<sprite texture="xxxx" yyyyyyy>
</item>
</override>

即通过xpath指定物品属性修改,以及允许原本的"子类"逻辑适用在重载同一个id的情况下。

本mod更新或者游戏本体更新时,需要重新安装客户端lua。

如果存在使用本功能重载人类属性的mod(如更新了的witd),如果在安装本mod时启用会导致启动服务器时客户端加载服务器大厅失败(因为大厅需要人类头像)。需要暂时禁用人物修改的mod,安装客户端组件后就可以正常运行。

当前实现如果一个mod对同一个id的多个重载,游戏将崩溃(windows 访问错误0xc0000005, linux segmentation fault.)并且没有任何提示和记录。这是因为目前没有对这个问题进行检查,而继承逻辑依赖一个包只有一个物品。在遇到这种情况时函数将发生无限递归,导致栈溢出。正常mod不会在一个mod实现一个物品的多个重载,但是在mod开发过程中可能会写错导致出现这种问题。后续更新会对这个情况进行正确的错误处理。

如果游戏启动后左上角没有版本号,命令行出现大量无贴图的物品,很可能就是游戏更新导致本mod客户端组件失效,需要重新安装客户端组件(适用上面情形)。

这个版本经过了上游Lua mod原作者的同意。本mod处于开发阶段,因此目前可能会有一些bug。欢迎提issue。

就像所有修改、基于原本游戏代码的mod,这个mod的代码版权归属潜渊症游戏开发商Undertow Games & FakeFish,仅可以用于潜渊症游戏和对应mod的开发。
热门讨论 查看全部(2)
11
5 月 8 日 下午 12:40
Suggestions
shangjiaxuan
10
2024 年 11 月 6 日 上午 2:12
Bug reports
shangjiaxuan
220 条留言
<†>Baigle1<†>™ 6 月 25 日 上午 9:48 
Great concept, I wonder how many mods rely on this and why it hasn't been implemented in with normal Lua?
冷南羽 6 月 18 日 上午 5:48 
难绷 更新了 然后游戏也更新了 又用不了 (悲)
Zannen 5 月 23 日 下午 12:31 
Ooh nice, has anyone tested if the Mudraptor mod works now?
会防空的树 5 月 9 日 上午 1:35 
终于更新了 感动:steamhappy:
shangjiaxuan  [作者] 5 月 8 日 下午 12:42 
Updated for 1.8.8. Not thoroughly tested though.
shangjiaxuan  [作者] 5 月 7 日 下午 5:24 
shangjiaxuan  [作者] 5 月 7 日 下午 5:17 
However, I've recently been busy looking for jobs and faced with other real-life problems and do not have all the energy and resource to update this promptly.

Anyone that is interested can reach out to me on github, and maybe together we could make this rework much easier.

I'm sorry for not keeping up to date.
shangjiaxuan  [作者] 5 月 7 日 下午 5:17 
Although there are still cases where it may require a workaround, for example mods that failed to load may be fixed by reordering the inheritance order, and vanilla does not give mods a second chance to load.

With the improvements in vanilla, this mod has been patching itself against vanilla with effort, but with so many workarounds littered everywhere, it was a miracle that it only needed resolving a few merge conflicts most of the time in the past.

At this point it may be just simpler to keep the inheritance logic intact and rework the whole integration into vanilla game.
shangjiaxuan  [作者] 5 月 7 日 下午 5:16 
To anyone still looking into an update:

Vanilla has fixed much of the design that this mod tried to fix on its own. Including but not limited to:

1. At least character prefab inheritance was fixed to be file/element based, so complex prefab load stage and activation logic can be ditched in many places.
2. Numerous occasions of bugs with sprite path resolving now integrated into vanilla. But the workarounds still litter around the codebase preventing merge.
EDEM 4 月 16 日 下午 1:14 
Someone has to UPDATE this mod