Grognak's Mod Manager v1.7 (Updated March 6, 2013!)

Discuss and distribute tools and methods for modding. Moderator - Grognak
Grognak
Posts: 172
Joined: Tue Sep 18, 2012 9:42 pm

Re: Grognak's Mod Manager v1.4.1 (Updated Nov 9 2012!)

Postby Grognak » Sun Dec 02, 2012 4:48 am

@Windup, just to make sure, did you restart GMM after putting the new mods in the folder?

@FlamingDodo, that advice is for Mac OS X computers. You're talking about the struct error and you're running Windows, correct? If so, did you follow my advice a little earlier?
Windupferrari
Posts: 2
Joined: Sun Dec 02, 2012 4:03 am

Re: Grognak's Mod Manager v1.4.1 (Updated Nov 9 2012!)

Postby Windupferrari » Sun Dec 02, 2012 5:48 am

Grognak wrote:@Windup, just to make sure, did you restart GMM after putting the new mods in the folder?

@FlamingDodo, that advice is for Mac OS X computers. You're talking about the struct error and you're running Windows, correct? If so, did you follow my advice a little earlier?


Yep, several times. I've restarted everything I could think of short of my laptop itself, with no changes.

EDIT: Also, I'm running OS X 10.6.8, if that helps.
Last edited by Windupferrari on Sun Dec 02, 2012 8:01 pm, edited 1 time in total.
Solarion
Posts: 14
Joined: Sat Nov 24, 2012 6:07 pm

Re: Grognak's Mod Manager v1.4.1 (Updated Nov 9 2012!)

Postby Solarion » Sun Dec 02, 2012 10:55 am

Va1iD wrote:I feel so dumb, seriously.

I did it, and it worked, and it's awesome, I don't know how, but I did it.

EDIT: Here's how.

1. Download the latest version of python.

2. Download GWM and extract the folder.

3. Go to your applications folder and open package contents of FTL

4. Navigate toward the FTL_README.HTML and copy and paste everything in the GWM folder.

5. Now, take out everything in the SRC folder and paste it in the same place as the HTML.

6. Now run the main.py python file.

7. Click no if you are running the game DRM free.

And there you go! GWM should make a mods folder where you can put your mod desires in.

And no, you don't need a modified .py file, no, you don't need a 'special' application, you need a brain. :D

If it still doesn't work, quote me and tell me what happened.

Mono is NOT needed. :)


I tried your approach. Installed python, unpacked the GMM folder into my FTL folder, got the files from the SRC folder and pasted them into the FTL folder also, ran the main.py. I got into the patch screen, patched with the extra scrap mod. The command prompt generated some text and then immediately closed down. Didn't even have time to see what was in there. I managed to screen cap it in time though. This is what it looks like

http://i.imgur.com/URFGG.png (large image, so won't post here)

And it still crashes my FTL game, so I'll just go reinstall now.
Flamingdodo
Posts: 6
Joined: Fri Nov 30, 2012 1:25 pm

Re: Grognak's Mod Manager v1.4.1 (Updated Nov 9 2012!)

Postby Flamingdodo » Sun Dec 02, 2012 5:14 pm

Grognak wrote:@Windup, just to make sure, did you restart GMM after putting the new mods in the folder?

@FlamingDodo, that advice is for Mac OS X computers. You're talking about the struct error and you're running Windows, correct? If so, did you follow my advice a little earlier?


Yes I am running windows 7 with the steam version of FTL.
I followed your advice of installing python and running the "main" file but it still came up with an error after selecting the mods and clicking patch.
sandrew26
Posts: 5
Joined: Sun Dec 02, 2012 7:16 pm

Re: Grognak's Mod Manager v1.4.1 (Updated Nov 9 2012!)

Postby sandrew26 » Sun Dec 02, 2012 7:25 pm

I've looked through many pages on this thread, and can't seem to find an answer.

