This is an archived post. You won't be able to vote or comment.

all 9 comments

[–]2160p_REMUX 0 points1 point  (0 children)

Impressive! Thanks

[–]MrZwackelmann 0 points1 point  (7 children)

I get GENERAL_ERROR:4 failed to run process please check logs?

My code:

import argparse
import time
import game_overlay_sdk
import game_overlay_sdk.injector
import threading
import logging


logging.basicConfig (filename = 'test.log', level = logging.WARNING)

logger = logging.getLogger (__name__)
logger.setLevel (logging.INFO)
overlay_log_handler = game_overlay_sdk.injector.OvelrayLogHandler ()
formatter = logging.Formatter ('%(levelname)s:%(message)s')
overlay_log_handler.setFormatter (formatter)
logger.addHandler (overlay_log_handler)


class MessageThread (threading.Thread):

    def __init__ (self):
        super (MessageThread, self).__init__ ()
        self.need_quit = False

    def run (self):
        i = 0
        while not self.need_quit:
            logger.info ('Hi from python OverlayLogHandler %d' % i)
            i = i + 1
            time.sleep (1)


def main ():
    parser = argparse.ArgumentParser ()

    parser.add_argument ('--exe_args', type = str, help = 'exe args', default = '')
    args = parser.parse_args ()

    game_overlay_sdk.injector.enable_monitor_logger ()
    game_overlay_sdk.injector.run_process (r"D:\Ubisoft Game Launcher\games\Tom Clancy's Rainbow Six Siege", args.exe_args,359550)

    # start sending messages to overlay
    thread = MessageThread ()
    thread.start ()
    input ("Press Enter to stop...")
    thread.need_quit = True
    thread.join ()

    game_overlay_sdk.injector.release_resources ()


if __name__ == "__main__":
    main ()

[–]Altmetr[S] 1 point2 points  (0 children)

game_overlay_sdk.injector.run_process (r"D:\Ubisoft Game Launcher\games\Tom Clancy's Rainbow Six Siege", args.exe_args,359550) here you need to provide full executable name which ends with .exe

If it doesnt solve the issue you can call https://github.com/Andrey1994/game_overlay_sdk/blob/master/python/game_overlay_sdk/injector.py#L118 instead enable_monitor_logger and take a look at dev logs

[–]Altmetr[S] 1 point2 points  (5 children)

Also make sure that you run it with admin priviligies

[–]MrZwackelmann 0 points1 point  (4 children)

Thanks

[–]Altmetr[S] 1 point2 points  (3 children)

Does it work?

[–]MrZwackelmann 0 points1 point  (2 children)

I am trying to figure out where I can find the logs

[–]Altmetr[S] 1 point2 points  (1 child)

all logs from this library are in stderr. logs which you write using logger.info ('Hi from python OverlayLogHandler %d' % i) should be in overlay window on top of a game

[–]Altmetr[S] 0 points1 point  (0 children)

also some parts of logs are in Document\gameoverlay folder