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

Discuss and distribute tools and methods for modding. Moderator - Grognak
Post Reply
boa13
Posts: 808
Joined: Mon Sep 17, 2012 11:42 pm

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

Post by boa13 »

Code: Select all

    dir_mods = ~/Documents/FTL mods
                ^
SyntaxError: invalid syntax
You forgot the quotes around "~/Documents/FTL mods". :) This is why Python is complaining; ~/Documents/FTL mods is not a valid Python instruction. The proper code would have been:

Code: Select all

    dir_mods = "~/Documents/FTL mods"
I'm guessing that "dir_root" is the way of making the .py file you're running the root (so it can have a relative filepath), and then 'mods' is the folder (I think it's case-sensitive). Would 'mods/subfolder' then go to a folder/file inside mods?
dir_root is actually the name of variable, a place in memory that contains whatever the program author wants it to contain, with whatever name the program author wants. In the present case, obviously, this piece of memory contains the directory where the Mod Manager resides. Using the os.path.join instruction, you told Python to compute a new directory name, composed of whatever was in dir_root, and then "mods", and to store the result in the variable named dir_mods. You are right that you could add deeper subdirectories this way, though the proper way to write the instruction, so that it also works on Windows (with backslashes instead of slashes) would be os.path.join(dir_root, 'mods', 'subfolder').
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!)

Post by sandrew26 »

Re boa: Ah, I see. You can tell I don't really know anything about python :oops: . I assumed that the quotes weren't part of the construction (I'm used to seeing quotes used only for print/text things), so that's my fault - thank you for clarifying. I also didn't realize dir_root was a variable, although I guess I never really checked to see if it was declared somewhere. I'm so lazy XD this is why I've never liked programming. I'll keep all of this in mind in case I have to do it again, though. Thank you again for all of your help!
Grognak
Posts: 172
Joined: Tue Sep 18, 2012 9:42 pm

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

Post by Grognak »

Thank you boa, for the help. :D And yeah sandrew, I assume the reason it didn't work in the first place was because the INI file wasn't in the "right place." Unfortunately, I'm not quite sure where that right place is on Mac (I'd assume it'd be the same folder that main.py was in.)
jocelyn
Posts: 6
Joined: Mon Nov 12, 2012 5:57 pm

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

Post by jocelyn »

Grognak wrote:Thank you boa, for the help. :D And yeah sandrew, I assume the reason it didn't work in the first place was because the INI file wasn't in the "right place." Unfortunately, I'm not quite sure where that right place is on Mac (I'd assume it'd be the same folder that main.py was in.)
Hi again,

To be more "mac like" on OSX you should write the settings to a .plist file and store it in: ~/Library/Preferences

I don't really know python (at least I've never tried to learn it, I might for this) but you can read, write, delete, plist files from the command line on osx using the native "defaults" command, so I'd assume it would be easy enough to use via python.

It looks to me like you accomplish this by using either os.system() and then using the defaults tool directly, or by using plistlib which has been available since python 2.6 (according to this page here at least: http://www.doughellmann.com/PyMOTW/plistlib/)

Unless someone else beats me to this I might look into this, it would make it a lot easier to get new users up and running on OSX at least.

Cheers :)
Flamingdodo
Posts: 6
Joined: Fri Nov 30, 2012 1:25 pm

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

Post by Flamingdodo »

Okay so I am a little confused by all these comments, if anyone knows can they please just message me a list of what to do to get it working, thanks.

I am running windows 7 with the steam version of FTL.
Grognak
Posts: 172
Joined: Tue Sep 18, 2012 9:42 pm

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

Post by Grognak »

If there is an issue for you, you will have to be more specific to get help. :)
Sparfell
Posts: 1
Joined: Thu Dec 06, 2012 9:46 pm

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

Post by Sparfell »

Hi

I have the linux version of FTL. I tried using the mod manager, at first to install the "disable fleet" mod, then trying to patch with nothing seleced. Each time I get the same error :

Code: Select all

OSError: [Errno 2] No such file or directory: '/home/thierry/opt/FTL/resources'
So, I take a look at my directory structure, and I'm not surprised by the error, the directory is in fact located in FTL/data/resources. I tried a quick google search ... in vain :| am I the only one using the linux version :mrgreen: or ??? Any help ?
marchpumpkin
Posts: 2
Joined: Sun Dec 09, 2012 2:12 am

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

Post by marchpumpkin »

I am banging my head against a wall.
I am running Mac OS 10.8.2 and have the STEAM version of FTL.
I cannot get GMM to run...honestly, I cannot even figure out how to install it.
I have dug through these forums but cannot find a simple, step-by-step solution....
AAARRGGHHH!!!
UltraMantis
Posts: 2125
Joined: Thu Sep 20, 2012 3:17 pm

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

Post by UltraMantis »

It's all in the readme file.

Code: Select all

To install the mod manager itself, unzip all of the files in the archive and move them into the folder:
Windows: in which FTLGame.exe resides.
Mac OS X: in which FTL_README.html resides.
Linux: in which FTL resides.

For Mac/Linux users: Move the contents of src into the same folder as modman.exe. In order to use GMM, run main.py via python. (It is safe to delete modman.exe.)

Mods come in .ftl files. To make one available to GMM, simply drag it into the /mods folder.

To install mods, open GMM, select the mods you want to be installed, and hit the button labled "Patch." Please note that you need to re-select mods that you already have installed, otherwise they will uninstall themselves.

In order to completely uninstall all mods, simply start the patching process with nothing selected.
Report spam using the handy Report Button Mod.
marchpumpkin
Posts: 2
Joined: Sun Dec 09, 2012 2:12 am

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

Post by marchpumpkin »

UltraMantis wrote:It's all in the readme file.

Code: Select all

Mac OS X: in which FTL_README.html resides.
Except in the STEAM version, there is no FTL_README.html file
FTL Faster Than Light.app resides in ~/Applications/Games as do all Mac STEAM games.
Unzipping and putting all the src files in that same folder still doesn't work

Perhaps it's the "run main.py via python" that I cannot get to work. I open python via Terminal but trying to run main.py just pukes.

If anyone can handhold me through it, rather than just saying "RTFM" (which I did but still did not understand), I'd appreciate it.
Post Reply