Recompile Python Library
Background
It is, in some cases, necessary to make changes to the underlying Python library file included with BF2. This file contains many .py files that are integral to the Python interpreter. Changing these files should be simple, but any apparent changes to the file will cause the BF2 launcher to throw a fatal error. This requires replacing the new .zip file with the old one.
I have figured out a way to recompile the .ZIP file without causing BF2 to fail. It is very simple and requires WinZIP (free download at http://www.download.com)
You must first unzip the pylib-2.3.4.zip file, which will create a pylib-2.3.4 folder.
You may now edit/add any files you would like.
Then, right click on the folder (assuming WinZIP installed its shell extension) and select "Add to archive...". When the dialog box pops up, make the following changes:
Tab: General
Option: Archive format
> Change To: ZIP
Option: Compression method
> Change To: Good
- - - - - - - - - - - - -
Tab: Files
Option: File paths
> Change To: Do not store paths
A zip file will be recompiled and you may now run your BF2 server with the new files embedded.
This is very useful for adding .py files for inclusion and may allow us to restore some of the Python functionality removed by EA.
Please post here if you have any ideas/comments/grievances.
You should probably delete/rename your old .ZIP file or WinZIP will create a zip file with a different name that wont be loaded by BF2 by default.
--Kmkz 17:02, 12 Oct 2005 (MDT)