Skip to content
This repository has been archived by the owner on Nov 22, 2021. It is now read-only.

Not restarting game #46

Closed
NuanKi opened this issue Oct 4, 2021 · 20 comments
Closed

Not restarting game #46

NuanKi opened this issue Oct 4, 2021 · 20 comments
Labels
bug Something isn't working

Comments

@NuanKi
Copy link

NuanKi commented Oct 4, 2021

2021-10-04_09.48.30.mp4

when using the restart game button or when you do the shifters missions the game closes but does not reopen.
I delete game.json to configure it again and when configuring, it closes and opens the game, but then it continues with the problem where it does not open

@NuanKi
Copy link
Author

NuanKi commented Oct 4, 2021

2021-10-04_09.49.44.mp4

@tmarenko
Copy link
Owner

tmarenko commented Oct 4, 2021

Can you upload video to youtube or similar video hosting? For some reason I can't view videos on github

@NuanKi
Copy link
Author

NuanKi commented Oct 4, 2021

sure

@NuanKi
Copy link
Author

NuanKi commented Oct 4, 2021

@tmarenko
Copy link
Owner

tmarenko commented Oct 4, 2021

Seems it clicks right in the middle with default position: https://github.com/tmarenko/mff_auto/blob/master/lib/game/ui/elements/main_menu.py#L124

What's the value of game_app_rect in your game.json file?

@NuanKi
Copy link
Author

NuanKi commented Oct 4, 2021

"game_app_rect": [0.7099841521394612, 0.2994350282485876, 0.7099841521394612, 0.2994350282485876]}

@tmarenko
Copy link
Owner

tmarenko commented Oct 4, 2021

Is there any errors in log files or inside console window? Usually value from game_app_rect is copied to GAME_APP UI:
https://github.com/tmarenko/mff_auto/blob/master/lib/gui/widgets/main.py#L243

@NuanKi
Copy link
Author

NuanKi commented Oct 4, 2021

2021-10-04 10:07:52,591 - INFO - updater - Loaded version: mff_auto=0.9.0, game=7.4.0, updater=1.1.0
2021-10-04 10:07:53,125 - INFO - updater - Current version 0.9.0 is up to date for Marvel Future Fight 7.4.0.
2021-10-04 10:07:54,018 - DEBUG - root - Creating 1 Tesseract API(s) with 'eng' language.
2021-10-04 10:07:54,225 - DEBUG - root - Creating 1 Tesseract API(s) with 'mff+eng' language.
2021-10-04 10:07:55,336 - DEBUG - root - -------- 7.0.1.0: found Close App shortcut at position 8
2021-10-04 10:07:55,337 - DEBUG - root - Initialized NoxPlayer object with name NuanKi version 7.0.1.0 and resolution (1280, 720); main window: (2, 32, 1282, 752), parent: (214, 136)
2021-10-04 10:07:55,340 - DEBUG - root - -------- 7.0.1.0: found Close App shortcut at position 8
2021-10-04 10:08:34,189 - INFO - root - --------: saved config file conf.ini. Need to restart emulator to apply changes.
2021-10-04 10:09:01,916 - DEBUG - main - Saving setting from first setup.
2021-10-04 10:09:01,950 - DEBUG - root - -------- 7.0.1.0: found Close App shortcut at position 8
2021-10-04 10:09:01,953 - DEBUG - root - Initialized NoxPlayer object with name NuanKi version 7.0.1.0 and resolution (1280, 720); main window: (2, 32, 1282, 752), parent: (214, 136)
2021-10-04 10:09:01,954 - DEBUG - root - -------- 7.0.1.0: found Close App shortcut at position 8
2021-10-04 10:09:02,711 - WARNING - main - Can't get to the main menu. Restarting the game just in case.
2021-10-04 10:09:02,714 - DEBUG - single_task_manager - Executing single task: RestartGameTask restart_game
2021-10-04 10:09:05,012 - DEBUG - game - Closing game.
2021-10-04 10:09:06,916 - DEBUG - game - Starting game.
2021-10-04 10:09:10,754 - DEBUG - single_task_manager - Task was forcibly stopped.
2021-10-04 10:09:10,772 - DEBUG - single_task_manager - Task completed.
2021-10-04 10:09:11,836 - DEBUG - single_task_manager - Executing single task: RestartGameTask restart_game
2021-10-04 10:09:13,491 - DEBUG - game - Closing game.
2021-10-04 10:09:15,627 - DEBUG - game - Starting game.
2021-10-04 10:11:23,553 - ERROR - game - Failed to start game
2021-10-04 10:11:23,735 - DEBUG - single_task_manager - Task completed.

