I want to know how to properly save dynamically generated objects, such as monsters, equipment, etc. Their quantities are uncertain, so how should I write the constructor function? Thank you.