Mod Developer Request!
Posted: Thu Oct 04, 2012 3:30 pm
To any mod developers who have had any issues with saving files as UTF-8 vs ANSI, I have a request to make:
If all of these are true for you, please let me know! I think I have a fix for that issue, but I have no way of testing, as UTF-8 encoded mod files don't seem to break FTL on my system.
I can walk anyone who's able to test this for me through the changes one-on-one, if you need help, let me know. The following changes should be all that's needed.
main.py, Line 7, add the following:
main.py, Line 31 replace this:
With this:
For those who don't know, Python is sensitive to spacing, so while changing things, do not alter the number of spaces at the beginning of a line, and don't change the spaces into tabs or anything else. If you do, it will likely break your copy of GMM until it's fixed.
- Do you have a reproducible way to reliably create the crashed FTL via saving your mod .append files as UTF-8 rather than ANSI?
- Do you run GMM via Python directly, rather than via modman.exe? (Or are you able to and still reproduce the first issue?)
- Are you willing to modify GMM files to help me test a possible fix for that issue?
If all of these are true for you, please let me know! I think I have a fix for that issue, but I have no way of testing, as UTF-8 encoded mod files don't seem to break FTL on my system.
I can walk anyone who's able to test this for me through the changes one-on-one, if you need help, let me know. The following changes should be all that's needed.
main.py, Line 7, add the following:
Code: Select all
import codecs
main.py, Line 31 replace this:
Code: Select all
target.write(source.read() + "\n")
With this:
Code: Select all
target.write(source.read().lstrip(unicode(codecs.BOM_UTF8, "utf8")) + "\n")
For those who don't know, Python is sensitive to spacing, so while changing things, do not alter the number of spaces at the beginning of a line, and don't change the spaces into tabs or anything else. If you do, it will likely break your copy of GMM until it's fixed.