Kpheonix57 Posted August 9, 2019 Share Posted August 9, 2019 Long story short: I need to "disenchant" an item via papyrus scripting, in order to add the enchantment to the list of enchants the player can use. I'd very much prefer not to require SKSE to do this, but I'm open to that if there's no other way. Anyone know how to do this, or know of a mod where this is done? I've looked all through the papyrus reference section on creationkit.com, on google, and through past posts on this forum. The lack of info on this subject suggests to me that this functionality is handled by the game engine and not available via papyrus scripting, but perhaps I'm just missing something. Some context for those who want it: I'm working on a mod where the player must collect all of the Daedric and Aedric artifacts. Upon collecting an artifact, it is sealed away to prevent misuse, but the power contained in the artifact is utilized to grant the player additional abilities. The action of sealing away the artifacts is the driving force of the mod storyline, but I would prefer to allow the player to still use the enchants from the artifacts on their custom weapons. The problem is that I don't have a good way to actually accomplish that because I can't find a way to teach the player the enchants via papyrus. I've thought of ways around this already, but they're less than ideal and I'm hoping someone has a better solution. I could simply run a check to see if the player has an artifact, without actually removing it from their inventory. I could then enable all the artifacts to be manually disenchanted (think EzEs Artifact disenchanting mod) at any enchanting table, thereby granting the player the use of the enchantment. This is very out of tune with the mod's storyline of sealing those artifacts away, though. I could remove the artifacts from the player's inventory during the sealing process, then add a generic modeled/named weapon/armor with the artifact's enchant back to the player's inventory. They could disenchant this item and get the artifact enchant that way. This may be the best option I have from a story standpoint, but it's still obviously not ideal as it still requires the player to manually disenchant the generic item. Anyone have any other ideas? All relevant ideas are welcome! Link to comment Share on other sites More sharing options...
Shivzz0119 Posted August 11, 2019 Share Posted August 11, 2019 (edited) Unfortunately there is no way to add an enchantment directly to the player... it HAS to be learned by disenchantment which unfortunately limits your options to the ones you have above Edited August 11, 2019 by Shivzz0119 Link to comment Share on other sites More sharing options...
TobiaszPL Posted August 11, 2019 Share Posted August 11, 2019 (edited) My english is bad sorry :c in Short what you want to do:- Block "Daedric" Artifacts ( "Seal enchant power" )- Give Player Artifact power as Enchant Power "Enchant Stones" ????Create new item, for example armor - You can use Soul Stone as Mesh and Texture, and give this stone enchantand then give this Enchant Stone to Player via script :tongue: QPlayer.AddItem( XX, 1 ); //Edit:I could remove the artifacts from the player's inventory duri Create misc item with Artifact Mesh and Textures and replace real artifact with MISC artifactyou can also change name to for example "Sealed Razor" instead of "Merheneus Razor" Yes i dont remember his name but it was somthing like merhenues or merzeneus xD when you will want to "Unlock" artifact power you can again replace itemsthis time you delete MISC item and give player WEAPON item Edited August 11, 2019 by TobiaszPL Link to comment Share on other sites More sharing options...
Kpheonix57 Posted August 15, 2019 Author Share Posted August 15, 2019 Unfortunately there is no way to add an enchantment directly to the player... it HAS to be learned by disenchantment which unfortunately limits your options to the ones you have above That's what I was afraid of. Oh well, no point worrying about what can't be done. Thanks for the replies! Link to comment Share on other sites More sharing options...
NexusComa Posted August 18, 2019 Share Posted August 18, 2019 Oh I would say it can't be done. Anything is possible in programming. You may have to be a bit tricky. You can't add an enchant to the list in real time but you could add it beforehand. Then it would just be a matter of triggering the learned part. With a bit of creative thinking like it's part of the puzzle you should be able to pull this off. Link to comment Share on other sites More sharing options...
TobiaszPL Posted August 21, 2019 Share Posted August 21, 2019 Oh I would say it can't be done. Anything is possible in programming. WIth this thinking you can also create program to wait for signal from Skyrimand when you recive this signal you can find and force to use Function to add new Enchant :P Here is my very simple version of this idea: https://www.youtube.com/watch?v=muvaGwuslb8 i just had problem with Action, its crash Skyrim with ENB when Action is runningso i create program to get Skyrim Window resize it and change Window Class Styles :x... Yes, everything is possible using programming... But sometimes its waste of time :P Link to comment Share on other sites More sharing options...
NexusComa Posted August 21, 2019 Share Posted August 21, 2019 I love how no matter what you say here someone is always there to try and troll you. When you learn an enchant in the game it's not like in real life the clouds part and a light shines down from the sky giving you a new power.Figure out how the game moves the enchant to your list of known enchants and simply mimic that via the code. If the game can do it that way so can you.Add the enchant to the games main list beforehand via the mod. Or come at it from a different direction ... possibly like this ... "Enchant Stones" ????Create new item, for example armor - You can use Soul Stone as Mesh and Texture, and give this stone enchantand then give this Enchant Stone to Player via script :tongue: QPlayer.AddItem( XX, 1 );This is just the type of thinking out of the box I was talking about. Anything is possible in programming.I'm sorry TobiaszPL if you somehow took offence to my response then felt the need to try and troll me with your ridiculous response.I really wasn't talking to you in anyway. Just simply pointing out anything is possible with programming in a fully programmed world.There was a time people said the things SKSE can do couldn't be done also ...Save your next trollish reply it's not really helping anyone. Link to comment Share on other sites More sharing options...
TobiaszPL Posted August 21, 2019 Share Posted August 21, 2019 - Ok !...You write it in hard english so i can't understand everything xD but i love you too :)"This is just the type of thinking out of the box" is that good or bad?You can simply unenchant stone with power of Daedric artefact :x...and Daedric artefact can stay sealed as Misc item xD lol..."I'm sorry TobiaszPL if you somehow took offence to my response"offence ? :o... "Well, i never" <-- lel Anno 1404 Venice xDDD Arrr :3 Link to comment Share on other sites More sharing options...
NexusComa Posted August 21, 2019 Share Posted August 21, 2019 Another ridiculous response ...Not helping anyone. Link to comment Share on other sites More sharing options...
foamyesque Posted August 23, 2019 Share Posted August 23, 2019 Unfortunately there is no way to add an enchantment directly to the player... it HAS to be learned by disenchantment which unfortunately limits your options to the ones you have above This is essentially the correct answer. There is no way, via ordinary Papyrus scripting, to teach a player a specific enchantment. It's entirely done by the game engine. There might be some kind of workaround with inventory shell games and using an enchanting table as part of the sealing process you're setting up, though. Player activates the table, the default artifacts are swapped out for dummies you can disenchant; as soon as the table's closed, the original ones are added back to the player. Do some filtering to avoid swapping out artifacts that were already sealed. It's similar in concept to some scripts I provided here awhile back to allow someone to use food in an alchemy station. Link to comment Share on other sites More sharing options...
Recommended Posts