Coder Social home page Coder Social logo

obs-sc2switcher's Introduction

OBS SC2Switcher

Installation:

Windows

(0.96 and below): Install the dependencies

64bit: copy sc2switcher.dll from the zip file into c:/program files (x86)/obs-studio/obs-plugins/64bit directory

32bit: copy sc2switcher-32.dll from the zip file into c:/program files (x86)/obs-studio/obs-plugins/32bit directory

Linux

Copy sc2switcher.so from the zip file into your obs-plugins directory. For me this is /usr/lib/obs-plugins/ but this may vary depending on your distro

Usage:

In the Tools menu, click on SC2Switcher.

Scene Switcher

  • Choose a scene to switch to in different menus/games
  • All are optional and will fall back to the in game/out of game scenes
  • The observing scene requires you to have entered your username in the 'usernames' tab

Score Tracker

  • Enter the name of the text source you are using for your scores
  • The text source will be updated with your score (mostly) automatically
  • If you play against a random player the plugin will ask you for their race
  • If you are neither player or both players (ie barcodes), the plugin will ask which player you were
  • There is a small chance that these notifications will take focus over sc2. If this is an issue you can untick 'Popups Enabled' and these will be ignored. You can use the buttons to update the score manually

Game Webhook

  • When entering or leaving a game, the plugin will send a request to the specified url with information about the game for use in other applications
  • For an example of how this could be used you could check out Ladderbet, an automated twitch chat betting bot
event: 'enter' or 'exit',
displayTime: ~,
players: [
	{
		'name': ~,
		'type': ~,
		'race': 'Terr', 'Zerg' or 'Prot',
		'result': 'Victory' or 'Defeat',
		'isme': 'true' or 'false',
	},
]
scores: {
	'Terr', 'Zerg' or 'Prot': {
		"Victory": ~,
		"Defeat": ~
	},
}
  • Known issue: Scores may not update until the start of the next game if you change the score manually or come across one of the situations mentioned in the Score Tracker section

If you use a separate PC to stream:

Enter the IP address of your SC2 computer in the SC2 PC IP box. On your SC2 PC, open the Battle.net launcher, click Options, Game Settings, and under SC2, check 'Additional Command Line Arguments', and enter -clientapi 6119 into the text box.

You can check that SC2 is configured correctly by going to http://[Your SC2 PC IP]:6119/ui in your browser on the streaming PC. It should look something like: {"activeScreens":["ScreenBackgroundSC2/ScreenBackgroundSC2","ScreenReplay/ScreenReplay","ScreenNavigationSC2/ScreenNavigationSC2","ScreenForegroundSC2/ScreenForegroundSC2","ScreenBattlenet/ScreenBattlenet"]}.

Building from source:

Make sure you have a version of obs-studio building properly (instructions are here).

Clone this repository into [OBS Source Directory]/UI/frontend-plugins/SC2Switcher

Add the line add_subdirectory(SC2Switcher) to [OBS Source Directory]/UI/frontend-plugins/CMakeLists.txt

Run CMake again and hit Configure, Generate, then Open Project

obs-sc2switcher's People

Contributors

2press avatar leigholiver avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

dayzin ogmkp

obs-sc2switcher's Issues

Not compatible with OBS 28

The plugin is unfortunately no longer contemptible with version 28 of OBS, see https://github.com/obsproject/obs-studio/releases/tag/28.0.1 for further details:

As of May 2020, version 5 of the Qt user interface toolkit ceased public development and is no longer being updated. Since then, our need for a more up-to-date version has been increasing as time goes by. With version 28.0, we felt it was important for us to update our user interface toolkit to the latest version; not just to gain access to the latest features, but also for the latest bug fixes and improved support for newer operating systems and architectures such as Windows 11 and Apple Silicon. Unfortunately, this also means that certain plugins that depend on version 5 of Qt will no longer work when you upgrade to version 28.0 and will need to be updated.

Whenever the scene changes the switcher is activated

I have another issue with the current "upgraded" version of the switcher that is related to all of these "extra" scene that were added. Before there were only two states "ingame" and "out of game" and the switcher would only switch once, when the state would change. This would allow me to manually change the scene while being out of game. In the "upgraded" version of the switcher there are many different states related to all of these extra scene. I currently don't use any of these extra states/scenes, nevertheless every time I would change the state of SC2, e.g., by opening a lobby, the scene switcher would redo the switch to the "out of game" scene in OBS, even though I don't want it to switch again, as I manually selected another OBS scene to be shown.

So, simple request: Could you change the switcher so that it only considers the activated states when triggering a switch?

W/L counter doesn't update if player won't quit into the menu

I'm not the one having the issue, and I'm writing on behalf of another player.

The issue is when you leave the match and you do not quit to the main menu but instead jump from the game into the replay the program doesn't update the counter.

In other words: there is a possibility to jump from the game right in the replay of that game at the moment the game ended, and if a player does that the program won't update the counter.

LoadLibrary failed

Hi,
a friend of mine can't get the OBS-SC2Switcher to work as OBS fails to load the corresponding library:

18:20:12.283: LoadLibrary failed for '../../obs-plugins/64bit/SC2SceneSwitcher.dll': (null) (193)
18:20:12.283: Module '../../obs-plugins/64bit/SC2SceneSwitcher.dll' not loaded

See attached a complete log file: 2018-05-03_18-20-11.txt

He has already tried to uninstall obs, delete all settings, and uninstall obs from scratch, but it doesn't help to solve this issue.

where is the "text soucre"?

i am not the english speaker. if there is offensive words, forgive me

my problem is that there is seem no text of source of Score Tracker(i have give name of that),that
should auto made by system,right? but where is it? i cant find it.

i download the all files (sc2switcher.dll and newest files like xxxx.h, xxx.cpp,...etc.) and place them all in D:\obs-studio\obs-plugins\64bit(yes, my obs place is in D disk)

i open SC2switcher in the tools menue, i only set something in Score Tracker and click "Start" in the first menue. the set up is following.
https://imgur.com/lzmAfW6
and run a 1 game in sc2, the score will change, that is good, but i cant find the "text source" that named after "ig1".

that should automately produced a file by system, right? what is wrong i do?
pls give me some tips, thx

have a good day,sir

Loading Screen

I am not sure if this is intended behavior or an issue:

When you use a "In Game" scene different from your "Replay" or "Observing" scene, the switcher will always switch to the "In Game" scene while in the loading screen, even if you are not actually playing, and only switch to the "Observing" Scene once the loading screen is over.

P.S.: My username list was today once again filled with my username on my first start of v0.95.

Missing Sc2 screens to switch to in-game and Alt+tab out

Hello,

are you maybe willing to extend your great tool to the status which the SC2 client can switch to as well?

If so it would be also really great if you also find the possibility to detect if someone is in or out tabbed (ALT+Tab) of Starcraft 2 (-->Define a scene?) but I didn't found anything regarding to this in the API.

These are all SC2 screens I found via http://localhost:6119/ui

  1. Startup, loading and leaving Sc2
  2. Login screen (name, region, password, offline)
  3. In menu after Login (Home screen)
  4. Campaign screen
  5. Coop screen
  6. Custom Games main screen
  7. Multiplayer: Training, Versus AI, Unranked, Ranked and Testing (Ranked ladder screen)
  8. Tournament screen
  9. Custom game Lobby
  10. Arcade screen (join)
  11. Arcade screen (browse)
  12. Arcade game Lobby
  13. Collection screen
  14. Replay browsing
  15. Replay "Watch With Others" Lobby
  16. Score screen after a Custom game
  17. Score screen after a Multiplayer Ranked
  18. Score screen after Arcade

These following are all screens I found via http://localhost:6119/game
which are additional needed to verify your are in a replay and not in game.

In an Arcade replay
In a Replay
2v2 In game:
2v2 In Replay
3v3 In game
3v3 In Replay
4v4 In game
4v4 Replay
In game Coop

What do you think about this? I could provide all necessary logical gates from the API client to filter for these status.

Plugin not loading

The plugin will not load for me: https://pastebin.com/dNVSAueC

This is after a windows re-install, I've had this issue before many times but never found a root cause.

18:55:23.780: LoadLibrary failed for '../../obs-plugins/64bit/sc2switcher.dll': The specified module could not be found.
18:55:23.780: (126)
18:55:23.780: Module '../../obs-plugins/64bit/sc2switcher.dll' not loaded

Ingame vs observer detection doesn't work properly

In the latest version the detection of "Ingame" vs "Observing" is not working properly. At first it was working for me, but today it didn't work - although I was observing, the scene would switch to the "Ingame" scene instead of the "Observing" scene. My username was entered properly, but I noticed that this very username was listed ~20 times in the username list (I entered it manually only once). I would assume that this is related.

Here is the obs log file:
2018-10-17 19-45-51.txt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.