-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
217 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
namespace Sst.TasTool { | ||
static class AppVersion { public const string Value = "0.0.0"; } | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Utilities for building tool assisted speedruns. | ||
|
||
# Installation | ||
|
||
- Make sure [Melon Loader](https://melonwiki.xyz/#/?id=what-is-melonloader) version 0.5.7 or newer is installed in Bonelab | ||
- Download [the mod from Thunderstore](https://bonelab.thunderstore.io/package/jakzo/TasTool/) (click on "Manual Download") | ||
- Open the downloaded `.zip` file and extract `Mods/TasTool.dll` into `BONELAB/Mods/TasTool.dll` which is usually at: | ||
- Steam: `C:\Program Files (x86)\Steam\steamapps\common\BONELAB\BONELAB` | ||
- Oculus: `C:\Program Files\Oculus\Software\Software\stress-level-zero-inc-bonelab` | ||
|
||
# Links | ||
|
||
- Source code: https://github.com/jakzo/SlzSpeedrunTools/tree/main/projects/Bonelab/TasTool | ||
- Thunderstore: https://bonelab.thunderstore.io/package/jakzo/TasTool/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" | ||
Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<ProjectGuid>{EAE1410F-B5CF-47D6-8764-2FCAEE822C9D}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>TasTool</RootNamespace> | ||
<AssemblyName>TasTool</AssemblyName> | ||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<Deterministic>true</Deterministic> | ||
<TargetFrameworkProfile /> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<Prefer32Bit>false</Prefer32Bit> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' "> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<Prefer32Bit>false</Prefer32Bit> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="System.IO.Compression" /> | ||
<Reference Include="System.Xml.Linq" /> | ||
<Reference Include="System.Data.DataSetExtensions" /> | ||
<Reference Include="Microsoft.CSharp" /> | ||
<Reference Include="System.Data" /> | ||
<Reference Include="System.Xml" /> | ||
<Reference Include="Assembly-CSharp"> | ||
<HintPath>..\..\..\references\Bonelab\Assembly-CSharp.dll</HintPath> | ||
</Reference> | ||
<Reference Include="SLZ.Marrow"> | ||
<HintPath>..\..\..\references\Bonelab\SLZ.Marrow.dll</HintPath> | ||
</Reference> | ||
<Reference Include="SLZ.Marrow.SDK"> | ||
<HintPath>..\..\..\references\Bonelab\SLZ.Marrow.SDK.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Il2Cppmscorlib"> | ||
<HintPath>..\..\..\references\Bonelab\Il2Cppmscorlib.dll</HintPath> | ||
</Reference> | ||
<Reference Include="MelonLoader"> | ||
<HintPath>..\..\..\references\Bonelab\MelonLoader.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Harmony"> | ||
<HintPath>..\..\..\references\Bonelab\0Harmony.dll</HintPath> | ||
</Reference> | ||
<Reference Include="UnhollowerBaseLib"> | ||
<HintPath>..\..\..\references\Bonelab\UnhollowerBaseLib.dll</HintPath> | ||
</Reference> | ||
<Reference Include="UnhollowerRuntimeLib"> | ||
<HintPath>..\..\..\references\Bonelab\UnhollowerRuntimeLib.dll</HintPath> | ||
</Reference> | ||
<Reference Include="UnityEngine.CoreModule"> | ||
<HintPath>..\..\..\references\Bonelab\UnityEngine.CoreModule.dll</HintPath> | ||
</Reference> | ||
<Reference Include="UnityEngine.PhysicsModule"> | ||
<HintPath>..\..\..\references\Bonelab\UnityEngine.PhysicsModule.dll</HintPath> | ||
</Reference> | ||
<Reference Include="UnityEngine.UI"> | ||
<HintPath>..\..\..\references\Bonelab\UnityEngine.UI.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Unity.TextMeshPro"> | ||
<HintPath>..\..\..\references\Bonelab\Unity.TextMeshPro.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Unity.Input"> | ||
<HintPath>..\..\..\references\Bonelab\UnityEngine.InputLegacyModule.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Unity.XR"> | ||
<HintPath>..\..\..\references\Bonelab\UnityEngine.VRModule.dll</HintPath> | ||
</Reference> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="AppVersion.cs" /> | ||
<Compile Include="src/**/*.cs" /> | ||
<Compile Include="../../../common/Utilities/Metadata.cs" /> | ||
<Compile Include="../../../common/Utilities/Dbg.cs" /> | ||
<Compile Include="../../../common/Bonelab/LevelHooks.cs" /> | ||
<Compile Include="../../../common/Utilities/Unity.cs" /> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
<PropertyGroup Condition=" '$(OS)' == 'Windows_NT' "> | ||
<PostBuildEvent> | ||
COPY "$(TargetPath)" "C:\Program | ||
Files\Oculus\Software\Software\stress-level-zero-inc-bonelab\Mods" | ||
</PostBuildEvent> | ||
</PropertyGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using MelonLoader; | ||
using System.Reflection; | ||
using System.Resources; | ||
using System.Runtime.InteropServices; | ||
|
||
[assembly:AssemblyTitle(Sst.TasTool.BuildInfo.NAME)] | ||
[assembly:AssemblyDescription(Sst.TasTool.BuildInfo.DESCRIPTION)] | ||
[assembly:AssemblyConfiguration("")] | ||
[assembly:AssemblyCompany(Sst.Metadata.COMPANY)] | ||
[assembly:AssemblyProduct(Sst.TasTool.BuildInfo.NAME)] | ||
[assembly:AssemblyCopyright("Created by " + Sst.Metadata.AUTHOR)] | ||
[assembly:AssemblyTrademark(Sst.Metadata.COMPANY)] | ||
[assembly:AssemblyCulture("")] | ||
[assembly:ComVisible(false)] | ||
//[assembly: Guid("")] | ||
[assembly:AssemblyVersion(Sst.TasTool.AppVersion.Value)] | ||
[assembly:AssemblyFileVersion(Sst.TasTool.AppVersion.Value)] | ||
[assembly:NeutralResourcesLanguage("en")] | ||
[assembly:MelonInfo( | ||
typeof(Sst.TasTool.Mod), Sst.TasTool.BuildInfo.NAME, | ||
Sst.TasTool.AppVersion.Value, Sst.Metadata.AUTHOR, | ||
"https://bonelab.thunderstore.io/package/jakzo/TasTool/")] | ||
[assembly:MelonGame(Sst.Metadata.DEVELOPER, Sst.Metadata.GAME)] | ||
|
||
namespace Sst.TasTool { | ||
public static class BuildInfo { | ||
public const string NAME = "TasTool"; | ||
public const string DESCRIPTION = "Utilities for building tool assisted speedruns."; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using MelonLoader; | ||
using UnityEngine; | ||
using UnityEngine.SceneManagement; | ||
using SLZ.SaveData; | ||
|
||
namespace Sst.TasTool { | ||
public class Mod : MelonMod { | ||
public override void OnInitializeMelon() { | ||
Dbg.Init(BuildInfo.NAME); | ||
Tas.Initialize(); | ||
} | ||
} | ||
} | ||
|
||
// Top level namespace to make calling via UnityExplorer easier | ||
public static class Tas { | ||
public static float CheatEngineTimescale = 1f; | ||
|
||
public static void Initialize() { | ||
Tas.SetResolution(); | ||
Sst.Utilities.LevelHooks.OnLevelStart += level => | ||
SlowdownAudio(CheatEngineTimescale); | ||
} | ||
|
||
public static void SetResolution() { | ||
Screen.SetResolution(3840, 1080, FullScreenMode.Windowed); | ||
} | ||
|
||
public static void SlowdownAudio(float timescale) { | ||
for (int i = 0; i < SceneManager.sceneCount; i++) { | ||
var currentScene = SceneManager.GetSceneAt(i); | ||
if (!currentScene.isLoaded) | ||
continue; | ||
foreach (var rootObj in currentScene.GetRootGameObjects()) { | ||
var audioSources = new List<AudioSource>(); | ||
Sst.Utilities.Unity.FindDescendantComponentsOfType<AudioSource>( | ||
ref audioSources, rootObj.transform); | ||
foreach (var audioSource in audioSources) { | ||
audioSource.pitch *= timescale; | ||
} | ||
} | ||
} | ||
} | ||
|
||
public static void ToggleBodyLog() { | ||
var progression = DataManager.Instance._activeSave.Progression; | ||
var isEnabled = !progression.HasBodyLog; | ||
progression.BodyLogEnabled = isEnabled; | ||
progression.HasBodyLog = isEnabled; | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"name": "TasTool", | ||
"version_number": "0.0.0", | ||
"description": "Utilities for building tool assisted speedruns.", | ||
"website_url": "https://github.com/jakzo/SlzSpeedrunTools/tree/main/projects/Bonelab/TasTool", | ||
"dependencies": ["LavaGang-MelonLoader-0.5.7"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters