SoulMemory 1.2.0
See the version list below for details.
dotnet add package SoulMemory --version 1.2.0
NuGet\Install-Package SoulMemory -Version 1.2.0
<PackageReference Include="SoulMemory" Version="1.2.0" />
paket add SoulMemory --version 1.2.0
#r "nuget: SoulMemory, 1.2.0"
// Install SoulMemory as a Cake Addin #addin nuget:?package=SoulMemory&version=1.2.0 // Install SoulMemory as a Cake Tool #tool nuget:?package=SoulMemory&version=1.2.0
SoulMemory
<a href="https://ko-fi.com/wasted1" title="Donate to this project using Buy Me A Coffee"><img src="https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg" alt="Buy Me A Coffee donate button" /></a> <a href="https://www.youtube.com/@1wasted"><img src="https://img.shields.io/badge/-YouTube-red"></a>
Backing library of SoulSplitter.
This library provides an API that lets you read/write from/to running fromsoft games (Dark Soul 1, Dark Souls 2, Dark Souls 3, Sekiro: Shadows die twice and Elden Ring). It uses the Win32 API to achieve this. It is build mainly with speedrunning in mind, and focuses on timer and autosplitter features.
Example usage
var ds1 = new DarkSouls1(); //Automatically resolves differences between PTDE & Remastered. Same applies to DarkSouls2
while (true)
{
if (!ds1.TryRefresh(out Exception e)) //Each game object must be refreshed often, best would be 60 times per second.
{
//TODO: handle error
}
var inGameTime = ds1.GetInGameTimeMilliseconds(); //Get the amount of milliseconds played on the current character
var isAsylumDemonAlive = ds1.ReadEventFlag((uint)DarkSouls1.Boss.AsylumDemon); //Read an arbitrary event flag, in this case the boss defeated flag for asylum demon
var inventory = ds1.GetInventory(); //Read all items in the players inventory
Thread.Sleep(10);
}
API
DarkSouls1 (PTDE & remastered)
bool ReadEventFlag(uint eventFlagId); //Read any event flag (more info about event flags on the wiki: https://github.com/FrankvdStam/SoulSplitter/wiki/Eventflags)
int GetAttribute(Attribute attribute); //Read an attribute (one of the player's levels)
bool IsWarpRequested(); //True if a loading screen is visible, and a warp was requested via a bonfire, homeward bone, darksign or homeward miracle
bool IsPlayerLoaded(); //True if the player object is loaded in memory
int GetInGameTimeMilliseconds(); //Returns the amount of milliseconds played on the current savefile. Returns 0 in the main menu
int NgCount(); //Returns what the current NG+ cycle is
int GetCurrentSaveSlot(); //Returns what the current, or last loaded save slot is
Vector3f GetPosition(); //Returns the players position in a vector of 3 floats
bool AreCreditsRolling(); //Returns true if the credits are rolling
void ResetInventoryIndices(); //Overwrites a number of in-game indices (current selected inventory slot for instance)
List<Item> GetInventory(); //Returns a list of items, read from the players inventory
BonfireState GetBonfireState(Bonfire bonfire); //Returns the state of a bonfire
string GetSaveFileLocation(); //Attempts to find the path to the savefile, depending on locale
bool TryRefresh(out Exception exception); //Refresh the internal structures, make sure the game is still running, etc. Must be called often for reliable return values
TreeBuilder GetTreeBuilder(); //Returns a structure representing memory addresses, pointers and offsets. Can be used to resolve said pointers, or verified against a file. You likely won't need this, unless you want to extend the object
DarkSouls2 (Vanilla & SOTFS)
bool Refresh(out Exception exception); //Refresh the internal structures, make sure the game is still running, etc. Must be called often for reliable return values
Vector3f GetPosition(); //Returns the players position in a vector of 3 floats
int GetBossKillCount(BossType bossType); //Returns a value representing the current NG+ cycle plus the amount of boss kills on this cycle. If you kill last giant once on ng, it will return 1. Kill him twice, it will retun 2. Kill him 0 times on ng+, it will return 1.
int GetAttribute(Attribute attribute); //Read an attribute (one of the player's levels)
bool IsLoading(); //Returns true when a loading screen is visible
bool ReadEventFlag(uint eventFlagId); //WARNING: not finished, will return garbage data. Event flags are weird in DS2.
DarkSouls3
bool Refresh(); //Refresh the internal structures, make sure the game is still running, etc. Must be called often for reliable return values
bool IsLoading(); //Returns true when a loading screen is visible
bool IsPlayerLoaded(); //Returns true when the player object is loaded into memory
int GetInGameTimeMilliseconds(); //Returns the amount of milliseconds played on the current savefile. Returns 0 in the main menu
void WriteInGameTimeMilliseconds(int millis); //Overwrite the game's in game time with a new value (used in blackscreen removal to create the illusion of a paused timer)
Vector3f GetPosition(); //Returns the players position in a vector of 3 floats
int ReadAttribute(Attribute attribute); //Read an attribute (one of the player's levels)
bool ReadEventFlag(uint eventFlagId); //Read any event flag (more info about event flags on the wiki: https://github.com/FrankvdStam/SoulSplitter/wiki/Eventflags)
bool BlackscreenActive() //Reads a combination of flags in memory to determine of a blackscreen is active
Sekiro
Refeshing Sekiro will install nologo and notutorial mods into the game. Additionally it installs a fix to the imprecise in game time.
bool Refresh(out Exception exception); //Refresh the internal structures, make sure the game is still running, etc. Must be called often for reliable return values
int GetInGameTimeMilliseconds(); //Returns the amount of milliseconds played on the current savefile. Returns 0 in the main menu
void WriteInGameTimeMilliseconds(int value); //Overwrite the game's in game time with a new value (used in blackscreen removal to create the illusion of a paused timer)
bool IsPlayerLoaded(); //Returns true when the player object is loaded into memory
Vector3f GetPlayerPosition(); //Returns the players position in a vector of 3 floats
bool IsBlackscreenActive(); //Reads a combination of flags in memory to determine of a blackscreen is active
bool ReadEventFlag(uint eventFlagId); //Read any event flag (more info about event flags on the wiki: https://github.com/FrankvdStam/SoulSplitter/wiki/Eventflags)
EldenRing
Refreshing Elden Ring will install a fix to the imprecise in game timer
bool Refresh(out Exception exception); //Refresh the internal structures, make sure the game is still running, etc. Must be called often for reliable return values
void EnableHud(); //The HUD can be on disabled or on "auto". This function sets it to always on.
Position GetPosition(); //Returns the players position in a vector of 3 floats + the ID's of the current tile
bool IsPlayerLoaded(); //Returns true if the player object is loaded into memory
ScreenState GetScreenState(); //Returns the current "screenstate", can be InGame/Loading/MainMenu/Unknown
bool IsBlackscreenActive(); //Reads a combination of flags in memory to determine of a blackscreen is active
List<Item> ReadInventory(); //Reads the player's inventory. A part of the inventory seems stored in event flags (especially key-items) so be warned: some things might not be in this list
bool ReadEventFlag(uint flagId); //Read any event flag (more info about event flags on the wiki: https://github.com/FrankvdStam/SoulSplitter/wiki/Eventflags)
int GetInGameTimeMilliseconds(); //Returns the amount of milliseconds played on the current savefile. Returns 0 in the main menu
void WriteInGameTimeMilliseconds(int milliseconds); //Overwrite the game's in game time with a new value (used in blackscreen removal to create the illusion of a paused timer)
void ResetIgt(); //Overwrite the game's in game time with 0 (used to prepare NG+ save files)
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- keystoneengine.csharp (>= 0.9.1.1)
- Microsoft.CSharp (>= 4.7.0)
- Microsoft.Windows.Compatibility (>= 6.0.0)
- Newtonsoft.Json (>= 13.0.1)
- System.Data.DataSetExtensions (>= 4.5.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.7.3 | 127 | 8/10/2024 |
1.7.2 | 78 | 8/1/2024 |
1.7.1 | 89 | 7/18/2024 |
1.7.0 | 74 | 7/12/2024 |
1.5.2 | 166 | 9/11/2023 |
1.5.1 | 118 | 9/10/2023 |
1.4.6 | 136 | 8/30/2023 |
1.4.2 | 180 | 4/8/2023 |
1.4.0 | 208 | 3/24/2023 |
1.3.0 | 277 | 12/17/2022 |
1.2.6 | 278 | 12/7/2022 |
1.2.1 | 306 | 11/22/2022 |
1.2.0 | 322 | 11/17/2022 |
1.1.9 | 327 | 11/9/2022 |
1.1.8 | 303 | 11/3/2022 |
1.1.7 | 351 | 10/27/2022 |