Last Epoch Save Editor

Upload *YOUR* gamehacking tools/helpers here
timechaos69
Expert Cheater
Expert Cheater
Posts: 281
Joined: Wed Oct 18, 2017 4:23 am
Reputation: 38

Re: Last Epoch Save Editor

Post by timechaos69 »

Architect wrote:
Sun Jul 30, 2023 8:06 am
Hi, Ash. Is it possible to expose the Duration property of buffs, for example? I'm thinking of using the Judgment aura as a candidate -- would love to see that spell extend for a full day for example. Is this seeable via Unity Explorer?
yea a buff duration extender would be a good find..also an amount of debuffs to inflict. say 100 things of ignite or shock per time instead of building it up. either way i have to say this mod is a godsend. get to try a lot of fun builds that arent really meta lol!

PurpleHazeDude
What is cheating?
What is cheating?
Posts: 1
Joined: Sun Jul 30, 2023 5:27 pm
Reputation: 0

Re: Last Epoch Save Editor

Post by PurpleHazeDude »

Thanks for the mod works great so far!
But every little mob drops exalted items now, no normal or magic ones?
How can i change that back to somewhat more vanilla?

timechaos69
Expert Cheater
Expert Cheater
Posts: 281
Joined: Wed Oct 18, 2017 4:23 am
Reputation: 38

Re: Last Epoch Save Editor

Post by timechaos69 »

PurpleHazeDude wrote:
Sun Jul 30, 2023 5:32 pm
Thanks for the mod works great so far!
But every little mob drops exalted items now, no normal or magic ones?
How can i change that back to somewhat more vanilla?
i think its under item data affixes - tier you have to disable that

Architect
Cheater
Cheater
Posts: 32
Joined: Mon May 22, 2017 4:09 pm
Reputation: 9

Re: Last Epoch Save Editor

Post by Architect »

Interesting. Duration is not a "standard" property. But it's alright, I figured out how to extend both of Judgment's radius and duration by using its Mutator. Thanks for this, Ash! I'm going to fork your repo and share my learnings along the way.

matci1
Noobzor
Noobzor
Posts: 11
Joined: Mon May 15, 2017 2:56 pm
Reputation: 0

Re: Last Epoch Save Editor

Post by matci1 »

How can you set it so that it does not change anything in the drop only maximize affix/prefix ?

Architect
Cheater
Cheater
Posts: 32
Joined: Mon May 22, 2017 4:09 pm
Reputation: 9

Re: Last Epoch Save Editor

Post by Architect »

matci1 wrote:
Mon Jul 31, 2023 10:14 pm
How can you set it so that it does not change anything in the drop only maximize affix/prefix ?
Under Item Data, do the following:

Rarity - Disable
Implicits - Disable
Forging Potential - Disable
Affix Values - Enable, 255
Affix Tier - Enable, 7
Unique Mods - Disable
Legendary Potential - Disable
Weaver Will - Disable

Basically, the Affix Tier setting controls the quality (T1 to T7) while Affix Values controls the "level" of the roll within that tier. AV = 255 guarantees max roll of that tier. Disable Affix Tier if you want to just literally maximize the AV without getting high AT during early game (I highly recommend this, I'm enjoying the game using this setting for now, characters don't get OP right away).

Architect
Cheater
Cheater
Posts: 32
Joined: Mon May 22, 2017 4:09 pm
Reputation: 9

Re: Last Epoch Save Editor

Post by Architect »

@Ash

Thinking if this is a better hook for abilities to avoid having to use them once first before activating modifications.

Code: Select all

        
        [HarmonyPatch(typeof(CharacterMutator), "OnStartedUsingAbility")]
        public class CharacterMutator__OnStartedUsingAbility
        {
            [HarmonyPostfix] 
            static void Postfix(CharacterMutator __instance, AbilityInfo __0, Ability __1, UnityEngine.Vector3 __2)
            {
                Ability ability = __1.TryCast<Ability>();
                if (Config.Data.mods_config.character.skills.Enable_channel_cost) { ability.channelCost = 0f; }
                if (Config.Data.mods_config.character.skills.Enable_manaCost)
                {
                    ability.manaCost = 0f;
                    ability.minimumManaCost = 0f;
                    ability.manaCostPerDistance = 0f;
                }
                if (Config.Data.mods_config.character.skills.Enable_noManaRegenWhileChanneling) { ability.noManaRegenWhileChanneling = false; }
                if (Config.Data.mods_config.character.skills.Enable_stopWhenOutOfMana) { ability.stopWhenOutOfMana = false; }
            }
        }
Gonna post my take on the mutators later.

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 need to add a reference to Ability if you want to modify it

Code: Select all

static void HookFunction(ref Ability __1)
{
	//With "ref Ability __1", __1 is a reference to the object, not a copy
	//Ability ability = __1.TryCast<Ability>(); //Is already an Ability, using Trycast do nothing	
	__1.manaCost = 0f;	
}

Code: Select all

static void HookFunction(AbilityInfo __0)
{
	//Get a reference to Ability from AbilityInfo
	Ability ability = __0.getAbility();
	ability.manaCost = 0f;
}
Your code Should be

Code: Select all

[HarmonyPatch(typeof(CharacterMutator), "OnStartedUsingAbility")]
public class CharacterMutator__OnStartedUsingAbility
{
	[HarmonyPostfix] 
	static void Postfix(CharacterMutator __instance, AbilityInfo __0, ref Ability __1, UnityEngine.Vector3 __2)
	{	
		if (Config.Data.mods_config.character.skills.Enable_channel_cost) { __1.channelCost = 0f; }
                if (Config.Data.mods_config.character.skills.Enable_manaCost)
                {
                    __1.manaCost = 0f;
                    __1.minimumManaCost = 0f;
                    __1.manaCostPerDistance = 0f;
                }
                if (Config.Data.mods_config.character.skills.Enable_noManaRegenWhileChanneling) { __1.noManaRegenWhileChanneling = false; }
                if (Config.Data.mods_config.character.skills.Enable_stopWhenOutOfMana) { __1.stopWhenOutOfMana = false; }
	}
}
[HarmonyPrefix] : Start before the function (you can choose to not launch original code)
[HarmonyPostfix] : Start after the function

Code: Select all

[HarmonyPrefix]
static bool Prefix()       
{
	//Code	
	return false; // original code will not be launched after
}  

Code: Select all

[HarmonyPrefix]
static void Prefix()       
{
	//Code	
}  
We can get the Ability from AbilityInfo and from Mutator, but we can't get Mutator from Ability
So, you can make all edit to Ability before the skill launch, but we have to wait after the skill to edit Mutator, because the only function with a ref to AbilityMutator is OnAbilityUse

Not simple to answer from a phone, i will update the github when i found a computer ^^

Architect
Cheater
Cheater
Posts: 32
Joined: Mon May 22, 2017 4:09 pm
Reputation: 9

Re: Last Epoch Save Editor

Post by Architect »

Ash06 wrote:
Tue Aug 01, 2023 2:45 pm
--snipped--
Thanks! Noted on the above. For the mutator, I tried looking for different hook. See below.

Code: Select all

using HarmonyLib;
using UniverseLib;

namespace LastEpochMods.Hooks
{
    internal class Ability_Mutators
    {
        [HarmonyPatch(typeof(AbilityMutator), nameof(AbilityMutator.Update))]
        public class AbilityMutator_Update
        {
            [HarmonyPostfix]
            static void Postfix(AbilityMutator __instance)
            {
                System.Type mutator_type = __instance.GetActualType();
                #region Acolyte_Necromancer_Lich
                if (mutator_type ==  typeof(ReapMutator)) 
                {
                    ReapMutator mutator = __instance.TryCast<ReapMutator>();
                    if (mutator != null)
                    {
                        mutator.isMissingAbility = true;
                        mutator.cullPercent = 200.0f;
                        mutator.increasedRadius = 360.0f;
                        mutator.spinAttack = true;
                    }
                }
                else if (mutator_type == typeof(HarvestMutator))
                {
                    HarvestMutator mutator = __instance.TryCast<HarvestMutator>();
                    if (mutator != null)
                    {
                        mutator.cullPercentage = 200.0f;
                        mutator.increasedRadius = 360.0f;
                    }
                }
                else if (mutator_type == typeof(ReaperFormMutator))
                {
                    ReaperFormMutator mutator = __instance.TryCast<ReaperFormMutator>();
                    if (mutator != null)
                    {
                        mutator.isMissingAbility = true;
                    }
                }
                #endregion
                #region Sentinel_Paladin_ForgeGuard
                else if (mutator_type == typeof(JudgementMutator))
                {
                    JudgementMutator mutator = __instance.TryCast<JudgementMutator>();
                    if (mutator != null)
                    {
                        mutator.increasedRadius = 3.0f;
                        mutator.increasedRadiusConsecratedGround = 3.0f;
                        mutator.increasedDurationConsecratedGround = 86400.0f;
                    }
                }
                else if (mutator_type == typeof(SmiteMutator))
                {
                    SmiteMutator mutator = __instance.TryCast<SmiteMutator>();
                    if (mutator != null)
                    {
                        mutator.ability.playerRequiresTarget = false;
                        mutator.ability.instantCastForPlayer = true;
                    }
                }
                #endregion
                #region Primalist_Beastmaster_Druid
                else if (mutator_type == typeof(ReaperFormMutator))
                {
                    ReaperFormMutator mutator = __instance.TryCast<ReaperFormMutator>();
                    if (mutator != null)
                    {
                        mutator.isMissingAbility = true;
                    }
                }
                else if (mutator_type == typeof(SummonWolfMutator))
                {
                    SummonWolfMutator mutator = __instance.TryCast<SummonWolfMutator>();
                    if (Config.Data.mods_config.character.companions.wolf.Enable_override_limit)
                    {
                        if (mutator != null)
                        {
                            mutator.TryCast<SummonWolfMutator>().wolfLimit = Config.Data.mods_config.character.companions.wolf.summon_limit;
                        }
                    }
                }
                else if (mutator_type == typeof(SummonScorpionMutator))
                {
                    if (Config.Data.mods_config.character.companions.scorpion.Enable_baby_quantity)
                    {
                        SummonScorpionMutator mutator = __instance.TryCast<SummonScorpionMutator>();
                        if (mutator != null)
                        {
                            mutator.babyScorpionQuantity = Config.Data.mods_config.character.companions.scorpion.baby_quantity;
                            mutator.babyScorpionsToSpawnOnAbilityActivation = Config.Data.mods_config.character.companions.scorpion.baby_quantity;
                            mutator.increasedBabySpawnRate = 1;
                        }
                    }
                }
                else if (mutator_type == typeof(SummonRaptorMutator))
                {
                    if (Config.Data.mods_config.character.companions.scorpion.Enable_baby_quantity)
                    {
                        SummonRaptorMutator mutator = __instance.TryCast<SummonRaptorMutator>();
                        if (mutator != null)
                        {
                            mutator.quantityLimit = 100;
                        }
                    }
                }
                else if (mutator_type == typeof(SummonSabertoothMutator))
                {
                    if (Config.Data.mods_config.character.companions.scorpion.Enable_baby_quantity)
                    {
                        SummonSabertoothMutator mutator = __instance.TryCast<SummonSabertoothMutator>();
                        if (mutator != null)
                        {
                            mutator.quantityLimit = 100;
                        }
                    }
                }
                #endregion
                #region Mage_Sorcerer_Spellblade
                else if (mutator_type == typeof(TeleportMutator))
                {
                    TeleportMutator mutator = __instance.TryCast<TeleportMutator>();
                    if (mutator != null)
                    {
                        mutator.isMissingAbility = true;
                    }
                }
                #endregion
            }
        }
    }
}
Many are still hardcoded but I plan on editing the config file to match your standards.

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 »

This should work but this function update every 2 milliseconds and can cause lags
Image
Hook the function for this screen make my game crash

Architect
Cheater
Cheater
Posts: 32
Joined: Mon May 22, 2017 4:09 pm
Reputation: 9

Re: Last Epoch Save Editor

Post by Architect »

Ash06 wrote:
Tue Aug 01, 2023 5:20 pm
This should work but this function update every 2 milliseconds and can cause lags
Image
Hook the function for this screen make my game crash
Not getting any lags but I agree, this is way too expensive. I guess OnAbilityUse really is the best. First cast being unaffected should be a small price to pay. :D

Architect
Cheater
Cheater
Posts: 32
Joined: Mon May 22, 2017 4:09 pm
Reputation: 9

Re: Last Epoch Save Editor

Post by Architect »

Currently testing a "complete all quests" function. Looks like some problematic quests are also mixed in. Let's see how deep this goes.

Code: Select all

