Skip to content

Commit

Permalink
Solved conflicts with TLOU loadremovers
Browse files Browse the repository at this point in the history
  • Loading branch information
justsaft committed Jun 13, 2021
1 parent cdc06ef commit 8885b5e
Show file tree
Hide file tree
Showing 81 changed files with 989 additions and 726 deletions.
Binary file removed HZD/hzd.vas
Binary file not shown.
Binary file removed HZD/hzdAussie.vas
Binary file not shown.
89 changes: 64 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,23 @@ Video with information and installation: [https://www.youtube.com/watch?v=lmLSUK
I am active in the Horizon Zero Dawn and The Last Of Us (1/2) communities. These efforts are intended to aid the communities to make live speedrunning times more comparable and therefore, hopefully, more enjoyable. If the tools are effective enough, this will eliminate the need to manually calculate your In-Game Time (IGT) through use of a video editor, which can be a laborious task for both runners and leaderboard moderators.



## Does it work?

These seem to work VERY well on my end, however different setups may cause different issues. Also there could be some scenerios in which they break. Please see information in either game to learn more about known issues, if any exist.


Please also see the Change Log in each laod remover description regarding the reason for updates to .vas files.
Please also see the Change Log in each load remover description regarding the reason for updates to .vas files.



## Requirements

Both the HZD and TLOU2 efforts are intended to be used for LiveSplit using the [Video Auto Splitter (VAS)](https://github.com/ROMaster2/LiveSplit.VideoAutoSplit) tool. Instructions for installation are already provided by the VAS github, but I will cover installation as well.
Both the HZD and TLOU2 efforts are intended to be used with LiveSplit using the [Video Auto Splitter (VAS)](https://github.com/ROMaster2/LiveSplit.VideoAutoSplit) component. Instructions for installation are already provided by the VAS github, but I will cover installation as well.

The VAS is only one necessary component. You also need to get a video source from your game into the VAS component. I use OBS with a component called [OBS-VirtualCam](https://github.com/CatxFish/obs-virtual-cam). Again, instructions for installalation are provided there but they will be covered here as well.
The VAS is only one necessary component. You also need to get a video source from your game into the VAS component. Since OBS version 26 the previosly required [OBS-VirtualCam](https://github.com/CatxFish/obs-virtual-cam) plugin is included as a feature in OBS (However, if you have a portable OBS version, the option to start the virtual cam won't show up).

There may be issues in installation for different versions of software, but don't be afraid to try versions different form my own. This is the list of versions that I use for development and testing:
There may be issues in installation for different versions of software, but don't be afraid to try versions different from my own. This is the list of versions that I use for development and testing:

- [Livesplit 1.8.10](https://github.com/LiveSplit/LiveSplit/releases)
- [Video Auto Splitter 0.5.2.3](https://github.com/ROMaster2/LiveSplit.VideoAutoSplit/releases)
Expand All @@ -31,7 +32,7 @@ I have reports from some users that have had success using PS4 share instead of

I have also heard reports that versions newer than the above list also work. Thank you Aquila_Ezio!

Kevin700p has had trouble streaming and using the load remover at the same time. Turns out his phone was plugged into his stream computer (a laptop) and unplugging the phone lets him do both at once.


## Installation of the LiveSplit VAS component

Expand All @@ -45,34 +46,36 @@ This assumes that you already have LiveSplit installed. If not, please visit th

Installation of the VAS should be complete. You will at a minimum need to restart LiveSplit.

## Installation of OBS-VirtualCam
This assumes that you already have some flavor of OBS installed. If not, please visit the [OBS release page](https://github.com/obsproject/obs-studio/releases). Should also work with Streamlabs-OBS, but I have not personally tried it.

1. Ensure OBS is closed.
2. Download [OBS-VirtualCam2.0.4-Installer.exe
](https://github.com/CatxFish/obs-virtual-cam/releases/download/2.0.4/OBS-VirtualCam2.0.4-Installer.exe)
3. Run the installation. One of the prompts will ask how many cameras you want. I selected 4, but really only 1 is needed.

## Setup

I recommend a reboot post-installation to avoid any headaches. The first thing that needs to be done is share the video from OBS to LiveSplit.


#### VirtualCam in OBS setup
#### Installation of OBS-VirtualCam (post OBS v26 - using the plugin)
> If you have any version of OBS newer than 26.0.0, you don't need this plugin - it's built right into OBS.
This assumes that you already have some flavor of OBS installed. If not, please visit the [OBS release page](https://github.com/obsproject/obs-studio/releases). Should also work with Streamlabs-OBS, but I have not personally tried it.

1. Open OBS
2. Under Scenes->Source, right click on your game capture source, then click on "Filters."
3. Under "Effects Filters", add a new filter. It may look like a "+" button near the bottom. Add a filter called "VirtualCam."
4. There are some settings here. I leave "Horizontal Flip" and "Keep Aspect Ratio" NOT checked. I also set "Buffered Frames" to 1.
5. Most importantly in these settings, remember the name of "Target Camera." For me, it is "OBS-Camera."
6. Click on the "Start" button.
1. Ensure OBS is closed.
2. Download [OBS-VirtualCam2.0.4-Installer.exe](https://github.com/CatxFish/obs-virtual-cam/releases/download/2.0.4/OBS-VirtualCam2.0.4-Installer.exe)
3. Run the installation. One of the prompts will ask how many cameras you want. I selected 4, but really only 1 is needed.
4. Open OBS
5. Under Scenes->Source, right click on your game capture source, then click on "Filters."
6. Under "Effects Filters", add a new filter. It may look like a "+" button near the bottom. Add a filter called "VirtualCam."
7. There are some settings here. I leave "Horizontal Flip" and "Keep Aspect Ratio" NOT checked. I also set "Buffered Frames" to 1.
8. Most importantly in these settings, remember the name of "Target Camera." For me, it is "OBS-Camera."
9. Click on the "Start" button.

Your game feed should now be fed to a virtual webcam with the name designated under "Target Camera."

> IMPORTANT: Every time that you close/open OBS, you will need to navigate to the VirtualCam filter and click that "Start" button. It will NOT auto-start each time OBS is restarted.
> Tip: If you are unsure that this is working, you can test using any program that makes use of a webcam to check video. For example: I use Discord and check video settings for video chat preview, and select the "OBS-Camera" to see if the game feed is coming through.


#### Video Auto Splitter

1. Download the ".vas" game profile from this page for your corresponding game.
Expand All @@ -82,37 +85,71 @@ Your game feed should now be fed to a virtual webcam with the name designated un
5. Click on "Layout Settings". Navigate to the tab titled "Video Auto Splitter."
6. Under "Settings" ensure that "Capture Device" represents what is set in OBS-VirtualCam's "Target Camera". For me, it is "OBS-Camera."
7. Still in "Settings", set the "Game Profile" to the appropriate ".vas" file (hzd.vas or tlou2.vas).
8. Click on the "Scan Region" tab and ensure that X=0, Y=0, Width=1920, and Height=1080. If your game is running, with OBS and VirtualCam running, you should see a live preview of your game with funny colors in this tab.
8. Click on the "Scan Region" tab.

- For **HZD** autosplitter ensure that
- X is set to 99
- Y is set to 976
- Width is set to 115
- Height is set to 25
- For **TLOU** autosplitter ensure that
- X is set to 0
- Y is set to 0
- Width is set to 1920
- Height is set to 1080

If your game is running, with OBS and VirtualCam running, you should see a live preview of your game with funny colors in this tab.


9. Click on OK, then OK again.
10. At this stage your timer is still probably checking against Real Time Attack (RTA) instead of the loadless IGT. Right-click on LiveSplit again, then select Compare Against->Game Time.
11. Save your layout
10. At this stage your timer is still probably checking against Real Time Attack (RTA) instead of the loadless IGT. Right-click on LiveSplit again, then select Compare Against->Game Time.
11. Save your layout



#### PS4/PS5 Settings

#### PS4 Settings
> These instructions should also apply to the PS5, but they might have a different name.
These load removers are based on reading the HUD in particular places. The PS4 has the ability to change how the HUD is rendered based on system settings. In order to ensure that the HUD is in the correct spot, you will need to set the HUD to the largest setting.
These load removers are based on reading the HUD in particular places. The PS has the ability to change how the HUD is rendered based on system settings. In order to ensure that the HUD is in the correct spot, you will need to set the HUD to the largest setting.

1. In the PS4's home screen, navigate to "Settings."
2. Go to "Sound and Screen."
3. Select "Display Area Settings."
4. Enlarge the setting to the maximum setting, until "Enlarge" becomes greyed.



## Testing

I *HIGHLY* Recommend testing this before attempting a run each day by doing a quick test.
With all of the above up and running and showing IGT, try to start the timer then invoke a load based on whatever the definition of a load is for your game.



## Problems

Kevin700P has had trouble streaming and using the load remover at the same time. Turns out his phone was plugged into his stream computer (a laptop) and unplugging the phone lets him do both at once.



## Troubleshooting

I will build this section more and more as people run into issues with setup. Please contact me if you have issues with setup, installation, or if you have inconsistencies in load times.

- Problem: Load pauses worked, but in the middle of the run they stop pausing or unpausing.
#### Problem: Load pauses worked, but in the middle of the run they stop pausing or unpausing.
- Solution: In LiveSplit restart the load remover by: Right-Click - Open Layout - select your layout

- Problem: I regularly get crashes in the middle of runs.
#### Problem: I regularly get crashes in the middle of runs.
- Solution: Your CPU may be overloaded. Try reducing your CPU load by closing unnecessary programs. I have had to eliminate Streamlabs Emote Walls since that regularly consumes 20% CPU on my end. I have also heard success regarding stopping local recordings (this sucks but all hardware is different).
- Solution 2: This may also be caused by a specific combination of software (VAS, LiveSplit, OBS). Try a different versions.

#### Problem: Scan Region tab in the VAS's settings doesn't show a preview
> This assumes you already have OBS running and outputting an image through via the virtual cam
- Solution: There's no real fix for this (yet) other than restarting LiveSplit or reloading your layout until it shows up.

> Problem brought up by ScrambledEggsChef and JustSaft


Expand Down Expand Up @@ -148,6 +185,8 @@ Right-click your game video capture device, then select "Properties"
- Color Space: Default
- Color Range: Partial



## Contributors

Though I'm the one building the configuration files I simply do not have the resources to test every scenario and every configuration. I greatly appreciate when others report on problems so that I can make these tools better. I view development on these tools as a community effort.
Expand Down
34 changes: 29 additions & 5 deletions HZD/README.md → src/HZD variants/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ The hzd.vas profile was built based on the rules on speedrun.com for the load-ti
This load remover checks the video feed for the "Loading...", and tells LiveSplit that it is a load whenever this appears.



## Does it work?

These seem to work VERY well on my end, however different setups may cause different issues. Also there could be some scenerios in which they break.
Expand All @@ -24,12 +23,37 @@ Please see the Change Log to regarding the reason for updates to the .vas files.
## Testing

I *HIGHLY* Recommend testing this before attempting a run each day by doing a quick test.
With all of the above up and running and showing IGT, try to start the timer then invoke a load.

1. In HZD, simply perform a fast-travel.
With all of the above up and running and showing IGT, try to start the timer then invoke a load by simply performing a fast-travel or loading a save.

- VAS Scan Region settings
- X is set to 99
- Y is set to 976
- Width is set to 115
- Height is set to 25


## Change Log

Empty for now
- Efforts to lower CPU usage
- Shrunken Scan Region size (See Scan Region above)
- Removed "start" WatchZone
- Removed "isLoading**a**" WatchZone, leaving the main WatchZone as the only feature to scan for


#### Classic variant

I added a classic variant where the scan region settings are the same as before this update (just as a backup)
- Scan Region settings
- Set X to 0
- Set Y to 0
- Set Width to 1920
- Set Height to 1080

#### German variant

The german language has the smallest loading indicator text on loading screens
- Scan Region settings
- Set X to 99
- Set Y to 976
- Set Width to 82
- Set Height to 22
Binary file added src/HZD variants/classic/hzd/imgs/loading.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/HZD variants/classic/hzd/imgs/loadinga.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/HZD variants/classic/hzd/script.asl
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
isLoading
{
return features["isLoading"].current > 10.0;
}
35 changes: 35 additions & 0 deletions src/HZD variants/classic/hzd/structure.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<GameProfile xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Name>Horizon Zero Dawn</Name>
<Screens>
<Screen>
<Name>Game</Name>
<Geometry>
<Width>1920</Width>
<Height>1080</Height>
</Geometry>
<WatchZones>
<WatchZone>
<Name>isLoading</Name>
<Geometry>
<X>99</X>
<Y>976</Y>
<Width>115</Width>
<Height>25</Height>
</Geometry>
<Watches>
<Watcher>
<Name>loading</Name>
<ErrorMetric>PeakAbsolute</ErrorMetric>
<WatchImages>
<WatchImage>
<FilePath>imgs\loading.png</FilePath>
</WatchImage>
</WatchImages>
</Watcher>
</Watches>
</WatchZone>
</WatchZones>
</Screen>
</Screens>
</GameProfile>
Binary file added src/HZD variants/german/hzd/img/loading.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/HZD variants/german/hzd/script.asl
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
isLoading
{
return features["isLoading"].current > 11.0;
}
35 changes: 35 additions & 0 deletions src/HZD variants/german/hzd/structure.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<GameProfile xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Name>Horizon Zero Dawn</Name>
<Screens>
<Screen>
<Name>Game</Name>
<Geometry>
<Width>82</Width>
<Height>22</Height>
</Geometry>
<WatchZones>
<WatchZone>
<Name>isLoading</Name>
<Geometry>
<X>0</X>
<Y>0</Y>
<Width>82</Width>
<Height>22</Height>
</Geometry>
<Watches>
<Watcher>
<Name>loading</Name>
<ErrorMetric>PeakAbsolute</ErrorMetric>
<WatchImages>
<WatchImage>
<FilePath>img\loading.png</FilePath>
</WatchImage>
</WatchImages>
</Watcher>
</Watches>
</WatchZone>
</WatchZones>
</Screen>
</Screens>
</GameProfile>
Binary file added src/HZD variants/normal/hzd/imgs/loading.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/HZD variants/normal/hzd/imgs/loadinga.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/HZD variants/normal/hzd/script.asl
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
isLoading
{
return features["isLoading"].current > 11.0;
}
35 changes: 35 additions & 0 deletions src/HZD variants/normal/hzd/structure.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<GameProfile xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Name>Horizon Zero Dawn</Name>
<Screens>
<Screen>
<Name>Game</Name>
<Geometry>
<Width>115</Width>
<Height>25</Height>
</Geometry>
<WatchZones>
<WatchZone>
<Name>isLoading</Name>
<Geometry>
<X>0</X>
<Y>0</Y>
<Width>115</Width>
<Height>25</Height>
</Geometry>
<Watches>
<Watcher>
<Name>loading</Name>
<ErrorMetric>PeakAbsolute</ErrorMetric>
<WatchImages>
<WatchImage>
<FilePath>imgs\loading.png</FilePath>
</WatchImage>
</WatchImages>
</Watcher>
</Watches>
</WatchZone>
</WatchZones>
</Screen>
</Screens>
</GameProfile>
Binary file added src/HZD variants/remoteplay/hzd/imgs/loading.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/HZD variants/remoteplay/hzd/imgs/loadinga.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/HZD variants/remoteplay/hzd/script.asl
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
isLoading
{
return features["isLoading"].current > 30.0;
}
35 changes: 35 additions & 0 deletions src/HZD variants/remoteplay/hzd/structure.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<GameProfile xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Name>Horizon Zero Dawn</Name>
<Screens>
<Screen>
<Name>Game</Name>
<Geometry>
<Width>115</Width>
<Height>25</Height>
</Geometry>
<WatchZones>
<WatchZone>
<Name>isLoading</Name>
<Geometry>
<X>0</X>
<Y>0</Y>
<Width>115</Width>
<Height>25</Height>
</Geometry>
<Watches>
<Watcher>
<Name>loading</Name>
<ErrorMetric>PeakAbsolute</ErrorMetric>
<WatchImages>
<WatchImage>
<FilePath>imgs\loading.png</FilePath>
</WatchImage>
</WatchImages>
</Watcher>
</Watches>
</WatchZone>
</WatchZones>
</Screen>
</Screens>
</GameProfile>
Binary file added src/HZD variants/template/imgs/loading.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 8885b5e

Please sign in to comment.