Jump to content
Official BF Editor Forums
Mach10

Bf2142 Md5 Generation

Recommended Posts

You may have noticed that BF2142 verfies client data much faster than it's BF2 predecessor, this is due to a change in the MD5 generation system. Previously MD5s were generated from very large client and server zip files, each time a client loaded into a server with the checks enabled, these large files needed to be checked (byte by byte), thus creating the long load times. New in BF2142, this is bypassed by usign a new method. If a file is larger than 8,000KB, the MD5 only checks the first first 160bytes and then the last 8,000KB, thus reducing the time needed for checking these files, also the zips in BF2142 are also chunked into smaller peices. This is most likely done to reduce the ability for hackers to exploit this change and edit the "middle" data, by chunking the files, this *middle* area range is decreased.

Now onto generating MD5s:

Required:

Python 2.3.4 Installed

Battlefield 2142 Client Installed

Battlefield bf2142 mod un-altered

Your mod installed

Step 1:

Download and install Python 2.3.4 (use Google).

Step 2:

Edit your System Path

1. Right click 'My Computer'

2. Click Properties

3. Goto Advanced Tab

4. Click Environment Variables

5. In the System Variables window selected Path and click Edit

6. Using your cursor, go to the end of the Variable line and add the following (using the default python installation directory, if you choose to install it to a different directory, this needs to reflect that): C:\Python23

Step 3:

Generating MD5s

1. Open the generate_md5.py file in your favorite text editor (notepad will do), and search for this line:

mod_name = 'bf2142'

2. Change bf2142 to your mod's name

3. Save File

4. Click Start

5. Click Run

6. Type: cmd

7. Press Enter

8. Type: cd\

9. Type: cd program files\electronic arts\battlefield 2142\

10. Type: python generate_md5.py

11. If you have installed python correctly, edited your system path correctly and Battlefield 2142 is installed in the above location, you will see the system creating MD5 files for your mod.

12. Change this back in the python file: mod_name = 'bf2142'

13. Save File

14. Close File

Step 4

Verifying MD5s

1. Browse to your mod's directory, if you see levels.md5 and std_archive.md5, you have sucessfully created MD5s.

2. MD5s take into account time creation dates, two users can't have the zip files with the same content, but different last modification/creation dates and create matching MD5s or interoperate eachother. Users can have the same zip files, but create MD5s locally on their machines at different times.

3. Test it all out. Create a dedicated server with a copy of your mod running, and join it. If you are able to connect without a 'Modified Content' error, everything is ready.

4. Package up your mod, and roll.

Edited by Mach10

Share this post


Link to post
Share on other sites

so should there stand:

C:\Documents and Settings\koen>cd\cd program files\electronic arts\battlefield 2142\python generate_md5.py?

because i get the message: 'The system cannot find the path specified.'

i have everything installed at the default places.....

Share this post


Link to post
Share on other sites

You have to type a 'Return' after 'cd \' in entry 8.

In entry9 Mach10 basically tells you : 'Change into the BF2142 install directory using the cd command' . Finish the line with a 'Return' again to execute the cd command.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...