[10:42:44.330] [LastEpochMods] Id: 1 Name: The Void Assault
[10:42:44.330] [LastEpochMods] Id: 2 Name: Armoury Aid
[10:42:44.331] [LastEpochMods] Id: 3 Name: Erza's Ledger
[10:42:44.332] [LastEpochMods] Id: 5 Name: Saving Last Refuge
[10:42:44.332] [LastEpochMods] Id: 6 Name: The Ruined World
[10:42:44.333] [LastEpochMods] Id: 7 Name: Pannion's Students
[10:42:44.333] [LastEpochMods] Id: 8 Name: The Sane Cultist
[10:42:44.334] [LastEpochMods] Id: 9 Name: The Lesser Refuge
[10:42:44.334] [LastEpochMods] Id: 10 Name: The Fate of the Refuge
[10:42:44.335] [LastEpochMods] Id: 11 Name: Artem's Offer
[10:42:44.335] [LastEpochMods] Id: 12 Name: A Study in Time
[10:42:44.336] [LastEpochMods] Id: 13 Name: The Ruined Temple
[10:42:44.336] [LastEpochMods] Id: 14 Name: The Immortal Empire
[10:42:44.337] [LastEpochMods] Id: 15 Name: The End of Time
[10:42:44.337] [LastEpochMods] Id: 17 Name: ActorTest
[10:42:44.338] [LastEpochMods] Id: 18 Name: A Long Detour
[10:42:44.339] [LastEpochMods] Id: 20 Name: The Admiral's Dreadnought
[10:42:44.339] [LastEpochMods] Id: 22 Name: Elder Mossbern
[10:42:44.340] [LastEpochMods] Id: 24 Name: The Oracle's Aid
[10:42:44.340] [LastEpochMods] Id: 25 Name: The Desert Waystation
[10:42:44.341] [LastEpochMods] Id: 26 Name: Waystation Sabotage
[10:42:44.345] [LastEpochMods] UnhollowerBaseLib.Il2CppException: System.NullReferenceException: Object reference not set to an instance of an object.

  at UnhollowerBaseLib.Il2CppException.RaiseExceptionIfNecessary (System.IntPtr returnedException) [0x00018] in <6f5e4ff5bbd94258ab8bd773251f8e6c>:0
  at Quest.completeQuest () [0x0002c] in <ca56c9e5bd714da98b9785bb80059b01>:0
  at LastEpochMods.Mods.Character.CompleteAllQuests () [0x00076] in <c43872a795a841be92984f87accb18b6>:0

Architect
Cheater
Cheater
Posts: 32
Joined: Mon May 22, 2017 4:09 pm
Reputation: 9

Re: Last Epoch Save Editor

Post by Architect »

Here's a dump of the quests in the game.

Some findings:
- if DisplayName is empty, assume it's a test.
- if PlayerVisible is False, assume it's a test.
- MainLine = True means main campaign. If False, either test or sidequest. Not reliable filter.
- QuestType = Normal means campaign. If Monolith then only for Monolith.

I guess I will split CompleteQuests into CompleteCampaign and CompleteMonolith.

Code: Select all

