RSS
 

Archive for the ‘Gaming’ Category

Logitech Gaming Software: LoL Profile Autodetection Fix

19 Nov 2016

The issue

If you own a piece of Logitech gaming equipment, chances are you probably play or have played League of Legends. Logitech Gaming Software is a tool provided by Logitech to allow configuring your devices. One popular feature is profiles which people can use to tweak settings on a per-game basis. This allows you to automatically change your DPI as you switch from FPS games to MOBA’s to osu!

Now one issue that many people are experiencing is the fact that the League of Legends executable does not automatically update to the latest game client executable on launch. This is mainly because Riot Games stores their game client executable in a path which includes the build version number of the client.

Example path to the game client executable on my system (for build version 0.0.1.152):

As you can imagine, this changes from patch to patch and when it does, Logitech Gaming Software fails to pick up this change (due to an issue with their League of Legends signature).

 

Solution

There is a relatively easy solution I found which you can apply to fix this issue. As we cannot change the file tree structure that Riot uses, we will simply update the signatures that Logitech Gaming Software uses so they can accurately find and locate the League of Legends game client executable after each patch using a combination of the Windows registry and regular expressions. Note that Logitech could fix this issue themselves by shipping a more robust signature with their tool.

The steps to solve the issue are as follows:

  1. First, we need to ensure that there is a entry in your Windows registry which points to the League of Legends RADS folder (found inside the directory where League of Legends is installed). You can quickly make sure all entries are correct by following this previous post that I made by clicking here. This is required! (Don’t skip this step).
  2.  

  3. Next, close the Logitech Gaming Software by right clicking on its icon in the system tray and selecting the exit option.
  4.  

  5. Open your text editor of choice (i.e. Notepad) as an Administrator. You can do this by typing Notepad in the Windows Search Box, right clicking on the Notepad result and selecting the Run as Administrator option. I recommend using Notepad++ as a text editor.
  6.  

  7. Now, we want to open a XML file called GameDatabase.xml which is shipped with Logitech Gaming Software. Press file and then open in Notepad and navigate to the folder where you installed Logitech Gaming Software. The file we need is located in the /Resources/Profile folder.

    The file was located here on my system:

    Make sure you select ‘All Files’ in the open file dialog box so you can see the XML file.

  8.  

  9. Now, press Ctrl + F to search for ‘league of legends’. You should find a block of text that looks very similar to this:

     
    This signature is used for the Logitech Gaming Software’s auto game detection feature. First, it looks up the key attribute in the Windows registry with the key name specified (in this case InstallLocation). Then it appends the executable attribute relative path to this value. Note that the relative path already contains an asterisk (*) where the game client build version should be, this is the regular expression matching which is used to match any characters.

    The problem is, this registry key did not even exist on my system and won’t exist on yours if you having this issue!

  10.  

  11. Now, we want to replace line 3 from step 5 from the <signature  part all the way to the /> part. Make sure you don’t replace the <profile  or <description XML elements.
     
    Replace the signature element with the following:

    Now, save the file by pressing Ctrl+S.

    This essentially tells Logitech Gaming Software to lookup the registry path that we set in step 1 and use that as the base path. This fixes the signature.

  12.  

  13. Finally, start up Logitech Gaming Software again. Navigate to the profile section and jot down (in another Notepad window) all your relevant profile settings so you don’t forget them.
  14.  

  15. Now, delete your current League of Legends profile, we don’t want to use old profiles that you may have manually created.
    Deleting League of Legends profile
  16.  

  17. Next, press the Scan for New Games button.
    Logitech Gaming Software Scan for new Games

    After a short scan, it should detect the League of Legends game executable. The blue coloured text for League of Legends indicates that the fix was successful! Press OK to add the autodetected game profile. Logitech Gaming Software League of Legends Profile Found

  18.  

  19.  Verify that the executable was found correctly by checking the properties of the new League of Legends profile. You should see 1 executable called League of Legends.exe
    Logitech Gaming Software Profile PropertiesLogitech Gaming Software Executable Found

 

And that’s it! Now the profile should automatically stay up to date with League of Legends patches. Please note that Logitech Gaming Software updates may overwrite the GameDatabase.xml file as they update/add more signatures. This will break the fix so avoid updating the database. This drawback is still much better than updating the path every time a League of Legends patch occurs which is very frequent in comparison.

 
30 Comments

Posted in Gaming

 

Modifying the Peggle Deluxe Game

06 Dec 2015

So some time ago I modified a the video game Peggle Deluxe which is a PC game by Popcap Games. My little baby brother had really gotten into the game and I wanted to add him as a character! I found a baby photo of him and thought I’d simply have to replace one image in the game directory.

Turns out this was not the case.
The majority of the files for this Popcap game, like other Popcap games, were stored in a file called main.pak. The first step was to extract the contents of this package.

Luckily, an online post was able to help me here (link).
Essentially I had to run the QuickBMS extractor application and supply it with 7x7m.bms and main.pak.

Links to the aforementioned files:
QuickBMS
http://aluigi.org/papers.htm#quickbms
http://aluigi.org/papers/quickbms.zip

7x7M Archives Script
http://aluigi.org/papers/bms/7x7m.bms

I decided to extract the contents of main.pak to the game directory. I also renamed main.pak to main.pak.bak. This forces the game to look for files in the current directory (as main.pak is missing).

Lastly all I had to do was modify one of the character templates and replace the pictures with pictures of my baby brother. I decided to replace the Dragon character (because its OP and also because my brothers favourite character is the Pumpkin so I thought I’d leave it intact).

Here are some images of what I changed (all changes made with Photoshop):

Main Template

This template contained the main images. There were four images, one of the character looking to the left, one looking towards the center (angled left), another looking towards the center (angled right) and finally one looking to the right. Its important to note the eyes were not in this picture (they move around in the game depending on where the mouse cursor or ball is).

Peggle Main Ali

Black and White (Cutout) Template

This template is simply the inverse of the main template images. The black parts of the image correspond to the background behind the character (that is, they act like a green screen).

Peggle-Cutouts

Eye Template

Finally, this template contained the eyes for the character at the correct pixel locations corresponding to the main template.
Peggle Eye Mask

Eye Bug

I saved all the above files and run Peggle! The images showed up fine but the eyes were missing entirely. I quickly narrowed the issue down to a character.cfg file which contained the following character profile for the Dragon character:

The four entries for Eyes refer to the pixel offset from the top right of the EyeImage image (Eye template). In this case, the Dragon only had 1 eye (or 2 eyes but attached) whereas our image has 2. So we need to modify the -1 entries so we set the offsets for the right and left eye of each of our 4 images (from Main template).

To find the correct pixels I simply used Photoshop:

Peggle Eye Offset

So the pixel offsets from the top right of the canvas for the first eye is: 25px, 50px (width first then height). I did this for each eye in the main template and came up with the following character profile:

I then loaded up the game to see the results and they work! The eyes weren’t exactly perfect but they were good enough for this project.

My baby brother loved playing as himself in the game and laughed non-stop for 10 minutes!

Here are some pictures of the result:
Peggle Ali Gameplay Peggle Ali Gameplay

 
No Comments

Posted in Gaming