LmeSzinc / StarRailCopilot

崩坏:星穹铁道脚本 | Honkai: Star Rail auto bot (简体中文/繁體中文/English/Español)
GNU General Public License v3.0
3.2k stars 157 forks source link

每日副本只进行了一次作战,没办法连续作战,[CombatMultiWave] False 问题 #641

Closed zly7 closed 1 month ago

zly7 commented 1 month ago

在提问之前...

描述你的问题

每日副本只进行了一次作战,没办法连续作战

如何复现

  1. 前往 '角色规划,飞霄60级到80级' 2.点击开始

预期行为

打完飞霄晋阶继续打,但是现在是打完一次一杯酪的时代 会返回到主界面

相关 Logs

INFO     08:23:08.099 │ OBTAIN GET                                                 
INFO     08:23:08.100 │ Find may obtain                                            
INFO     08:23:08.122 │ [trailblaze_exp] True                                      
INFO     08:23:08.124 │ Obtain enter OBTAIN_2                                      
INFO     08:23:08.133 │ Click ( 914,  512) @ OBTAIN_2                              
INFO     08:23:08.612 │ [ITEM_NAME after] 一杯酪的时代 -> 一杯酩酊的时代           
INFO     08:23:08.614 │ [ITEM_NAME 0.017s] 一杯酩酊的时代                          
INFO     08:23:08.615 │ [ITEM_NAME matched]                                        
         ItemAscension(A_Glass_of_the_Besotted_Era)                                
INFO     08:23:08.631 │ [ITEM_AMOUNT] 3                                            
INFO     08:23:08.632 │ [ITEM_AMOUNT format] 当前持有:3 -> 3                      
INFO     08:23:08.633 │ [ITEM_AMOUNT 0.018s] 3                                     
INFO     08:23:08.634 │ Obtain close                                               
INFO     08:23:08.635 │ Click (1065,  199) @ ITEM_CLOSE                            
INFO     08:23:09.011 │ [trailblaze_exp] True                                      
INFO     08:23:09.012 │ Obtain get end                                             
INFO     08:23:09.013 │ <<< OBTAINED RESULT >>>                                    
INFO     08:23:09.014 │ Obtained item: A_Glass_of_the_Besotted_Era, 3              
INFO     08:23:09.016 │ Bind task ['Alas', 'Dungeon']                              
INFO     08:23:09.017 │ Save config ./config\src.json,                             
         Dungeon.Planner.PlannerOverall={'time': datetime.datetime(2024, 10, 4, 8, 
         23, 9), 'comment': '<9.0d', 'value': '10.14%'}                            
INFO     08:23:09.142 │ <<< PLANNER >>>                                            
INFO     08:23:09.144 │ item=ItemAscension(A_Glass_of_the_Besotted_Era) value=3    
         total=62 synthesize=0 time=datetime.datetime(2024, 10, 4, 8, 22, 31)      
         progress=4.84 eta=1.5                                                     
INFO     08:23:09.144 │ item=ItemTrace(Countertemporal_Shot)                       
         value=MultiValue(purple=0, blue=30, green=27) total=MultiValue(purple=101,
         blue=69, green=6) synthesize=MultiValue(purple=0, blue=7, green=0)        
         time=datetime.datetime(2024, 10, 4, 8, 22, 31) progress=10.43 eta=7.5     
INFO     08:23:09.145 │ item=ItemWeekly(Regret_of_Infinite_Ochema) value=0 total=11
         synthesize=0 time=datetime.datetime(2024, 10, 4, 8, 22, 31) progress=0.0  
         eta=0.0                                                                   
INFO     08:23:09.146 │ item=ItemCalyx(Artifex_Gyreheart)                          
         value=MultiValue(purple=0, blue=0, green=237) total=MultiValue(purple=43, 
         blue=65, green=6) synthesize=MultiValue(purple=4, blue=77, green=0)       
         time=datetime.datetime(2024, 10, 4, 8, 22, 31) progress=40.31 eta=0.0     
