Skip to content

讨论&实现:一键搭建 Mod 开发环境 - #18

Open
TWT233 wants to merge 1 commit into
xvrsl:mainfrom
TWT233:main
Open

讨论&实现:一键搭建 Mod 开发环境#18
TWT233 wants to merge 1 commit into
xvrsl:mainfrom
TWT233:main

Conversation

@TWT233

@TWT233 TWT233 commented Oct 27, 2025

Copy link
Copy Markdown
Contributor

本 PR 引入了一个第三方 NuGet 包用以实现一键搭建开发环境:

  • 自动寻找游戏路径、reference dll
  • mod build 后自动部署到本地游戏 Mods 文件夹中,不再需要手动 copy 产物

测试:

  • 自动化 Reference DLL 在引入包后即可验证此处略去
  • 自动部署验证如下
image

虽然比较利好上手 Mod 开发,但由于涉及引入三方包,放在官方性质的指引中可能不合适,所以本 PR 需要讨论

@zhongqingsong

Copy link
Copy Markdown
Contributor

要不直接做成vs 插件吧

@TWT233

TWT233 commented Oct 28, 2025 via email

Copy link
Copy Markdown
Contributor Author

@QiE2035

QiE2035 commented Oct 28, 2025

Copy link
Copy Markdown

有个bug:当游戏的安装位置不在Steam本体中,而在其它的库中时,注册表的安装位置可能为空,从而导致NuGet包定位不到游戏

@TWT233

TWT233 commented Oct 28, 2025 via email

Copy link
Copy Markdown
Contributor Author

@BAKAOLC

BAKAOLC commented Oct 28, 2025

Copy link
Copy Markdown

我这边做了个模板工程
https://github.com/BAKAOLC/Duckov_Modding_Template

我感觉可以和你这个包一起工作看看?

@TWT233

TWT233 commented Oct 29, 2025 via email

Copy link
Copy Markdown
Contributor Author

<Reference Include="$(DuckovPath)$(SubPath)TeamSoda.*"/>
<Reference Include="$(DuckovPath)$(SubPath)ItemStatsSystem.dll"/>
<Reference Include="$(DuckovPath)$(SubPath)Unity*"/>
<PackageReference Include="TWT233.DMAPI.ModBuildConfig"/>

@inkydragon inkydragon Oct 29, 2025

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

用第三方包避不开的问题:如何防范供应链攻击?

没有针对任何人的意思。
这相当于多了个不受控的步骤,而且问题一般发生在,你都忘了这个包/这个游戏的时候。
mod 开发者自己用可以,但加到示例项目中不太好。
如果可以,直接源码引入也是好的。

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

可以考虑官方fork一个然后发布并维护,这样就是移交到官方供应

@TWT233

TWT233 commented Oct 29, 2025 via email

Copy link
Copy Markdown
Contributor Author

@xvrsl

xvrsl commented Nov 3, 2025

Copy link
Copy Markdown
Owner

感谢支持,不过我不太像引入额外的 Nuget 包,毕竟是一个示例工程。推荐 fork 一个,然后我可以在 README 贴一个参考链接。

@TWT233

TWT233 commented Nov 3, 2025 via email

Copy link
Copy Markdown
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants