Jump to content

[LE] Enchantments and SetPlayerKnows


Recommended Posts

Hi everyone!
I created a weapon enchantment and a script on a trigger to make the player learn that specific enchantment.
To do this I used MyEnchantment.SetPlayerKnows(True).
When I use the Arcane Enchanter everything works fine, I find the enchantment I created in the list of enchantments, I select it and I can easily apply it on weapons...

 

Where is the problem?
After a week, game time, if I go back to an Arcane Enchanter, the enchantment is no longer present in the enchantment list, the player no longer knows it and I have to go back to the trigger to make the player learn the enchantment again...

 

Does anyone know if there is a parameter on SetPlayerKnows to determine how long the player knows the enchantment?

Link to comment
Share on other sites

If everything in your mod is done correctly and you are testing in an unmodded and clean save file / game, then it's highly possible that you run into an SKSE (as I call them) "hole".

The reason I removed all SKSE dependencies from my last quest mod, I found a bunch of this kind of issues with quite a few of its functions.


Just because an SKSE or equivalent to it function exists out there, it doesn't mean that's 100% 'fail safe' proof or 100% hard tested.

In the end SKSE is just one more mod made by simple people just like everyone else, and like everyone else they make mistakes too.

Link to comment
Share on other sites

When you say you created an enchantment. Do you mean in the CK usual way, or are you mean the CreateEnchantment() SKSE call?

 

There are some quirks about the live version

 

; Creates a new enchantment on the item given the specified parameters
; all arrays must be the same size
; created enchantments are not purged from the save when removed or overwritten
; exact same enchantments are re-used by the game
Function CreateEnchantment(Float maxCharge,MagicEffect[] effects,Float[] magnitudes,Int[] areas,Int[] durations) Native

Link to comment
Share on other sites

When you say you created an enchantment. Do you mean in the CK usual way, or are you mean the CreateEnchantment() SKSE call?

Hi Sphered

Thanks for the answer

I mean in the CK

This is the Enchantment: https://drive.google.com/file/d/175kWf4Ckf7H2aRt-V6Vq7T9LyG9JkgbE/view?usp=share_link

Thist is the 1st Effect:https://drive.google.com/file/d/1mn9LwHgdco-KuUznpRjZJihzcPiP8KrD/view?usp=share_link

This is the 2nd Effect: https://drive.google.com/file/d/1duJZP90Uq9_Y3sKHuSqIrv4jc28UrYDB/view?usp=share_link

Edited by Tiziano74
Link to comment
Share on other sites

Havent messed with chants in a while so dont recall if duplicate effect names can give you issues

 

I notice both of those are the same name. Maybe others also use that name? Just an off-top-of-head thought but atm otherwise go with with Max said IMO. I just was going to say I dont think you can even "learn" SKSE created ones

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...