No, I have icon.py in the folder where I start sizemodgen.py
Still it asks for it..
And when I place this icon.py inside the "python-3.13.1-embed-amd64\Lib\site-packages\icon"
then the next problem WAS the "tree" in lxml.
Now I am stuck again with the icon problem.
wellwell.. with another pc it worked out!
It must be a wrong installation where the paths are not set correct
But now:
Using the original data folder gives me this:
PS X:\SteamLibrary\steamapps\common\Distant Worlds 2\mods\mysizemod> python .\sizemodgen.py ..\..\data .\mysizemod
Traceback (most recent call last):
File "X:\SteamLibrary\steamapps\common\Distant Worlds 2\mods\mysizemod\sizemodgen.py", line 293, in <module>
c = etree.parse(open(fn, "r"))
File "src\\lxml\\etree.pyx", line 3589, in lxml.etree.parse
File "src\\lxml\\parser.pxi", line 1979, in lxml.etree._parseDocument
File "src\\lxml\\parser.pxi", line 1999, in lxml.etree._parseFilelikeDocument
File "src\\lxml\\parser.pxi", line 1893, in lxml.etree._parseDocFromFilelike
File "src\\lxml\\parser.pxi", line 1224, in lxml.etree._BaseParser._parseDocFromFilelike
File "src\\lxml\\parser.pxi", line 633, in lxml.etree._ParserContext._handleParseResultDoc
File "src\\lxml\\parser.pxi", line 739, in lxml.etree._handleParseResult
File "src\\lxml\\etree.pyx", line 351, in lxml.etree._ExceptionContext._raise_if_stored
File "src\\lxml\\parser.pxi", line 384, in lxml.etree._FileReaderContext.copyToBuffer
File "C:\Users\fred88\AppData\Local\Programs\Python\Python313\Lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 6481: character maps to <undefined>
I had to create a folder where I copied all relevant xml files as an original to get needed results:
python .\sizemodgen.py .\origData .\.
For me on the actuak dw2 game it crashes. Its maybe the factor 12.
I will do another try with 1/6th.
Tomorrow I am going to make a video to show how I did it.
I extract all sizes and then look for the smallest size. Then i divide through the smallest size and round them so that they are integers.
The 1/6th is not crashing but the models look like they are untouched..
Here is my 1/6th mod

- my mod
- rx.jpg (62.39 KiB) Viewed 216 times
Here is you 1/6th mod

- yours.jpg (110.37 KiB) Viewed 216 times