MinoMino / minqlbot

An administration tool for the Quake Live client, extensible with plugins.
GNU General Public License v3.0
26 stars 10 forks source link

Can you somehow run this alongside your normal Quake Live? #1

Closed sp00n closed 9 years ago

sp00n commented 9 years ago

I'd like to run both a server bot and my normal client, is this somehow possible? I've tried to copy the relevant files into a new directory (including all the .pk3s), but when I try to launch the game it tells me that I cannot run quakelive.exe directly and need to run the launcher.

I could fire up a Virtual Machine, but this seems kind of excessive just for the server management.

sp00n commented 9 years ago

And if i copy the Launcher.exe, it does start, but eventually will tell me that it failed to open uix86.dll for writing when trying to open the second instance of QL. Even after copying the file(s) into the \baseq3 and \home\baseq3 directory.

MinoMino commented 9 years ago

Yes, it is possible. There is an issue with doing so, though. For some reason, when QL loads a map, it'll lock keyboard input globally. I didn't think much of it initially, but eventually it started annoying me way too much and I ended up going with a VM in the end. Perhaps there are ways to get around this, but I didn't bother looking for a solution. If you still want to do so, here are two ways I know of:

  1. Make a new folder, which'll act as the home folder for your bot, copy the contents of C:\Users\Mino\AppData\Local\id Software\quakelive (replacing "Mino", of course) into it, then finally copy C:\Users\Mino\AppData\LocalLow\id Software\quakelive\baseq3 (the whole folder, not just the contents) into it. If you want to use a specific config, it goes into the latter folder. You should now be able to launch the game by launching the launcher with "--useLocal" as an argument and the bot's newly made home folder as its working directory. You can make a shortcut to the launcher and edit it to do this.
  2. I've written a simple custom launcher in Python. This launcher can be used to manually specify the various paths so that they don't collide with the one you game on. Look at the example to see how you authenticate and launch. In your case, you'll want to initialize QlHandle like this: qlh = qllauncher.QlHandle(home_path="C:/path/to/bot") where the path to the bot doesn't have to exist in advance. QL will create this folder and copy the necessary files to it. Since no other path was passed, it'll default to the current installation of QL for the rest of the files. Configs go into the baseq3 folder, which should be created automatically by QL after the first time running the game with the script.

Hope that helps!

sp00n commented 9 years ago

Thank you, that --useLocal switch really helped. I've got it now up and running, and from initial tests I didn't notice any keyboard issues, but I haven't really played yet myself. Only voted for another map, and it seemed to work fine during/after it loaded.

Now I'd only need a script to automatically join my server and another one for an auto-op... oh well.

By the way, I wasn't able to use the injector in a Virtual Machine with Windows XP. It recognized the minoqlbot.dll, but didn't so for the quakelive.exe target. The inject button was grayed out and the status remained at "waiting for target", no matter if I started the injector or the game first. Using "Quake Live" as the window title didn't help either.

MinoMino commented 9 years ago

Good to hear it worked.

And yeah, I know about the injector not working on XP. Somewhere along the code, I probably use some part of the Windows API that's specific to Vista and above. Might look into it, but for the time being I recommend using Winject when on XP.

sp00n commented 9 years ago

Are there any command line switches for your Minjection tool so that you don't have to manually enter the strings each time you start the server?

MinoMino commented 9 years ago

Unfortunately, no. It's a pretty shitty injector that I never finished. I was told Winject can be launched with command line arguments and is overall a much better injector than mine. Try it out.