I don't know if this is the right place to post questions about papyrus but I have a question about a papyrus script I was trying to make. What it basically does is rename a recipe by adding "(Learned)" to its name once it's read. (Pretty much like the unread books mod, only this doesn't use a FormList, this script is added to each recipe directly in the CK) For some reason this code only works when the item is on the ground or anywhere else where you can actually activate the 3D object. If it's in the inventory it doesn't work, self.GetBaseObject() doesnt return any value. I've been looking out there for Papyrus help/tutorials/references but there's really not that much. Any thoughts on this would be appreciated.
Scriptname dar_TeachProperties extends ObjectReference
Import StringUtil
Form Property recipeObject Auto
String recipeName
Event OnRead()
recipeObject = self.GetBaseObject()
recipeName = recipeObject.getName()
If (recipeIsRead == false)
If Substring(recipeName, 0, 9) != "(Learned)"
recipeObject.setName("(Learned) " + recipeName)
EndIf
EndIf
EndEvent
Bool Property recipeIsRead Auto