Id  ,Name                                             ,DisplayName                         ,PlayerVisible ,MainLine ,QuestType
  1 ,A10 test quest                                   ,The Void Assault                    ,True          ,True     ,Normal
  2 ,Armoury Aid                                      ,Armoury Aid                         ,True          ,False    ,Normal
  3 ,Erza Ledger                                      ,Erza's Ledger                       ,True          ,False    ,Normal
  5 ,Saving Last Refuge                               ,Saving Last Refuge                  ,True          ,True     ,Normal
  4 ,Main Quest ChA                                   ,                                    ,False         ,False    ,Normal
  6 ,Chapter B The Ruined World                       ,The Ruined World                    ,True          ,True     ,Normal
  7 ,Pannion's Students                               ,Pannion's Students                  ,True          ,False    ,Normal
  8 ,TheSaneCultist                                   ,The Sane Cultist                    ,True          ,False    ,Normal
  9 ,Chapter B The Lesser Refuge                      ,The Lesser Refuge                   ,True          ,False    ,Normal
 10 ,Chapter B The Refuge                             ,The Fate of the Refuge              ,True          ,False    ,Normal
 11 ,Artem's Offer                                    ,Artem's Offer                       ,True          ,False    ,Normal
 12 ,A Study in Time                                  ,A Study in Time                     ,True          ,False    ,Normal
 13 ,The Ruined Temple                                ,The Ruined Temple                   ,True          ,True     ,Normal
 14 ,The Immortal Empire                              ,The Immortal Empire                 ,True          ,True     ,Normal
 15 ,The End of Time                                  ,The End of Time                     ,True          ,True     ,Normal
 16 ,Hidden C10 Time Transition                       ,                                    ,False         ,False    ,Normal
 17 ,Testing                                          ,ActorTest                           ,True          ,False    ,Normal
 18 ,A Long Detour                                    ,A Long Detour                       ,True          ,True     ,Normal
 19 ,Hidden ChZ TimeWarp Z40                          ,                                    ,False         ,False    ,Normal
 20 ,The Admiral's Dreadnought                        ,The Admiral's Dreadnought           ,True          ,True     ,Normal
 21 ,Hidden ChZ Injured                               ,                                    ,False         ,False    ,Normal
 22 ,Hiddem Mossbern A05                              ,Elder Mossbern                      ,True          ,False    ,Normal
 23 ,Hidden C30 Prisoner                              ,                                    ,False         ,False    ,Normal
 24 ,The Oracle's Aid (ChD)                           ,The Oracle's Aid                    ,True          ,True     ,Normal
 25 ,The Desert Waystation (ChD)                      ,The Desert Waystation               ,True          ,True     ,Normal
 26 ,Waystation Sabotage (ChD Side)                   ,Waystation Sabotage                 ,True          ,False    ,Normal
 27 ,BETA Launch Endpoint                             ,The Monolith of Fate                ,True          ,False    ,Normal
 28 ,Crafting Tutorial                                ,An Introduction to Crafting         ,True          ,False    ,Normal
 29 ,The Last Imperial (Chapter B Sidequest)          ,The Last Imperial                   ,True          ,True     ,Normal
 30 ,Hidden Gems (Chapter D Sidequest)                ,Hidden Gems                         ,True          ,False    ,Normal
 31 ,Journey to the Necropolis (Chapter E Main Quest) ,Journey to the Necropolis           ,True          ,True     ,Normal
 32 ,The Immortal Citadel (ChE Main Quest)            ,The Immortal Citadel                ,True          ,True     ,Normal
 33 ,Alric's Revenge (ChE Side Quest)                 ,Alric's Revenge                     ,True          ,False    ,Normal
 34 ,Time Rift Introduction A60                       ,An Ancient Path                     ,True          ,False    ,Normal
 35 ,B40 Time Rift Quest                              ,An Ancient Hunt                     ,True          ,False    ,Normal
 36 ,D05 Time Rift Quest                              ,The Sapphire Tablet                 ,True          ,False    ,Normal
 37 ,C40 Time Rift Quest                              ,The Corrupted Lake                  ,True          ,False    ,Normal
 38 ,E20 Time Rift Quest                              ,                                    ,False         ,False    ,Normal
 39 ,Mastery Selection Quest                          ,The Power of Mastery                ,True          ,True     ,Normal
 40 ,Hidden FR EoT Mastery Icon                       ,                                    ,False         ,False    ,Normal
 41 ,Hidden Gaspar PostMastery Icon                   ,                                    ,False         ,False    ,Normal
 42 ,Rahyeh's Warpath (ChF pt1)                       ,Rahyeh's Warpath                    ,True          ,True     ,Normal
 43 ,Wrath of the Wengari (ChF pt2)                   ,Wrath of the Wengari                ,True          ,True     ,Normal
 44 ,The Temple of Heorot (ChF pt3)                   ,The Temple of Heorot                ,True          ,True     ,Normal
 45 ,The Lance of Heorot (ChF pt4)                    ,The Lance of Heorot                 ,True          ,True     ,Normal
 46 ,Liberating the Nomads (ChF side 1)               ,Liberating the Nomads               ,True          ,False    ,Normal
 47 ,A Northern Cure (ChF side 2)                     ,A Heoborean Cure                    ,True          ,False    ,Normal
 48 ,Chapter A First                                  ,The Last Refuge                     ,True          ,True     ,Normal
 49 ,Chapter A SideQuest Evacuation                   ,Evacuation                          ,True          ,False    ,Normal
 50 ,Heorot's Last Blessing (ChG pt1)                 ,Heorot's Last Blessing              ,True          ,True     ,Normal
 51 ,Passage through Deep Harbor (ChG pt2)            ,Passage through Deep Harbor         ,True          ,True     ,Normal
 52 ,Deep Harbor Rescue (ChG side 1)                  ,Deep Harbor Rescue                  ,True          ,False    ,Normal
 53 ,Liath and Thetima (ChG pt3)                      ,Liath and Thetima                   ,True          ,True     ,Normal
 54 ,Isle of Storms (ChG pt4)                         ,Isle of Storms                      ,True          ,True     ,Normal
 55 ,Sirens and Sailors (ChG side 2)                  ,Sirens and Sailors                  ,True          ,False    ,Normal
 56 ,To Shell With It (ChG side 3)                    ,To Shell With It                    ,True          ,False    ,Normal
 57 ,Lagon (ChG pt5)                                  ,Lagon                               ,True          ,True     ,Normal
 58 ,Liath's Tower (ChG side 4)                       ,Liath's Tower                       ,True          ,False    ,Normal
 59 ,R3Q10 The Void Has Come                          ,The Void Has Come                   ,True          ,False    ,Monolith
 60 ,R1Q10 Fall of the Outcasts                       ,Fall of the Outcasts                ,True          ,False    ,Monolith
 61 ,R3Q20 Cult of the Black Wing                     ,Cult of the Black Wing              ,True          ,False    ,Monolith
 62 ,R1Q20 Purge of Maj'elka                          ,The Purge of Maj'elka               ,True          ,False    ,Monolith
 63 ,R2Q10 Blood Pact                                 ,A Pact of Blood                     ,True          ,False    ,Monolith
 64 ,R2Q10 Frost Brand                                ,A Brand of Frost                    ,True          ,False    ,Monolith
 65 ,R2Q30 Frost Lich                                 ,"Blood, Frost, and Death"           ,True          ,False    ,Monolith
 66 ,R2Q20 Imperial Heoborea                          ,Vengeance for Heoborea              ,True          ,False    ,Monolith
 67 ,R3Q30 The Black Sun                              ,The Black Sun                       ,True          ,False    ,Monolith
 68 ,R1Q30 Assemble Abomination                       ,Fate of the Outcasts                ,True          ,False    ,Monolith
 69 ,R4Q10 Void Necropolis                            ,Immortal Empire's End               ,True          ,False    ,Monolith
 70 ,R4Q20 Undead Caravan                             ,Last March of the Dead              ,True          ,False    ,Monolith
 71 ,R4Q30 Void Harton Boss                           ,The Ruin of the Dreadnought         ,True          ,False    ,Monolith
 72 ,R5Q10 The Blessed Horn                           ,The Blessed Horn                    ,True          ,False    ,Monolith
 73 ,R5Q20 Stolen Lance                               ,The Stolen Lance                    ,True          ,False    ,Monolith
 74 ,R5Q30 God Hunter Argentus                        ,God Hunter Argentus                 ,True          ,False    ,Monolith
 75 ,R7Q30 Undead Dragon Boss                         ,Emperor of Corpses                  ,True          ,False    ,Monolith
 76 ,R6Q10 Flooded Thetima                            ,Thetima the Drowned City            ,True          ,False    ,Monolith
 77 ,R6Q30 Monolith Lagon                             ,Ending the Storm                    ,True          ,False    ,Monolith
 78 ,R7Q20 Storm Dragons                              ,Lair of Storms                      ,True          ,False    ,Monolith
 79 ,R6Q20 Lagon Isle                                 ,Storming the Isle                   ,True          ,False    ,Monolith
 80 ,R7Q10 Dragon Victory                             ,The Burn of Deceit                  ,True          ,False    ,Monolith
 81 ,R6Q20 Hidden Liath Branch Quest                  ,Hidden R6Q20 Choice [TESTING]       ,False         ,False    ,Monolith
 82 ,R1Q30 Hidden Branch Choice                       ,Hidden R1Q30 Choice TEST            ,False         ,False    ,Monolith
 83 ,Timeline 1 Completion Quest                      ,Monolith: Fall of the Outcasts      ,True          ,False    ,Normal
 84 ,Timeline 2 Completion Quest                      ,"Monolith: Blood ,Frost and Death"  ,True          ,False    ,Normal
 85 ,Timeline 3 Completion Quest                      ,Monolith: The Black Sun             ,True          ,False    ,Normal
 86 ,Timeline 4 Completion Quest                      ,Monolith: Ruin of the Empire        ,True          ,False    ,Normal
 87 ,Timeline 5 Completion Quest                      ,Monolith: The Stolen Lance          ,True          ,False    ,Normal
 88 ,Timeline 6 Completion Quest                      ,Monolith: Ending the Storm          ,True          ,False    ,Normal
 89 ,Timeline 7 Completion Quest                      ,Monolith: Reign of Dragons          ,True          ,False    ,Normal
 90 ,Hidden Timeline 1 Upgrade Quest                  ,                                    ,False         ,False    ,Normal
 91 ,Hidden Timeline 3 Upgrade Quest                  ,                                    ,False         ,False    ,Normal
 92 ,Hidden Timeline 6 Upgrade Quest                  ,                                    ,False         ,False    ,Normal
 93 ,Thetima Siege (ChG side 5)                       ,Destroying the Siege Camp           ,True          ,False    ,Normal
 94 ,Finding Pannion (ChA main)                       ,Finding Pannion                     ,True          ,True     ,Normal
 95 ,Book Retrieval (ChA sidequest)                   ,Preserving Knowledge                ,True          ,False    ,Normal
 96 ,Sane Cultist Camp Quest (ChB main)               ,Sanity in the Darkness              ,True          ,True     ,Normal
 97 ,A50 the Betrayer (ChA side)                      ,The Upper District                  ,True          ,False    ,Normal
 98 ,B30 Cultist Ambush (ChB sidequest)               ,Survivors in the Ruins              ,True          ,False    ,Normal
 99 ,B7s10 Symbol of Hope (ChB)                       ,The Symbol of Hope                  ,True          ,True     ,Normal