@NuanKi
Copy link
Author

NuanKi commented Oct 4, 2021

no error appears until after a while in which the game does not open

@tmarenko
Copy link
Owner

tmarenko commented Oct 4, 2021

What about other settings (example on screenshot)?
image

Do they load correctly and do they match values from game.json (timeline_team, mission_team, etc.)?

@NuanKi
Copy link
Author

NuanKi commented Oct 4, 2021

{"timeline_team": 2, "mission_team": 4, "acquire_heroic_quest_rewards": true, "handle_network_errors": false
capture_20211004102440641
,

@NuanKi
Copy link
Author

NuanKi commented Oct 4, 2021

everything else seems to load correctly

@tmarenko
Copy link
Owner

tmarenko commented Oct 4, 2021

I was able to reproduce this issue, looking into it. Seems overriding UI elements isn't synchronized between processes (tasks)

@NuanKi
Copy link
Author

NuanKi commented Oct 4, 2021

the problem keeps happening to me even though I re-downloaded and configured everything

@tmarenko
Copy link
Owner

tmarenko commented Oct 4, 2021

I was able to reproduce this issue, looking into it.

The temporary fix is to override default value inside settings/ui_override.py file. Just add this line at the end:
GAME_APP.button_rect = Rect(0.7099841521394612, 0.2994350282485876, 0.7099841521394612, 0.2994350282485876)

@tmarenko tmarenko added the bug Something isn't working label Oct 4, 2021
@NuanKi
Copy link
Author

NuanKi commented Oct 4, 2021

k, thanks for everything

@tmarenko
Copy link
Owner

tmarenko commented Oct 4, 2021

Fixed in 432cb9c

@NuanKi
Copy link
Author

NuanKi commented Oct 6, 2021

Error code in shifter missions

2021-10-05 19:05:55,052 - DEBUG - game - Closing game.
2021-10-05 19:05:57,054 - DEBUG - game - Starting game.
2021-10-05 19:06:54,938 - DEBUG - game - Game started successfully.
2021-10-05 19:06:57,598 - ERROR - root - 'TWISTED WORLD'
Traceback (most recent call last):
File "C:\Users\emman\Desktop\mff_auto-0.9.0-build\lib\gui\helper.py", line 226, in wrapper
return func(*args, **kwargs)
File "C:\Users\emman\Desktop\mff_auto-0.9.0-build\lib\gui\widgets\queue_items\general.py", line 164, in do_missions
return game_mode.do_missions(*args, **kwargs)
File "C:\Users\emman\Desktop\mff_auto-0.9.0-build\lib\game\missions\epic_quest.py", line 61, in do_missions
self.start_missions(farm_shifter_bios=farm_shifter_bios)
File "C:\Users\emman\Desktop\mff_auto-0.9.0-build\lib\game\missions\epic_quest.py", line 120, in start_missions
stage_1_num = self.start_stage(self.stage_1_ui, stage_1_num, farm_shifter_bios=farm_shifter_bios)
File "C:\Users\emman\Desktop\mff_auto-0.9.0-build\lib\game\missions\epic_quest.py", line 39, in start_stage
self.game.select_mode(self.mode_name)
File "C:\Users\emman\Desktop\mff_auto-0.9.0-build\lib\game\game.py", line 340, in select_mode
mode = self._modes[name]
File "", line 2, in getitem
File "C:\Users\emman\Desktop\mff_auto-0.9.0-build\python\App\Python\lib\site-packages\multiprocess\managers.py", line 772, in _callmethod
raise convert_to_error(kind, result)
KeyError: 'TWISTED WORLD'

@tmarenko
Copy link
Owner

tmarenko commented Oct 6, 2021

KeyError: 'TWISTED WORLD'

Forgot that restart_game now clears game modes. This should fix it: b91f3a7

@tmarenko
Copy link
Owner

tmarenko commented Oct 6, 2021

@tmarenko tmarenko closed this as completed Oct 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants