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

Discuss and distribute tools and methods for modding. Moderator - Grognak
Vhati
Posts: 792
Joined: Thu Oct 25, 2012 12:01 pm

Re: Grognak's Mod Manager v1.6 (Updated Feb 23, 2013!)

Postby Vhati » Thu Feb 28, 2013 8:45 pm

fudz wrote:ahhh yes mate, I was hacking main.py to account for the name changes, which was going ok until I go to this syntax error:

Code: Select all

raise FTLDatPacker, "Index is full"
SyntaxError: invalid syntax

Article: Python 3 Porting Guide

Looks like that should become:

Code: Select all

raise FTLDatError("Index is full")


fudz wrote:didnt realize youre the author—so lol I have 2.6 installed anyway, so I should revert back to that then?
That'd be the easy and reliable route.
But since you've already started porting, we can both learn a bit before you revert. ;)

fudz wrote:PS. I know nothing about python, but dont mind getting my hands dirty ;)
Ambitious.
The most helpful and dangerous kind of user. :)
Last edited by Vhati on Fri Mar 01, 2013 2:14 pm, edited 1 time in total.
fudz
Posts: 7
Joined: Thu Feb 28, 2013 6:18 pm

Re: Grognak's Mod Manager v1.6 (Updated Feb 23, 2013!)

Postby fudz » Thu Feb 28, 2013 10:47 pm

ok Ive done a lot of editing and Ive got it asking me to locate data.dat or FTL.app if on osx.

I cant seem to select FTL.app, its ghosted out

Screen shot 2013-02-28 at 22.46.54.png
fudz
Posts: 7
Joined: Thu Feb 28, 2013 6:18 pm

Re: Grognak's Mod Manager v1.6 (Updated Feb 23, 2013!)

Postby fudz » Thu Feb 28, 2013 10:58 pm

ok I managed to get it to run, by hard editing the path to the resources, and moving the app to applications

Code: Select all

candidates.append(os.path.join("/", *["Applications","FTL","FTL.app","Contents","Resources"]))



Screen shot 2013-02-28 at 22.56.57.png


not ideal but it seems to work, be nice to be able to leave the game in my games folder and select FTL.app when prompted.

:)

have a look at the screen shot (scroll down) - let me know if that looks right to you, cheers
Vhati
Posts: 792
Joined: Thu Oct 25, 2012 12:01 pm

Re: Grognak's Mod Manager v1.6 (Updated Feb 23, 2013!)

Postby Vhati » Fri Mar 01, 2013 12:05 am

fudz wrote:not ideal but it seems to work, be nice to be able to leave the game in my games folder and select FTL.app when prompted.
That's due to be fixed in 1.7.

I typoed the filetypes arg. This oughtta make the FTL.app choosable.

Code: Select all

    result = tkFileDialog.askopenfilename(title="Find data.dat or FTL.app",
        filetypes=[("data.dat or OSX Bundle", ("*.dat","*.app")), ("All Files", "*.*")])
The resource folder's path ultimately gets saved to modman.ini where it can be set with a text editor.
Delete the ini or give the setting an empty value, and GMM will ask again.


fudz wrote:have a look at the screen shot (scroll down) - let me know if that looks right to you, cheers

Yep. That's what it should look like (the toggle button could stand to be wider, but otherwise...).
Congratulations! I initially taught myself PHP that way once.

I'm nearly done myself, adjusting the beleeding-edge code to work in both 2.x and 3.x (no promises that it'll stay that way). It's not committed yet. I'm still wrestling with one of the new features.
If I don't get that working in time, you should revert to 2.x if you haven't already.


Edit: The 3.x-friendliness changes have been submitted to Grognak for GMM 1.7.
vavakx
Posts: 2
Joined: Fri Mar 01, 2013 5:30 am

Re: Grognak's Mod Manager v1.6 (Updated Feb 23, 2013!)

Postby vavakx » Fri Mar 01, 2013 1:15 pm

I have downloaded GMM with Github and it has no modman.exe!!! :evil:
What shall I do???
User avatar
kartoFlane
Posts: 1488
Joined: Mon Jan 14, 2013 10:20 pm

Re: Grognak's Mod Manager v1.6 (Updated Feb 23, 2013!)

Postby kartoFlane » Fri Mar 01, 2013 1:27 pm

Why the hell would you download it from GitHub... Just use the mediafire links.
Superluminal2 - a ship editor for FTL
Vhati
Posts: 792
Joined: Thu Oct 25, 2012 12:01 pm

Re: Grognak's Mod Manager v1.6 (Updated Feb 23, 2013!)

Postby Vhati » Fri Mar 01, 2013 1:59 pm

vavakx wrote:I have downloaded GMM with Github and it has no modman.exe!!! :evil:
What shall I do???
Since you're on Windows...
  • Open a dos prompt (run as administrator, if necessary).
  • cd to GMM's directory.
  • Run: "main.py"

If you've got python installed, the exe's just a fancy launcher.

kartoFlane wrote:Why the hell would you download it from GitHub... Just use the mediafire links.
Downloading from github lets you play with not-yet-released features.
The downside is it's not packaged up for distribution to end-users.

When the app's in a language that doesn't need compiling, it's not so tough for users to get a snapshot running.
vavakx
Posts: 2
Joined: Fri Mar 01, 2013 5:30 am

Re: Grognak's Mod Manager v1.6 (Updated Feb 23, 2013!)

Postby vavakx » Fri Mar 01, 2013 3:39 pm

Vhati wrote:
vavakx wrote:I have downloaded GMM with Github and it has no modman.exe!!! :evil:
What shall I do???
Since you're on Windows...
  • Open a dos prompt (run as administrator, if necessary).
  • cd to GMM's directory.
  • Run: "main.py"

If you've got python installed, the exe's just a fancy launcher.

kartoFlane wrote:Why the hell would you download it from GitHub... Just use the mediafire links.
Downloading from github lets you play with not-yet-released features.
The downside is it's not packaged up for distribution to end-users.

When the app's in a language that doesn't need compiling, it's not so tough for users to get a snapshot running.

Thanks
User avatar
kartoFlane
Posts: 1488
Joined: Mon Jan 14, 2013 10:20 pm

Re: Grognak's Mod Manager v1.6 (Updated Feb 23, 2013!)

Postby kartoFlane » Fri Mar 01, 2013 4:42 pm

I've found a bug - GMM crashes whenever the mods folder contains more .ftl files than can fit on the manager's list - namely, 7 is max, at 8 and more it starts crashing.

Log:

Code: Select all

2013-03-01 17:39:29 INFO: Grognak's Mod Manager v1.6 (on Windows-7-6.1.7601-SP1)
2013-03-01 17:39:29 INFO: Rooting at: C:\Program Files (x86)\Steam\steamapps\common\FTL Faster Than Light\GMM

2013-03-01 17:39:29 INFO: Using FTL dats path from config: C:\Program Files (x86)\Steam\steamapps\common\FTL Faster Than Light\resources
2013-03-01 17:39:29 DEBUG: Failed to find mod file by name: PLAYER_SHIP_CIRCLE
2013-03-01 17:39:29 INFO: Added Scarab.ftl
2013-03-01 17:39:29 INFO: Added Shard.ftl
2013-03-01 17:39:30 ERROR: <class '_tkinter.TclError'>
Traceback (most recent call last):
  File "D:\My Documents\projects\Grognaks-Mod-Manager - dist\build\pyi.win32\main\out00-PYZ.pyz\Tkinter", line 1410, in __call__
  File "D:\My Documents\projects\Grognaks-Mod-Manager - dist\build\pyi.win32\main\out00-PYZ.pyz\Tkinter", line 2798, in set
TclError: expected floating-point number but got "0,875"
Superluminal2 - a ship editor for FTL
Vhati
Posts: 792
Joined: Thu Oct 25, 2012 12:01 pm

Re: Grognak's Mod Manager v1.6 (Updated Feb 23, 2013!)

Postby Vhati » Fri Mar 01, 2013 6:30 pm

kartoFlane wrote:I've found a bug

Code: Select all

TclError: expected floating-point number but got "0,875"

Fixed in GMM 1.7. That was a subtle one.

The bug surfaces in non-US locales that have commas for decimal points in their numbers.
The gui library lets a comma sneak in somewhere when it does math, and it panics.

If you're impatient, you can get your copy working thusly:
Find this line in main.py, near the top.

Code: Select all

locale.setlocale(locale.LC_ALL, "")
Add this below it.

Code: Select all

locale.setlocale(locale.LC_NUMERIC, "C")  # Use period for numbers.
You'll need to run main.py directly, as modman.exe has a broken copy of its own, bundled inside.


* Technically the locale poisoning wasn't truely fixed until Python 3.2, but this workaround is good for all versions.