100 ,B30 Void Extermination Quest (ChB side)          ,Clearing the Ruins                  ,True          ,False    ,Normal
101 ,R8Q10 Sheltered Wood Evacuation                  ,Fall of Last Refuge                 ,True          ,False    ,Monolith
102 ,R8Q20 Erza Quest                                 ,Erza's Last Stand                   ,True          ,False    ,Monolith
103 ,R8Q30 Husk of Elder Gaspar                       ,The Last Elder                      ,True          ,False    ,Monolith
104 ,R9Q10 Saving Yulia                               ,The Frozen Dissident                ,True          ,False    ,Monolith
105 ,R9Q20 Grael at Thetima                           ,Grael's Assault                     ,True          ,False    ,Monolith
106 ,R9Q30 Heorot                                     ,Heorot                              ,True          ,False    ,Monolith
107 ,R10Q10 Volcanic Majelka                          ,The Flame Scarred City              ,True          ,False    ,Monolith
108 ,R10Q30 Volcanic Shamans                          ,Shamans of the Eruption             ,True          ,False    ,Monolith
109 ,R10Q20 Volcanic Caves                            ,The Fires Below                     ,True          ,False    ,Monolith
110 ,Timeline 8 Completion Quest                      ,Monolith: The Last Ruin             ,True          ,False    ,Normal
111 ,Timeline 9 Completion Quest                      ,Monolith: Age of Winter             ,True          ,False    ,Normal
112 ,Timeline 10 Completion Quest                     ,Monolith: Spirits of Fire           ,True          ,False    ,Normal
113 ,Hidden Timeline ALL Upgrade Quest                ,                                    ,False         ,False    ,Normal
114 ,Journey to Maj'elka (ChH pt1)                    ,Journey to Maj'elka                 ,True          ,True     ,Normal
115 ,Scalebane Coup (ChH pt2)                         ,The Scalebane                       ,True          ,True     ,Normal
116 ,C35 Spear Gate SideQuest                         ,Soul Warden Ambush                  ,True          ,False    ,Normal
117 ,Ruby Commander Quest (ChH side H60)              ,"Arjani, the Ruby Commander"        ,True          ,False    ,Normal
118 ,Missing Merchant Quest (ChH side H30)            ,The Missing Merchant                ,True          ,False    ,Normal
119 ,Treasure Flip Quest (ChH side)                   ,Desert Treasure                     ,True          ,False    ,Normal
120 ,Oasis Hunt (ChH side H80)                        ,Oasis Hunt                          ,True          ,False    ,Normal
121 ,Harton Idol Quest (ChH side)                     ,Harton's Idol                       ,True          ,False    ,Normal
122 ,Crystal Monster Quest (ChH side)                 ,"Too Greedily, Too Deep"            ,True          ,False    ,Normal
123 ,Grand Theft Eagle Quest (ChH pt3)                ,Grand Theft Eagle                   ,True          ,True     ,Normal
124 ,Apophis and Majasa (ChH pt4)                     ,Apophis and Majasa                  ,True          ,True     ,Normal
125 ,Returning Player Catchup 0.8.3 Quest             ,Return to Yulia                     ,True          ,True     ,Normal
126 ,Hidden Lost Spriggan EoT Easter Egg Quest        ,Hidden Lost Spriggan EoT Easter Egg ,False         ,False    ,Normal
127 ,Z Overhaul First Quest (Z12-Z22)                 ,To Keeper's Camp                    ,True          ,True     ,Normal
128 ,Z Overhaul Second Quest (Z32-Z52)                ,The Keepers                         ,True          ,True     ,Normal
129 ,Z Overhaul Third Quest (Z62-Z72)                 ,The Keeper Vault                    ,True          ,True     ,Normal
130 ,Z Overhaul Fourth Quest (Z82-Z102)               ,The Shard                           ,True          ,True     ,Normal
131 ,Storerooms Sidequest (Z1s10)                     ,Storeroom Sabotuers                 ,True          ,False    ,Normal
132 ,Highlands Sidequest (Z82)                        ,Missing in the Highlands            ,True          ,False    ,Normal

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 »

