Closed Ssencipe closed 7 months ago
Currently only searches for videos if they're in
The primary issue currently is that when transferring profiles or downloading TV Packs that utilize this mod, the Television Videos folder does not transfer like it does with other TV mods. Regardless of whether it is under plugins or under plugins\DeathWrench-BestestTelevisionMod, it is not present when a profile is shared or a dependent mod is downloaded.
I made a separate mod based off of CodeEnder-Custom_Boombox_Fix to address this. It will just move the .mp4 files to where they need to go. https://thunderstore.io/c/lethal-company/p/DeathWrench/TelevisionVideosFix/
This is a temporary solution for now.
Using the new mod creates a new Television Videos folder in plugins, but it also fails to actually transfer anything. It seems to have actually deleted all the videos instead.
I am going to go over the methodology of the issue because I think there is some miscommunication.
Having a TelevisionVideos folder in both plugins and plugins\DeathWrench-BestestTelevisionMod functions perfectly fine. The issues stem from transferring these files in any way.
The act of exporting to a Thunderstore profile via profile code or file seems to remove all videos from the Television Videos folder when using BestestTelevisionMod.
Downloading a Thunderstore mod utilizing BestestTelevision mod as a dependency will delete all of the files in the Television Videos folder when the mod is added to a profile.
Running the game with both BestestTelevisionMod and TelevisionVideosFix will attempt to move any .mp4 files to a new location, but will instead remove them from the profile entirely, leaving only an empty Television Videos folder in plugins.
These issues do not occur when attempting the same thing with TVLoader (however I have not tested TVLoader with TelevisionVideosFix). There seems to be a transferring issue with BestestTelevisionMod specifically.
The act of exporting to a Thunderstore profile via profile code or file seems to remove all videos from the Television Videos folder when using BestestTelevisionMod.
This shouldn't happen, but then again I haven't really messed with profiles, and I don't click this button:
I got sick of clicking it and instead of using the steam launch command --doorstop-enable true --doorstop-target "C:\Users\death\AppData\Roaming\r2modmanPlus-local\LethalCompany\profiles\Lethal Company\BepInEx\core\BepInEx.Preloader.dll"
I made a profile in r2modman called Lethal Company, deleted the folder and then symlinked it to the main Lethal Company directory like so:
using Symlinker
I only use this profile, and all the mods I have get installed into the main game directory now. I remember having a bug with profiles loading mods I didn't have installed anymore so that's why I did it this way in my own setup.
What LethalTVManager does to add files roughly: https://github.com/DeathWrench/BestestTVMod/blob/main/Plugin.cs
What TVLoader does to add files: https://github.com/DeathWrench/BestestTVMod/blob/main/Utils/VideoManager.cs
Specifically this part:
foreach (string
textin Directory.GetDirectories(Paths.PluginPath))
{
string path = Path.Combine(Paths.PluginPath,
text, "Television Videos");
if (Directory.Exists(path))
{
string[] files = Directory.GetFiles(path, "*.mp4");
...
This is what's successfully finding all the files. Trying to implement how TVLoader loads files into what LethalTVManager does, seems to break a lot of things, like if I skip a video it won't play until turning the TV off and back on again..
Television Videos Fix creates a Television Videos folder if it doesn't exist in the BepInEx/plugin folder, and then it searches for files similarly to how TVLoader does it, and just moves them all to the "right" folder. I don't know how this is broken or why it's deleting the Television Videos folder since I removed the code that deletes files in version 0.0.3. Tested with TVTendo and it moved the files successfully. I'll take your word for it that it's not working for you in any case and try to fix it another way.
Odd, we seem to be experiencing different issues. The channel skipping function works fine on my end without having to turn off the TV. However, when the clip finishes it starts the next clip in the file's order as if you never skipped ahead or behind (for example, if I was watching channel 5, and I skipped to channel 8, when the clip for channel 8 ends, it would play channel 6 instead of channel 9). I'll keep testing things with the mod. Maybe I can get a different reaction out of r2modman instead of Thunderstore. I'll let you know if I find anything.
UPDATE: Went to r2modman I got TVTENDO working. Went back to Thunderstore and got things working on a duplicate profile. The first profile I tested on seems to be the issue for whatever reason. The most recent patch and TVFixer do the trick now it seems. I will test to see if I can transfer local TV files by profile code on a new profile, and if it works I'll close the issue.
Tweaked, some things, and I believe I have gotten the mod to work as intended. Utilizing the recent fixes and accessory mod, the mod functions assuming a published mod is used. Users will need to run the game twice for things to function, but otherwise it's all good. Closing issue.
Odd, we seem to be experiencing different issues. The channel skipping function works fine on my end without having to turn off the TV.
You misunderstand, this is why I made the Television Videos Fix mod. I couldn't get the code to search for the files working without bugs like that. Just easier to substitute it with the TV Fix mod for now. I'm gonna keep it open since this is only a temporary fix. In theory, I imagine but haven't tested: If 2 mp4s are named exactly the same the Television Videos Fix mod could fail, plus I'd rather things load properly the first time.
Finally fixed it for good. https://github.com/DeathWrench/BestestTVMod/commit/eac7b8143658e5eeaf9d5842027e0aa8904ace01
The mod does not seen to properly share contents of the television folder to other players. I have tested it by sharing a profile code with my local files to other players with no success. For other players, it was only playing vanilla TV clips. I also tried downloading a TV pack from Thunderstore that used this mod as a dependency (TVTENDO), and when I booted up the game it was only playing vanilla TV clips. I verified that the mod files actually contained clips, and I tried changing the root of their file from BepInEx to plugins to match other TVLoader mods, but it still failed to load the clips. The mod seems to only work locally.