antonpup / Aurora

Unified lighting effects across multiple brands and various games.
http://www.project-aurora.com/
MIT License
1.83k stars 365 forks source link

GTA5 not working #230

Closed rakosi2 closed 7 years ago

rakosi2 commented 7 years ago

Aurora detects that I started gta5 and my keyboard goes all white. Aurora is showing what I have on the preview while i play gta5 like I preview chomp(all red) with police and that is what I see constantly. I tried clicking patch logitech several times. I tried 5.1d and dev version on windows 10 with same results. I then tried bf3 but got a static colors and then tried rocket league but I think that goes with issue#227. The skype works as pause button flashes brown. I am running a corsair k95.

antonpup commented 7 years ago

I am confused about your report. So, GTA 5 isn't functioning properly? Is BF1 not functioning properly? Or is Skype integration not working properly?

For BF1, you need to use the dev build and patch Logitech with it for lighting to work properly. GTA 5 should function fine, I will check if Rockstar changed something. Skype should also function properly.

rakosi2 commented 7 years ago

I was trying to say that Aurora can detect Skype's unread messages and flash brown but Aurora is not working with bf3, gta5, and rocket league as I am seeing what I set in the preview tab. For an example, in gta5 I turn on wanted level in the preview and it flashes the whole time in game.

antonpup commented 7 years ago

Try this fix #42 .

As for the GTA 5 preview, if you set the police wanted level and leave it on, it will play in the game. So before playing GTA 5, make sure that the previews are all off.

rakosi2 commented 7 years ago

I have visual C++ 2015 14.0.24215 x64 and x86 installed if that is what you mean by fix #42. As for the preview, how do you turn it off? I don't see any checkbox or anything to enable/disable preview.

rakosi2 commented 7 years ago

Both steam and Aurora is ran as an administrator and gta5 launched from steam's menu. In task manager, UAC Virtualization is grayed out for both Aurora, GTA5, and GTA5Launcher so I am assuming that they are running as an administrator. Once GTA5 in started up, even when I switch characters, my K95 is still all white. I try to add a wanted level in the preview tab and now it is all white with f-keys flashing.

For the logitech LED SDK patch, do I need logitech's suite installed even though I don't have a logitech keyboard?

rakosi2 commented 7 years ago

YES, YES You do need to install the Logitech suite for the patch to work. I also tried gta5 without logitech opened and did not work. So can you please change the requirements to include the Logitech suite if it is needed for the rgb to be passed through to Aurora.

antonpup commented 7 years ago

You shouldn't need to install Logitech Gaming Software... I'll check it out.

rakosi2 commented 7 years ago

So now it sometimes works and sometime it doesn't. Right now when I play GTA Online it is all white but when I am chased by police then my F keys are alternating red/blue while all other keys are still white. Also I have noticed that in Devices and Wrappers tab, every time I click retry for connected device, it sometimes says K95 and sometimes says Not Initialized.

rakosi2 commented 7 years ago

Ok so if I go from story mode to online so let's say trevor to online then in online my keyboard stays brown while I am in online so Aurora is not detecting that I am in Online mode. Also I just needed to install Logitech Gaming Software to get the LogitechLed.dll without it I get a large error. So I just have Logitech Led installed but not running.

antonpup commented 7 years ago

@simon-wh Can you debug GTA 5 not properly detecting game states? Perhaps for GTA 5, we could use a range of colors to detect game states. For example: R [100,105] G [0,5] B [35. 40] is some state. So if Rockstar decides to slightly change the color of Online or Trevor state, then Aurora hopefully could still detect correct states.

rakosi2 commented 7 years ago

I would like to help debug, I am currently playing GTA Online and I have built Aurora from the Dev branch, I just don't know how I can see the values and the debug output just says a bunch of keyboards "was not initialized"

antonpup commented 7 years ago

@rakosi2 For GTA 5, the following code is responsible for detecting the Game State. It's detected based on the reported background color. https://github.com/antonpup/Aurora/blob/dev/Project-Aurora/Profiles/GTA5/GSI/GameState_GTA5.cs#L193

