Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 18 Guests
Online:

LATEST FORUM THREADS

»
warfare
CoD4 Map + Mod Releases
Voting menu on maps
CoD+UO General
Hauling 911
CoDBO3 General

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty 4
Category: CoD4 Scripting
Scripting and coding with Call of Duty 4.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername, novemberdobby
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Next Page
subscribe
Author Topic: Weapon Modding Tutorial
ShadowLance194
General Member
Since: Jan 27, 2008
Posts: 101
Last: Mar 4, 2008
[view latest posts]
Level 4
Category: CoD4 Scripting
Posted: Thursday, Feb. 14, 2008 09:50 pm
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: "UberMod\weapons\sp\ak47".

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 (weapons\sp\ak47 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 CoD4\Mods\UberMod\weapons\sp

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: fireType\Full 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: fireType\2-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: clipSize\30
Mine: clipSize\20

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.

Heres the codes for weapon damage:

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

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

meleeDamage\200\
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.

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

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

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

playerDamage\50\
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:
Code:
damage\200\minDamage\200\meleeDamage\200\maxDamageRange\2500\minDamageRange\5000\playerDamage\150\


The list of different things you can change is pretty huge and I don't really have the time to make a comprehensive list of everything. If you have a specific question like "how do you change the muzzle flash?" or "how do you change the firing sound?" Feel free to ask here on this post.

I'm subscribed so I'll get e-mail notifications.
Share |
94sniper
General Member
Since: Jun 15, 2007
Posts: 907
Last: Jun 22, 2009
[view latest posts]
Level 7
Category: CoD4 Scripting
Posted: Thursday, Feb. 14, 2008 09:53 pm
nice tut. 1 Q though, the modbuilder.exe is in the bin folder right? I just thought that it should be stated rather than people spend an hour looking for it.
Share |
novemberdobby
General Member
Since: Sep 17, 2006
Posts: 1965
Last: Oct 13, 2013
[view latest posts]
Level 8
Forum Moderator
Category: CoD4 Scripting
Posted: Thursday, Feb. 14, 2008 09:56 pm
Good. I'll probably link to this tut when/if I make a Maya weapon tutorial, I'm just trying to work out why tag_flash won't change the muzzleflash location.
Share |
ShadowLance194
General Member
Since: Jan 27, 2008
Posts: 101
Last: Mar 4, 2008
[view latest posts]
Level 4
Category: CoD4 Scripting
Posted: Thursday, Feb. 14, 2008 09:56 pm
94sniper writes...
Quote:
nice tut. 1 Q though, the modbuilder.exe is in the bin folder right? I just thought that it should be stated rather than people spend an hour looking for it.


Yep

edited on Feb. 14, 2008 04:57 pm by ShadowLance194
Share |
Mystic
General Member
Since: Apr 10, 2004
Posts: 6147
Last: Apr 15, 2018
[view latest posts]
Level 10
Forum Moderator
Im a fan of MODSonair
Category: CoD4 Scripting
Posted: Thursday, Feb. 14, 2008 10:05 pm
Posted to tutorials. Nice one.
Share |
p0ptart
General Member
Since: Jan 20, 2008
Posts: 27
Last: Feb 22, 2008
[view latest posts]
Level 2
Category: CoD4 Scripting
Posted: Thursday, Feb. 14, 2008 10:19 pm
when i try and move the weapon i want to mod to the csv file section it says :Error: Selected file "AutoDesertEagle\weapons\mp\deserteagle_mp" is not supported, skipping

Any ideas why?
Share |
.KiLL3R.
General Member
Since: Oct 26, 2006
Posts: 1437
Last: Jul 3, 2017
[view latest posts]
Level 8
Category: CoD4 Scripting
Posted: Thursday, Feb. 14, 2008 10:23 pm
-EDIT-

oops forget i said that, what i find is the having a copy of the weapon file in raw/weapons/mp AND in a custom iwd in the main folder with the weapon file tends to work

edited on Feb. 14, 2008 05:25 pm by .KiLL3R.
Share |
p0ptart
General Member
Since: Jan 20, 2008
Posts: 27
Last: Feb 22, 2008
[view latest posts]
Level 2
Category: CoD4 Scripting
Posted: Thursday, Feb. 14, 2008 10:26 pm
Well modbuilder automatically looks for the mods in : C:\Documents and Settings\------(my computer log in name)---\Mods


Wonder why?
Share |
ShadowLance194
General Member
Since: Jan 27, 2008
Posts: 101
Last: Mar 4, 2008
[view latest posts]
Level 4
Category: CoD4 Scripting
Posted: Thursday, Feb. 14, 2008 10:29 pm
Btw, here's a link to the singleplayer mod I made. Just modified all the weapons to do something different, different sounds, muzzleflashes, stuff like that.

It's basically just me messing around, so some weapons may be really funky/underpowered/overpowered. But maybe you'll get a kick out of it ;)

http://files.filefront.com/ShadowModrar/;9633344;/fileinfo.html
Share |
ShadowLance194
General Member
Since: Jan 27, 2008
Posts: 101
Last: Mar 4, 2008
[view latest posts]
Level 4
Category: CoD4 Scripting
Posted: Thursday, Feb. 14, 2008 10:37 pm
p0ptart writes...
Quote:
Well modbuilder automatically looks for the mods in : C:\Documents and Settings\------(my computer log in name)---\Mods


Wonder why?


Not sure.. maybe they eventually mean to release a 'mod launcher' tool?

It finds all the mods I put in my CoD4/Mods folder.
Share |
Restricted Access Topic is Locked
Page
Next Page
subscribe
MODSonline.com Forums : Call of Duty 4 : CoD4 Scripting

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»