Git Product home page Git Product logo

fc2mppatcher's Introduction

FC2MPPatcher

A community-made utility for patching Far Cry 2 to yet again support multiplayer online.

Howto / Instructions

By following the these instructions you will be able to play multiplayer online within 2 minutes!

Account registration

In order to play online you have to register for an online account, Ubisoft services shutdown on June 1st 2021 (Source).

  • Create an online account by registering at farcry2.online.
    • Verify your account by clicking on the link in the received e-mail.
    • NOTE: You do not need to login to your account on the website, only ingame.
  • Add an online profile (or edit existing one) in the ingame multiplayer menu, use exactly the same account details as registered on farcry2.online website.
  • Enjoy your multiplayer online experience!

Installation

  • Download the latest version of the patch here (make sure to download the .zip file), if you have a previous version installed, select upgrade instead of install.
  • Run the patcher application (fc2mppatcher.exe) and make sure to select the network interface that your internet connection is on (Usually Ethernet or Wifi).
  • Press the patch button and you are good to go!

Currently to play ranked matches you need PunkBuster installed, even though it is not in use by the server itself.

NOTE: As mentioned in our license, we are not liable for any damage to your game or computer.

Requirements

  • A legal copy of the Far Cry 2 game (We do not ship any game files as they are intellectual property of Ubisoft Montreal).
  • Game from one of these sources: Steam, Uplay, Epic Games, GOG or the Retail edition (CD/Disc).
  • Your game needs to be patched to version 1.03.

Antivirus

This patch could trigger a false positive in your antivirus software, that is because it alters Far Cry 2 game files, this is to be expected and can be ignored. This software contains no code, you're welcome to read throught our source code ;-)

Features

This resolves the following issues for the game and dedicated server.

Both

  • Binding to the wrong network interface, resolving issues with online multiplayer.
  • Broadcasting to wrong address, causing issues with LAN multiplayer (including over VPN).

Game

  • Steam and Uplay version now being able to login to online accounts.
  • Joining matches hosted ingame.

Dedicated Server

  • Dedicated Server now able to start in online mode.
  • Annoncing wrong IP address in multiplayer, showing 9999 ping for matches in lobby.
  • Custom map download from host now working properly for online servers.
  • Possible to disable PunkBuster even for ranked matches.

If you experience diffculties patching the game, first make sure you got the 1.03 patch installed, if your version of the game isn't supported (only Retail, Steam, Uplay and GOG is tested), please report on the issue tracker, it's a quick fix.

Hosting a server

To host a server online you have to make the proper ports is open/forwarded. Usually port TCP/UDP 9000 to 9100 should do, everything else should work out of the box!

Please be aware that IP addresses shown in server logs may be misleading, no matter what address is shown the server actually listens to address 0.0.0.0 (any), which makes it reachable on any network adapter.

If hosting a server to be used by players on LAN or thru VPN, you have to select the proper network adapter (if VPN select that) before patching!

Discord

Far Cry 2 Community
Far Cry 2 Other community

Thanks to

Contributors

zenoy and halvors - for patching the assembly code, creating the patcher application, and providing community backend services.
FEARIV and claypigeon - for helping developing our web services.
svinsen, Gabor and Lasercar - for help testing and community support.

Others

Thanks to original author of PE Bliss library, rukaimi (kaimi.ru)!
Thanks to the Qt project for an amazing library to work with.

fc2mppatcher's People

Contributors

halvors avatar zenoy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fc2mppatcher's Issues

Could not bind to network socket. Startup of network engine failed.

This is not an issue specific to your patcher. I get this with and without your fixes applied.

This error message appears every time i make an attempt to connect to a locally hosted dedicated server, and also when creating a LAN match directly from the game. I have not tried to connect to remote servers.

There's no trace of a connection attempt in the server output.
Though interestingly enough, the dedicated server is listed in the game when scanning for LAN matches.

The server and the client run from the same installation.

Perhaps you can shed light on this. Research on the net left me where i started.

grafik

1500 XP limit per match (Ranked)

Earning more than 1500 XP in a single match, the exceeding amount will be deducted from total XP - still, everything else is recorded (kills, progress on manuals). Though barely anyone has reached that point with the new backend, removing it would allow us to have Double XP Weekends, which would attract more players and helps keeping their interest in Ranked - also, the returning players who had reached, or was nearly rank 30 on Ubisoft's Official Backend, they start from scratch again - it would help them catch up a little.
I think that would be a fun element to have. - Tatu

Custom map download issue

Introduction

When joining servers running custom maps, players are unable to download maps.

This is due to mismatch between the advertised IP address by clients and the server and their actual addresses because of being behind a NAT instance.

There is a community map download server that functions as a mitigation to this issue, but properly logging into it requires further specific setup, not to be covered in this issue.

Research already known prior to [09.02.2020]

  • When clients connect to a server, their local IP address is sent inside the packet and is sadly used by the server for multiple purposes.
  • Downloads work when connecting to the server over LAN due to no NAT instance being in between.
  • The server maintains an allow list of which IP addresses to accept download requests from.
  • The allow list automatically adds clients that did properly connect to the server, and serves the purpose of denying access to other random clients not in-game.
  • Clients somehow receives a response to the custom map download request instructing them to connect to the wrong IP address.

Research done after [09.02.2020]

  • The allow list actually does not prevent clients from downloading the map due to the issue of sending the local IP address, as it sends the local IP both when initially added, and when checking against the allow list.

Possible solutions

Far Cry 2 is does indeed poorly implement service when used in conjunction with NAT, that is even with NAT traversal specific code found in the executable.

According to this research it seems like this issue is solvable using only a server side patch.

Required to resolve the issue

  • [Server] Inject code to retrieve the actual public IP address of the server and set it before sending the custom map download response back to the client, ensuring that the client connects to the right IP address.

Also this should be fixed as it MAY introduce undefined behavior if two clients ends up having the same local IP address.

  • [Server] Hijacking the function handling the packet initially sent to the server, and reading the public IP address that is known from the actual connection into the data structure supposed to contain the wrong IP address sent inside the packet received from the client.

Custom map download don't work for LAN

This is probably due to the detection if the public IP address in the server without taking the possibility of LAN play into account, in this case we should do nothing.

Showing used peerId or playername in general errormessage

Several commands, basically to chat privately or kick/ban players require the use of a name or id. Whenever it doesn't exist (yet), you get a general error player not found. This makes it hard to see which failed when you execute multiple id/name related commands. So request: Add the used id/name to the errormessage so it's clear which used command(s) failed.

Fix HTTP map downloads for Retail version

Fix HTTP map downloads for Retail version, currently it can be workaround-ed by using old winhttp.dll that is compatible with it.

We should look into just patching the API calls to winhttp and adapt them to the new winhttp.dll for the Retail version.

Patch for Far Cry 3?

Hi not sure where to send this but you seem to know how FC server and client are communicating. Ubisoft recently closed down their MP online service for FC3 and will never come back again, is it possible to build a similar service for FC3 so players can play online again ? Many people think it’s the best team deathmatch game ever made.

I’m happy to support any way I can, there are more people that can support.

FC2MPPatcher application does not work in Win 11

In the Win 11 operating system, when running the FC2MPPatcher application, fc2mppatcher.exe cannot be opened, it writes an error - it is impossible to run this application on your PC.

Please recompile and compile the .exe version of the application for the current version of Windows 11

Windows 11 Enterprise 22H2
OS build: 22621.2428
Interoperability: Windows Feature Experience Pack 1000.22674.1000.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.