Getting OP.GG replays to work

12
Comment below rating threshold, click here to show it.

Gosav3122

Junior Member

05-09-2014

So OP.GG stores replays of games now, the way they do this is by allowing you to download a batch file. Obviously you can't run a batch file on a mac, and they haven't yet written an equivalent shell script file for download. The file seems fairly simple, most of it is code for finding your RADS file and then this line is where the magic happens:
@start "" "League of Legends.exe" "8394" "LoLLauncher.exe" "" "spectator spectator.na.lol.riotgames.com:80 Hiircq6267vaCnGpfCt4DXhTnXIWx+hf 1374507714 NA1"
I know how to manually go to the specific path they're indicating, so that's not an issue. There's also a "LoLLauncher" file that i'm presuming is the equivalent to LolLauncher.exe. Given that you can spectate on a mac, there has to be a way to run this file with the settings they're indicating (that is, to spectate the given game). Does anyone know how?

In case you want to see the entire batch file, I've uploaded one for reference (it's very short).

Attached Files
File Type: txt LOL_OPGG_Observer_1374507714.txt (5.8 KB, 491 views)

Comment below rating threshold, click here to show it.

FreakinUnoriginl

Senior Member

05-10-2014

Whether or not it works on Mac depends on whether or not the Mac versions of those executables can accept the same arguments as the Windows version.

You can open up Terminal, drag into the terminal the equivalent of "League of Legends.exe" (probably League of Legends.app, but possibly an executable hidden inside the app package instead), type "8394", drag into the terminal the equivalent of "LoLLauncher.exe" (same potential issue as the previous app), and then everything else in that command.

I say "drag into the terminal" because then it fills in the app path for you, instead of having to figure out the right local directory to launch from (which is what most of the batch file seems to be doing).

I'd give it a try, but the Mac I have with me doesn't have League installed.


Comment below rating threshold, click here to show it.

Mike4Real

Senior Member

05-10-2014

It'd be awesome if you guys could figure this out. I always felt like being able to watch replays of my gameplay would be sooooo helpful in improving. I was really jealous of my friends who were able to use LoL Replay. Let me know if you get this going, I'll definitely use it when I play,


Comment below rating threshold, click here to show it.

FreakinUnoriginl

Senior Member

05-12-2014

I've tried every Mac binary, none of them seem to recognize the spectate argument and all of them seem to result in the client being re-launched. Someone might need to figure out how to isolate the app used to spectate.

This is what I observed in the terminal after clicking spectate for a random game, not sure if someone else can figure out how to proceed with this:

Quote:
<unknown>(0xa18511a8): ALWAYS| Physical memory: 8589934592
<unknown>(0xa18511a8): ALWAYS| Started System Init
<unknown>(0xa18511a8): ALWAYS| Maestro Init
<unknown>(0xb031d000): ALWAYS| Started ReplayDownloadManager thread.
<unknown>(0xb031d000): ALWAYS| ==== Fetch MetaData Phase ====
<unknown>(0xb031d000): ALWAYS| ---- Waiting to fetch 5000
<unknown>(0xa18511a8): ALWAYS| Maestro completed init
<unknown>(0xa18511a8): ERROR| RadsFileHandle RadsOpenFile(const char *const): RADS cannot open file "ClientZips.txt" because it's not in the manifest.
<unknown>(0xa18511a8): ERROR| RadsFileHandle RadsOpenFile(const char *const): RADS cannot open file "ClientZips.txt" because it's not in the manifest.
<unknown>(0xa18511a8): ERROR| Failed to open "ClientZips.txt"
<unknown>(0xa18511a8): ALWAYS| Replay mode
<unknown>(0xa18511a8): ALWAYS| StartSession called
<unknown>(0xa18511a8): ALWAYS| Started Init event arguments
<unknown>(0xa18511a8): ALWAYS| Waiting until connection...
<unknown>(0xa18511a8): ALWAYS| InitRenderer() enter
<unknown>(0xa18511a8): ALWAYS| r3dRenderLayer::Init(0x03c3da70) enter
<unknown>(0xa18511a8): ALWAYS| r3dRenderLayer::Init() exit successfully
<unknown>(0xa18511a8): ALWAYS| Loaded locale en_US via fontconfig
<unknown>(0xa18511a8): ALWAYS| r3dRenderLayer::SetMode(XRes = 1920, YRes = 1200, BPP = 32, Flags=4) enter
<unknown>(0xa18511a8): ALWAYS| r3dRenderLayer::SetMode: Creating d3d device
<unknown>(0xa18511a8): ALWAYS| r3dRenderLayer::SetMode: Initialize shaders for current rendering path
<unknown>(0xa18511a8): ALWAYS| r3dRenderLayer::RecreateOwnedResources
<unknown>(0xa18511a8): ALWAYS| r3dRenderLayer::SetMode exit successfully
<unknown>(0xb031d000): ALWAYS| Spectator server version retrieved: 1.82.0
<unknown>(0xb031d000): ALWAYS| Replay metadata retrieved.
<unknown>(0xb031d000): ALWAYS| ==== Fetch Startup Chunk Phase ====
<unknown>(0xb031d000): ALWAYS| ---- Waiting to fetch 5
<unknown>(0xb031d000): ALWAYS| ---- Downloading Chunk 1
<unknown>(0xb031d000): ALWAYS| ---- Waiting to fetch 5
<unknown>(0xb031d000): ALWAYS| ---- Downloading Chunk 2
<unknown>(0xb031d000): ALWAYS| ---- Waiting to fetch 5
<unknown>(0xb031d000): ALWAYS| ---- Downloading Chunk 3
<unknown>(0xb031d000): ALWAYS| ==== Fetch All Chunks Phase ====
<unknown>(0xb031d000): ALWAYS| ---- Waiting to fetch 10000
<unknown>(0xa18511a8): ALWAYS| In Riot::Win::Resize: Resizing the window and retrieving monitor info
<unknown>(0xa18511a8): ALWAYS| In Riot::Win::Resize: Initial VideoMode(5c37828) and resolution (1920 x 1200)
<unknown>(0xa18511a8): ALWAYS| In Riot::Win::Resize: VideoMode(5c37828) and resolution (960 x 600)
<unknown>(0xa18511a8): ALWAYS| In Riot::Win::Resize: Resized window to resolution 1920x1200
<unknown>(0xa18511a8): ALWAYS| Replay ready.
<unknown>(0xa18511a8): ALWAYS| Set focus to app
<unknown>(0xa18511a8): ALWAYS| Input started
<unknown>(0xa18511a8): ALWAYS| Waiting for server response...
<unknown>(0xa18511a8): ALWAYS| **** Request chunk 1
<unknown>(0xa18511a8): ALWAYS| Requesting chunk id 1 of chunk type 1
<unknown>(0xa18511a8): ALWAYS| Started new chunk. ChunkID: 1 chunk start time: 0.000000 current time: 0.000000
<unknown>(0xa18511a8): ALWAYS| Receiving PKT_World_SendGameNumber, GameID: 00000000522aa361, PlatformID: NA1
<unknown>(0xa18511a8): ALWAYS| Receiving PKT_World_SendGameNumber, GameID: 00000000522aa361, PlatformID: NA1
<unknown>(0xa18511a8): ALWAYS| Receiving PKT_SynchVersionS2C_s, Server :Version 4.7.0.305 [PUBLIC]
<unknown>(0xa18511a8): ALWAYS| Initializing GameModeComponents for mode=CLASSIC.
<unknown>(0xa18511a8): ALWAYS| ... Processing GameMode Mutator = CLASSIC.
<unknown>(0xa18511a8): ALWAYS| netUID: ffffffff defaultname
<unknown>(0xa18511a8): ALWAYS| PlayGame Started
<unknown>(0xa18511a8): ALWAYS| PlayGame Entered
<unknown>(0xa18511a8): ALWAYS| Receiving PKT_World_SendGameNumber, GameID: 00000000522aa361, PlatformID: NA1


Comment below rating threshold, click here to show it.

MarineQueenPrime

Junior Member

05-28-2014

On a Mac you can use `ps -ef` to list the current processes and the arguments that were used to launch them. For instance, this is how a spectated game is launched by the client on my Mac:

Quote:
/Applications/League of Legends.app/Contents/LoL/RADS/solutions/lol_game_client_sln/releases/0.0.0.117/deploy/
LeagueOfLegends.app/Contents/MacOS/LeagueofLegends 8394 LoLLauncher /Applications/League of Legends.app/Contents/LoL/RADS/projects/lol_air_client/releases/0.0.0.127/deploy/
bin/LolClient spectator spectator.na.lol.riotgames.com:80 judwnQUg2idPU6OaDynS6yNafODof27W 1398346711 NA1
Unfortunately, when you run this standalone it complains about not having loaded a DLL and proceeds to launch the client rather than launching the spectated game:

Quote:
/Applications/League\ of\ Legends.app/Contents/LoL/RADS/solutions/lol_game_client_sln/releases/0.0.0.117/deploy/LeagueOfLegends.app/Contents/MacOS/LeagueofLegends 8394 LoLLauncher /Applications/League\ of\ Legends.app/Contents/LoL/RADS/projects/lol_air_client/releases/0.0.0.127/deploy/bin/LolClient spectator spectator.na.lol.riotgames.com:80 judwnQUg2idPU6OaDynS6yNafODof27W 1398346711 NA1
<unknown>(0xa16651a8): ALWAYS| Global logging level set to OKAY
<unknown>(0xa16651a8): ERROR| Failed to find Rads dynamic library. This should have been made available by the patcher (Rads).


Comment below rating threshold, click here to show it.

MarineQueenPrime

Junior Member

05-28-2014

DLL injection doesn't quite work either. I ran the following from the following directory:

Quote:
/Applications/League of Legends.app/Contents/LoL/RADS/
projects/lol_launcher/releases/0.0.0.122/deploy/LoLLauncher.app/Contents/MacOS
(split the line to make it easier to read)


Quote:
LD_PRELOAD="./libRiotRadsIO.dylib" /Applications/League\ of\ Legends.app/Contents/LoL/RADS/solutions/lol_game_client_sln/releases/0.0.0.117/deploy/LeagueOfLegends.app/Contents/MacOS/LeagueofLegends 8394 LoLLauncher /Applications/League\ of\ Legends.app/Contents/LoL/RADS/projects/lol_air_client/releases/0.0.0.127/deploy/bin/LolClient spectator spectator.na.lol.riotgames.com:80 AIO4Cf1w257sQ/KYj931P2QLoXnHTERb 1398383705 NA1
<unknown>(0xa16651a8): ALWAYS| Global logging level set to OKAY
<unknown>(0xa16651a8): ALWAYS| Loading RADS dynamic library: /Applications/League of Legends.app/Contents/LoL/RADS/projects/lol_launcher/releases/0.0.0.122/deploy/LoLLauncher.app/Contents/MacOS/libRiotRadsIO.dylib
<unknown>(0xa16651a8): ALWAYS| Loaded RADS dynamic library: /Applications/League of Legends.app/Contents/LoL/RADS/projects/lol_launcher/releases/0.0.0.122/deploy/LoLLauncher.app/Contents/MacOS/libRiotRadsIO.dylib
However, the spectated game still does not launch

These errors probably have something to do with it
Quote:
@log --- @@@[C++ -> Flash]@@@ Main::init
@log --- ------------------------------- ABOUT TO LOCALIZE
Error: CallMethod - can't find method _level0.viewRoot.mcScreenMain.mcProgressBarOverall .setMaskXScale
Error: CallMethod - can't find method _level0.viewRoot.mcScreenMain.mcProgressBarCurrent .setMaskXScale
Perhaps another library needs to be loaded at runtime?

EDIT: The "can't find method" errors happen when running the Launcher - I think this is a separate non-issue


Comment below rating threshold, click here to show it.

Mike4Real

Senior Member

05-28-2014

Thanks for the continued work on this MarineQueenPrime, like I said I feel like replays would be sooooo helpful to improving my gameplay. If someone could figure it out it would be awesome.


Comment below rating threshold, click here to show it.

MarineQueenPrime

Junior Member

05-29-2014

Gladly! I'd enjoy being able to watch replays as well.

A couple notable differences between launching the client via the above commands and launching it through the Launcher:

- Using the Launcher, the parent process ID of the Client is the Launcher's process ID. This is not the case from command line.
- Using the command line, `ps ef` doesn't show a process as in my initial post


Comment below rating threshold, click here to show it.

Xeculus

Member

4 Weeks Ago

Doubt it's going to work unfortunately.

However, you can bootcamp Windows and easily be able to run the op.gg recording format. Setting up bootcamp is extremely easy - search it up on Youtube. Also, you can get free copies of Windows if you choose to on a certain, ah, Gangplank website (heh)


Comment below rating threshold, click here to show it.

EvilNebster

Junior Member

3 Days Ago

Xeculus: Such the pessimist! :P

I encountered this problem today and luckily for you guys, it was an easy one. Here's what I ran to watch DaBox in one of his latest games (quotes around arguments are needed!):

Quote:
cd "/Applications/League of Legends.app/Contents/LoL/RADS/solutions/lol_game_client_sln/releases/0.0.0.127/deploy/LeagueOfLegends.app/Contents/MacOS"
riot_launched=true ./LeagueOfLegends 8394 LoLLauncher "" "spectator fspectate.op.gg:81 emGqus8lmS35WSkT6bDOOQQY84u6ojhS 1461439057 NA1"
Happy spectating guys!


EDIT:
For those of you who know how to install packages using homebrew and how to create bash scripts, install coreutils using homebrew and then you can use this script:

Quote:
#!/bin/bash
BATCH_FILE=$(greadlink -f "$1")
cd "/Applications/League of Legends.app/Contents/LoL/RADS/solutions/lol_game_client_sln/releases/"
cd "$(find . -depth 1 -type d | gsort -V | tail -n 1)/deploy/LeagueOfLegends.app/Contents/MacOS"
riot_launched=true ./LeagueOfLegends 8394 "LoLLauncher" "" "$(cat $BATCH_FILE | grep 8394 | sed "s/^.*\"\(spectator .*\)\"/\\1/")"
Run it like:
Quote:
> ./spectateGame.sh ~/Downloads/LOL_OPGG_Observer_1460272551.bat


12