Elin
Tome of Memory Loss
35 Comments
grueshanker  [author] 19 hours ago 
@Shinshi

AWESOME,

as always, thank you for testing and helping the mod improve :)
Shinshi LolitaLover 5 Sep @ 5:11am 
Mod works collectry in my Elin, too! Thank you very much!!
grueshanker  [author] 5 Sep @ 12:56am 
Updated with 2 new default option:
- PreventEnemyRemoval = true - Blocks spell/ability removal from hostile NPCs
- PreventEnemyMenuAccess = true - Shows menu option but provides flavor text refusal for enemies

Increased cost by ~10k value (~9 gold bar in my game after all calculations). Can set this in the Excel sheet
grueshanker  [author] 4 Sep @ 11:42pm 
@Virban

AWESOME,

thanks so much for testing and confirming :))
Virban 4 Sep @ 11:39pm 
i have tried the new update on Melilith and everything worked like intended. I tried changing maps, reloading, sleeping , rebooting the game completely +all of that while hosting. The deleted spell didnt reappear. Thank you very much for your hard work!
grueshanker  [author] 4 Sep @ 6:35pm 
@Virban @Shinshi

I couldn't replicate the issue by moving areas or sleeping, but I could replicate it by:
1. Having NPCs read spellbooks, OR
2. Save and reload

Both triggered the same underlying problem where the game rebuilds ability lists from original character data.

To try to fix, I changed the mod to track removed abilities directly on each character using the game's save system instead of temporary memory. please test (might need to unsubscribe/resubscribe) and let me know if it works
grueshanker  [author] 4 Sep @ 5:29pm 
thanks for finding this bug guys! implementation is quite new, I will look into fixing this after determining behavior
Virban 4 Sep @ 12:37pm 
Hi. Awesome mod i was looking for something like this! Thank you for this!
And to add to Shinshi i had the same happen with Melilith.She remembers innate spells after a map change
Shinshi LolitaLover 4 Sep @ 6:39am 
OMG,when player sleep and wake or move map, GK remembers her forgotton spell...
Shinshi LolitaLover 4 Sep @ 1:56am 
Great!! 素晴らしい!!(in japanese,means wonderful)
Thank you for patiently test.
Now WE can edit spells and abilities completely at our disposal.
Your work will saves a lot of adventurers in North Tyris!!
grueshanker  [author] 4 Sep @ 12:13am 
I have done a major overhaul of this mod, to enable it to detect and remove innate NPC abilities, and fixed most issues reported. please give it a go and test
grueshanker  [author] 3 Sep @ 10:34pm 
@Shinshi
Thanks for the tests so far, I found the cause. Elin uses two separate systems for abilities. Learned ones go in elements.dict and remove fine, but special NPCs like GK, Kettle, Will O Wisp, Falis, Kiria use hardcoded actCombat abilities. That’s why removal and detection failed for these hardcoded abilities. I’ll post an update that handles both so they can be detected and removed. Appreciate the help, your steps made it clear.
grueshanker  [author] 3 Sep @ 3:14pm 
@Shinshi
Thank you for your patience and tests. it seems to affect certain subset of unique npcs, but not others. I will try to work out complete behavior for the fix, but will require dive in Elin codebase. Can you please post Player.log pastebin after testing using memory tome on these NPCs?

By the way, I manage to replicate GK behavior you mentioned in English version too, by spawn in Golden Knight and capture her with a monster ball, so I can see it is affecting her and some other npcs specifically..
Shinshi LolitaLover 3 Sep @ 3:16am 
Thanks for Immediately response.
I think this is not especially at Golden Knight. I tryed other NPC, they act same. ex:Kettle,Will 'O Wisp,Falis,Kiria
May I paste CWL's log on pastebin?
grueshanker  [author] 3 Sep @ 2:26am 
@Shinshi

Thanks so much for the detailed replication. I suspect it is not an issue with YK Dev/YK Framework but in fact with how the abilities and spell of Golden Knight herself is detected. The game must have some special logic for her or similar ones. I will take a look this week :)
Shinshi LolitaLover 3 Sep @ 1:32am 
Thanks for taking time.I'm impressed!

In my Elin,NPC Spell Learning still works collectly.

What I tried was forget spell learned in vanilla.Golden Knight's "inclusion of nature"(may different name in English. it is GK's only healing spell.)

Here is my try.
1. Give the spell book to GK,NPC Spell Learning show log "GK gained magical knowledge".
2. Use Tome of Memory Loss to GK, the spell added can show.
3. Try to remove, log says "Something went wrong while removing spell." and window is auto closed.
4. Use Tome of Memory Loss again, there was no spell,same as first. and count of Tome is decreased.

After, i tried to remove spell by YK Dev Tool,and failed. may need support by YK Framework's author.
grueshanker  [author] 2 Sep @ 8:00pm 
I have made an update which handles how Spells and Abilities are filtered, let me know if this improves detections for spells learned outside the "NPC Spell learning mod". Also made update to prevent error from occur when user has set "auto-close" window off in settings and attempt to remove multiple spell after book crumbled.
grueshanker  [author] 2 Sep @ 2:22pm 
@Shinshi, for replication purposes, how was the NPC taught this spell that can't be removed?
grueshanker  [author] 2 Sep @ 1:58pm 
@Shinshi, thanks for the detailed report. This is intentional Behavior.

If there was some Spell which was added by my companion mod, "NPC Spell Learning", it can be removed by this mod.

If there was some Spell that was added by a different outside mod/mechanism (likely not Vanilla), I think I did not code in removal. For that, please try to use YK Dev Tool to remove those spells not learned by "NPC Spell Learning" and then try to reteach the same spell using "NPC Spell Learning" mod and it should work.

I will look into a compatibility patch for this..

