PyMS Windows EXE's (v1.2.1)

Help - Resources - Discussion
User avatar
poiuy_qwert
Posts: 548
Joined: Sun Jan 13, 2008 2:14 am

Postby poiuy_qwert » Wed May 20, 2009 7:45 am

Ah yeah there was a Mac bug that caused programs that used mpq stuff to close at start. It will be fixed for next version.
Lord_Jeremy
Posts: 8
Joined: Sun May 17, 2009 11:01 pm

Postby Lord_Jeremy » Wed May 20, 2009 11:31 am

Ah thanks so much. You're the best :)
User avatar
poiuy_qwert
Posts: 548
Joined: Sun Jan 13, 2008 2:14 am

Postby poiuy_qwert » Wed May 20, 2009 8:15 pm

Oh i think i remember how to fix it for source users. Open LibsSFmpq.py and find this part of code (might be a little different):[spoiler]

Code: Select all

def MpqInitialize():
   _SFmpq.MpqGetVersionString.restype = c_char_p
   _SFmpq.MpqGetVersion.restype = c_float
   _SFmpq.SFMpqGetVersionString.restype = c_char_p
   _SFmpq.SFMpqGetVersionString2.argtypes = [c_char_p,c_int]
   _SFmpq.SFMpqGetVersion.restype = SFMPQVERSION
   
   _SFmpq.SFileOpenArchive.argtypes = [c_char_p,c_int,c_int,c_void_p]
   _SFmpq.SFileCloseArchive.argtypes = [c_int]
   #_SFmpq.SFileOpenFileAsArchive.argtypes = [c_int,c_char_p,c_int,c_int,c_void_p]
   _SFmpq.SFileGetArchiveName.argtypes = [c_int,c_char_p,c_int]
   _SFmpq.SFileOpenFile.argtypes = [c_char_p,c_void_p]
   _SFmpq.SFileOpenFileEx.argtypes = [c_int,c_char_p,c_int,c_void_p]
   _SFmpq.SFileCloseFile.argtypes = [c_int]
   _SFmpq.SFileGetFileSize.argtypes = [c_int,c_void_p]
   _SFmpq.SFileGetFileArchive.argtypes = [c_int,c_void_p]
   _SFmpq.SFileGetFileName.argtypes = [c_int,c_char_p,c_int]
   _SFmpq.SFileSetFilePointer.argtypes = [c_int,c_int,c_void_p,c_int]
   _SFmpq.SFileReadFile.argtypes = [c_int,c_void_p,c_int,c_void_p,c_void_p]

   _SFmpq.SFileGetFileInfo.argtypes = [c_int,c_int]
   _SFmpq.SFileListFiles.argtypes = [c_int,c_char_p,c_void_p,c_int]
   # _SFmpq..argtypes = []
   # _SFmpq..argtypes = []
   # _SFmpq..argtypes = []
   # _SFmpq..argtypes = []
   # _SFmpq..argtypes = []
   # _SFmpq..argtypes = []
   _SFmpq.SFileSetArchivePriority.argtypes = [c_int,c_int]
   _SFmpq.MpqOpenArchiveForUpdate.argtypes = [c_char_p,c_int,c_int]
   _SFmpq.MpqCloseUpdatedArchive.argtypes = [c_int,c_int]
   _SFmpq.MpqAddFileToArchive.argtypes = [c_int,c_char_p,c_char_p,c_int]
   _SFmpq.MpqAddWaveToArchive.argtypes = [c_int,c_char_p,c_char_p,c_int,c_int]
   _SFmpq.MpqRenameFile.argtypes = [c_int,c_char_p,c_char_p]
   _SFmpq.MpqDeleteFile.argtypes = [c_int,c_char_p,c_char_p]
   _SFmpq.MpqCompactArchive.argtypes = [c_int]
   _SFmpq.MpqAddFileFromBuffer.argtypes = [c_int,c_void_p,c_int,c_char_p,c_int]
[/spoiler]You just have to add one line after the first ("if not FOLDER:"), then indent the lines under it (or just copying whats below over the old stuff should work):[spoiler]

Code: Select all