INFO     08:23:09.147 │ Planner item=ItemAscension(A_Glass_of_the_Besotted_Era)    
         value=3 total=62 synthesize=0 time=datetime.datetime(2024, 10, 4, 8, 22,  
         31) progress=4.84 eta=1.5 come from DungeonList(Stagnant_Shadow_Gloam)    
INFO     08:23:09.148 │ [is_approaching_total] False                               
INFO     08:23:09.153 │ [OCR_WAVE_COST] 30                                         
INFO     08:23:09.154 │ [OCR_WAVE_COST format] 30 -> 30                            
INFO     08:23:09.155 │ [OCR_WAVE_COST 0.006s] 30                                  
INFO     08:23:09.173 │ [CombatMultiWave] False                                    
INFO     08:23:09.189 │ [STAMINA_OCR after] 135/2401+ -> 135/240+                  
INFO     08:23:09.191 │ [STAMINA_OCR] 135/240+                                     
INFO     08:23:09.191 │ [STAMINA_OCR format] 135/240+ -> (135, 105, 240)           
INFO     08:23:09.192 │ [STAMINA_OCR 0.010s] (135, 105, 240)                       
INFO     08:23:09.207 │ [RESERVED_OCR] 1918                                        
INFO     08:23:09.208 │ [RESERVED_OCR format] 1918 -> 1918                         
INFO     08:23:09.209 │ [RESERVED_OCR 0.007s] 1918                                 
INFO     08:23:09.231 │ Bind task ['Alas', 'Dungeon']                              
INFO     08:23:09.232 │ Save config ./config\src.json,                             
         Dungeon.DungeonStorage.TrailblazePower={'time': datetime.datetime(2024,   
         10, 4, 8, 23, 9), 'total': 240, 'value': 135},                            
         Dungeon.DungeonStorage.Reserved={'time': datetime.datetime(2024, 10, 4, 8,
         23, 9), 'total': 2400, 'value': 1918}                                     
INFO     08:23:09.236 │ Current has 135, combat costs 30, do 1 wave                
INFO     08:23:09.238 │ Click (1149,  657) @ COMBAT_PREPARE                        
INFO     08:23:09.901 │ Team set: 1                                                
INFO     08:23:10.003 │ [Team] 1                                                   
INFO     08:23:10.004 │ Already selected to the correct team                       
INFO     08:23:10.004 │ <<< COMBAT SUPPORT >>>                                     
INFO     08:23:10.013 │ Click (1140,  489) @ COMBAT_TEAM_SUPPORT                   
INFO     08:23:11.011 │ Click (1074,  660) @ COMBAT_SUPPORT_ADD                    
INFO     08:23:11.823 │ Team set: 1                                                
INFO     08:23:11.826 │ [Team] 1                                                   
INFO     08:23:11.827 │ Already selected to the correct team                       
INFO     08:23:11.828 │ Click (1088,  645) @ COMBAT_TEAM_PREPARE                   
INFO     08:23:19.531 │ <<< COMBAT EXECUTE >>>                                     
INFO     08:23:19.542 │ _combat_2x_checked                                         
INFO     08:23:19.543 │ Click (1146,   37) @ COMBAT_AUTO                           
INFO     08:23:19.732 │ _combat_auto_checked                                       
INFO     08:23:24.883 │ Combat continues                                           
INFO     08:23:29.224 │ Combat continues                                           
WARNING  08:23:40.885 │ Func screenshot() call timeout, retrying: 0                
WARNING  08:23:57.736 │ Func screenshot() call timeout, retrying: 0                
INFO     08:23:57.912 │ Combat continues                                           
INFO     08:24:02.169 │ Combat continues                                           
INFO     08:24:08.437 │ Combat continues                                           
INFO     08:24:12.475 │ Combat continues                                           
INFO     08:24:17.222 │ Combat execute ended at COMBAT_AGAIN                       
INFO     08:24:17.222 │ <<< COMBAT FINISH >>>                                      
INFO     08:24:17.224 │ Done 1 waves at total                                      
INFO     08:24:17.225 │ Planner item=ItemAscension(A_Glass_of_the_Besotted_Era)    
         value=3 total=62 synthesize=0 time=datetime.datetime(2024, 10, 4, 8, 22,  
         31) progress=4.84 eta=1.5 come from DungeonList(Stagnant_Shadow_Gloam)    
INFO     08:24:17.226 │ Planner item=ItemAscension(A_Glass_of_the_Besotted_Era)    
         value=3 total=62 synthesize=0 time=datetime.datetime(2024, 10, 4, 8, 22,  
         31) progress=4.84 eta=1.5 come from DungeonList(Stagnant_Shadow_Gloam)    
INFO     08:24:17.227 │ [is_approaching_total] False                               
INFO     08:24:17.237 │ [STAMINA_OCR after] 105/2401+ -> 105/240+                  
INFO     08:24:17.238 │ [STAMINA_OCR] 105/240+                                     
INFO     08:24:17.239 │ [STAMINA_OCR format] 105/240+ -> (105, 135, 240)           
INFO     08:24:17.240 │ [STAMINA_OCR 0.010s] (105, 135, 240)                       
INFO     08:24:17.247 │ [RESERVED_OCR] 1918                                        
INFO     08:24:17.248 │ [RESERVED_OCR format] 1918 -> 1918                         
INFO     08:24:17.249 │ [RESERVED_OCR 0.007s] 1918                                 
INFO     08:24:17.254 │ Bind task ['Alas', 'Dungeon']                              
INFO     08:24:17.255 │ Save config ./config\src.json,                             
         Dungeon.DungeonStorage.TrailblazePower={'time': datetime.datetime(2024,   
         10, 4, 8, 24, 17), 'total': 240, 'value': 105},                           
         Dungeon.DungeonStorage.Reserved={'time': datetime.datetime(2024, 10, 4, 8,
         24, 17), 'total': 2400, 'value': 1918}                                    
INFO     08:24:17.266 │ [obtain_frequent_check] False                              
INFO     08:24:17.267 │ Combat wave limit: 1/1, can not run again                  
INFO     08:24:17.268 │ Click ( 443,  602) @ COMBAT_EXIT                           
WARNING  08:24:19.644 │ Func screenshot() call timeout, retrying: 0                
INFO     08:24:21.826 │ Combat finishes at COMBAT_PREPARE                          
INFO     08:24:21.828 │ [obtain_frequent_check] False                              
INFO     08:24:21.830 │ Combat exit                                                
INFO     08:24:21.832 │ COMBAT_PREPARE -> CLOSE                                    
INFO     08:24:21.833 │ Click (1235,   44) @ CLOSE                                 
INFO     08:24:23.846 │ COMBAT_PREPARE -> CLOSE                                    
INFO     08:24:23.847 │ Click (1237,   39) @ CLOSE                                 
INFO     08:24:24.764 │ [combat_wave_done] 1                                       
INFO     08:24:24.765 │ Achieve daily quest                                        
         Obtain_victory_in_combat_with_Support_Characters_1_times                  
INFO     08:24:24.766 │ Used 30 stamina                                            
INFO     08:24:24.766 │ Done Consume_120_Trailblaze_Power stamina 30               
INFO     08:24:24.768 │ [TrailblazePowerExhausted] False                           
INFO     08:24:24.769 │ Bind task ['Alas', 'Dungeon']                              
INFO     08:24:24.770 │ Run the rest waves without compulsory support              
═══════════════════════════════════ DUNGEON RUN ═══════════════════════════════════
INFO     08:24:24.771 │ DUNGEON RUN                                                
INFO     08:24:24.771 │ Dungeon: DungeonList(Stagnant_Shadow_Gloam), team=1,       
         wave_limit=0, support_character=None                                      
INFO     08:24:24.773 │ Combat enter from map                                      
[src] exited. Reason: Manual stop

截图

image

还有别的吗?

研究了一会发现是这里不知道为啥是False [CombatMultiWave] False 这个东西在哪里设置啊,我打开config那个文件没找到CombatMultiWave这个设置

zly7 commented 1 month ago

判断逻辑在conbat.py这里

zly7 commented 1 month ago
def dungeon_run(
            self, dungeon: DungeonList, team: int = None, wave_limit: int = 0, support_character: str = None):
        """
        Run dungeon, and handle daily support

        Args:
            dungeon:
            team: 1 to 6.
            wave_limit: Limit combat runs, 0 means no limit.
            support_character: Support character name

        Returns:
            int: Run count

        Pages:
            in: Any
            out: page_main
        """
        require = self.require_compulsory_support()
        if require and self.support_once:
            logger.info('Run once with support')
            count = self._dungeon_run(dungeon=dungeon, team=team, wave_limit=1,
                                      support_character=self.config.DungeonSupport_Character)

            logger.info('Run the rest waves without compulsory support')
            if wave_limit >= 2 or wave_limit == 0:
                # Already at page_name with DUNGEON_COMBAT_INTERACT
                if wave_limit >= 2:
                    wave_limit -= 1
                count += self._dungeon_run(dungeon=dungeon, team=team, wave_limit=wave_limit,
                                           support_character=support_character, skip_ui_switch=True)

            return count

这里不知道为什么wave_limit要设计成1

zly7 commented 1 month ago
══════════════════════════════════ DUNGEON RUN ══════════════════════════════════
INFO     11:08:16.954 │ DUNGEON RUN                                              
INFO     11:08:16.956 │ Dungeon: DungeonList(Stagnant_Shadow_Gloam), team=1,     
         wave_limit=0, support_character=None                                    
INFO     11:08:16.957 │ Combat enter from map                                    
INFO     11:09:15.964 │ Function calls:                                          
                   <string>   L1 <module>                                        
                   spawn.py L116 spawn_main()                                    
                   spawn.py L129 _main()                                         
                 process.py L314 _bootstrap()                                    
                 process.py L108 run()                                           
         process_manager.py L152 run_process()                                   
                    alas.py L274 loop()                                          
                    alas.py  L79 run()                                           
                     src.py  L31 dungeon()                                       
                 dungeon.py L340 run()                                           
                 dungeon.py L208 dungeon_run()                                   
                 dungeon.py  L64 _dungeon_run()                                  
                interact.py  L33 combat_enter_from_map()                         
                  device.py L150 screenshot()                                    
                  device.py L202 stuck_record_check()                            
                  device.py  L46 show_function_call()                            
WARNING  11:09:15.966 │ Wait too long                                            
WARNING  11:09:15.967 │ Waiting for {'GET_LIGHT_CONE', 'COMBAT_PREPARE',         
         'COMBAT_AGAIN', 'COMBAT_TEAM_PREPARE', 'REWARD_ENTER',                  
         'MAIN_GOTO_CHARACTER', 'DUNGEON_COMBAT_INTERACT'}                       
INFO     11:09:15.988 │ [Package_name] com.miHoYo.hkrpg                          
ERROR    11:09:15.989 │ GameStuckError: Wait too long                            
WARNING  11:09:15.992 │ Saving error: ./log/error/1728011355992                  
WARNING  11:09:16.452 │ Game stuck, com.miHoYo.hkrpg will be restarted in 10     
         seconds                                                                 
WARNING  11:09:16.453 │ If you are playing by hand, please stop Src              
INFO     11:09:16.454 │ Task call: Restart                                       
INFO     11:09:16.457 │ Bind task ['Alas', 'Dungeon']                            
INFO     11:09:16.458 │ Save config ./config\src.json,                           
         Restart.Scheduler.NextRun=datetime.datetime(2024, 10, 4, 11, 9, 16),    
         Restart.Scheduler.Enable=True                                           
INFO     11:09:26.511 │ Scheduler: End task `Dungeon`  

之后的补充报错

125pq commented 1 month ago

我刷取灵砂材料,遇到同样的问题

LmeSzinc commented 1 month ago

需要解锁副本,只有10体力本能选择战斗轮次,突破材料自然是CombatMultiWave=False

zly7 commented 1 month ago

感谢!emmm,可能我想问的是为啥不能打完一次马上继续打第二次直到体力耗完或者材料符合就打之后的材料?而不是返回地图然后结束触发异常,这感觉有点奇怪

LmeSzinc commented 1 month ago

任务是联动的,游戏每日需要你使用一次支援