Additionally, can you confirm since you are on stable: Is NPC Spell Learning still working for you?

Nightly seems to have broken it, so I might have to separate Nightly NPC Spell Learning to new mod..
Shinshi LolitaLover 2 Sep @ 7:41am 
Thanks for kindfull support.
Here is Player.log. https://pastebin.com/fiNyf202
It is too long,so I cut not useful data.
I tryed to use NPC Spell Learning, spell added by mod can show and remove, but already learned spells are not visible.
And teach already learned spell and try to remove, not works and get log "Something went wrong while removing the spell."
grueshanker  [author] 2 Sep @ 1:01am 
Steps I used:
1) Loaded in with CWL (Stable) + YK Framework + Elin (Stable)
2) Using my other mod NPC Spell Learning, I gave the Ice Arrow spell book to my cat ally. She read and learned the spell --> Internally, this is added as an NPC Ability, not a spell.
3) I hold the Tome of Memory Loss, middle click on the Cat, and brings up the Spell tab. I can clearly see the Ice Arrow from the drop down and I am able to delete it with default settings.

This process works fine for me on both Stable and Nightly, so I will need more reproduction steps to help out.
grueshanker  [author] 2 Sep @ 12:42am 
Also can you give an example of a NPC Spell? For the purpose of my other mod, Spell Learning, these spells are turned into "Abilities" when loaded into NPCs, so they should show fine.
grueshanker  [author] 2 Sep @ 12:38am 
Hi @Shinshi

Since I cannot replicate on CWL (Stable) + YK Framework + Elin (Stable), it might be mod conflict. Please post Player.log for troubleshooting (can use a pastebin like website)
Shinshi LolitaLover 1 Sep @ 10:51pm 
Thanks for Mod.
But in my game, part of Mod dosen't works. I use stable CWL, and YK Framework is placed upper than this Mod.
Player Spells,Player Abilities,NPC Abilities can show, but NPC Spells can not show, so I can't remove spells.
grueshanker  [author] 31 Aug @ 7:39pm 
Next, for CWL, I am on Nightly Elin. So I have (Nightly) Custom Whatever Loader (#15 in mod list order).

If I was on Stable Elin, I would unsub (Nightly) CWL and sub (Stable) CWL. Try it out and let me know the followup.
grueshanker  [author] 31 Aug @ 7:37pm 
Let me help with some troubleshooting steps.

1) Unsubscribe this mod
2) Start Elin, load save, hit continue when it brings up missing mod message.
3) Save and quit.
4) Re-subscribe this mod, it will ask you to also subscribe YK Framework and (Nightly) Custom Whatever Loader. if you are on stable, ensure to unsub (Nightly) Custom Whatever Loader and sub (Stable) Custom Whatever loader.
5) Start Elin, but do not load save yet.
6) (Optional) You might want a mod to re-order your mods easier, like Mod Viewer plus: https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=3523551623
7) In Title Screen, go to "Mod Viewer"
8) Make sure "YK Framework" is enabled and high up on the modlist. In my modlist, it is #11..
9) Make sure Tome of Memory loss is lowest on the list (ie in my modlist, it is 167)

In my game, I am on Nightly with >100 mods, so yours must be lack of YK Framework or mod load order issue. Above steps should resolve.
LaderN 31 Aug @ 7:25pm 
FileNotFoundException: Could not load file or assembly 'YKFramework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' o ...
<[RMB] close>
<[MMB] do not show>
<>c__DisplayClass52_0.<AddButton>b__0
UnityEngine.CoreModule::InvokableCall.Invoke
UnityEngine.CoreModule::UnityEvent.Invoke
UIButton._OnPress
UIButton.<OnPointerDown>b__68_1
BaseCore+<_WaitForEndOfFrame>d__22.MoveNext
UnityEngine.CoreModule::SetupCoroutine.InvokeMoveNext

@grueshanker i got this error when middle-click on ally and press button use tome of memmory
grueshanker  [author] 31 Aug @ 3:58am 
@Keylaynak,

I would need Player.log and error message, as I was unable to replicate this. I am able to add spells fine with the option on, I load up with only YK Framework, (Stable) Custom Whatever Loader, and this mod.

This is settings:
C:\Program Files (x86)\Steam\steamapps\common\Elin\BepInEx\config\npcspellmanager.custom.item.cfg

Make sure following is set to true if you want to add spells:
## Enable spell addition functionality (powerful feature - use with caution)
# Setting type: Boolean
# Default value: false
EnableSpellAddition = true
grueshanker  [author] 31 Aug @ 3:11am 
@Keylaynak

thank you for the report. I will try to see if I can replicate on stable when I have the time.

@LaderN

I am unable to replicate; can you try to unsubscribe and resubscribe?

Mod load order should have YK Framework > (Nightly) Custom Whatever Loader. I made my mods load at the very end just in case > Tome of Memory Loss > NPC Spell Learning.

Also try paste Player.log or specific errors as I cannot replicate on latest
LaderN 31 Aug @ 2:57am 
@grueshanker after update it conflict with YK framework
北海自闭儿童 31 Aug @ 2:47am 
Good job!
Kelaynak 31 Aug @ 2:31am 
Hi Im using CWL stable. I can use the tome and adding abilities work great but adding spells does not work for me. Stable version would be very nice I was looking for a mod like this for a time now
grueshanker  [author] 31 Aug @ 1:46am 
Added new option to Show spell levels (default true), remove YK DevTool dependency, and made window a bit wider
grueshanker  [author] 31 Aug @ 1:32am 
Hi @LaderN, thanks for the feedback, I will add an option to display level of spells.
LaderN 31 Aug @ 1:17am 
@grueshanker This mod should display the levels of the ally's available spells. This section can include an option to edit the default spells: false means displaying the spell levels, true means allowing editing