Перейти к содержимому
ANDROS

Iw4x server setup guide (unoffical)

Recommended Posts

header.jpg

Notice: This is a unofficial guide for iw4x. If you looking for the "Official" guide. Go to the wiki page on their site. This one is only a fan made guide. I'm not the developer of IW4x.

Follow these instructions to set up your own IW4x server at your home or on a VPS server of your choice. IW4x allows hosting 2 ways of a match. You can either run a classic cod4-5 style of map rotation or you can host a Lobby that allows to have an intermission to edit your class, killstreaks, map vote, see who is in the game just like a steam lobby actually. The cool thing about lobbies, the game will start when you have enough players while the regular (classic) likes to run the match with 0 players and late players get upset when their favorite map is on & the match is about over...shame shame. So choose wisely which one you wanted to host.

Please note that this guide is the unofficial guide from iw4x wiki website. This method of ours is to try to make it as an easier way to explain and understand how the custom configs work for you as much as we can.


If you are an advanced user, knows what you are doing and wants to cut to the chase and have all the damn configs already & in a big hurry. You can download the pre-configuration zip CLICK HERE.

The Requirements

  • The Visual C++ Redistributable Package
  • Notepad++ or Sublime Text. Whatever you want. (I don't recommend windows notepad.)
  • Steam (optional)
  • IW4x Updater (link included in the instructions)
  • A Brain. (Mostly know how to manage files and edit)
  • Computer or VPS that's online 24/7 with a decent connection that can handle 18 players.
 
Instructions for Hosting a Regular Server (M)
  • Copy your 'Call of Duty Modern Warfare 2' folder to another location
  • Download the IW4x updater, place it in your server folder and run the updater.exe
  • Follow the instructions on the updater window. (Basically, type 1 and yes)
  • Download the server.cfg and place it in your 'userraw' folder. (Create if you don't have one)
  • Download the DedicatedServer.bat & drop it on your main root of your game folder.
  • Right click the DedicatedServer.bat file and go to edit with notepad++
  • Carefully review/edit the bat file. Game Port & LAN Mode.
  • Save the file that you just edit.
  • Go to your userraw folder. Right click on server.cfg and edit with notepad++
  • Carefully review & edit the cfg file to your liking.
    Give it a hostname, Message of the day, Gametype, remove/add maps that you want on the rotate.
  • Save the server.cfg file that you just edit after you done. You can always go back and edit it
  • Forward the TCP and UDP port you put in the bat file.
  • Run the startserver.bat and have fun! (ignore any missing console errors)
 
Instructions for Hosting a Lobby Party Server (P)
  • Copy your 'Call of Duty Modern Warfare 2' folder to another location
  • Download the IW4x updater, place it in your server folder and run the updater.exe
  • Follow the instructions on the updater window. (Basically, type 1 and yes)
  • Download the partyserver.cfg and myplaylist.info place them both in your 'userraw' folder (Create if you don't have one)
  • Download the DedicatedLobbyServer.bat & drop it on your main root of your game folder.
  • Right click the DedicatedLobbyServer.bat file and go to edit with notepad++.
  • Carefully review/edit the file to your liking, Gamemode, GamePort, LAN Mode.
  • Save the file that you just edit after you done. You can always go back and edit it.
  • Go to your userraw folder. Right click on partyserver.cfg and edit with notepad++
  • Carefully review & edit the cfg file to your liking. Give it a hostname, Message of The Day, etc.
  • Save the partyserver.cfg file that you just edit.
  • On your router, Forward the TCP and UDP port you put in +set net_port "28960" or whatever of your choice. We can't help on this as everyone's routers very different.
  • Run the DedicatedLobbyServer.bat and the window should open the name of your server, 0/18 players, none. Ignore any console errors that happen. As long as the server doesn't crash or error out.
  • If the server show on the list. You're done. Have fun!

TROUBLESHOOTING FROM A HOME SERVER: If your server doesn't show on the server browser. Then you probably don't have the TCP & UDP properly port forward. Try finding your internal IP by hitting winkey+R type in cmd & hit enter. type in ipconfig /all and look for ipv4 address of 192.168.X.XXX on either Local Area Connection or your Ethernet adapter (Just look for your network driver name.) Make sure you add the internal IP on the port forward page. Also, make sure that the internal address will never change by turning it into a Static IP. You can also do that on your router (Address Reservation) or your windows computer under Network Connections, Right click on Ethernet, properties. Make sure to match the Address, Subnet, Gateway & DNS from the one shown on the command prompt. If you don't match that correctly then you might end up losing internet connection to that computer. Try again or set it back to Obtain IP & DNS automatically under properties again. 

If you still can't get it on the list. Keep changing ports from the router and bat file until it does show. Maybe your ISP very strict on allowing ports or you have a 3rd party firewall hidden in your system not allowing iw4x.exe to communicate to the nodes.
 

Instructions for Hosting an Offline LAN Regular/Lobby Server
  • Do the steps above of each one of your choice. Lobby (P) or Regular dedicated (M)
  • While you editing the bat file with notepad++ Change the set LANMode= from 0 to 1
  • If you chose the manual server. You're done! That's it!
  • If you choose Lobby Server. Go to userraw folder and edit your myplaylist.info with notepad++
  • Make sure party_minplayers is set to "2" on whatever playlist you chose.
  • Don't do "1" on teambased games or you going to have problems.
  • Free-for-all you can get by "1" if you feel like playing yourself.
  • Make sure All PC's are set to Home/Private Network and iw4x.exe is allowed in windows firewall or 3rd party firewalls.
  • Run the DedicatedServer.bat or DedicatedLobbyServer.bat
  • Client PC's Go to Join Game> Source: LAN
  • You're done.

Below this line. Everything is optional. You have successfully hosted a server. If you feel like you ready to take the challenge of config the server to your liking then cross this line.

-----------------------------------------------------------------------------------------------------------------------------------------------------------------

Instructions on how to host another server without conflict

Clone Regular Server

  • Go to your userraw folder.
  • Right click and copy server.cfg
  • Right-click on a blank space inside the userraw folder window and paste.
  • Right click on the server - Copy.cfg file rename it to server2.cfg
  • Right click on server2.cfg and edit with notepad++
  • Carefully edit/review the cfg again. Make sure to change the hostname a little different Also the g_log.
  • File and save the new server2.cfg file
  • Go back to the main root of your game.
  • Copy & Paste DedicatedServer.bat same way you did with cfg file.
  • Right click on the DedicatedServer - copy.bat and rename it to DedicatedServer2.bat
  • Right click and edit with notepad++
  • Change the gameport to a different number. Try 28961
  • Go down to where it says set ServerFilename=server.cfg. Rename it to server.cfg to server2.cfg
  • Save the DedicatedServer2.bat file
  • Make sure to again port forward the new port (28961) with UDP & TCP
  • Now run your second iw4x dedicated server. You should now have 2 servers up and running without issues.

 

Clone Lobby Server

  • Go to your userraw folder.
  • Right click and copy partyserver.cfg
  • Right-click on a blank space inside the userraw folder window and paste.
  • Right click on the partyserver - Copy.cfg file rename it to partyserver2.cfg
  • Right click on partyserver2.cfg and edit with notepad++
  • Carefully edit/review the cfg again. Make sure to change the hostname a little different Also the g_log.
  • File and save the new partyserver2.cfg file
  • Go back to the main root of your game.
  • Copy & Paste LobbyDedicatedServer.bat same way you did with cfg file.
  • Right click on the LobbyDedicatedServer - copy.bat and rename it to LobbyDedicatedServer2.bat
  • Right click and edit with notepad++
  • Change the gameport to a different number. Try 28961
  • Go down to where it says set ServerFilename=partyserver.cfg. Rename it to partyserver.cfg to partyserver2.cfg
  • Save the LobbyDedicatedServer2.bat file
  • Make sure to again port forward the new port (28961) with UDP & TCP
  • Now run your second iw4x dedicated server. You should now have 2 servers up and running without issues.
 
Instructions for hosting a random mod server

Depending on the mods. They release in different and sometimes laziest kind of ways. They either in a zip file that has a mod/modname folder already or they have modname.iwd or z_modname.iwd. If the mod release in an IWD then you would probably going have to create some folders.

The location should look something like this.

Цитата

\mods\Jumpmod\z_jumpmod.iwd

So pretty much

Цитата

C:\Whatever\Modern Warfare 2\mods\Jumpmod\z_jumpmod.iwd


Of course, they don't have to be named the same thing. You can call the Jumpmod folder to whatever folder you want to show on the server list. Anyway, this will make the client or server recognized that yes there is a mod exist and ready to load. You can double check the mod by opening iw4x client and going to the mods menu, Launch it, Create Game, Start Game. Test.

If your mod works with iw4x. You can now try installing the mod on the server same you install on your client.

If the mod doesn't show on the list. Check and make sure that the mod folder is in the mods folder along with the iwd inside it. The reason they put z_ on the mod is that they wanted to make sure that the mod will always load last before the stock & iw4x scripts.

Now to get it loaded on your dedicated server. Right click on the DedicatedServer.bat or LobbyDedicatedServer.bat and type in ModFolderName line. Example

ModFolderName=mods/jumpmod
(If you using a old config or iw4x's. it's +set fs_game "mods/jumpmod")

Now when you run your dedicated server. It will load \mods\Jumpmod\z_jumpmod.iwd every time. When new users join, the mod will upload over TCP (Yes reason we port forward TCP) to the clients to play such enjoyable mod.

Lots of mods out there. You will just have to look for them & install the correct way.
 

Instructions on how to run FPS booster "script" 

"Scripts" it's a different kind of gsc mod loading way. Which was introduce back in fourDeltaOne. The purpose was for noob modders to stop editing existing GSC from the stock game ( _rank.gsc) that already existed so it will avoid code conflicts between the vanilla game or iw4m and the mod itself. You can use the /scripts/ in the mods folder (Requires clients to download) or userraw folder that will mod shadowing way and the mod name will not show up on the server browser list that an actual mod is loaded & will not be downloaded. Great way of developing a mod that you don't want the public to have yet or you just want to load a very simple script like an FPS boost like the other servers.
 

  • Go to your userraw folder.
  • Create a folder called scripts
  • Download this fpsboost.gsc file
  • Copy the fpsboost.gsc from your downloads folder.
  • Paste the fpsboost.gsc into your scripts folder.
  • Run your server. You don't need to config anything. The script will run

TIP:
Be sure to backup your userraw before trying this! 
Copy and paste the userraw folder from your game to the desktop.
You can do the same with bot warfare mod by extracting the IWD with WinRAR to the userraw folder in case you want to run multiple mods but be warned. Some mods overwrite existing files. So be careful. If it breaks. Just restore your userraw folder that you copied from the desktop. I hope you did read the orange above....SMH if you didn't.

Instructions on how to password protect your server.
Protecting your game is handy if you don't want unwanted visitors from joining your 1v1 or a Clan vs Clan match or just too dang worried that cheaters will ruin a good game. It's very simple to add and only takes a few seconds.

Permanent Password
  • Go to your userraw folder.
  • Right click on server.cfg or partyserver.cfg (depending on which mode server you on) and edit with notepad++.
  • Go down to where it says g_password ""
  • Type in a password you wanted

Temporary Password

  • Start your server if you don't have it running
  • on the console window type in g_password "123456" (123456 to whatever you want)
  • It should work instantly but if not just type in map_restart.
  • to open your match with no password without restarting, type in g_password "" with double quotes to disable.
 
Instructions on how to control your server in-game
It can be frustrating, not able to play & control your server at the same time. So today we going to cover just the simple basics of RCON support which been around the stone ages of PC gaming. It's simple and easy to run for novice users and later down the road when you up for a stronger challenge you can set up an in-game chat bot called Big Brother bot (B3) which we also have a guide for that one as well *ADD LINK* here. You may see it around the block while playing IW4x. It's nice and handy, annoying at times spamming the chat but can also be difficult to setup the correct way as you wanted but if you want something fast or temporary and easy to setup then RCON would be the best bet.
 
  • Go to userraw folder.
  • Right click on your server.cfg or partyserver.cfg and edit it with notepad++
  • Look for set rcon_password "" which should be on line 48.
  • Add a rcon password and don't give it out to anybody but you and trusted friend for example.
 
set rcon_password "Iloveiw4x123"

 

  • Now go to file and save your config.
  • Open your game and join your server. (Party servers will have to either xpartygo or map mp_rust)
  • Now spawn into the map.
  • Now depending on your keyboard. hit the tilde key underneath your esc key. beside the 1 key
  • Now you should see a green bar across the top of your screen and colorful text that says IW4x build #> with a text cursor blinking.
  • Lets just do a simple test. type in..
Цитата

/rcon login thepasswordyoumade

 

  • Now you should be able to log in and able to execute commands to your own server. So let's try another.
Цитата

/rcon map_restart

 

If you on the loading screen again. that means it's working. If it doesn't press shift+tilde and scroll down to see if any errors about password invalid. Double check and make sure that the config indeed saved. Now there are lots of commands you can use with RCON just the same way as you can on the server console. I'll just give the simple basic commands below. Remember if you disconnect from your server. You will need to /rcon login password again or the /rcon commands will not work. It doesn't believe that you are the admin if you don't login again.
 

Цитата

/rcon fast_restart

Quck restart of the match without the loading map.
 

Цитата

/rcon kick Bobthebuilder stop whining kid.

This will kick the player and give him the message on the main menu of why.
 

Цитата

/rcon ban bobthebuilder banned!


This will ban the player from the server.
Sometimes they not too easy to type in the name so you might have to do a clientkick ID but how do you find the client ID? Very simple. You will have to shift+tilde and type in
 

Цитата

/rcon status

Sometimes you gotta scroll to the bottom and see the status list. Just look for his name and look at the left of the #.
 

Цитата

/rcon clientkick 0

or for baning a player
 

Цитата

/rcon banClient 0

 

war - Team Deathmatch
dm - Free-for-all
dom - Domination
koth - Headquarters
sab - Sabotage
sd - Search and Destroy
arena - Arena
dd - Demolition
ctf - Capture the Flag
oneflag - One-Flag CTF
gtnw - Global Thermo-Nuclear War
Цитата

/rcon g_gametype dm

This will change the gametype to Free-For-All. look at the list above and change dm to whatever gametype you want after the next match or you can speed things up by doing this
 

Цитата

/rcon map_restart

Will restart the current map to whatever changes you made to g_gametype
 

Цитата

/rcon map_rotate

Will go to the next map with the changes you made to g_gametype as well. Just depends how you set your map rotation if you didn't g_gametype after every map on the server config which in case you haven't done that. you can mix gametypes in the map rotation.
 

Цитата

/rcon scr_GAMETYPE_timelimit

Will change whatever time you want even during the game. You don't have to restart the game.
 

Цитата

/rcon scr_GAMETYPE_scorelimit


Will change whatever score limit you want even during the game as well and yet again.. you don't have to map restart to make score limit and time limit change.
Replace GAMETYPE to whatever gamemode you like. scr_dom_scorelimit or scr_dom_timelimit. That will effect gamemode like Domination.

mp_afghan - Afghan
mp_derail - Derail
mp_estate - Estate
mp_favela - Favela
mp_highrise - Highrise
mp_invasion - Invasion
mp_checkpoint - Karachi
mp_quarry  - Quarry
mp_rundown  - Rundown
mp_rust - Rust
mp_boneyard - Scrapyard
mp_nightshift  - Skidrow
mp_subbase  - Sub Base
mp_terminal - Terminal
mp_underpass   - Underpass
mp_brecourt  - Wasteland

DLC1 STIMULUS
Make sure you have them all DLC installed on your server or will crash
mp_complex - Bailout
mp_crash - Crash
mp_overgrown - Overgrown
mp_compact  - Salvage
mp_storm - Storm

DLC2 RESURGENCE
mp_abandon - Carnival
mp_fuel2 - Fuel
mp_strike - Strike
mp_trailerpark - Trailer Park
mp_vacant - Vacant

DLC3 NUKETOWN
mp_nuked - Nuketown

DLC4 CLASSICS 1
mp_cross_fire  - Crossfire
mp_bloc  - Bloc
mp_cargoship - Cargoship

DLC5 CLASSICS 2
mp_killhouse  - Killhouse
mp_bog_sh  - Bog

DLC6 FREIGHTER
mp_cargoship_sh - Freighter

DLC7 RESURRECTION
mp_shipment_long  - Long:Shipment
mp_rust_long   - Long: Rust
mp_firingrange  - Firing Range

DLC8 RECYCLED
mp_storm_spring - Chemical Plant
mp_fav_tropical  - Tropical: Favela
mp_estate_tropical - Tropical: Estate
mp_crash_tropical - Tropical: Crash
mp_bloc_sh  -  Forgotten City

SP MAPS to MP
oilrig  - Oilrig
iw4_credits  - Test map
co_hunted - Village
Цитата

/rcon map mp_rust

This will change the map to Rust. look at the list above and change mp_rust to whatever short map name you want.
 

Цитата

/rcon g_gametype dm; map mp_rust_long

This will execute 2 commands at once and will load Free-for-all Rust: Long.

That covers it for now but however, you can download 3rd party tools that support RCON protocols so you don't even have to be in the game controlling your server. There are even some Android apps that allow you to install on your tablet or your phone that making executing gametypes and maps easy by a press of a button. Just look around what's right for you. If you hosting a lobby server. you will be logged out every time you back in the lobby which is currently a known bug? but anyway I highly recommend looking for an application that supports your needs.

Changelog (5/28/2017)
*Added missing bog and shipment, reorganized the map list in myplaylist.info
*Added carepackage and XP commands to partyserver.cfg from server.cfg
*Change command on g_log to make sure the logs will go to logs folder like it should be by iw4x default.
*Repacked the prebuild dedis configs with the latest changes. 


Changelog (5/1/2017)
*forgot to add party_enabled 0 command on DedicatedServer.bat to keep from switching lobby mode.
*Update & randomize map rotation for noobs.
*Fixed a issue with 16 players max on configs.
*Removed bot guide for online dedicated servers. Getting a bit bot cancer on the server list. No need to host one online. Private match works fine.

DedicatedLobbyServer.bat

fpsboost.gsc

DedicatedServer.bat

server.cfg

partyserver.cfg

myplaylists.info

IW4x_Prebuild_dedi_configs.zip

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

Создайте аккаунт или войдите для комментирования

Вы должны быть пользователем, чтобы оставить комментарий

Создать аккаунт

Зарегистрируйтесь для получения аккаунта. Это просто!

Зарегистрировать аккаунт

Войти

Уже зарегистрированы? Войдите здесь.

Войти сейчас

×