Call of Duty Gaming News
Login Welcome to MapModNews
Wednesday, January 18 2017 @ 12:05 PM GMT

TUTORIAL Beginners guide to modifying gametypes CoD4

Call of Duty Mod Tools

For those who are searching for a tutorial on how to modify gametypes in CoD4....

ShabbaStoney wrote one and when you click on READ MORE you can find out how coding in CoD4 is done.

Now you can open sab.gsc in notepad / wordpad / visual studio / programmers notepad etc...

So now we have the gsc opened up we can start changing the game type.

Another Cod 4 Skinning Tutorial

Call of Duty Mod Tools

by Wilhelm and Kamy

First off download this folder : CoD4Tut.rar  (dds plugins for Photoshop)


Call Of Duty 4 Skinning Tutorial For Photoshop

1. Place the .dds plug-in into C:Program FilesAdobePhotoshopPlug-InsFile Formats
If the .dds plug-in is not correctly installed you will not be able to open the file in Photoshop.

Also, drag the iwi2dds and dds2iwi-cod4 converters to your desktop to be used later on.

2. Begin by going to C:Program FilesActivisionCall of Duty 4 - Modern Warfaremain, and using WinRAR, or a similar program that can be used to open the IW archives, open the IW_4.iwd file. Scroll until you see the files with the prefix "weapon", most weapon files have the prefix “weapon”, and Click-and-Drag the “weapon_ak47_c.iwi” file to your desktop.
(Not just weapon files can be skinned, but for example we will be using the weapon_ak47_c.iwi file)

Weapon files with _c or _col are the actual weapon skins. Weapon files without _c or _col are pictures for the weapon menu or bump maps.

3. Click-and-Drag the “weapon_ak47_c” file and drop it onto your iwi2dds converter. Once this is done a .dds file should appear on your desktop. It will most likely be named "weapon_ak47_c.iwi_out”. The file has just been converted to the .dds format and
is ready for editing.

4. Double-Click the new .dds file and it should open the image in Photoshop. Photoshop will not open if the plug-in isn’t in the right place or correctly installed. When Photoshop is open a few windows may appear.
It may ask you to choose the size of the picture, if so, choose normal default sizes.
It may ask you if you would like to display MIP Maps with the image. Select “No” if this message appears.

5. Now for the actual editing. We’ll just change the wood color for example.

You can use this image: has some nice wood grain images for us to use. After you’ve found one you like copy-and-paste the image to the file in Photoshop, which should already be open.

6. Free transform the texture until it overlaps the wooden pieces in the picture, and lower the opacity until you can see through the image.

7. Once that is done, select the eraser tool and erase the overlapping wood.
The image should now look natural to the gun. Techniques like blending options are also very helpful.

8. The skinning is done. Go to File à Save As and save the file in the .dds format. A window may appear asking for .dds format specifications. Set Save Format to DXT5 and MIP Maps to Generate MIP maps.

9. Once this is done drag and drop the new .dds file onto the dds2iwi-cod4 converter, which will convert the .dds back to a .iwi file. The name of the new .iwi file should be "weapon_ak47_c.iwi_out". change the file name to "weapon_ak47_c ." The file is ready to be archived.

10. To archive the file place it in C:Program FilesActivisionCall of Duty 4 - Modern WarfareModsModWarfareimages Then double-click the makeMod icon that will create the .iwd file for you. Once the Batch File completes its operation press any key to continue.

11. Copy and paste the z_modwarfare.iwd file, which now contains the weapon_ak47_c.iwi file you’ve just made, to your Call of Duty 4 Main folder. You may have to rename the file.

12. The Skin Is Ready For Play!
Play a mission in single-player, or start a listen server in multiplayer to test it out.

I hope this tutorial was a great help to you in your efforts to make skins.

Additional support or questions can be directed to my email

Wilhelm and Kamy (Kamy didn't do shit though xD)

Call of Duty 4’s Developer Tools

Call of Duty Mod Tools

by Alex J. Champandard

This article provides an overview of the development tools inside the SDK, explains how the AI logic is structured, and then dig deeper into the level scripts.

Examining the AI Scripts in Call of Duty 4’s Developer Tools

Call of Duty 4: Modern Warfare received high praises from readers during the 2007 Game AI Awards; in fact, it was the runner-up for the community award. Admittedly, the AI in the game doesn’t necessarily shine for technical reasons, but it’s wonderfully put together within the whole story, and has arguably become one of the best examples of scripted level design.

Infinity Ward released the Mod Tools for COD4:MW, so it’s a perfect opportunity to take a look under the hood to figure out how the developers structured the engine and its scripts. There’s a lot to learn from, whether you’re building a story-driven game or not.

Screenshot 1: Squad behaviors in Call of Duty 4: Modern Warfare


Download and Installation

Compared to the mod tools of other games (like F.E.A.R.’s SDK), this one is particularly easy to install. In fact, it’s just a plain ZIP file!

You’ll need a PC version of COD4:MW to get the tools up and running. But luckily, the game is not required to download and extract the Mod Tools.

The Mod Tools link can be found at the top of this page.
Once the download is complete, extract it to the same directory as the game itself.

Screenshot 2: AI configuration files within the COD4 mod tools.


Finding Your Way Around

The technology at Infinity Ward is originally based on a Quake 3 engine license, dating back to the first few games in the franchise. Obviously the technology has changed heavily, but there are traces left throughout the scripts and data files (e.g. autogenerated QUAKED files), along with very similar concepts (e.g. worldspawn in levels).

Generally speaking, this engine takes a heavily data-driven approach. With the developer tools, you get access to most of the data (level scripts, configuration files) in readable format. However, the tools are in executable format, and the engine is distributed as a bunch of DLL files. The directories, particularly with regards to the AI and level scripts, are laid out as follows:

Binary Tools — The tools that build the game are in the ./bin/ directory, including the COD4 editor derived from id’s Q3Radiant.

Engine Libraries — These seem to be DLL files in the ./deffiles/ directory (e.g. aitype.dll), along with scripts describing what’s inside (e.g. aitype.gdf).

Raw Assets — The bulk of the game’s data is in the ./raw/ directory, including AI configuration files as ./raw/aitypes/*.[gsc,csv] and level scripts as ./raw/maps/*.gsc files.

Whether you’re just browsing around to learn or actually building a mod, you’ll spend most of your time in that last folder with the raw assets.

Screenshot 3: Interactive helicopter scene in COD4: MW



When browsing through the developer tools, pay attention to the following in particular:

The scripting language with C-style syntax and many of its semantics too. It also has some game specific features, such as micro-threads which execute using cooperative scheduling.

A clean and well documented API for integrating the scripts with the engine, and in particular the AI. For example, functions include: PickupGrenade, MoveToWaypoint, IsKnownEnemyInRadius and CanAttackEnemyNode etc.

The API and level scripts have a heavy focus on animations, which allows the developers to pay attention to the details in every level. For instance, the AimAtPos function returns the the blend time of the aim. You can also override and use specific animation trees within the level scripts.

There’s a level editor, presumably based on Q3Radiant, but since then customized for the COD games. The bulk of the AI configuration files are generated automatically from the export process.

The rest of this article looks at how the scripts are organized and setup.

Screenshot 4: A simple level in the COD4 Radiant editor (see tutorial).


Configuration Files for AI Characters

All the character AI types are configured by two files each, one *.gsc file which is a C-like language similar to the ones used by Quake 3, and the other a *.csv file which contains Comma Separated Values to configure the AI.

The CSV approach is a rather elegant way to handle parameters for the AI. Typically, these are generated automatically from a large spread sheet (or another central data-visualization) within the game editor. Here’s a simple case for an enemy combatant:

weapon,sp/berettaThis integrates with the script below, which contains the main logic for this same enemy soldier:

self.animTree = ""; = "allies";
self.type = "human";
self.accuracy = 0.2; = 150;
self.weapon = "ak74u";
self.secondaryweapon = "beretta";
self.sidearm = "beretta";
self.grenadeWeapon = "fraggrenade";
self.grenadeAmmo = 0;

self setEngagementMinDist( 128.000000, 0.000000 );
self setEngagementMaxDist( 512.000000, 1024.000000 );

}This file is auto-generated also. What’s not entirely clear is why certain parameters are handled in the CSV while others are in the GSC file, other than the explicit handling of inheritance within the second script.

Screenshot 5: A scripted car sequence in COD4: MW


Level Scripting

Apart from these configuration files, the bulk of the AI logic is hidden inside the compiled DLL files. Luckily, the most interesting scripts (the ones for the levels) are available.

The ./raw/maps contains all the level scripts. These aren’t ordered in a particularly obvious way unless you know the names of all the levels! But here’s how it works:

Common Files — The files starting with an underscore: _*.gsc are base files that are included by the specific levels. Functionality includes a patrol behavior, animation logic, various vehicle controllers, and even an A* pathfinder!

Level Scripts — Each map has a few scripts associated with it. There’s a base GSC which references other files that start with the same base name: *_code.gsc, *_anim.gsc, *_fx.gsc and *_amb.gsc. These handle the logic, animations, particles and graphics, and sound respectively.

The bulk of the logic for each level is within the main GSC file, and the *_logic.gsc script. Typically, these files are structured as follows:

/* Load the common scripts. */
#include maps_utility;
#include common_scriptsutility;
/* Include other scripts for this level. */
#include mapsarmada_code;

/* The top-level function for this map. */
// Set up the event handlers for different scenes.
default_start( ::ride_start );
add_start( "ride", ::ride_start, &"STARTS_RIDE" );
/** ... **/

// Prepare the data, presumably for streaming...
precachestring(&"ARMADA_INTRO" );
precachestring(&"ARMADA_DATE" );
/** ... **/

// Call main functions of dependent scripts.
maps_m1a1::main( "defaultvehicle" );
/** ... **/

// Globlal variables used for the game state.
flag_init ( "player_has_flashed" );
flag_init ( "return_fire" );
/** ... **/

// Launch micro-threads for the rest of the logic.
thread razor_wire_setup();
thread hq_breach();
/** ... **/

// Spawn the entities that are part of the level.
left_rooftop_enemies = getentarray(
"left_rooftop_enemies", "script_noteworthy" );
array_thread(left_rooftop_enemies, ::add_spawn_function,
::set_threatbias_group, "left_rooftop_enemies" );
/** ... **/
}There are many custom / one-off lines that were ignored in this example, but it outlines the rough structure of these scripts. The logic controlling individual characters when necessary is done in threads, which are also script functions.

