New Weapon

Weapon.def Discussion Here

Moderators: Q-dad~TAG, EXP STAFF, Moderator

New Weapon

Postby swtdivalove » 06-18-2005 07:01 PM

Alrighty... I've done everything possible to add a new weapon to JO... I've searched through tons of forums and stuff and I've not found it, even here in these forums.

What I'm trying to do is add a SF Weapon...

M4 Silenced (Merely changing the soundset), but a copy of the regular M4.

I'm not looking to mod the 3di file, the meshes or the textures.

I just want to add the M4 Silenced to the selectible weapons in the game.

Here's what I have in the weapons.def file...:

______________________________________________________

weapon "WPN_M4Silenced"
category 3
rank 39
statid 346
teamfilter blue
charfilter rifleman
charfilter medic
charfilter engineer
round_type "AMMO_CAR15_556MM"
clipsize 60
startrounds 300
error 0.0165 0.2 0.25 0.0165 0.032 0.047
targetpitchmax 85
targetpitchmin 85
targetyawrange 120
ammoclass CLASS_556MM 1
ammobucket 1
launchuserpoint bullet
clipweight 10
weaponweight 200
flags Sighted
flags WhileSwimming
flags LaserBeam
flags ShowElevation
scope_max_zero 10 50 200
scope_max_mag 10
scope_min_mag 4
sights m4aim.tga 112 0 889 768 blend
sights chvpip.tga 496 368 527 399 add scale
crosshair coma20mm.tga
hudicon H_m4s.tga
hudclipgfx 0 0 H_clip.tga
hudrndgfx 6 0 4 0 1 H_round.tga
animadm m4_1st
gfx1 M4_1st
gfx1a armsG
gfx1b armsGb
gfx3 M4_3RD
pos -26.55 23.25 -165.00 2.500 0.750 356.750
tpos -67.75 44.50 -154.50 1.250 2.250 0.250

action "idle"
delayend auto
anim anim_wpn_idle
function wpn_std_idle
end

action "emptyidle"
delayend auto
anim anim_wpn_idle
function wpn_std_idle
end

action "fire"
delayend 3
soundsetend GS_MP5SUP
anim anim_wpn_fire
function wpn_std_fire
particle Effect_CAR15MF
particleuserpoint mflash01
end

action "recoil"
delayend 0
anim anim_wpn_recoil
function wpn_std_recoil
particle Effect_CAR15Cas
particleuserpoint bcasing
end

action "reload"
delaystart 100
delayend auto
soundset GF_M4_RL
anim anim_wpn_reload
function wpn_std_reload
end

action "empty"
delayend auto
soundset DRY_OICW
anim anim_wpn_empty
function wpn_std_empty
end

action "switchto"
soundset GF_M4_ST
delaystart 1
delayend 3
anim anim_wpn_switchto
function wpn_std_switchto
end

action "switchfrom"
soundset GF_M4_SF
delaystart 1
delayend 3
anim anim_wpn_switchfrom
function wpn_std_switchfrom
end

action "switchrank"
delaystart 1
delayend 3
anim anim_wpn_switchrank
function wpn_std_switchrank
end
end

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

Here's what I have in the gametxt.bin

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

WEAP_SHORT_M4Silenced = "M4 Silenced";

WPN_M4Silenced ="M4 Silenced";


I've also added an entry in the game.cfg file, but everytime I check it after checking the game to see if it's there... the line containing it is gone...

Here's the line:

avail_wpn_M4Silenced = 3


I've checked every other possible file to make sure that I don't have to do something in them also...

Any help would be appreciated.
swtdivalove
Modder Queen
 
Posts: 91
Joined: 12-27-2004 12:48 PM

Postby Ma1/m27de » 06-19-2005 07:18 AM

if your trying to add it so you have a m4 atuo m4 semi then m4 silenced then you need to edit the main m4 auto part to have more sub-selections.
3D Studio Max 7
Photoshop CS2
Milkshape3D
Ultimate Unwrap
Website: <a>www.m27designs.com</a> - <a>Tech Razor</a>
Image
User avatar
Ma1/m27de
Senior Member
 
Posts: 229
Joined: 03-29-2004 01:37 PM

Postby swtdivalove » 06-19-2005 11:26 AM

There are 5 different M4 weapons listed in the weapon.def file.

I'm just making a 6th.
swtdivalove
Modder Queen
 
Posts: 91
Joined: 12-27-2004 12:48 PM

Postby swtdivalove » 06-21-2005 02:34 PM

bump
swtdivalove
Modder Queen
 
Posts: 91
Joined: 12-27-2004 12:48 PM

Postby swtdivalove » 06-24-2005 10:05 AM

bump
swtdivalove
Modder Queen
 
Posts: 91
Joined: 12-27-2004 12:48 PM

Postby Ma1/m27de » 06-24-2005 01:35 PM

there are not 5 seprate m4 weapons. just 2 m4 types m4 with auto and semi subtype

then m4 auto with semi and m203 subtypes.

there is just 5 entry's to distinquish the types.

for more clarification read the top of the weapons.def sample file that came with the BHD mod tools it will tell you about the subtypes and how it works. i know your trying to make new weapon entry so that will make a 3rd m4 type gun now you can just copy and paste the 2 entries for the default m4 auto and m4 semi and then just change the id numbers for those guns and then edit the sound it makes and you will then have your silenced gun in the game. you will also need to edit the gamemenu bin file to get the name of your gun to show up in game and in menu.

anymore questions dont hesitate to ask,
3D Studio Max 7
Photoshop CS2
Milkshape3D
Ultimate Unwrap
Website: <a>www.m27designs.com</a> - <a>Tech Razor</a>
Image
User avatar
Ma1/m27de
Senior Member
 
Posts: 229
Joined: 03-29-2004 01:37 PM


Return to Weapon.def

Who is online

Users browsing this forum: No registered users and 1 guest

cron