I'm trying to get the mod manager to work on OSX 10.8.2 with steam; i'm fairly certain my python is up-to-date (2.7.2). I've got the main.py and all of the /src files in the folder with the FTL readme, and tried running main.py through terminal ("python path/main.py"). But, I'm still getting some errors:

Code: Select all

Traceback (most recent call last):
  File "/Users/Andrew/Library/Application Support/Steam/SteamApps/common/FTL Faster Than Light/FTL.app/Contents/main.py", line 417, in <module>
    allowzip = cfg.getboolean("settings", "allowzip")
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ConfigParser.py", line 360, in getboolean
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ConfigParser.py", line 599, in get
ConfigParser.NoSectionError: No section: 'settings'

Is there something wrong with my python, or am I doing something wrong? Also, the _init_.py file is blank - is it supposed to be?
boa13
Posts: 829
Joined: Mon Sep 17, 2012 11:42 pm
Location: Nantes, France

Re: Grognak's Mod Manager v1.4.1 (Updated Nov 9 2012!)

Postby boa13 » Sun Dec 02, 2012 7:31 pm

I've never tried running the Mod Manager, I have not read this whole thread, and I don't have a Mac... but I know a bit of Python. :)

Having an empty __init__.py file is not a problem, it's actually quite common. Also, from the error log you posted, it seems that the program started well, but is complaining that it cannot find some settings. Possibly, the Mod Manager has a config file? In that case, make sure it is at the proper place, and contains the proper options.

More accurately, the Mod Manager is trying to read an option named "allowzip" (allowzip = on or allowzip = off) in the "[settings]" section of the config file, but there is no "[settings]" section in the config file. Or maybe there is no config file at all. :)
Forum janitor — If you spot spam, PM me the URL and/or the username of the spammer.
I have powers, moderator powers. I am not keen on using them, but will do so if needed.
sandrew26
Posts: 5
Joined: Sun Dec 02, 2012 7:16 pm

Re: Grognak's Mod Manager v1.4.1 (Updated Nov 9 2012!)

Postby sandrew26 » Sun Dec 02, 2012 7:54 pm

Re Boa: Thank you for helping out =) Yes, there's an ini file.

Code: Select all

[settings]
# Sets whether .zip files can be treated as .ftl files. Defaulted to 0 (false).
# Warning: Setting to 1 will cause file extentions to show in the mod list (cosmetic issue only)
allowzip = 0
# Sets the directory for mods (Mac OS X only)
macmodsdir = ~/Documents/FTL mods

I tried changing allowzip to 1, but that still didn't work (exactly the same error as before). I don't think changing the directory will do anything, but I could try it if you think it will?

EDIT: I've got the main.py open, and found the bit where it's asking for the config options... could I just manually edit the options into main.py, so it doesn't have to go look for them and then freak out? (I don't know python, but I can usually find my way through code and then copy+paste in things)

Code: Select all

# Load up config file values
cfg = SafeConfigParser()
cfg.read("modman.ini")

allowzip = cfg.getboolean("settings", "allowzip")
boa13
Posts: 829
Joined: Mon Sep 17, 2012 11:42 pm
Location: Nantes, France

Re: Grognak's Mod Manager v1.4.1 (Updated Nov 9 2012!)

Postby boa13 » Sun Dec 02, 2012 8:30 pm

I think the core issue is that the program does not find the modman.ini file. You can change all the settings you want in that file, the program does not find it anyway. :) Where is that file currently? What do directory are you in when you launch the program? Try to copy the modman.ini file in the directory from which you load the mod manager.

You could also try to modify the program by hand, but I would advise to try to put the config file at the "proper place". If you want do modify the program anyway, it should not be too hard. In the particular case of allowzip, you would change the line from "allowzip = cfg.getboolean("settings", "allowzip")" to "allowzip = False".
Forum janitor — If you spot spam, PM me the URL and/or the username of the spammer.
I have powers, moderator powers. I am not keen on using them, but will do so if needed.
sandrew26
Posts: 5
Joined: Sun Dec 02, 2012 7:16 pm

