Git Product home page Git Product logo

auto_simulated_universe's Issues

建议优化祝福选取

建议在选不到对应命途祝福时,增加一个优先级选项。比如打第6世界,记忆是打boss完全没用的祝福,虚无(除了弱点击破)和欢愉如果没有对应角色,效果依然很低,存护/毁灭/丰饶比较通用。

在这个地图下反复出现list index out of range错误

结束程序重新运行,一识别到地图就报错。
手动打完后进入下一区域就正常了

INFO [2023-05-25 13:22:56,075] [admin.py:29] isUserAdmin - CheckTokenMembership returned: True
WARNING [2023-05-25 13:22:57,649] [utils.py:31] 等待游戏窗口
INFO [2023-05-25 13:23:00,954] [states.py:32] 加载地图
INFO [2023-05-25 13:23:01,333] [states.py:38] 加载地图完成,共 114 张
INFO [2023-05-25 13:23:03,831] [utils.py:584] 地图编号:92676  相似度:0.542528735632184
地图文件:
[ WARN:[email protected]] global loadsave.cpp:244 cv::findDecoder imread_(''): can't open/read file: check file path/integrity
E: 运行函数时出现错误
Traceback (most recent call last):
  File "E:\Downloads\Compressed\CentOS-LLVM-Fork-main\gui.py", line 38, in run
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "E:\Downloads\Compressed\CentOS-LLVM-Fork-main\states.py", line 329, in start
    self.route()
  File "E:\Downloads\Compressed\CentOS-LLVM-Fork-main\states.py", line 75, in route
    res = self.normal()
          ^^^^^^^^^^^^^
  File "E:\Downloads\Compressed\CentOS-LLVM-Fork-main\states.py", line 172, in normal
    self.now_loc = (4096 - int(xy[0]), 4096 - int(xy[1]))
                               ~~^^^
IndexError: list index out of range

image

祝福丢弃事件卡住

在遇到第11层虚构史学家事件时,会卡在丢弃祝福这一步中,忘截图了。

[功能请求] 强制前台功能

有时候挂机的时候弹出什么弹窗之类的会把游戏窗口的前台抢走,此时程序就停了;或者用一些远程桌面软件连接(比如向日葵)也可能抢前台。

强制前台和断点回复功能是冲突的,因此有些人不需要这个功能;但对于我外出或者晚上睡觉挂机这种场合是不需要断点回复的。
鉴于现在有 GUI 了,能否考虑在 GUI 或者配置文件里加个选项,或者某个快捷键来控制是否打开强制前台功能?

两种实现方式,一种是用快捷键开关是否强制前台,另一种是打开了强制前台后,如果检测到游戏没在前台,则每过一定时间(比如说 20 秒)把游戏切到前台

校准出现问题

如下:
C:\Users\19492\DOWNLO1\AUTO_S3\AUTO_S~1>python align_angle.py
WARNING [2023-05-21 00:41:54,260] [utils.py:30] 等待游戏窗口

C:\Users\19492\DOWNLO1\AUTO_S3\AUTO_S~1>pause

人物有在动和转向,但是·很慢,最好显示的也是pause

沉浸器、复活装置误触卡死

如题,有时会跑到这俩玩意边上(当然也有下载装置,但是一般够下载一个人所以不会卡死),依旧会触发F,导致程序卡在复活选择页面或者沉浸领取页面
或许可以针对这几个的文本识别增添黑名单或者条件?

模拟宇宙4难度三报错

