I'm trying to figure out how to cap the maximum quality a weapon or piece of armor can be improved to a single tier of Legendary. I can't find anything in the CK that seems to govern this behavior and I'm wondering if it's scripted or hard-coded. I don't have any experience scripting, but I can learn. If it's hard-coded, there's nothing I can do. If someone can help me find out what I need to be looking at, I would be most grateful.