Re: Grognak's Mod Manager v1.4.1 (Updated Nov 9 2012!)

Postby sandrew26 » Sun Dec 02, 2012 9:02 pm

Re boa: I'm pretty certain everything is in the correct directory. Image

There's some directory checking later on in main.py, but the program never seems to get to that point (since I never have the option to give a steam bool, and no GUI ever appears):
[spoiler]

Code: Select all

elif platform.system() == "Darwin":
    steam = msgbox.askyesno(progname, "Did you purchase FTL through Steam?")
    if steam == True:
        dir_res = os.path.join(os.environ['HOME'], 'Library/Application Support/Steam/SteamApps/common/FTL Faster Than Light/FTL.app/Contents/Resources')
    if steam == False or steam == None:
        if not os.path.isfile(os.path.join(dir_root, "MacOS", "FTL")):
            msgbox.showerror(progname, "Grognak's Mod Manager must be located directly above the MacOS folder in FTL.dat")
            sys.exit(0)
        dir_res = os.path.join(dir_root, 'Resources')
    os.chdir(dir_root)
    dir_mods = cfg.get("settings", "macmodsdir")
    dir_mods = os.path.expanduser(dir_mods)
    if not os.path.exists(dir_mods):
       os.makedirs(dir_mods)
       copy(os.path.join(dir_root, "mods/Beginning Scrap Advantage.ftl"), dir_mods)
       msgbox.showinfo(progname, "A folder has been created in " + dir_mods + ". Please place any FTL mods there.")
[/spoiler]
I'll try your code, and see if it works. Thank you so much for sticking with me; I appreciate it.
Unrelated - how do I do spoiler tags on this board?

EDIT: Boa, you rock. Replacing the bit looking for the ini file worked(I got to say steam = true, but then the window closed and that's all I got other than the error log in Terminal), but it looks like I'm still stuck on line 599's get.

Code: Select all

Traceback (most recent call last):
  File "/Users/Andrew/Library/Application Support/Steam/SteamApps/common/FTL Faster Than Light/FTL.app/Contents/main.py", line 438, in <module>
    dir_mods = cfg.get("settings", "macmodsdir")
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ConfigParser.py", line 599, in get
ConfigParser.NoSectionError: No section: 'settings'

I really with I had a complier or something so I could see the line numbers, and not just textedit XD. It also looks like I need to add in a line for the mac directory. Could you please help me out with the code for that?

EDIT2: Apparently textedit has a line search function. Hooray! Anyway, here's lines 438 and 599.
438 is in the directory search bit I copied above:

Code: Select all

    dir_mods = cfg.get("settings", "macmodsdir")

and 599 is a comment (I included the stuff afterwards):

Code: Select all

# All done!
if platform.system() == "Windows":
    if msgbox.askyesno(progname, "Patching completed successfully. Run FTL now?"):
        os.system("\"" + os.path.join(dir_root, "FTLGame.exe") + "\"")
else:
    msgbox.showinfo(progname, "Patching completed successfully.")

boa13
Posts: 829
Joined: Mon Sep 17, 2012 11:42 pm
Location: Nantes, France

Re: Grognak's Mod Manager v1.4.1 (Updated Nov 9 2012!)

Postby boa13 » Sun Dec 02, 2012 9:43 pm

The line 599 in question is not the one from the Mod Manager, but from ConfigParser.py, which is the standard Python module that parses ini files. You were right to look at the line mentioned before that, line 438, which is indeed in Mod Manager's main.py.

This is actually the same issue as before. At line 438, Mod Manager tries to read another setting from the ini file, and since it still does not find it, it goes in error.

You could try replacing line 438 from
dir_mods = cfg.get("settings", "macmodsdir")
to
dir_mods = "~/Documents/FTL mods"
Forum janitor — If you spot spam, PM me the URL and/or the username of the spammer.
I have powers, moderator powers. I am not keen on using them, but will do so if needed.

Who is online

Users browsing this forum: No registered users and 38 guests