Screenshot 6: Under attack from an enemy in the distance.


Summary & Further Information

This kind of approach to level scripting gives you a lot of control, especially with a well thought out API that has matured over the course of multiple games. However, it certainly takes a lot of coding, debugging and tweaking.

With over 12.4 Mb and 205,718 lines of level scripts (not including the automatically generated configuration files), it’s even more clear than ever that the behaviors in Call of Duty 4: Modern Warfare are the result of heavy labor and intense perfectionism.

For someone willing to get into mods for story-driven games, and who doesn’t mind the process of scripting, then this engine is the perfect fit!


Screenshot 7: Squad attacks in Call of Duty 4: Modern Warfare

How to create a weapon mod

Call of Duty Mod Tools


How to create a weapon mod.

1) Create a new folder in CoD4/Mods called whatever you want, my example will be: "UberMod"

2) Use WinRar to extract the "Weapons" folder from iw_11.iwd in CoD4/main into my CoD4/Mods/Ubermod folder.

3) Open ModBuilder.exe

4) Selected "UberMod" from the drop down list titled "Mod" in the first tab "CSV Creator"

5) Look through the list on the left (Files) and start moving the things you want to mod to the right (CSV). For example: "UberModweaponsspak47".

6) Click New CSV, leave the setting at 'blank', and type in your mod name, UberMod, in this case.

