What we want to do is capture an OnObjectEquipped() Event. Capturing this event on the Player is a little indirect because we don't want to attach a script to the Player directly. Instead, it would be better to use a ReferenceAlias filled by the player.
The most straight-forward way to do this would be to:
1) Create a Quest. Give it an EditorID and exit the window. Re-open the quest. It should be set to "Start Game Enabled".
2) Create a ReferenceAlias on that Quest.
3) Set it to Specific Reference: PlayerRef. Check Allow Reserved.
4) Attach a script to the ReferenceAlias that looks something like this:
scriptname SierSoulGemAliasScript extends ReferenceAliasMiscObject property SoulGemWhatever autoMiscObject property FragmentWhatever autoActor property PlayerRef autoEvent OnObjectEquipped(Form akBaseObject, ObjectReference akReference) if akBaseObject == SoulGemWhatever PlayerRef.RemoveItem(SoulGemWhatever) PlayerRef.AddItem(FragmentWhatever) endifendEvent
5) Attach a script to the quest itself that looks something like this:
scriptname SierSoulGemQuestScript extends QuestReferenceAlias property myPlayerAliasOnTheQuest autoActor property PlayerRef autoEvent OnInit() bool b = myPlayerAliasOnTheQuest.ForceRefIfEmpty(PlayerRef)endEvent
You will need to "fill" the properties in the CK after you compile the scripts and attach them to the Alias and Quest. This establishes a linkage between "script objects" and "Creation Engine objects". The properties are meaningless to the engine until they are filled in the CK.
You will need to, of course, change the property names in the scripts to meaningful things. I'm not in front of the CK right now so I don't know what the actual editor IDs for empty soul gems or soul gem fragments are.
To make this work on many different empty soul gems (instead of just one type), instead of making a property for a single type of soul gem on the Alias script, make a property for a FormList, create the FormList in the CK, and fill the form list with the empty soul gems you want to recognize. You will have to modify the If statement of the OnObjectEquipped() event to accommodate this change; I leave it to you to make that change.
Hope this helps.
By the way, you will get an error notification generated by the game whenever you attempt to "equip" an item in the Misc category; something like "this item cannot be equipped". This comes from a GameSetting in the CK. I blanked out the contents of this GameSetting long ago in Frostfall and no one has ever seemed to miss it. You will have to do the same.