And this code is responsible for actually setting the color that will be drawn to the keyboard from a previously determined Game State. https://github.com/antonpup/Aurora/blob/dev/Project-Aurora/Profiles/GTA5/GameEvent_GTA5.cs#L53

It's just not triggering the correct Game State, thus returning a PlayerState.Undefined. That does not get drawn. Rockstar has done this in the past, where they changed the color values by one. So Aurora wasn't detecting states properly. That is why I suggested that we try detecting ranges instead.

If you fix it, feel free to send a pull request.

rakosi2 commented 7 years ago

I modified Aurora to output the color to the console and when I go into GTA Online, the GameState_GTA5 function is not being called so it's something other than a color difference. Well I am getting "Exception thrown: 'System.ComponentModel.Win32Exception' in System.dll" in the output

rakosi2 commented 7 years ago

In NetworkListener.cs, the StreamReader reading the game state does not read anything when I switch to gtaonline so Aurora maintains what color it was last including anything I set in the preview tab. I have no clue how the IPCServer works so I will leave the rest to you guys.

simon-wh commented 7 years ago

I've just done some testing with GTA 5 and I got it working after I ran both Aurora and both GTA5 exes as admin, installed Logitech Gaming Software and patch the Logitech SDK. After that, it worked as normal, except for the background colour of multiplayer not being detected as it was drastically different than before.

I've changed it now for the state detection that it'll round all the values to the closest 5 to prevent issues with slightly changed values of each state. @rakosi2 I'm not sure why it isn't getting anything when you're in online, but if you get cops, if it is receiving game states properly it'll refresh and should show the correct colour if it wasn't before.

rakosi2 commented 7 years ago

OK thanks for the update, Single player works with correct colors but when I switch to Multiplayer, it switches back to white. In the logs I get "12/27/2016 12:23:11 PM: Undefined color - Color [A=255, R=255, G=0, B=255]" after adding the values to GameState_GTA5.cs it started working.

simon-wh commented 7 years ago

@rakosi2 Is this with or without the commit that referenced this issue? Is there any other issues that you can tell?

rakosi2 commented 7 years ago

I haven't tried all of the colors yet but the main characters in single player, multiplayer and police works

simon-wh commented 7 years ago

I have a feeling that the Multiplayer state color might have some sort of variation based on your character, as I have a completely different value to you and mine doesn't change at all and is also completely different to what was there already. Were you in a CEO group or something when it was giving you that and what is the gender of your character?

rakosi2 commented 7 years ago

I am a new player at lv.28 and not in any group.

rakosi2 commented 7 years ago

So I have added a checkbox to Aurora to Bypass the cases and just display what gta5 gives and I think that in online, you are displayed your Crew's color because my crew color is pink and that is what I see while I play online.

rakosi2 commented 7 years ago

Ya after I left my Crew, it started doing the issue again with it maintaining single-player colors after switching to multiplayer, so the color during multiplayer is up to your crew color. I would recommend just passing any unknown colors as the fill background because different crews are going to have different colors.

simon-wh commented 7 years ago

@rakosi2 I've just made a commit that'll use the background colour from the game if it cannot be detected

rakosi2 commented 7 years ago

Ok thanks, the only thing with this update is that as you start GTA5 the keyboard led is off unlike the all white as it was (well, it maintains the last color so if you close gta and start it again then it will show last color, so there needs to be a default color when GTA starts). And other then there is no color change if I am not in a crew(nothing you can do about this) this is good thank you.

simon-wh commented 7 years ago

What colour does it give when you're not in a crew? I can set it to use white by default for GTA, but the issue with it using the previous colour on restart is something we can only really deal with if we track the process exiting or starting.

rakosi2 commented 7 years ago

None, it just maintains the last color as no update gets sent

simon-wh commented 7 years ago

@rakosi2 The commit above resolves the issue with it keeping the previous game state colour on game restart. I've also brought back the Ambient Colour option which will be used as the startup colour for the game. Do you know if Online without a crew is actually sending out an update or not?

antonpup commented 7 years ago

I am marking this as resolved. If it still persists, feel free to carry the discussion on.