Last Epoch Save Editor

Upload *YOUR* gamehacking tools/helpers here
CyrexBabbel
Noobzor
Noobzor
Posts: 13
Joined: Wed Apr 19, 2017 3:32 pm
Reputation: 1

Re: Last Epoch Save Editor

Post by CyrexBabbel »

Ash06 wrote:
Wed Jun 07, 2023 1:23 am
CyrexBabbel wrote:
Tue Jun 06, 2023 5:03 pm
I only have one question: where do i get the right property names of the stats? For example, one propertiy is named SP.CriticalMultiplier. Where can i get the name now, for lets say mana regeneration? Is this possible to get with the unity explorer ingame?

Can you also tell me, how to get the function or how to edit for example the enemy density?
You can do the same as the function "Edit" in Mods\UniqueMods.cs with UnityExplorer

Code: Select all

UnityEngine.Object obj = Functions.GetObject("UniqueList");
if (type == typeof(UniqueList))
Search with UnityExplorer an object, filter by class "UniqueList", filter by name "UniqueList"
Select the result object

Code: Select all

Il2CppSystem.Collections.Generic.List<UniqueList.Entry> Uniques_List_Entry = unique_list.uniques;
Inspect UniqueList.Uniques
Inspect any UniqueList.Entry
Image

Code: Select all

ul_entry.mods = mods;
Inspect UniqueList.Entry.Mods
Inspect any UniqueItemMod

Code: Select all

mods.Add(new UniqueItemMod
            {
                type = BaseStats.ModType.INCREASED,
                value = 999,
                maxValue = 999,
                property = SP.AttackSpeed,
                tags = AT.None
            });
Inspect UniqueItemMod.Property for "property" Enum, same with type, tags, ...

With the same method, you can edit any object in Unity (not only Last Epoch)

For density :
- SpawnerPlacementRoom.intendedSpawnerDensity (maybe this, edit alls rooms at the beginning of your scene , see github)
- SpawnerPlacementManager.defaultSpawnerDensity
- SpawnerPlacementManager.alwaysRollSpawnerDensity
- MonolithTimeline.enemyDensityModifier

I Update the github with Gold Multiplier, Experience Multiplier, Item drop Multiplier
long13579 wrote:
Tue Jun 06, 2023 8:27 pm
I'm stuck at step 7. Could someone help me please ?
Image
If you don't have "UniverseLib.IL2CPP.Unhollower.dll" in "UserLibs" folder, you have to install UnityExplorer

Image
All refs (LastEpoch default folder)
Hey Ash,

great, i got it now with the Object Explorer.

I saw now, you can just edit everything you want in there on the fly. ( tried with density )


Just have to try and test it now, to work as a mod.


Thanks for your help!!

long13579
Novice Cheater
Novice Cheater
Posts: 16
Joined: Tue Jun 06, 2023 8:03 pm
Reputation: 0

Re: Last Epoch Save Editor

Post by long13579 »

Ash06 wrote:
Wed Jun 07, 2023 1:23 am
Thank you so much. Now i'm down to 8 errors, so close yet so far. Idk if i put your codes in right places
Last edited by long13579 on Fri Jun 09, 2023 2:04 am, edited 2 times in total.

User avatar
Ash06
Expert Cheater
Expert Cheater
Posts: 260
Joined: Wed Oct 09, 2019 2:34 pm
Reputation: 119

Re: Last Epoch Save Editor

Post by Ash06 »

You're missing some code, [Link] , download again (code --> download zip), then edit refs if your game isn't in the default folder

Some of the code has been rewrite for optimizing speed when editing a lot of objects.
There are 2 mains AutoLoad functions, one After Init (require UnityExplorer.dll ref), one after scene change
ex: edit item before loading a character, edit spawner after scene change

Image
Enable/Disable all you want And/Or use the code to make you own mod

long13579
Novice Cheater
Novice Cheater
Posts: 16
Joined: Tue Jun 06, 2023 8:03 pm
Reputation: 0

