Jump to content

Modding on Linux?


deleted

Recommended Posts

I have been trying to create my first mod today but it's been an absolute nightmare. Unfortunately it seems that on Linux Don't Starve will not compile Spriter files so I have been trying to run Steam in Wine to do this with no luck. Is there any other solution?

Link to comment
Share on other sites

Thanks, I've got that up and running but when I use scml to try and compile a mod it runs for a second and throws the following error:

Error Exporting /home/daniel/Downloads/ds_mod_tools-master/build/linux/mod_tools/wand/exported/wand.zipunhashable instanceTraceback (most recent call last):  File "/home/daniel/Downloads/ds_mod_tools-master/build/linux/mod_tools/tools/scripts/buildanimation.py", line 495, in <module>    ExportBuild( endianstring, zip_file, buildxml, outzip, not results.skipantialias, results.platform, results.textureformat, results.hardalphatextureformat, results.force, results.ignoreexceptions )  File "/home/daniel/Downloads/ds_mod_tools-master/build/linux/mod_tools/tools/scripts/buildanimation.py", line 365, in ExportBuild    atlases = AtlasImages( images, "atlas", outzip, 2048, antialias, platform, textureformat, hardalphatextureformat, force, ignore_exceptions)  File "/home/daniel/Downloads/ds_mod_tools-master/build/linux/mod_tools/tools/scripts/buildanimation.py", line 214, in AtlasImages    atlases = atlas.Atlas(ims=ims, outname=outname, max_size=maxtexturesize, scale_factor=SCALE_FACTOR, ignore_exceptions=ignore_exceptions, force_square=results.square)  File "/home/daniel/Downloads/ds_mod_tools-master/build/linux/mod_tools/buildtools/linux/Python27/Lib/site-packages/klei/atlas.py", line 204, in Atlas    contained_images[ b.im ] = TrueTypeError: unhashable instanceThere was an export error!ERROR: Command failed!

Any ideas?

Link to comment
Share on other sites

Thanks, I've got that up and running but when I use scml to try and compile a mod it runs for a second and throws the following error:

Error Exporting /home/daniel/Downloads/ds_mod_tools-master/build/linux/mod_tools/wand/exported/wand.zipunhashable instanceTraceback (most recent call last):  File "/home/daniel/Downloads/ds_mod_tools-master/build/linux/mod_tools/tools/scripts/buildanimation.py", line 495, in <module>    ExportBuild( endianstring, zip_file, buildxml, outzip, not results.skipantialias, results.platform, results.textureformat, results.hardalphatextureformat, results.force, results.ignoreexceptions )  File "/home/daniel/Downloads/ds_mod_tools-master/build/linux/mod_tools/tools/scripts/buildanimation.py", line 365, in ExportBuild    atlases = AtlasImages( images, "atlas", outzip, 2048, antialias, platform, textureformat, hardalphatextureformat, force, ignore_exceptions)  File "/home/daniel/Downloads/ds_mod_tools-master/build/linux/mod_tools/tools/scripts/buildanimation.py", line 214, in AtlasImages    atlases = atlas.Atlas(ims=ims, outname=outname, max_size=maxtexturesize, scale_factor=SCALE_FACTOR, ignore_exceptions=ignore_exceptions, force_square=results.square)  File "/home/daniel/Downloads/ds_mod_tools-master/build/linux/mod_tools/buildtools/linux/Python27/Lib/site-packages/klei/atlas.py", line 204, in Atlas    contained_images[ b.im ] = TrueTypeError: unhashable instanceThere was an export error!ERROR: Command failed!
Any ideas?

I've seen this error before, because I got it myself. It's because you have python2-pillow installed, the fork/improvement of Python 2's old (and somewhat buggy/poorly designed) PIL library. However, the mod tools rely on PIL specific behaviour.

One option would be to uninstall Pillow and install the old PIL instead. However, that's unlikely to be a viable option because you probably have packages depending on Pillow (and the two can't cleanly coexist as system-wide installations).

What I had to do was compile python2-PIL myself, putting it somewhere (let's say "~/klei_python_compat), which should look like

$ ls -1 klei_python_compat/PILPIL.pthpysane-2.0-py2.7.egg-infosane.pysane.pycsane.pyo_sane.so
Then, before running the mod tools, you should set the PYTHONPATH environment variable appropriately:

$ export PYTHONPATH=~/klei_python_compat/
(I'm not sure if tilde expansion works here, but if not just put /home/daniel, $HOME or whatever)

Then it should work. But you'll need the latest commit from my fork of the mod tools (appropriately titled "worked around an issue for systems with Pillow installed"). What this last commit does is give loading priority to packages in PYTHONPATH over the ones bundled with the mod tools.

It's ugly and cumbersome, but that'll do the trick. Unfortunately this seems to be the only way around it other than refactoring a bunch of Klei's Python code, or altogether implementing scml -> bin compilation from scratch.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...