Resource icon

League of Legends Scene Switcher

Sphere

Member
This is a specific scene switch plugin for League of Legends.

Installation
Download for both 32 and 64-bit.
  • 32-bit Windows: Copy LolSceneSwitch.dll (32-bit) to "/Program Files/OBS/plugins"
  • 64-bit Windows: Copy LolSceneSwitch.dll (64-bit) to "/Program Files/OBS/plugins" or copy LolSceneSwitch.dll (32-bit) to "/Program Files (x86)/OBS/plugins" (depending on which OBS you use)
You might want to run this OBS as administrator when using this plugin to allow the plugin access to your log files.

What it does
It can switch scenes depending on whether the LoL window is the active window, you are tabbed out or the game is over. It also distinguishes between being in loadscreen or being in the actual game and can use a different scene for either. You can also choose a specific scene for each map (Summoners Rift, Twisted Treeline, ...), so that the plugin shows different scenes in loadscreen or in game depending on which map you play. As an example i set up some scenes and used these for the plugin to achieve something like this.

Additional information
The plugin gets the information of whether being in loadscreen, which map is being played and so on by reading the log file that League of Legends writes on the fly. You can browse the source code here. There's probably a lot wrong with the code, so if you notice anything that could be done better please tell me.


Would be great if you could tell me whether it's working for you and help me finding bugs :)

greetz, Sphere
 
Last edited:

VinnyJ

New Member
Awesome approach by reading the log file for the loadscreen.
I made a thread on the LoL forum a while back, for them to change the window title temporarily during the loadscreen, went ignored. :)

Thanks for this.
 

Jack0r

The Helping Squad
Hey, I gave it a shot as I did some videos for the "general" scene switcher. What I am missing is an option to switch to a "launcher" scene if the launcher gets activated. Also I just joined a spectator session, the loadingscreen switch worked, but the ingame scene switch failed, maybe league does not set you "ingame" if you spectate? I will test with a botmatch in a second.
 

Sphere

Member
Jack0r said:
Also I just joined a spectator session, the loadingscreen switch worked, but the ingame scene switch failed, maybe league does not set you "ingame" if you spectate?
Nice catch, i didn't think about spectator mode. Just updated, should work now.

Jack0r said:
What I am missing is an option to switch to a "launcher" scene if the launcher gets activated.
I'm not sure whether i understand. Do you mean a scene that shows when the LoL Air Client is the active window? So that you have a scene that shows when every other program is active and another scene for when the client is active? I didn't think of that yet, might be an addition. You should be able to use the "general" scene switcher besides this plugin if you really need it for now.
 

Jack0r

The Helping Squad
Yea for my original tutorials I used one scene for each of:
PVP.net Patcher, PVP.Net Client and League of Legends (TM) client
I think you need PVP.Net Client to show endscore screen right? Will check that out later and make a video for everyone :D
 

Sphere

Member
Jack0r said:
I think you need PVP.Net Client to show endscore screen right?
I think the "When LoL get's closed"-scene should have you covered, i intended that scene to be your default-desktop-scene or something like that.
 

DesiGamer

New Member
does this plugin allow you to record the game, even if your tabbed out. For instance sometimes when I die and am waiting to respawn. I usually tab out and browse my facebook or change a song etc. I would like it to continue recording the game even if I tab out into another screen.
 

Sphere

Member
DesiGamer said:
does this plugin allow you to record the game, even if your tabbed out.
I think as long as you don't have your game in fullscreen mode this should be possible, fullscreen mode will not work because when tabbed out the game won't render any new frames and it will show up as a static image on stream (afaik).

If you set your League of Legends game to windowed mode (or borderless) in the video settings, capture it in OBS with the "Window Capture" and then uncheck the "When tabbed out of LoL" controlbox in the plugin settings i believe that it should work (also aero enabled could be necessary afaik). "Game Capture" could work as well in that scenario but i'm not sure.

Edit: I just tried it and somehow ain't able to capture the game with "Window Capture", but it worked with the game being in windowed mode and capturing it with "Game Capture" for me.
 

Zykino

