Alliedassault           
FAQ Calendar Search Today's Posts Mark Forums Read
Go Back   Alliedassault > FPS Gaming General Discussion > MoH Maps, Mods & Skins
Reload this Page adding hammer as secondary weapon to weapon inventory
MoH Maps, Mods & Skins Discuss custom maps, skins and mods here.

Reply
 
Thread Tools Display Modes
adding hammer as secondary weapon to weapon inventory
Old
  (#1)
philadelphia killing mach is Offline
Senior Member
 
Posts: 1,366
Join Date: May 2004
Location: I hate HippiesLand
   
Default adding hammer as secondary weapon to weapon inventory - 02-04-2005, 09:37 AM

i'm looking to add the model sledgehammer (but changing files to read 'hammer') to the weapon list as a secondary weapon for both sides much like the CN team did with the 'knife' in City Nights by using most of the scripting* from the knife weapon from City Nights_Final and changing 'knife' to 'hammer'.

folders i've added/created in pk3:

models/weapons/hammer
*inside the weapons folder is the hammer.tik
*inside the hammer folder are the hammer.skd, hammer.lod, hammer.skc

scripts/hammer.shader

textures/hammer.tga


hammer.tik
[code:6d75e] TIKI
setup
{
scale 0.52 // Set default scale to 16/30.5 since world
// is in 16 units per foot and model is in cm's
path models/weapons/hammer
skelmodel hammer.skd
surface all shader hammer

}

init
{
server
{
classname Weapon
weapontype pistol
name "Walther P38"
rank 120 120


pickupsound p38_snd_pickup
ammopickupsound p38_snd_pickup_ammo
noammosound

// Holstering info
// holstertag "Bip01 Pelvis"
// holsteroffset "1.5 -4 -10.0"
// holsterangles "5 190 195"
// holsterScale 1.0

// Primary fire type info
// firetype bullet
// ammotype "Pistol"
// meansofdeath bullet
semiauto
bulletcount 0
clipsize 0
startammo 0
ammorequired 1



//==============================================//
// WEAPON BEHAVIOR MODELLING //
//==============================================//

// Walther P-38 Pistol: Max Eff. Range is 75 yds with a muzzle velocity of 1150 ft/s. (9mm Parabellum round)

bulletrange 3120 //the range at which bulletspread is applied fully
bulletspread 40 40 56 56 // minpitch minyaw maxpitch maxyaw(offsets in world units)
firespreadmult 0.38 0.7 200 0.6 //add falloff cap maxtime
firedelay 0.15
bulletdamage 33 //original 25
movementspeed 1.0

tracerfrequency 1

crosshair 1
// usenoammo 1 // allow the pistol to be used when it has no ammo

secondary firetype melee
secondary ammotype none
secondary ammorequired 0
secondary meansofdeath bash
secondary bulletrange 64
secondary bulletdamage 40
secondary bulletknockback 50
secondary quiet

airange short

// AI animation group info
weapongroup pistol

// DM Attributes

dmbulletcount 1
dmstartammo 0
dmammorequired 1
// dmfiredelay 0.15
dmfiredelay 0.15
// dmbulletdamage 33 //original 25
dmbulletdamage 40 //original 25
dmmovementspeed 1.0

dmbulletrange 3120 //the range at which bulletspread is applied fully (65 yards)
// dmbulletspread 40 40 56 56 // minpitch minyaw maxpitch maxyaw(offsets in world units) spread is maximum at top movement speed
dmbulletspread 70 70 130 130 // minpitch minyaw maxpitch maxyaw(offsets in world units) spread is maximum at top movement speed
// dmfirespreadmult 0.38 0.7 200 0.6 //add falloff cap maxtime
dmfirespreadmult 0.58 0.5 200 0.6 //add falloff cap maxtime 0.38 0.7 200 0.6 (original)

dmcrosshair 1

// Secondary fire DM Attributes
secondary dmammorequired 0
secondary dmbulletrange 96
secondary dmbulletdamage 60

// this is attached to the player during reload
cache models/ammo/p38_clip.tik
}
client
{
cache tracer.spr
cache muzsprite.spr
cache models/fx/muzflash.tik
cache models/ammo/pistolshell.tik
}
}

$path models/weapons/p38

animations
{
idle P38.skc
reload P38_reload.skc
{
server
{
18 surface clip +nodraw
39 surface clip -nodraw
last idle
}
client
{
entry sound P38_snd_reload item
}

}

secondaryfire P38.skc
{
server
{
entry shoot secondary
}
}
fire P38.skc
{
server
{
// entry shoot primary
}
client
{
entry stopaliaschannel P38_snd_fire
entry sound P38_snd_fire

// By now, the server has already fired the weapon, so it's
// ok to apply the view kick apon entry to avoid problems
// with multiple application on single frame animations.

////////////////////////////////////////////////////////////////////////////////////////
// View Kick Controls
//
// View Kicking works based on the assumptions that every weapon has its own tendencies to kick in
// a paticular fashion. In MOH we call then scatter patterns. Currently we have 2 scatter patterns which
// will be explained.
// Scatter Patterns:
// "V" - the cone. The longer you shoot the more random your shots will be in the horizontal axis.
// "T" - the T shape. The gun has a tendancy to push in a paticular direction. //not used much...too artificial looking
//
//
// +-------------------------------------------- Scatter Pitch Min
// | +--------------------------------------- Scatter Pitch Max
// | | +------------------------------- Scatter Yaw Min
// | | | +--------------------------- Scatter Yaw Max
// | | | | +--------------------- The Recentering speed in fraction per second
// | | | | | +---------------- The Scatter Pattern
// | | | | | | +---------- The absolute pitch min/max
// | | | | | | | +------- The absolute yaw min/max
// | | | | | | | | +----- This is the pitch at which you loose all
// | | | | | | | | | control of the weapon and its behavior is
// | | | | | | | | | purely random.
// V V V V V V V V V
entry viewkick -1.0 -1.0 -0.16 0.16 1.2 "V" 2.8 0.8 1.2

//entry viewkick -1.2 -1.2 -0.2 0.2 1 "V" 3.0 1.0 1.6 (Colt .45 stats)

// muzzle flash
entry tagdlight tag_barrel 0.25 0.2 0.15 120 0.11
entry tagspawn tag_barrel
(
scale 0.2
offsetalongaxis 2 0 0
count 1
scale 0.30
model muzsprite.spr
life 0.06
)
entry tagspawn tag_barrel
(
count 1
scalemin 0.15
scalemax 0.25
model models/fx/muzflash.tik
randomroll
life 0.04
)

// smoke puff
// entry commanddelay 0.05 tagspawn tag_barrel
// (
// volumetric
// model gun // sets the type of smoke
// life 10 // amount of smoke
// scale 1.0 // radius
// alpha 0.3 // density
// color 0.7 0.7 0.7 // RBG color of the smoke
// velocity 2 // base velocity away from the surface
// randvelaxis random 6 0 0 // velocity offset
// offsetalongaxis random 4 0 0 // positional offset
// )

// shell eject
entry commanddelay 0.1 tagspawn tag_eject
(
count 1
model models/ammo/pistolshell.tik
spawnrange 1024
velocity 50
randvel crandom 10 crandom 10 random 20
avelocity crandom 90 crandom 90 0
accel 0 0 -800
physicsrate 20
life 2.0
fadedelay 1.7
collision
bouncefactor 0.2
bouncesoundonce snd_pistol_shell
)
}
}
}

/*QUAKED playerweapon_german_p38 (0.0 0.0 1.0) (-8 -8 -8) (8 8 8)
German pistol - Walther P38
*/[/code:6d75e]

hammer.shader
[code:6d75e]hammer
{
qer_editorimage textures/hammer.tga
{
map textures/hammer.tga
rgbGen lightingSpherical
}
}[/code:6d75e]

hammer does not show up when i tested . is there coding/scripting somewhere telling to add this weapon to the player's list ?



*credit to CN team for scripting.
  
Reply With Quote
Old
  (#2)
Michael is Offline
Senior Member
 
Michael's Avatar
 
Posts: 1,533
Join Date: Nov 2003
Location: New York
  Send a message via AIM to Michael Send a message via MSN to Michael Send a message via Yahoo to Michael  
Default 02-04-2005, 09:46 AM

if u have the actual new model for the hammer and did the coding right it should work. if u need more scripting help though u should post this at TMT. they have tons of scripters that post there.


  
Reply With Quote
Old
  (#3)
philadelphia killing mach is Offline
Senior Member
 
Posts: 1,366
Join Date: May 2004
Location: I hate HippiesLand
   
Default 02-04-2005, 09:53 AM

posted it over there and i'm just using the sledgehammer model (used in norway/uboat map; guy on otherside of sub swinging sledgehammer up and down) but changing all the sledgehammer files to read hammer instead.

should work or at least model should show up.
  
Reply With Quote
Old
  (#4)
imported_Grim_Reaper is Offline
Senior Member
 
Posts: 3,452
Join Date: Jun 2003
Location: mASSachusetts
  Send a message via AIM to imported_Grim_Reaper Send a message via MSN to imported_Grim_Reaper  
Default 02-04-2005, 12:14 PM

its cause of the bones, you might need to re-export it with the pistol bones...
  
Reply With Quote
Old
  (#5)
philadelphia killing mach is Offline
Senior Member
 
Posts: 1,366
Join Date: May 2004
Location: I hate HippiesLand
   
Default 02-04-2005, 03:04 PM

okaaaaaaay, scrap that idea
thanks m and grim
  
Reply With Quote
Old
  (#6)
R'Jackson'Harris is Offline
Senior Member
 
Posts: 1,277
Join Date: Dec 2003
Location: Was |TAS|Jackson
  Send a message via AIM to R'Jackson'Harris Send a message via MSN to R'Jackson'Harris  
Default 02-04-2005, 03:40 PM

you mean chandge the name from colt 45 to sledgehammer?
  
Reply With Quote
Old
  (#7)
philadelphia killing mach is Offline
Senior Member
 
Posts: 1,366
Join Date: May 2004
Location: I hate HippiesLand
   
Default 02-04-2005, 03:52 PM

no, you would have the pistol as a secondary but like in City Nights, you would also have another secondary weapon (they used a knife, i'm looking to use the model slegehammer from mohaa)

i looked through all of City Nights_Final files and didn't find anything concerning the knife other than the files i listed above (there was a knife.skd, knife.tik , knife.shader, knife.tga )

i only changed the word sledgehammer to hammer to give it a new name.

would it take someone long to build a model w/animations for this (a seondary bash only weapon) since the animations and model is allready in the game ?

or can the hammer model just be added like they seemed to have done in City Nights_Final (knife/secret weapon) ?
  
Reply With Quote
Old
  (#8)
Scorpion -]M15F1T[- is Offline
Sergeant 1st Class
 
Posts: 1,664
Join Date: May 2004
Location: Joined: 06 May 2003
   
Default 02-06-2005, 06:31 PM

I know this is in the tiks for SH maybe these will help

// Additional DM loadout
dm additionalstartammo "grenade" 2
dm additionalstartammo "smokegrenade" 1
dm startitem "items/binoculars.tik"

not sure but........
  
Reply With Quote
Old
  (#9)
philadelphia killing mach is Offline
Senior Member
 
Posts: 1,366
Join Date: May 2004
Location: I hate HippiesLand
   
Default 02-07-2005, 08:07 AM

would that work for AA ? and would i had a line like that to a precache, scr ?
  
Reply With Quote
Old
  (#10)
Scorpion -]M15F1T[- is Offline
Sergeant 1st Class
 
Posts: 1,664
Join Date: May 2004
Location: Joined: 06 May 2003
   
Default 02-07-2005, 05:19 PM

If you go to tmt and get lamrons throwin knives mod he uses the same thing to add the knives to the grenade slot take a look : )
  
Reply With Quote
Old
  (#11)
philadelphia killing mach is Offline
Senior Member
 
Posts: 1,366
Join Date: May 2004
Location: I hate HippiesLand
   
Default 02-07-2005, 05:27 PM

you know i saw that thread but didn't look at the code too much. you really think i can then ad the sledgehammer model from AA ?
  
Reply With Quote
Old
  (#12)
Scorpion -]M15F1T[- is Offline
Sergeant 1st Class
 
Posts: 1,664
Join Date: May 2004
Location: Joined: 06 May 2003
   
Default 02-07-2005, 10:11 PM

The way i see it is if he can use it to add his own knives model i dont see why u cant use the hammer.
  
Reply With Quote
Old
  (#13)
philadelphia killing mach is Offline
Senior Member
 
Posts: 1,366
Join Date: May 2004
Location: I hate HippiesLand
   
Default 02-07-2005, 10:26 PM

i got word in TMT that whole new animations and bones and modeling would have to be done since the sledgehammer doesn't allready have it, so scrap that idea.
  
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.12 by ScriptzBin
Copyright ©2000 - 2025, vBulletin Solutions Inc.
vBulletin Skin developed by: vBStyles.com
© 1998 - 2007 by Rudedog Productions | All trademarks used are properties of their respective owners. All rights reserved.