def MpqInitialize():
   if not FOLDER:
      _SFmpq.MpqGetVersionString.restype = c_char_p
      _SFmpq.MpqGetVersion.restype = c_float
      _SFmpq.SFMpqGetVersionString.restype = c_char_p
      _SFmpq.SFMpqGetVersionString2.argtypes = [c_char_p,c_int]
      _SFmpq.SFMpqGetVersion.restype = SFMPQVERSION
      
      _SFmpq.SFileOpenArchive.argtypes = [c_char_p,c_int,c_int,c_void_p]
      _SFmpq.SFileCloseArchive.argtypes = [c_int]
      #_SFmpq.SFileOpenFileAsArchive.argtypes = [c_int,c_char_p,c_int,c_int,c_void_p]
      _SFmpq.SFileGetArchiveName.argtypes = [c_int,c_char_p,c_int]
      _SFmpq.SFileOpenFile.argtypes = [c_char_p,c_void_p]
      _SFmpq.SFileOpenFileEx.argtypes = [c_int,c_char_p,c_int,c_void_p]
      _SFmpq.SFileCloseFile.argtypes = [c_int]
      _SFmpq.SFileGetFileSize.argtypes = [c_int,c_void_p]
      _SFmpq.SFileGetFileArchive.argtypes = [c_int,c_void_p]
      _SFmpq.SFileGetFileName.argtypes = [c_int,c_char_p,c_int]
      _SFmpq.SFileSetFilePointer.argtypes = [c_int,c_int,c_void_p,c_int]
      _SFmpq.SFileReadFile.argtypes = [c_int,c_void_p,c_int,c_void_p,c_void_p]

      _SFmpq.SFileGetFileInfo.argtypes = [c_int,c_int]
      _SFmpq.SFileListFiles.argtypes = [c_int,c_char_p,c_void_p,c_int]
      # _SFmpq..argtypes = []
      # _SFmpq..argtypes = []
      # _SFmpq..argtypes = []
      # _SFmpq..argtypes = []
      # _SFmpq..argtypes = []
      # _SFmpq..argtypes = []
      _SFmpq.SFileSetArchivePriority.argtypes = [c_int,c_int]
      _SFmpq.MpqOpenArchiveForUpdate.argtypes = [c_char_p,c_int,c_int]
      _SFmpq.MpqCloseUpdatedArchive.argtypes = [c_int,c_int]
      _SFmpq.MpqAddFileToArchive.argtypes = [c_int,c_char_p,c_char_p,c_int]
      _SFmpq.MpqAddWaveToArchive.argtypes = [c_int,c_char_p,c_char_p,c_int,c_int]
      _SFmpq.MpqRenameFile.argtypes = [c_int,c_char_p,c_char_p]
      _SFmpq.MpqDeleteFile.argtypes = [c_int,c_char_p,c_char_p]
      _SFmpq.MpqCompactArchive.argtypes = [c_int]
      _SFmpq.MpqAddFileFromBuffer.argtypes = [c_int,c_void_p,c_int,c_char_p,c_int]
[/spoiler]
Lord_Jeremy
Posts: 8
Joined: Sun May 17, 2009 11:01 pm

Postby Lord_Jeremy » Thu May 21, 2009 3:26 am

Thank you, that did indeed fix the problem. I'm guessing python doesn't ignore tabs, perhaps using the indent-levels instead of braces as in C?

Anyway, where the hell did you get your format documentations? I've done extensive searching myself and only found scattered notes across defunct websites. Oh and I'm wondering if the Unused value of the Flingy.dat is really unused. I noticed a bunch of units use it, though maybe it really does nothing :P
User avatar
poiuy_qwert
Posts: 548
Joined: Sun Jan 13, 2008 2:14 am

Postby poiuy_qwert » Thu May 21, 2009 3:50 am

Yes thats how python works.

I got most online but some from FaRTy1billion. I think anything marked as unused (if it has no ? after it) is unreferenced by the actual game code, though I used the labels from DatEdit so i'm not 100% sure.
User avatar
poiuy_qwert
Posts: 548
Joined: Sun Jan 13, 2008 2:14 am

Postby poiuy_qwert » Wed Oct 28, 2009 10:34 pm

[quote name='bajadulce' post='7905' date='Oct 28 2009, 05:33 AM']WTF.. why didn't you say something earlier. :lol:[/quote]
Heh Its only plastered everywhere ;) :P Im glad you like it!

Return to “PyMS (poiuy_qwert's complete modding suite)”

Who is online

Users browsing this forum: No registered users and 1 guest