Skip to content

Commit

Permalink
Updated AutoSplitter for TOEM v1.09 by adjusting all pointer paths to…
Browse files Browse the repository at this point in the history
… new TypeInfo locations and fadjusted field offsets where necessary.
  • Loading branch information
cieldeville committed Nov 27, 2021
1 parent 70ce757 commit 29f74fc
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 19 deletions.
Binary file modified Components/LiveSplit.TOEM.dll
Binary file not shown.
31 changes: 21 additions & 10 deletions Components/LiveSplit.Toem.Updates.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
<?xml version="1.0" encoding="utf-8" ?>
<update version="1.8.0">
<files>
<file path="Components/LiveSplit.TOEM.dll" status="changed"/>
</files>
<changelog>
<change>Publishing for LiveSplit for the first time.</change>
<change>AutoSplitter detects player getting out of bed for the first time, then splits every new region and once the end screen prompt is shown.</change>
<change>Returning to main menu before reaching the ending will reset the timer.</change>
</changelog>
</update>
<updates>
<update version="1.8.0">
<files>
<file path="Components/LiveSplit.TOEM.dll" status="changed"/>
</files>
<changelog>
<change>Publishing for LiveSplit for the first time.</change>
<change>AutoSplitter detects player getting out of bed for the first time, then splits every new region and once the end screen prompt is shown.</change>
<change>Returning to main menu before reaching the ending will reset the timer.</change>
</changelog>
</update>
<update version="1.9.0">
<files>
<file path="Components/LiveSplit.TOEM.dll" status="changed"/>
</files>
<changelog>
<change>Updated AutoSplitter for TOEM v1.09</change>
<change>Fixed pointer paths to required types and fields</change>
</changelog>
</update>
</updates>
27 changes: 21 additions & 6 deletions Game/GameState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,19 +78,34 @@ public GameState(MemoryInterface memInterface)

private void BuildPaths()
{
_gameManagerTypeInfo = PointerPath.Module("GameAssembly.dll", 0x1E3FE88UL).Deref().Build();
// script.json @ GameManager_TypeInfo [Address]
_gameManagerTypeInfo = PointerPath.Module("GameAssembly.dll", 0x1BBA520UL).Deref().Build();
// IL2CPP constant
_gameManagerStaticFields = _gameManagerTypeInfo.Extend().Offset(0xB8UL).Deref().Build();
_atTitleScreenPath = _gameManagerStaticFields.Extend().Offset(0x30UL).Build();
_currentRegionPath = _gameManagerStaticFields.Extend().Offset(0x40UL).Build();
// GameManager.cs @<AtTitleScreen>k__BackingField [FieldOffset]
_atTitleScreenPath = _gameManagerStaticFields.Extend().Offset(0x38UL).Build();
// GameManager.cs @<CurrentRegion>k__BackingField [FieldOffset]
_currentRegionPath = _gameManagerStaticFields.Extend().Offset(0x48UL).Build();

_sceneTransitionControllerTypeInfo = PointerPath.Module("GameAssembly.dll", 0x1E32D28UL).Deref().Build();

// script.json @ SceneTransitionController_TypeInfo [Address]
_sceneTransitionControllerTypeInfo = PointerPath.Module("GameAssembly.dll", 0x1BB22C0UL).Deref().Build();
// IL2CPP constant
_sceneTransitionControllerStaticFields = _sceneTransitionControllerTypeInfo.Extend().Offset(0xB8UL).Deref().Build();
// SceneTransitionController.cs @ <IsLoadingScene>k__BackingField
_isLoadingScenePath = _sceneTransitionControllerStaticFields.Extend().Offset(0x29UL).Build();

_menuManagerTypeInfo = PointerPath.Module("GameAssembly.dll", 0x1E41780UL).Deref().Build();

// script.json @ MenuManager_TypeInfo [Address]
_menuManagerTypeInfo = PointerPath.Module("GameAssembly.dll", 0x1BBBC60UL).Deref().Build();
// IL2CPP constant
_menuManagerStaticFields = _menuManagerTypeInfo.Extend().Offset(0xB8UL).Deref().Build();
_menuManagerInstancePath = _menuManagerStaticFields.Extend().Deref().Build();
// MenuManager.cs @<Instance>k__BackingField [FieldOffset]
_menuManagerInstancePath = _menuManagerStaticFields.Extend().Offset(0x0UL).Deref().Build();
// MenuManager.cs @menu_TheEnd [FieldOffset]
_theEndScreenInstancePath = _menuManagerInstancePath.Extend().Offset(0xD8UL).Deref().Build();

// TheEndScreen.cs @myState [FieldOffset]
_theEndScreenStatePath = _theEndScreenInstancePath.Extend().Offset(0x40UL).Build();
}

Expand Down
14 changes: 12 additions & 2 deletions Game/PlayerController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,26 @@ public PlayerController(MemoryInterface memInterface)

private void BuildPaths()
{
_playerControllerTypeInfo = PointerPath.Module("GameAssembly.dll", 0x1E49190UL).Deref().Build();
// script.json @ PlayerController_TypeInfo [Address]
_playerControllerTypeInfo = PointerPath.Module("GameAssembly.dll", 0x1B9D350UL).Deref().Build();
// IL2CPP constant
_playerControllerStaticFields = _playerControllerTypeInfo.Extend().Offset(0xB8UL).Deref().Build();
_playerControllerInstancePath = _playerControllerStaticFields.Extend().Deref().Build();
// PlayerController.cs @<Instance>k__BackingField [FieldOffset]
_playerControllerInstancePath = _playerControllerStaticFields.Extend().Offset(0x0UL).Deref().Build();

// PlayerController.cs @currentState [FieldOffset]
_currentStatePath = _playerControllerInstancePath.Extend().Offset(0x200UL).Build();
// PlayerController.cs @nextState [FieldOffset]
_nextStatePath = _playerControllerInstancePath.Extend().Offset(0x208UL).Build();
// PlayerController.cs @roamState [FieldOffset]
_roamStatePath = _playerControllerInstancePath.Extend().Offset(0x218UL).Build();
// PlayerController.cs @sitState [ToFieldOffsetken]
_sitStatePath = _playerControllerInstancePath.Extend().Offset(0x220UL).Build();
// PlayerController.cs @animationState [FieldOffset]
_playAnimationStatePath = _playerControllerInstancePath.Extend().Offset(0x228UL).Build();
// PlayerController.cs @faceBoardState [FieldOffset]
_faceBoardStatePath = _playerControllerInstancePath.Extend().Offset(0x230UL).Build();
// PlayerController.cs @climbingState [FieldOffset]
_climbingStatePath = _playerControllerInstancePath.Extend().Offset(0x238UL).Build();
}

Expand Down
3 changes: 3 additions & 0 deletions LiveSplit.TOEM.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -138,5 +138,8 @@
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<Content Include="Components\LiveSplit.Toem.Updates.xml" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
2 changes: 1 addition & 1 deletion Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
// indem Sie "*" wie unten gezeigt eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.8.0.0")]
[assembly: AssemblyVersion("1.9.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

[assembly: ComponentFactory(typeof(TOEMFactory))]

0 comments on commit 29f74fc

Please sign in to comment.