INFO [2023-06-12 23:51:18,625] [align_angle.py:76] 校准完成
WARNING [2023-06-12 23:51:25,685] [utils.py:77] 等待游戏窗口
INFO [2023-06-12 23:51:27,000] [states.py:62] 加载地图
INFO [2023-06-12 23:51:27,594] [states.py:68] 加载地图完成,共 47 张
INFO [2023-06-12 23:51:27,719] [utils.py:227] 匹配到图片 ./imgs/f.jpg 相似度 0.992240 阈值 0.970000
INFO [2023-06-12 23:51:28,538] [utils.py:227] 匹配到图片 ./imgs/f.jpg 相似度 0.992249 阈值 0.970000
0.8487523794174194
DEBUG [2023-06-12 23:51:28,545] [utils.py:115] 按下按钮 f,等待 0 秒后释放
INFO [2023-06-12 23:51:29,535] [states.py:512] 匹配不到任何图标
INFO [2023-06-12 23:51:30,607] [utils.py:227] 匹配到图片 ./imgs/init.jpg 相似度 0.996731 阈值 0.955000
INFO [2023-06-12 23:51:32,201] [utils.py:227] 匹配到图片 ./imgs/begin.jpg 相似度 0.996317 阈值 0.970000
INFO [2023-06-12 23:51:34,619] [utils.py:227] 匹配到图片 ./imgs/start.jpg 相似度 0.983151 阈值 0.970000
INFO [2023-06-12 23:51:36,212] [utils.py:227] 匹配到图片 ./imgs/yes.jpg 相似度 0.998937 阈值 0.970000
INFO [2023-06-12 23:51:37,811] [states.py:512] 匹配不到任何图标
INFO [2023-06-12 23:51:38,885] [utils.py:227] 匹配到图片 ./imgs/fate.jpg 相似度 0.983170 阈值 0.955000
INFO [2023-06-12 23:51:40,474] [utils.py:227] 匹配到图片 ./imgs/fate_2.jpg 相似度 0.994509 阈值 0.970000
INFO [2023-06-12 23:51:42,078] [states.py:512] 匹配不到任何图标
INFO [2023-06-12 23:51:43,156] [states.py:512] 匹配不到任何图标
INFO [2023-06-12 23:51:44,239] [states.py:512] 匹配不到任何图标
INFO [2023-06-12 23:51:48,446] [states.py:337] 地图编号:89201 相似度:0.546031746031746
E: 运行函数时出现错误
Traceback (most recent call last):
File "gui\choose.py", line 31, in run
File "states.py", line 698, in start
File "states.py", line 116, in route
File "states.py", line 346, in normal
FileNotFoundError: [Errno 2] No such file or directory: 'check0.txt'

匹配图标/识别地图功能会在部分场合失效

校准后开始运行,但是在第二步就会卡住(选择宇宙的难度页面),无限返回“匹配不到任何图标”。

[states.py:418] 匹配不到任何图标

这里通过手动点击开始/手动选择角色,强行进入模拟宇宙关卡后,角色基本可以自动执行至第一个精英处,但是在打掉第一个精英后会有大概率卡在沉浸奖励的对话框那里,由于会先自动点击对话框,然后就在沉浸奖励的选择页面卡住,此时依然会无限返回“匹配不到任何图标”。

具体可见log文件

log.txt

随机TypeError

Traceback (most recent call last):
  File "C:\Users\maiki\DOCUME~1\HONKAI~1\AUTO_S~1\states.py", line 253, in <module>
    main()
  File "C:\Users\maiki\DOCUME~1\HONKAI~1\AUTO_S~1\states.py", line 249, in main
    su.route()
  File "C:\Users\maiki\DOCUME~1\HONKAI~1\AUTO_S~1\states.py", line 57, in route
    res=self.normal()
        ^^^^^^^^^^^^^
  File "C:\Users\maiki\DOCUME~1\HONKAI~1\AUTO_S~1\states.py", line 155, in normal
    self.get_direc()
  File "C:\Users\maiki\DOCUME~1\HONKAI~1\AUTO_S~1\utils\utils.py", line 278, in get_direc
    ang=math.atan2(loc[0]-self.real_loc[0],loc[1]-self.real_loc[1])/math.pi*180
                   ~~~~~~^~~~~~~~~~~~~~~~~
TypeError: unsupported operand type(s) for -: 'tuple' and 'int'```

地图18769匹配失败

地图如下:
capture_20230614054915740

总是会匹配到其他地图(每次都不一样),我把其他地图移除之后,只留下18769,发现匹配率只有0.36

log文件:
log.txt

卡在墙角

如题,一号位是白露,有时会卡在墙角——由于画面左上角有敌人,但攻击不到,就会卡在墙角一直攻击

关于提高队伍容错率

1.进入休整区域后,远程角色空A一下,打破恢复血瓶,回复队伍血量
2.进入休整区域后,倘若队伍有角色死亡(角色死亡背景色变灰,不显示血条)直接点击复活装置进行复活
亦或者直接点击复活装置,如果显示角色头像,点击复活
PS:本人是代码小白,一点小建议,感谢大佬制作的工具
584_2023042745134237

584_2023042745134185

AttributeError: 'NoneType' object has no attribute 'start'

INFO [2023-06-08 10:00:18,557] [admin.py:29] isUserAdmin - CheckTokenMembership returned: True
WARNING [2023-06-08 10:00:25,003] [utils.py:76] 等待游戏窗口
E: 运行函数时出现错误
Traceback (most recent call last):
File "C:\Users\michael\Downloads\Auto_Simulated_Universe-main\Auto_Simulated_Universe-main\gui\choose.py", line 31, in run
res = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\michael\Downloads\Auto_Simulated_Universe-main\Auto_Simulated_Universe-main\states.py", line 57, in init
notif('开始运行',f'初始计数:{self.count}')
File "C:\Users\michael\Downloads\Auto_Simulated_Universe-main\Auto_Simulated_Universe-main\utils\utils.py", line 30, in notif
cnt=s[0].strip('\n')
~^^^
IndexError: list index out of range
Exception in thread Thread-13 (start):
Traceback (most recent call last):
File "C:\Users\michael\AppData\Local\Programs\Python\Python311\Lib\threading.py", line 1038, in _bootstrap_inner
self.run()
File "C:\Users\michael\AppData\Local\Programs\Python\Python311\Lib\threading.py", line 975, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\michael\Downloads\Auto_Simulated_Universe-main\Auto_Simulated_Universe-main\gui\choose.py", line 65, in start
run(page.su.start)
^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'start'

imgs\maps下添加分支

事实上该项目已经录入了很完整的地图信息,大多情况下都可以正常使用
但部分情况下,无法匹配到高相似度的地图,这时候就需要手动录入地图信息(实际上,录入的过程也很方便)
然而这存在一个问题,手动录入的地图信息和原有地图信息并没有区分开。这不方便版本间、玩家间的地图信息迁移。
比如我在v4.08下录入的地图信息,难以方便的迁移至v4.3版本。而我们也难以方便的共享自己录入的地图信息以及导入别人录入的地图信息。
所以,也许在imgs\maps上添加分支,比如项目自带的地图信息放在origin,而手动录入的地图信息可以自定义一个tag,又或者简单的哈希一个值是个好主意。

建议

或许可以参考隔壁,不主动攻击而是匹配感叹号等待被攻击?

关于环境配置问题

“只支持1920*1080(窗口化或全屏幕),关闭HDR。”

不太清奇HDR具体指带什么,是设置中的某一项吗?
请求更多信息,

启动报错

已经确认通过update.bat更新到了最新版本
无论是python states.py --find=1启动还是python gui.py启动都会报错,已经使用了管理员权限,报错信息如下

python states.py --find=1
INFO [2023-06-12 11:19:25,640] [states.py:706] find: 1, debug: 0, show_map: 0
WARNING [2023-06-12 11:19:25,645] [utils.py:77] 等待游戏窗口
Traceback (most recent call last):
  File "D:\Download\github\Auto_Simulated_Universe-main\states.py", line 724, in <module>
    main()
  File "D:\Download\github\Auto_Simulated_Universe-main\states.py", line 707, in main
    su = SimulatedUniverse(find, debug, show_map, speed, update)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Download\github\Auto_Simulated_Universe-main\states.py", line 56, in __init__
    self.update_count()
  File "D:\Download\github\Auto_Simulated_Universe-main\states.py", line 542, in update_count
    s=fh.readlines()
      ^^^^^^^^^^^^^^
  File "<frozen codecs>", line 322, in decode
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd2 in position 3: invalid continuation byte
python gui.py
INFO [2023-06-12 11:19:38,084] [admin.py:29] isUserAdmin - CheckTokenMembership returned: True
WARNING [2023-06-12 11:19:51,229] [utils.py:77] 等待游戏窗口
E: 运行函数时出现错误
Traceback (most recent call last):
  File "D:\Download\github\Auto_Simulated_Universe-main\gui\choose.py", line 31, in run
    res = func(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^
  File "D:\Download\github\Auto_Simulated_Universe-main\states.py", line 56, in __init__
    self.update_count()
  File "D:\Download\github\Auto_Simulated_Universe-main\states.py", line 542, in update_count
    s=fh.readlines()
      ^^^^^^^^^^^^^^
  File "<frozen codecs>", line 322, in decode
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd2 in position 3: invalid continuation byte
Exception in thread Thread-28 (start):
Traceback (most recent call last):
  File "E:\miniconda\envs\autosr\Lib\threading.py", line 1038, in _bootstrap_inner
    self.run()
  File "E:\miniconda\envs\autosr\Lib\threading.py", line 975, in run
    self._target(*self._args, **self._kwargs)
  File "D:\Download\github\Auto_Simulated_Universe-main\gui\choose.py", line 73, in start
    run(page.su.start)
        ^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'start'

请问有无使用方法

您好,请问是对分辨率有何要求吗?进入模拟宇宙地图内后攻击两下乱走

打开调试模式到—,仍然会在12层或13层自动结算退出

INFO [2023-06-10 14:17:38,609] [utils.py:226] 匹配到图片 ./imgs/f.jpg 相似度 0.989913 阈值 0.970000
INFO [2023-06-10 14:17:39,330] [utils.py:226] 匹配到图片 ./imgs/f.jpg 相似度 0.988069 阈值 0.970000
INFO [2023-06-10 14:17:39,332] [utils.py:226] 匹配到图片 ./imgs/tele.jpg 相似度 0.984512 阈值 0.965000
INFO [2023-06-10 14:17:39,332] [states.py:254] 地图-1已完成,相似度-1,进入13层
DEBUG [2023-06-10 14:17:39,336] [utils.py:114] 按下按钮 f,等待 0 秒后释放
DEBUG [2023-06-10 14:17:40,343] [utils.py:114] 按下按钮 1,等待 0 秒后释放
DEBUG [2023-06-10 14:17:42,076] [utils.py:114] 按下按钮 esc,等待 0 秒后释放
F8 已被按下,尝试停止运行
INFO [2023-06-10 14:17:44,487] [states.py:606] 尝试停止运行
INFO [2023-06-10 14:17:45,132] [states.py:354] 通关!当前层数:1
INFO [2023-06-10 14:17:45,837] [states.py:130] 停止运行

丢弃奇物事件卡住

在这个事件无限卡住。
虽然不知道为什么进入这个事件,但是考虑到程序的健壮性,建议加入丢弃奇物事件的识别。
pic_honkai

advice

关底BOSS前的黑塔能不能把主选祝福按高到低升级一下,不然练度低不大稳

地图几个都合不上

大佬录的模拟6 难度1吗? 会不会难度等级不一样 地图不一样? 我这边难度2 连续试了三个地图 都对不上号

校准时出现报错,无法将浮点数无穷大转换为整数(OverflowError: cannot convert float infinity to integer)

F:\Auto_Simulated_Universe>python align_angle.py
INFO [2023-06-12 13:31:47,430] [align_angle.py:30] 开始校准
WARNING [2023-06-12 13:31:47,436] [utils.py:77] 等待游戏窗口
[0]
F:\Auto_Simulated_Universe\align_angle.py:58: RuntimeWarning: divide by zero encountered in scalar divide
su.multi *= ax / ay
Traceback (most recent call last):
File "F:\Auto_Simulated_Universe\align_angle.py", line 81, in
main()
File "F:\Auto_Simulated_Universe\align_angle.py", line 42, in main
su.mouse_move(60)
File "F:\Auto_Simulated_Universe\utils\utils.py", line 903, in mouse_move
dx = int(9800 * y * 1295 / self.real_width / 180 * self.multi)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OverflowError: cannot convert float infinity to integer


报错时
x: 60
y: 30
self.real_width: 1920
dx: inf


显示器分辨率:2560x1440
游戏分辨率:1920x1080(窗口模式)

FileNotFoundError 'logs/notif.txt'

In states.py function update_count(self,read=True)

The code

time_cnt = os.path.getmtime(file_name)

should be execute after if os.path.exists(file_name): to prevent FileNotFoundError .

This is the code after fixed.

    def update_count(self,read=True):
        file_name = 'logs/notif.txt'
        if read:
            if os.path.exists(file_name):
                time_cnt = os.path.getmtime(file_name)
                with open(file_name,'r') as fh:
                    s=fh.readlines()
                    new_cnt = int(s[0].strip('\n'))
                    try:
                        time_cnt = float(s[3].strip('\n'))
                    except:
                        pass
            else:
                new_cnt = 0
                os.makedirs('logs',exist_ok=1)
                with open(file_name, 'w') as file:
                    file.write("0")
                    file.close()
                time_cnt = os.path.getmtime(file_name)
                #win32api.SetFileAttributes(file_name, win32con.FILE_ATTRIBUTE_HIDDEN)
        else:
            new_cnt = self.count + 1
            time_cnt = self.count_tm
        dt = datetime.datetime.fromtimestamp(time.time())
        current_weekday = dt.weekday()
        monday = dt + datetime.timedelta(days=-current_weekday)
        target_datetime = datetime.datetime(monday.year, monday.month, monday.day, 4, 0, 0)
        monday_ts = target_datetime.timestamp()
        if dt.timestamp()>=monday_ts and time_cnt<monday_ts:
            self.count=not read
        else:
            self.count=new_cnt
        self.count_tm = time.time()

安装依赖库报错

安装win32gui依赖库时报错ModuleNotFoundError: No module named 'win32.distutils.command',尝试手动安装过pywin32,仍然解决不了。
QQ图片20230519235445

雅利安六号地图迷路

打模拟世界5难度二的时候发现的,在进入雅利安六号所在地图时,打完怪物有一定概率迷路,会自己选择退出
1685852126049

希望能有优先战斗层的设置

现在的打法很容易到最后一层还凑不齐两个回响,希望能尽量多走战斗凑够回响。
以及希望能出奇物黑名单功能,例如在巡猎命途下不选其他命途的火漆。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.