7) Click the "MOD Builder" tab. Select UberMod from the drop down menu (Mod).

In the two big boxes, you'll get two lists. The list on the left is basically a list of the resources currently in your CSV file. The list on the right is all the files in your MOD folder (CoD4/Mods/UberMod)

Go ahead and check the things you want to mod (weaponsspak47 in this case)

8) Make sure "Build Fast File" and "Build IWD File" are checked.

9) Click Build Mod. At the bottom it will say "Building Fast Files...", so give it some time.

10) Copy your CoD4 shortcut (singleplayer or multiplayer, whichever you modded). Right click it---> Properties. Then add to the target line:[ +set fs_game "mods/UberMod"] (copying only inside the brackets). This is your new shortcut to run your mod.

Now, to actually mod the weapon you want. In this example I'll use the AK47.

1) Go into CoD4ModsUberModweaponssp

2) Open 'ak47' with notepad.

3) Gaze at the strange complicated mess of code. Everything is fairly self-explanatory once you figure out the pattern.

For example: fireTypeFull Auto

Fire type can be "Single Shot", "Full Auto", "2-Round Burst", "3-Round Burst", or "4-Round Burst". Without the quotes. Be sure to type it in exactly.

I changed it to: fireType2-Round Burst

If you're having trouble finding certain lines, use the search function (cntrl+f) then put in "fireType".

So, next we'll change the clipsize.

Original: clipSize30
Mine: clipSize20

Optionally, you can adjust the other ammo stats, such as maxAmmo, dropAmmoMin, dropAmmoMax to fit. IE if I changed the gun instead to have a 300 round clip, but left the 'maxAmmo' attribute as the original, you would only be able to hold 1 clip at a time.


Here the codes for weapon damage:

Base weapon damage, I think enemies have 200 health, since all the one-shot kill weapons are 200 damage.

I can only guess that this means the weapon ranges between 85 and 100, ie 85-100 damage.

This is 'knife' damage. The reason this code is in EVERY weapon, but ALL the same value, is because in the original call of duty games each weapon had a different melee damage, because the melee attack was 'rifle-bash'. So pistol-whipping did less than M1 Garand-whipping.

Not sure on these values, I think it means that at 1024 units, the weapon deals the max damage (100).

And at 2400 meters, it deals the minimum damage (85)

You'll notice that shorter-ranged weapons have smaller values (shotguns, pistols, etc)

How much damage the gun deals to the player from the hands of an enemy. No idea how much health the player has. I think 200, but different difficulty settings may change that (or damage modifiers).

So, I changed it to: damage200minDamage200meleeDamage200maxDamageRange

First | Previous | 1 2 3 4 5 | Next | Last

Who's Online

Guest Users: 124

Auto Translations

  • Arabic
  • Bulgarian
  • Catalan
  • Chinese Simplified
  • Chinese Traditional
  • Croatian
  • Czech
  • Danish
  • Dutch
  • Filipino
  • Finnish
  • French
  • German
  • Greek
  • Hebrew
  • Hindi
  • Indonesian
  • Italian
  • Japanese
  • Korean
  • Latvian
  • Lithuanian
  • Norwegian
  • Polish
  • Portugese
  • Romanian
  • Russian
  • Serbian
  • Slovak
  • Slovenian
  • Spanish
  • Swedish
  • Ukrainian
  • Vietnamese

Older Stories

Thursday 06-Nov

Monday 03-Nov

Sunday 02-Nov

Thursday 30-Oct


Play online blackjack for real money and receive bonuses and VIP points from casinos.

The Poker American Express sites allow players to deposit using their amex credit card and play blackjack online