Architect wrote:
Wed Aug 02, 2023 1:58 am
I guess OnAbilityUse really is the best. First cast being unaffected should be a small price to pay. :D
You can't get AbilityMutator from Ability, so create a function doiing that

Code: Select all

using System.Collections.Generic;

namespace LastEpochMods.OnSceneChanged
{
    public class Ability_Mutator
    {
        private static System.Collections.Generic.List<AbilityMutator> ability_mutators = null;
        public static void Init()
        {
            ability_mutators = new List<AbilityMutator>();
            foreach (UnityEngine.Object obj in UniverseLib.RuntimeHelper.FindObjectsOfTypeAll(typeof(AbilityMutator)))
            {
                ability_mutators.Add(obj.TryCast<AbilityMutator>());
            }
        }
        public static AbilityMutator GetMutatorObjectFromAbility(Ability ability)
        {
            AbilityMutator mutator = new AbilityMutator();
            foreach (AbilityMutator obj in ability_mutators)
            {
                if (obj.ability == ability)
                {
                    mutator = obj;
                    break;
                }                
            }

            return mutator;
        }
    }
}
Init OnSceneWasLoaded event

Code: Select all

public override void OnSceneWasLoaded(int buildIndex, string sceneName)
{
	Scenes.CurrentName = sceneName;
	if (UniverseLibLoaded)
	{
		if (Scenes.GameScene())
		{                    
                    ...
                    OnSceneChanged.Ability_Mutator.Init(); //Get all AbilityMutator refs
                }
	}
}
Use in CharacterMutator:OnStartedUsingAbility

