Need for Speed: Hot Pursuit 2/Online: Difference between revisions

From NFS Modding Wiki
Jump to navigation Jump to search
No edit summary
 
(One intermediate revision by the same user not shown)
Line 191: Line 191:
==== [https://cdn.discordapp.com/attachments/737226135259316224/743222301167976488/Asac2.09.zip?ex=66ad5235&is=66ac00b5&hm=efbc00fa2130f5deb75266dd8b026198e95caf0fdd398791a046af5998fe5128& A Sac v2091 Hot Pursuit 2 Stats recorder (Download)] ====
==== [https://cdn.discordapp.com/attachments/737226135259316224/743222301167976488/Asac2.09.zip?ex=66ad5235&is=66ac00b5&hm=efbc00fa2130f5deb75266dd8b026198e95caf0fdd398791a046af5998fe5128& A Sac v2091 Hot Pursuit 2 Stats recorder (Download)] ====
Used for recording specific statistics from races such as lap times and car/track combinations, which can be compared against other players.
Used for recording specific statistics from races such as lap times and car/track combinations, which can be compared against other players.
[[Category:Online]]
 
{{DEFAULTSORT:2002}}
[[Category:Online play guides]]

Latest revision as of 11:02, 31 October 2024


OpenSpy

Need for Speed: Hot Pursuit 2's online functionality relies on GameSpy, which is no longer an active service. So, to play online, OpenSpy must be used.

There are two methods of enabling the game to connect via OpenSpy:

Method 1: Patch your game's executable (or download a patched executable)

Using a hex editor, such as HxD, open the game's executable and replace all instances of gamespy.com with openspy.net.

Method 2: Use openspy-client

Download the latest release of openspy-client. Extract the openspy.x86.dll file to the game folder, next to the game executable. Rename it to dsound.dll.

NOTE: this method has not been tested and may not work.

Server hosting

Dedicated Server

Launch the game with parameter "-server", "-dedsvrinstance", or "+host".

You can also edit server.ini in your game's save data folder and set isDedicated to 1, but this will launch the whole game and require navigation to manually start an online game.

Configuration

According to the official ReadMe documentation, the following ports are used by the game:

  • TCP 80, 8511, 28900
  • UDP 1230, 8512, 27900, 61220 through 61230

There are three editable files inside the game's save data folder (usually Documents/EA Games/Need for Speed: Hot Pursuit 2, but can be changed with the widescreen fix):

  • banlist.txt (possibly referring to bootlist.txt?) - this records the identities of players who you have banned. It adds one line for each player you ban. To un-ban a player, simply edit this file and remove the corresponding line.
  • netprefs.ini - users can modify the netprefs.ini file to specify custom ports for the game servers. If this file is deleted it will be recreated with default settings.
  • server.ini - various game options for a hosted server can be configured here.

Active server list

Open Spy active servers for Need for Speed: Hot Pursuit 2

Server Console Commands

Can be found in an online game by pressing the ~ key and then typing "/?".

Command Function Client-side or server-side?
/name [playername] Requests change to new client name Client
/voteboot [playername] Adds a vote to boot client, if eligible to vote Client
/votebootbyid [id] Same as voteboot but using client id for identification. Client
/votemap [trackname] or /votemap [tracknumber] (e.g. /votemap Coastal Parklands) Adds a vote to change track, if eligible to vote. Also recognizes Random. Only first 5 chars of track name needed, English only. Client
/setup If in setup mode, launches car select dialog Client
/startrace Attempts to start race immediately, without a countdown Server
/boot [playername] Boots player. player is banned until next setup phase. Server
/ban [playername] Bans the player permanently. to un-ban, must hand edit ban file. Server
/bootbyid [id] Same as boot but using client id for identification. Server
/banbyid [id] Same as ban but using client id for identification. Server
/send [playername],[message] Sends a directed message to player. Both
/quit or /exit Exit directly to desktop. Both
/disconnect Exit to FE, equivalent to disconnect button. Both
/challenge or /reset Equivalent to request restart button if client, resets if running server. Both
/idlist Shows list of connected clients with the server assigned client ID. Both
/server finishtimeout [ms] Sets the timeout for race over after the first player finishes a single race. (default is 90 seconds, 0 is off) Server
/server laptimeout [ms] Sets lap inactivity timeout. (default 10 minutes, min 5 minutes, 0=off) Server
/server maxsetuptime [ms] Sets max setup time after entering setup mode (default 0=off, min 15 seconds) Server
/server heartbeat [ms] Sets heartbeat time before booting unresponsive client. (min 10 seconds) Server
/server resultsdisplaytime [ms] Length of time for server to stay in results mode after race finish. Server
/server countdown [ms] Sets setup time after first car selected. (default 15 seconds, min 5 seconds) Server
/server docountdown [1 or 0] If 0 sets first car selected countdown to off, non 0 = on. (default on) Server
/server voting [1 or 0] If 0 ignores votes for booting and track change. (default on) Server
/server numraces [num] Number of races before settings, e.g. random, are reprocessed (default is 5) Server
/server laps [num] Alter number of laps for next race, will be processed on next server reset. Server
/server class [class] Class restriction for next race (1-5 = class, any other number is any class) Server
/server direction [num] Direction for next race after a reset. Server
/track [trackname] or /track [tracknumber] Changes next track that server will use after a reset. Server
/racetype ko or /racetype sr Changes racetype that server will use after a reset. Server
/servername [NewName] Changes server name. Server
/password [NewPassword] Changes server password. Maximum of 12 characters. Server
/votemap The Voting commands allow settings to be changed on Servers by Clients. Requesting a restart also uses the voting mechanism. Server
/voteboot Server
/request [car] (Not mentioned in official ReadMe). Must use name of car folder in the game's Cars directory (e.g. /request speedstr for Opel Speedster) Client

Useful server hosting tools

Cheat engine table (Download)

Run the server and then use cheat engine to open this table and your game process to apply these settings.

Aside from usual settings, it also allows player collisions to be disabled

HP2 Dedicated Server Manager (Download)

This can be used to disable player collisions or set a car class rotation

A Sac v2091 Hot Pursuit 2 Stats recorder (Download)

Used for recording specific statistics from races such as lap times and car/track combinations, which can be compared against other players.