Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[问题反馈] [通用] 希望作者教程里写下如何自己写模板。现在自己改写模板好痛苦啊。 #791

Open
hugetiny opened this issue Feb 21, 2025 · 7 comments
Labels
bug Something isn't working

Comments

@hugetiny
Copy link

代码版本

1b43228

问题描述

我试着自己改写模板,挺费劲的,主要是vscode中无法识别各种state和state template的引用,建议作者把模板制作的过程出个简化的教程。
如果模板出错的话,F12 调试信息中也看不出哪一行出错了,只能复原再改,有点费力气。
比如开了战斗助手:

松开所有按键
加载模型 C:\games\ZenlessZoneZero-OneDragon\assets\models\flash_classifier\yolov8n-640-flash-0127\model.onnx
自动战斗配置加载成功 全配队通用
加载声音模板中
指令[ 自动战斗 ] 节点 加载自动战斗指令 返回状态 成功
加载声音模板完成

再按F12没反应。不按开始脚本,直接按F12的话又会报错

松开所有按键
加载模型 C:\games\ZenlessZoneZero-OneDragon\assets\models\flash_classifier\yolov8n-640-flash-0127\model.onnx
自动战斗配置加载成功 全配队通用
加载声音模板中
指令[ 自动战斗调试 ] 节点 加载自动战斗指令 返回状态 成功
加载声音模板完成
指令[ 自动战斗调试 ] 执行出错 相关截图保存至 AutoBattleDebugApp_1740120810831 Traceback (most recent call last): File "C:\games\ZenlessZoneZero-OneDragon\src\one_dragon\base\operation\operation.py", line 299, in execute round_result: OperationRoundResult = self._execute_one_round() ^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\games\ZenlessZoneZero-OneDragon\src\one_dragon\base\operation\operation.py", line 370, in _execute_one_round current_round_result: OperationRoundResult = self._current_node.op_method(self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\games\ZenlessZoneZero-OneDragon\src\zzz_od\application\battle_assistant\auto_battle_debug_app.py", line 92, in check_screen new_task = self.auto_op._normal_scene_handler.get_operations(time.time()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'AutoBattleOperator' object has no attribute '_normal_scene_handler'
指令[ 自动战斗调试 ] 执行出错 相关截图保存至 AutoBattleDebugApp_1740120811283 Traceback (most recent call last): File "C:\games\ZenlessZoneZero-OneDragon\src\one_dragon\base\operation\operation.py", line 299, in execute round_result: OperationRoundResult = self._execute_one_round() ^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\games\ZenlessZoneZero-OneDragon\src\one_dragon\base\operation\operation.py", line 370, in _execute_one_round current_round_result: OperationRoundResult = self._current_node.op_method(self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\games\ZenlessZoneZero-OneDragon\src\zzz_od\application\battle_assistant\auto_battle_debug_app.py", line 92, in check_screen new_task = self.auto_op._normal_scene_handler.get_operations(time.time()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'AutoBattleOperator' object has no attribute '_normal_scene_handler'
指令[ 自动战斗调试 ] 执行出错 相关截图保存至 AutoBattleDebugApp_1740120811730 Traceback (most recent call last): File "C:\games\ZenlessZoneZero-OneDragon\src\one_dragon\base\operation\operation.py", line 299, in execute round_result: OperationRoundResult = self._execute_one_round() ^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\games\ZenlessZoneZero-OneDragon\src\one_dragon\base\operation\operation.py", line 370, in _execute_one_round current_round_result: OperationRoundResult = self._current_node.op_method(self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\games\ZenlessZoneZero-OneDragon\src\zzz_od\application\battle_assistant\auto_battle_debug_app.py", line 92, in check_screen new_task = self.auto_op._normal_scene_handler.get_operations(time.time()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'AutoBattleOperator' object has no attribute '_normal_scene_handler'
指令[ 自动战斗调试 ] 执行出错 相关截图保存至 AutoBattleDebugApp_1740120812185 Traceback (most recent call last): File "C:\games\ZenlessZoneZero-OneDragon\src\one_dragon\base\operation\operation.py", line 299, in execute round_result: OperationRoundResult = self._execute_one_round() ^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\games\ZenlessZoneZero-OneDragon\src\one_dragon\base\operation\operation.py", line 370, in _execute_one_round current_round_result: OperationRoundResult = self._current_node.op_method(self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\games\ZenlessZoneZero-OneDragon\src\zzz_od\application\battle_assistant\auto_battle_debug_app.py", line 92, in check_screen new_task = self.auto_op._normal_scene_handler.get_operations(time.time()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'AutoBattleOperator' object has no attribute '_normal_scene_handler'
指令[ 自动战斗调试 ] 执行失败 返回状态 异常
暂停运行
停止运行

游戏截图

No response

运行日志

No response

你的建议

1.希望从代码IDE层面告诉我们一些经验怎么调试模板,模板中代码相互引用的跳转。

2.可以像原神bettergi一样,在游戏界面加个遮罩层。我显示器是1080p的,因为客户端建议必须1080p以上,目前只能开windows虚拟桌面,2个桌面来回切。否则来回窗口切看运行调试信息太不方便了。

@hugetiny hugetiny added the bug Something isn't working label Feb 21, 2025
@hugetiny
Copy link
Author

如果直接F12是正确调试方式的话,那么报错信息也不是模板的错,找不到错在哪里

@Paper-white
Copy link
Contributor

Paper-white commented Feb 21, 2025

您好,有的
https://onedragon-anything.github.io/zzz/zh/home.html
建议在设置里直接打开调试模式的开关,这样启动战斗之后日志就会显示具体的调试内容
更多时候是观察自动战斗页面的触发器是否正确触发来确定脚本是否正常运行

Image

@hugetiny
Copy link
Author

您好,有的 https://onedragon-anything.github.io/zzz/zh/home.html 建议在设置里直接打开调试模式的开关,这样启动战斗之后日志就会显示具体的调试内容 更多时候是观察自动战斗页面的触发器是否正确触发来确定脚本是否正常运行

Image

目前你自己模板开发的时候能实现断点调试了吗?能教教吗

@Paper-white
Copy link
Contributor

看首页加交流群吧,战斗模板是群里其他大佬负责写的,我涉猎不多

@DoctorReid
Copy link
Owner

目前的确没什么好的调试方案,特别是你还不熟悉配置用法的情况下。

但是呢,熟悉配置之后,基本就不会报错了。

  1. 确保你的文件通过了 yaml 的语法检测
  2. 文档里有写必要参数,需要花点时间看看
  3. 现在通用配置里已经有很多角色的模板了,可以参考。可以问一下遥酱的制作技巧

@hugetiny
Copy link
Author

hugetiny commented Mar 6, 2025

目前的确没什么好的调试方案,特别是你还不熟悉配置用法的情况下。

但是呢,熟悉配置之后,基本就不会报错了。

  1. 确保你的文件通过了 yaml 的语法检测
  2. 文档里有写必要参数,需要花点时间看看
  3. 现在通用配置里已经有很多角色的模板了,可以参考。可以问一下遥酱的制作技巧

1.这个vscode能检测没问题
2.必要参数无非就是哪几个参数必填,某几个参数什么作用之类的?有链接吗
3.遥酱好像是默认通用模板的作者吧,是加discord群能问到他吗?

@yokuminto
Copy link
Contributor

目前的确没什么好的调试方案,特别是你还不熟悉配置用法的情况下。
但是呢,熟悉配置之后,基本就不会报错了。

  1. 确保你的文件通过了 yaml 的语法检测
  2. 文档里有写必要参数,需要花点时间看看
  3. 现在通用配置里已经有很多角色的模板了,可以参考。可以问一下遥酱的制作技巧

1.这个vscode能检测没问题 2.必要参数无非就是哪几个参数必填,某几个参数什么作用之类的?有链接吗 3.遥酱好像是默认通用模板的作者吧,是加discord群能问到他吗?

相关教程都在文档里面有写,关于其他问题,你可以在阅读readme后获得相关的信息
至于遮罩,目前没有开发者在推进。没有找到能够在性能上面保持优势,并且在遮罩存在下也能准确获取原始视频流的方法
如果你有好的想法,你可实现完整功能后以pr的形式进行提交并等待审查

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants