Thanks for the response! I'm sorry, i am very new to this, and i tried to get the keys using defines.prototypes["quality"]. In the API docs it says this should return a table equivalent to {normal = 0, uncommon = 0,...} but when i tried to get the keys using for k,_ in defines.prototypes["quality"] it would just return... something that was not useful to me (at this point i don't remember). Thanks for reaching out, i knew there had to be a better way of doing this, but at some point i just wanted the mod to run :P