New Member
Ok I'm new with OBS but your plugin look interesting. I just have some questions about it :
Does the OBS plugin have an automatic update like OBS itself look like to have? (Or is it possible to be warned when a plugin has an update?)
For your LoL Scene Switcher plugin is it possible to have 2 differents overlay when we are in Spectate mode (like normal and when you hit "Q" in a fight to remove cam, ad ...)? Actually I don't use Q but I use [Tab].
I may take a look at your code and help you but I don't like programming on windows so I don't really know ^^.
Sorry if my English is bad but I'm tired :s
 

ugze

New Member
Hello,
I tried everything in the tutorial, but in preview and stream, my game capture screens still show up black.
I am running OBS in administrator, and I have made sure that the game capture is capturing the actual game and not just the client. The client shows up fine in the window capture.
I included an image.
http://imgur.com/7YdWzYY

EDIT: I might add that it is capturing the audio and cursor just fine, just everything else is black.

EDIT2: Something else I noticed. The 32-bit SceneSwitcher.dll does not show up in plugins on the 32-bit OBS (in Program Files) but the 64-bit one does. Similarly, the 64-bit SceneSwitcher.dll does not show up in plugins on the 64-bit OBS (in ProgramFilesx86) but the 32-bit one does. Yet both 32-bit and 64-bit OBS have the same problem with game capture. Look at EDIT3 below.

EDIT3: Just kidding, it seems OP made a mistake. According to task manager, the one is ProgramFilesx86 is the 32-bit, whereas the one in ProgramFiles is the 64-bit, which means the dll files are working in the correct versions.
My OS is 64-bit, so ProgramFiles should be 64-bit, and ProgramFilesx86 should be 32-bit.

I prefer not to use the alternative of using Monitor or Window capture with Borderless mode because Borderless mode decreases the game FPS significantly from Fullscreen mode.

EDIT4: Sorry for the really long post, but it seems people who use Radeon graphics cards like me on a laptop will have this issue. Basically, the reason why the screen is black is because League of Legends and OBS must be running on the same GPU (for me, there is Intel HD and Radeon. LoL is running on Radeon, OBS runs on Intel HD even if I add OBS to graphics configuration for Radeon), and it seems there's no way to fix this. For those with Nvidia, you must add OBS to your 3D application settings on your Nvidia manager so that it runs on the same GPU as LoL.
 

Sphere

Member
Zykino said:
Does the OBS plugin have an automatic update like OBS itself look like to have?
At least this plugin has no automatic update function, no. The built-in plugins however (like game capture etc.) are updated with OBS itself afaik.
Zykino said:
For your LoL Scene Switcher plugin is it possible to have 2 differents overlay when we are in Spectate mode (like normal and when you hit "Q" in a fight to remove cam, ad ...)?
OBS already has a built in function for that. Right click on a scene and select "Set Hotkey".


ugze said:
Just kidding, it seems OP made a mistake. According to task manager, the one is ProgramFilesx86 is the 32-bit, whereas the one in ProgramFiles is the 64-bit, which means the dll files are working in the correct versions.
My OS is 64-bit, so ProgramFiles should be 64-bit, and ProgramFilesx86 should be 32-bit.
Sphere said:
64-bit Windows: Copy LolSceneSwitch.dll (64-bit) to "/Program Files/OBS/plugins" or copy LolSceneSwitch.dll (32-bit) to "/Program Files (x86)/OBS/plugins"
I don't see the mistake here? o.O
ugze said:
...but it seems people who use Radeon graphics cards like me on a laptop will have this issue.
Troubleshooting for laptop's dual graphics belongs to the "questions and help" forum i believe, and can be found here: viewtopic.php?f=5&t=5965
 

TCi

Member
The only bug I can see so far after using this, is the "when LoL gets closed" setting resetting. Every time I start OBS, the setting is grayed out, and I have to select the scene I want.

Other than that it is working great
 

Sphere

Member
TCi said:
The only bug I can see so far after using this, is the "when LoL gets closed" setting resetting.
Wow that was a stupid mistake :D Thx for the nice catch, just updated and should be fixed now.

TCi said:
Other than that it is working great
Glad to hear that :)
 

TCi

Member
Sphere said:
TCi said:
The only bug I can see so far after using this, is the "when LoL gets closed" setting resetting.
Wow that was a stupid mistake :D Thx for the nice catch, just updated and should be fixed now.)
Thought it would be very simple mistake. Heh

Thanks for the quick fix :)
 
Top