Re: Last Epoch Save Editor

Post by long13579 »

Ash06 wrote:
Thu Jun 08, 2023 2:00 am
You're missing some code, [Link] , download again (code --> download zip), then edit refs if your game isn't in the default folder
This time it's down to 1 error haha :lol:. I have the refs plus UnityExplorer.ML.IL2CPP.dll in Last Epoch folder\Mods. Not sure if it's the one you said.
Edit: Btw can you tell me what version of melonloader you are using ?

Image

User avatar
Ash06
Expert Cheater
Expert Cheater
Posts: 260
Joined: Wed Oct 09, 2019 2:34 pm
Reputation: 119

Re: Last Epoch Save Editor

Post by Ash06 »

We are using MelonLoader 5.7 (because latest version use .net6.0 and i don't have time to patch UnityExplorer for .net6.0)
A ref for UnityExplorer.ML.IL2CPP.dll (from Last Epoch folder\Mods\) was added (use to get UnityEplorer Initialized value)

This screen isn't your code, right?

In the latest version in github, you only have to edit "LoadItemsMods" and "LoadSceneMods" (in main.cs), and CustomMod (in Mods\UniqueMods.cs), don't add old code ^^

Image
"LoadItemsMods" function in main.cs :
Here you can Enable/Disable and change values for mods and add CustomMods for unique
CustomMod can be create by duplicate "CustomMods_1" function in Mods\unique_mod.cs

Code: Select all

public static Il2CppSystem.Collections.Generic.List<UniqueItemMod> NameOfTheMod()
{
	//Create new Array of UniqueItemMod
	Il2CppSystem.Collections.Generic.List<UniqueItemMod> mods = new Il2CppSystem.Collections.Generic.List<UniqueItemMod>();
	//Add UniqueItemMod to Array
	mods.Add(new UniqueItemMod
	{
		type = BaseStats.ModType.INCREASED,
                value = 999,
                maxValue = 999,
                property = SP.AttackSpeed,
                tags = AT.None
         });
         //Add More
         
         return mods;
}
Then add a line for your item in "LoadItemsMods" function in main.cs

Code: Select all

 Mods.UniqueMods.Uniques_Mods = new System.Collections.Generic.List<Mods.UniqueMods.unique_mod>
 {
 	new Mods.UniqueMods.unique_mod { id = 111, mods = Mods.UniqueMods.CustomMods_0() }
 	//Add more unique here
 	//new Mods.Items_Mods.Unique.unique_mod { id = UniqueId, mods = CustomMod }
 	new Mods.UniqueMods.unique_mod { id = UniqueId, mods = Mods.UniqueMods.NameOfTheMod() } //This Exemple
 };
"Mods.Items_Mods.Basic.Launch();" in Mods\Items_Mods.cs (Edit Basic Items) :
Edit Here if you want to edit basic items (there are 2 exemple : "classRequirement" and "levelRequirement")

"Mods.Items_Mods.Unique.Launch();" in Mods\Items_Mods.cs (Edit Unique Items) :
Edit Here if you want to edit unique items (there are 2 exemple : "effectiveLevelForLegendaryPotential" and "Enable_UniqueMods")

Image
"LoadSceneMods" in main.cs (Here you can Enable/Disable and change values for scene mods)
"Mods.Scene_Mods.Launch();" in Mods\Scene_Mods.cs (Edit all game object) : (There are some exemple for itemdrop, MonsterRarity and Spawner)

So, First, get the code and don't modify it, (add all refs if need)
Build in Visual studio
Copy "UnityLastEpochMods.dll" from "Bin\Debug\" to "LastepochFolder\Mods\"
Copy "Newtonsoft.Json.dll" from "Bin\Debug\" to "LastepochFolder\UserLibs\"
Launch your game (don't play your main character, because you will get a lot of exp gold items)
If all working, you can start to edit the code
CyrexBabbel wrote:
Tue Jun 06, 2023 5:03 pm
Can you also tell me, how to get the function or how to edit for example the enemy density?
When you start a new map, SpawnerPlacementManager load all SpawnerPlacementRoom for this map
SpawnerPlacementRoom pop enemys when you are close to it

Code: Select all

//SpawnerPlacementRoom
Mods.Scene_Mods.Enable_SpawnerPlacementRoom_intendedSpawnerDensity = true; //Untested
Mods.Scene_Mods.SpawnerPlacementRoom_intendedSpawnerDensity = 9999;
//SpawnerPlacementManager
Mods.Scene_Mods.Enable_SpawnerPlacementManager_defaultSpawnerDensity = true;
Mods.Scene_Mods.SpawnerPlacementManager_defaultSpawnerDensity = 9999;
Mods.Scene_Mods.Enable_SpawnerPlacementManager_alwaysRollSpawnerDensity = true; //always true if you want to edit density
Mods.Scene_Mods.SpawnerPlacementManager_alwaysRollSpawnerDensity = false; //always false if you want to edit density

long13579
Novice Cheater
Novice Cheater
Posts: 16
Joined: Tue Jun 06, 2023 8:03 pm
Reputation: 0

Re: Last Epoch Save Editor

Post by long13579 »

Ash06 wrote:
Thu Jun 08, 2023 2:00 am
Thank you, it's working like a charm xD.

User avatar
Ash06
Expert Cheater
Expert Cheater
Posts: 260
Joined: Wed Oct 09, 2019 2:34 pm
Reputation: 119

Re: Last Epoch Save Editor

Post by Ash06 »

bigbambu wrote:
Mon Jun 05, 2023 1:50 pm
The past iterations of the Editor allowed for maxing out specific nodes of skills, rather than the entire skill tree. Is this still possible?
omarino2011 wrote:
Tue Jun 06, 2023 8:26 pm
does this save editor allow my to pick skill nodes withut having the adjacent ones unlocked?
This features was remove, but you can do it with the mod

F10 with the mod, launch SkillsHelper
This will show all your character skill tree, and all nodes on it, with id and name

Exemple with smite
Image
Get skill_name and node_id for the node you want to edit
exemple : "Smite Increased Healing Area", node_id = 9, skill_name = "Smite"

You can do what you want with the mod, but you need to add a point in the tree after to force game to save the tree
in main.cs, in "LoadSkill"_Mods function, add line for your node

Code: Select all

private void LoadSkill_Mods()
{
	//Mods.Skills_Mods.EditNode("Skill_Name", Skill_Id, Skill_Points, this);
	Mods.Skills_Mods.EditNode("Smite", 9, 0, this); //Set Smite Node_id 9 to 0
}
You can launch this function with F9 in game, but as said above, you need point to force game to save

Or, you can do it with [Link]
Copy your character_save without "EPOCH" at the beginning
Image
Search for "savedSkillTrees"
I want to remove point to node_id = 9, index is 4 in node_IDs array
So edit NodePoints with the same index to what you want
Then Copy all to your save, don't forget "EPOCH" at the beginning

omarino2011
Novice Cheater
Novice Cheater
Posts: 18
Joined: Wed Apr 14, 2021 10:25 pm
Reputation: 1

Re: Last Epoch Save Editor

Post by omarino2011 »

Ash06 wrote:
Thu Jun 08, 2023 4:41 pm
bigbambu wrote:
Mon Jun 05, 2023 1:50 pm
The past iterations of the Editor allowed for maxing out specific nodes of skills, rather than the entire skill tree. Is this still possible?
omarino2011 wrote:
Tue Jun 06, 2023 8:26 pm
does this save editor allow my to pick skill nodes withut having the adjacent ones unlocked?
This features was remove, but you can do it with the mod

F10 with the mod, launch SkillsHelper
This will show all your character skill tree, and all nodes on it, with id and name

Exemple with smite
Image
Get skill_name and node_id for the node you want to edit
exemple : "Smite Increased Healing Area", node_id = 9, skill_name = "Smite"

You can do what you want with the mod, but you need to add a point in the tree after to force game to save the tree
in main.cs, in "LoadSkill"_Mods function, add line for your node

Code: Select all

private void LoadSkill_Mods()
{
	//Mods.Skills_Mods.EditNode("Skill_Name", Skill_Id, Skill_Points, this);
	Mods.Skills_Mods.EditNode("Smite", 9, 0, this); //Set Smite Node_id 9 to 0
}
You can launch this function with F9 in game, but as said above, you need point to force game to save

Or, you can do it with [Link]
Copy your character_save without "EPOCH" at the beginning
Image
Search for "savedSkillTrees"
I want to remove point to node_id = 9, index is 4 in node_IDs array
So edit NodePoints with the same index to what you want
Then Copy all to your save, don't forget "EPOCH" at the beginning

stuff looks so complicated it might as well be witchcraft to me at this point and i just started learning python :cry:
would u mind if i DM you for further help if i dont get it right?

omarino2011
Novice Cheater
Novice Cheater
Posts: 18
Joined: Wed Apr 14, 2021 10:25 pm
Reputation: 1

Re: Last Epoch Save Editor

Post by omarino2011 »

So I managed to change it using notepad++ and i was so disappointed to realise that the hammers dealt no damage when they return.
At least I learned something :D

CyrexBabbel
Noobzor
Noobzor
Posts: 13
Joined: Wed Apr 19, 2017 3:32 pm
Reputation: 1

Re: Last Epoch Save Editor

Post by CyrexBabbel »

Hey Ash,

sry for bothering you again, but iam still on the very basic side in terms of coding or c#.
What i got now through the object explorer is to change the min and max rolls for the affixes while crafting ( MasterAffixesList, AffixList.SingleAffix and then AffixList.Tier ).

While changing the values, it updates everything and the stats are working and not only text changes.

My goal now would be, to changes the rolls for the different tiers for the corrresponding affix id ( we know that already because of your database ).

Can i use one of those code masks you already posted, to achieve this?

I also tested, if the values are saved if you close the game. I changed mele crit roll to max 50% on tier 2 and got a 41% roll.
I save the game and started it again, and changed the max roll value again to 50% before loading my char. The 41% is still on the item, so it should be manageable to load the mod first, before loading the char, to still have your crafted higher affixes on the items.

Thank you :)!

User avatar
Ash06
Expert Cheater
Expert Cheater
Posts: 260
Joined: Wed Oct 09, 2019 2:34 pm
Reputation: 119

Re: Last Epoch Save Editor

Post by Ash06 »

Values on Item is like 0 to 255 (0 to 100%), min = 0% and max = 100%, Editing Tiers values don't modify yours items.
When entering with a character in game, all items are generated from list, so we edit all list before.

Function Multiply all Tiers (i create a new file "Affixs_Mods" in Mods\)

Code: Select all

public static void MultiplyAffixsTiersRolls(int mutiplier)
{
	UnityEngine.Object obj = Functions.GetObject("MasterAffixesList");
	System.Type type = obj.GetActualType();
	if (type == typeof(AffixList))
	{
		AffixList affix_list = obj.TryCast<AffixList>();
                foreach (AffixList.SingleAffix s_affix in affix_list.singleAffixes)
                {
                	Il2CppSystem.Collections.Generic.List<AffixList.Tier> tiers = s_affix.tiers;
                	foreach (AffixList.Tier tier in tiers)
                	{
                		tier.maxRoll = mutiplier * tier.maxRoll;
                		tier.minRoll = mutiplier * tier.minRoll;
                	}
                }
                foreach (AffixList.MultiAffix m_affix in affix_list.multiAffixes)
                {
                	Il2CppSystem.Collections.Generic.List<AffixList.Tier> tiers = m_affix.tiers;
                	foreach (AffixList.Tier tier in tiers)
                	{
                		tier.maxRoll = mutiplier * tier.maxRoll;
                		tier.minRoll = mutiplier * tier.minRoll;
                	}
                }
	}
}
Load code (at the end of "LoadItemsMods()" in main.cs)

Code: Select all

//Affixs
Mods.Affixs_Mods.MultiplyAffixsTiersRolls(100);
If you want to choose id and tier :

Code: Select all

public static void EditAffixRollsByTier(int affix_id, int tier, int min, int max)
{
	UnityEngine.Object obj = Functions.GetObject("MasterAffixesList");
	System.Type type = obj.GetActualType();
	if (type == typeof(AffixList))
	{
		AffixList affix_list = obj.TryCast<AffixList>();
		bool found = false;
                foreach (AffixList.SingleAffix s_affix in affix_list.singleAffixes)
                {
                	if (s_affix.affixId == affix_id)
                	{
                		if (((tier - 1) > -1) && (s_affix.tiers.Count > (tier - 1)))
                		{
                			s_affix.tiers[(tier - 1)].maxRoll = max;
                			s_affix.tiers[(tier - 1)].minRoll = min;
                		}
                		found = true;
                		break;
                	}
                }
                if (!found)
                {
                	foreach (AffixList.MultiAffix m_affix in affix_list.multiAffixes)
                	{
                		if (m_affix.affixId == affix_id)
                		{
                			if (((tier - 1) > -1) && (m_affix.tiers.Count > (tier - 1)))
                			{
                				m_affix.tiers[(tier - 1)].maxRoll = max;
                				m_affix.tiers[(tier - 1)].minRoll = min;
                			}
                			break;
                		}
                	}
                }
	}
}
Load code (at the end of "LoadItemsMods()" in main.cs)

Code: Select all

//Affixs
Mods.Affixs_Mods.EditAffixRollsByTier(100, 7, 100, 999); //id, tier, min, max

CyrexBabbel
Noobzor
Noobzor
Posts: 13
Joined: Wed Apr 19, 2017 3:32 pm
Reputation: 1

Re: Last Epoch Save Editor

Post by CyrexBabbel »

Hey Ash,

amazing, works like intended!!!

For training and learning purposes, i tried to replicate the same with the unique mods ( the multiplier ).
Dont know, if my declaration is good, but it works like it should! ( iam happy it works, even if it is most likely copy paste from you ^^ ).

Code: Select all

public static void MultiplyAffixsRollsUnique(int mutiplier)
        {
            UnityEngine.Object obj = Functions.GetObject("UniqueList");
            System.Type type = obj.GetActualType();
            if (type == typeof(UniqueList))
            {
                UniqueList unique_list = obj.TryCast<UniqueList>();
                foreach (UniqueList.Entry u_list in unique_list.uniques)
                {                                
                    Il2CppSystem.Collections.Generic.List<UniqueItemMod> uniquemods = u_list.mods;
                    foreach (UniqueItemMod u_item_mods in uniquemods)
                    {                        
                        u_item_mods.value = mutiplier * u_item_mods.value;
                        u_item_mods.maxValue = mutiplier * u_item_mods.maxValue;
                    }
                }                             
            }
        }
A little bit off topic, but how long did it took you, to code like this? It must be amazing, to literally mod everything you can think of with the coding knowledge haha :D

Thank you for your help Ash!

CyrexBabbel
Noobzor
Noobzor
Posts: 13
Joined: Wed Apr 19, 2017 3:32 pm
Reputation: 1

Re: Last Epoch Save Editor

Post by CyrexBabbel »

Hey Ash,

also tried now to change the max points to spend on a passive skill on the tree.
Max points are now 255 per single passive skill. The max value doesnt update on the tree, but you can spend more points ( for example 16/8 ).

I think, the value has to be also updated on the "SkillTree" per class/mastery, to just visually show the right max amount to spend.

Code: Select all

public static void MaxPassivePoints()
        {
            UnityEngine.Object obj = Functions.GetObject("Global Tree Data");
            System.Type type = obj.GetActualType();
            if (type == typeof(GlobalTreeData))
            {
                GlobalTreeData tree_data = obj.TryCast<GlobalTreeData>();
                foreach (GlobalTreeData.PassiveTreeData passive_list in tree_data.passiveTrees)
                {
                    Il2CppSystem.Collections.Generic.List<GlobalTreeData.NodeData> nodes = passive_list.nodes;
                    foreach (GlobalTreeData.NodeData node_pointsMax in nodes)
                    {
                        node_pointsMax.maxPoints = 255;
                    }
                }
            }
I searched now where to get the the amount of skillpoints per levelup, but couldnt find it. Can you help here maybe?

Thanks!!

User avatar
Ash06
Expert Cheater
Expert Cheater
Posts: 260
Joined: Wed Oct 09, 2019 2:34 pm
Reputation: 119

Re: Last Epoch Save Editor

Post by Ash06 »

Sorry, not home, First donwload DnsSpy and link with UnityExplorer.
Open à gameobject you Know, then show with dnsspy.
In dnsspy, Search for levelup, skillspoints, ...
If you find variables in results, use the same method, otherwise hook functions with harmony patch.

Get Character Data

Code: Select all

private static LocalTreeData GetCharacter_TreeData()
{
	LocalTreeData tree_data = null;
	foreach (UnityEngine.Object obj in UniverseLib.RuntimeHelper.FindObjectsOfTypeAll(typeof(UnityEngine.Object)))
	{
		System.Type type = obj.GetActualType();
		if (type == typeof(LocalTreeData))
		{
			if (obj.name == "MainPlayer(Clone)")
			{
				tree_data = obj.TryCast<LocalTreeData>();
                        	break;
                        }
		}
	}
	
	return tree_data;
}
Skills Points : Max = 255

Code: Select all

public static void EditSkillsPoints(byte value, Main main)
{
	LocalTreeData tree_data = GetCharacter_TreeData();
	if (tree_data != null)
	{
		foreach (LocalTreeData.SkillTreeData skill_tree_data in tree_data.specialisedSkillTrees)
                {
                	main.LoggerInstance.Msg("Set " + skill_tree_data.ability.abilityName + " Level to : " + value);
                	skill_tree_data.level = value;
                }
	}
}
Passive Points : Max = 65535

Code: Select all

public static void EditPassivePoints(ushort value, Main main)
{
	LocalTreeData tree_data = GetCharacter_TreeData();
	if (tree_data != null)
	{
		main.LoggerInstance.Msg("Set Passive Tree Points to " + value);
		tree_data.passiveTree.pointsEarnt = value;
	}
}
Load (in main.cs), in game with F9

Code: Select all

private void LoadSkill_Mods()
{
	//Mods.Skills_Mods.EditNode("Smite", 9, 0, this);
	Mods.Skills_Mods.EditPassivePoints(65535, this);
	Mods.Skills_Mods.EditSkillsPoints(255, this);
}

Code: Select all

public override void OnLateUpdate()
{
	if (!UnityExplorerLoaded) 
	{
		if (UnityExplorer.ObjectExplorer.SceneHandler.SelectedScene != null) { UnityExplorerLoaded = true; }
	}
	else
	{
		if (!ItemsModsLoaded) { ItemsModsLoaded = true; LoadItemsMods(); }
                if (Input.GetKeyDown(KeyCode.F9)) { LoadSkill_Mods(); }
                else if (Input.GetKeyDown(KeyCode.F10)) { LoadSkillsHelper(); }
                else if (Input.GetKeyDown(KeyCode.F11)) { Mods.LastEpochSaveEditor.GenerateDatabase(this); }                
	}
}

CyrexBabbel
Noobzor
Noobzor
Posts: 13
Joined: Wed Apr 19, 2017 3:32 pm
Reputation: 1

Re: Last Epoch Save Editor

Post by CyrexBabbel »

Thank you Ash!

Post Reply

Who is online

Users browsing this forum: No registered users