From 748fb4e5f09a6befed6995c867831fe287767bdf Mon Sep 17 00:00:00 2001 From: Pao Date: Sat, 4 Feb 2023 02:33:11 +0100 Subject: [PATCH] Added a shitty script to generate clothing Items to make it easier to me --- Test_Name.xml | 6 ++++++ python_helpers/main.py | 48 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 Test_Name.xml create mode 100644 python_helpers/main.py diff --git a/Test_Name.xml b/Test_Name.xml new file mode 100644 index 0000000..568101f --- /dev/null +++ b/Test_Name.xml @@ -0,0 +1,6 @@ + + + TEST TEXT FROM SOMETHING + TEST TEXT FROM SOMETHING FEMALE + get guid + diff --git a/python_helpers/main.py b/python_helpers/main.py new file mode 100644 index 0000000..28f569d --- /dev/null +++ b/python_helpers/main.py @@ -0,0 +1,48 @@ +import lxml.etree as gfg + +# +# +# Prost_Left_Hand_MetalHand_Male +# Prost_Left_Hand_MetalHand_Female +# 2101af26-54b9-455b-abc0-7533ce37f84b +# false +# false +# false +# Prosthesis\metal_base +# + + + +def create_single_xml(): + root = gfg.Element("clothingItem") + + m_MaleModel = gfg.Element("m_MaleModel") + m_MaleModel.text = "TEST TEXT FROM SOMETHING" + root.append(m_MaleModel) + + m_FemaleModel = gfg.Element("m_FemaleModel") + m_FemaleModel.text = "TEST TEXT FROM SOMETHING FEMALE" + root.append(m_FemaleModel) + + m_GUID = gfg.Element("m_GUID") + m_GUID.text = "get guid" + root.append(m_GUID) + + m_Static = gfg.Element("m_Static") + m_Static.text = "false" + + m_AllowRandomTint = gfg.Element("m_AllowRandomTint") + m_AllowRandomTint.text = "false" + + # TODO Defined by the amount of textures that we're gonna pass + for x in range(2): + + textureChoices = gfg.Element("textureChoices") + textureChoices.text = "Texture path" + + tree = gfg.ElementTree(root) + + with open("Test_Name.xml", "wb") as file: + tree.write(file, encoding='utf-8', xml_declaration=True, pretty_print=True ) + +create_single_xml() \ No newline at end of file