Code: Select all

[HarmonyPatch(typeof(CharacterMutator), "OnStartedUsingAbility")]
public class OnStartedUsingAbility
{
	[HarmonyPostfix]
	static void Postfix(CharacterMutator __instance, AbilityInfo __0, ref Ability __1, UnityEngine.Vector3 __2)
	{
		if (__1 != null)
		{
			//Code for Ability
			
			//Get Mutator
			AbilityMutator ability_mutator = OnSceneChanged.Ability_Mutator.GetMutatorObjectFromAbility(__1);
			
			//Code for Mutators
			System.Type type = ability_mutator.GetActualType();
			if (type == typeof(TransplantMutator))
			{
			
			}
		}
	}
}
Works well, OnStartedUsingAbility is the best choice, thanks

Github is Up.
I'm debugging the Headhunter item, few mobs have buffs, so I don't steal buffs from them anymore, but i generate random buff on kill.
If you want to try it, force drop it

Architect
Cheater
Cheater
Posts: 32
Joined: Mon May 22, 2017 4:09 pm
Reputation: 9

Re: Last Epoch Save Editor

Post by Architect »

Thanks for the update, Ash! Kinda massive update, going to fork it.

I'm still in the process of doing the quests. It's actually difficult as some are erroring out LMAO.

Post Reply

Who is online

Users browsing this forum: No registered users