Increasing number of smokegrenades (should be a easy one)
Moderator: Moderators
-
KARR-PureEstonian
- Private
- Posts: 6
- Joined: Thu Apr 14, 2005 5:39 pm
Increasing number of smokegrenades (should be a easy one)
OK, I searched your forum, but I'm too new to MoH scripting or editing.
I run spearhead server(on my PC), I play with my friends often.
I just want to increase the number of smokegrenades to number of 6 for all weapons, for every skin (want to remain the colors).
Editing tik files should be easy, but can't do it. I go to pak1.pk3/models/weapons and there changed the tik files, changed the DM loadout for nagant russians but got the same result 0.
Using PakScape. Please help! Am I editing the right tik files?
I run spearhead server(on my PC), I play with my friends often.
I just want to increase the number of smokegrenades to number of 6 for all weapons, for every skin (want to remain the colors).
Editing tik files should be easy, but can't do it. I go to pak1.pk3/models/weapons and there changed the tik files, changed the DM loadout for nagant russians but got the same result 0.
Using PakScape. Please help! Am I editing the right tik files?
Don't edit the original tik file extract them and make a custom pk3 file for them . You can keep the same names as the original files just put them in a pak that is read after the game paks . The game packs begin with p so have your pk3 start with a letter that is after p so that your changed tiks overwrite the game tiks .
Open the smoke grenade files from pak1.pk3 models/weapons directory and change them like this and add to your pk3 in the models/weapons directory like this one
M18_smoke_grenade_base.txt
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/M18_smoke_grenade
skelmodel M18_smoke_grenade.skd
surface m18_smoke_gren shader M18_smoke_gren
surface pin shader M18_smoke_gren
}
init
{
server
{
classname Weapon
weapontype grenade
name "M18 Smoke Grenade"
rank 540 540
weaponsubtype 1 // differentiates smoke grenades from regular grenades
pickupsound smokegrenade_snd_pickup
ammopickupsound smokegrenade_snd_pickup_ammo
noammosound m2frag_snd_noammo
// Holstering info
// holstertag "Bip01 Spine1"
// holsteroffset "3.12 10.5 3.64"
// holsterangles "20 -40 0"
// holsterScale 1.0
// Primary fire type info (fast, arcing throw)
firetype projectile
ammotype "smokegrenade"
projectile models/projectiles/M18_smoke_grenade_primary.tik
semiauto
clipsize 1
ammorequired 1
firedelay 0.75
maxchargetime 4.0
minchargetime 0.6
crosshair 1
quiet // don't notify AI of it being fired
autoputaway 1 // automatically put the weapon away when out of ammo
usenoammo 0 // don't allow it to be used when it has no ammo
movementspeed 1.0
sp startammo 1
dm startammo 5 //<============
sprealism startammo 1
dmrealism startammo 4 //<============
// Secondary fire type info (more controllable, straight throw)
shareclip
secondary firetype projectile
secondary ammotype "smokegrenade"
secondary projectile models/projectiles/M18_smoke_grenade.tik
secondary clipsize 1
secondary ammorequired 1
secondary firedelay 0.75
secondary maxchargetime 1.5
secondary minchargetime 0.5
// AI animation group info
weapongroup grenade
}
client
{
cache models/projectiles/M18_smoke_grenade_primary.tik
cache models/projectiles/M18_smoke_grenade.tik
}
}
animations
{
raise M18_smoke_grenade.skc
{
// if we're pulling out grenades, we've definatly got 'em
server
{
enter surface all -nodraw
}
}
idle M18_smoke_grenade.skc
{
server
{
enter surface all -nodraw
}
}
// this should make sure that it doesn't look like there's a grenade in hand when you don't have one
idle_empty M18_smoke_grenade.skc
{
server
{
enter surface all +nodraw
}
}
charge M18_smoke_grenade_charge.skc
{
server
{
8 surface pin +nodraw
}
client
{
enter sound smokegrenade_snd_grenade_pull weapon
8 tagspawn tag_pin
(
count 1
model models/ammo/grenade_pin.tik
life 1
randvelaxis range 25 30 0 0
accel 0 0 -330
avelocity crandom 30 crandom 30 crandom 30
)
}
}
secondarycharge M18_smoke_grenade_charge.skc
{
server
{
8 surface pin +nodraw
}
client
{
enter sound smokegrenade_snd_grenade_pull weapon
8 tagspawn tag_pin
(
count 1
model models/ammo/grenade_pin.tik
life 1
randvelaxis range 25 30 0 0
accel 0 0 -330
avelocity crandom 30 crandom 30 crandom 30
)
}
}
fire M18_smoke_grenade.skc
{
server
{
first shoot
first surface all +nodraw
}
client
{
first sound smokegrenade_snd_grenade_throw weapon
}
}
secondaryfire M18_smoke_grenade.skc
{
server
{
first shoot secondary
first surface all +nodraw
}
client
{
first sound smokegrenade_snd_grenade_throw weapon
}
}
reload M18_smoke_grenade.skc
{
server
{
first sound smokegrenade_snd_reload weapon
first surface all -nodraw
}
}
}
Open the smoke grenade files from pak1.pk3 models/weapons directory and change them like this and add to your pk3 in the models/weapons directory like this one
M18_smoke_grenade_base.txt
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/M18_smoke_grenade
skelmodel M18_smoke_grenade.skd
surface m18_smoke_gren shader M18_smoke_gren
surface pin shader M18_smoke_gren
}
init
{
server
{
classname Weapon
weapontype grenade
name "M18 Smoke Grenade"
rank 540 540
weaponsubtype 1 // differentiates smoke grenades from regular grenades
pickupsound smokegrenade_snd_pickup
ammopickupsound smokegrenade_snd_pickup_ammo
noammosound m2frag_snd_noammo
// Holstering info
// holstertag "Bip01 Spine1"
// holsteroffset "3.12 10.5 3.64"
// holsterangles "20 -40 0"
// holsterScale 1.0
// Primary fire type info (fast, arcing throw)
firetype projectile
ammotype "smokegrenade"
projectile models/projectiles/M18_smoke_grenade_primary.tik
semiauto
clipsize 1
ammorequired 1
firedelay 0.75
maxchargetime 4.0
minchargetime 0.6
crosshair 1
quiet // don't notify AI of it being fired
autoputaway 1 // automatically put the weapon away when out of ammo
usenoammo 0 // don't allow it to be used when it has no ammo
movementspeed 1.0
sp startammo 1
dm startammo 5 //<============
sprealism startammo 1
dmrealism startammo 4 //<============
// Secondary fire type info (more controllable, straight throw)
shareclip
secondary firetype projectile
secondary ammotype "smokegrenade"
secondary projectile models/projectiles/M18_smoke_grenade.tik
secondary clipsize 1
secondary ammorequired 1
secondary firedelay 0.75
secondary maxchargetime 1.5
secondary minchargetime 0.5
// AI animation group info
weapongroup grenade
}
client
{
cache models/projectiles/M18_smoke_grenade_primary.tik
cache models/projectiles/M18_smoke_grenade.tik
}
}
animations
{
raise M18_smoke_grenade.skc
{
// if we're pulling out grenades, we've definatly got 'em
server
{
enter surface all -nodraw
}
}
idle M18_smoke_grenade.skc
{
server
{
enter surface all -nodraw
}
}
// this should make sure that it doesn't look like there's a grenade in hand when you don't have one
idle_empty M18_smoke_grenade.skc
{
server
{
enter surface all +nodraw
}
}
charge M18_smoke_grenade_charge.skc
{
server
{
8 surface pin +nodraw
}
client
{
enter sound smokegrenade_snd_grenade_pull weapon
8 tagspawn tag_pin
(
count 1
model models/ammo/grenade_pin.tik
life 1
randvelaxis range 25 30 0 0
accel 0 0 -330
avelocity crandom 30 crandom 30 crandom 30
)
}
}
secondarycharge M18_smoke_grenade_charge.skc
{
server
{
8 surface pin +nodraw
}
client
{
enter sound smokegrenade_snd_grenade_pull weapon
8 tagspawn tag_pin
(
count 1
model models/ammo/grenade_pin.tik
life 1
randvelaxis range 25 30 0 0
accel 0 0 -330
avelocity crandom 30 crandom 30 crandom 30
)
}
}
fire M18_smoke_grenade.skc
{
server
{
first shoot
first surface all +nodraw
}
client
{
first sound smokegrenade_snd_grenade_throw weapon
}
}
secondaryfire M18_smoke_grenade.skc
{
server
{
first shoot secondary
first surface all +nodraw
}
client
{
first sound smokegrenade_snd_grenade_throw weapon
}
}
reload M18_smoke_grenade.skc
{
server
{
first sound smokegrenade_snd_reload weapon
first surface all -nodraw
}
}
}
-
KARR-PureEstonian
- Private
- Posts: 6
- Joined: Thu Apr 14, 2005 5:39 pm
Thank you!!!
Thank You!!!
bdbodger
really big thank to you, really.
Now I got the point, before changed these same settings only for one smoke, but now I understand that I had to change?every smokegrenade settings.
One more question, if I want to ban or change (settings) weapon do I have to change only the files in the models/weapon directory.
I am a better player, than scripter
Thanks to all admins and for all forum people.
Going to have a party now
bdbodger
really big thank to you, really.
Now I got the point, before changed these same settings only for one smoke, but now I understand that I had to change?every smokegrenade settings.
One more question, if I want to ban or change (settings) weapon do I have to change only the files in the models/weapon directory.
I am a better player, than scripter
Thanks to all admins and for all forum people.
Going to have a party now
-
KARR-PureEstonian
- Private
- Posts: 6
- Joined: Thu Apr 14, 2005 5:39 pm
I don't know much about SH, but i do know a fair amount about .tik files
Pk1>>models>>fx>>M18_smoke_grenadeexplosion_base.txt
init
{
server
{
classname SmokeGrenade
notsolid
life 30// <-- I think its this. 2 = 1 second: 30 - 15 secs. Make this bigger for longer time
// angles 0 0 0
alwaysdraw
toss
gravity .8
setsize "-2 -2 -2" "2 2 2"
//
// !!! these values should mimic those of the client-side effect below !!!
// NOTE: no other values currently exist that can be set on the server, and no ranges are allowed
//
spawnrate 1.5
bouncefactor 0.8
spawnlife 10
scalerate 0.6
velocity 24 0 4
spin 0.133
offset 0 0 30
scale 51.2 // 0.4 * 128, where 128 is the size of the texture and 0.4 is the max scale
fadedelay 7
fadein 1
maxalpha .9
}
client
{
//
// !!! these values should be mimicked by the server-side simulation above !!!
//
originemitter initial
(
spawnrate 1.5
model smokegrenade_allied.spr
color 1 1 1
spritegridlighting
alpha 1
collision
bouncefactor 0.8
life 10
scalerate 0.7
velocity 30
randvelaxis crandom 4 crandom 4 4
spin 0.133
offset crandom 10 crandom 10 range 20 20
angles 0 0 random 360
avelocity 0 0 crandom 20
scalemin 0.2
scalemax 0.4
fadedelay 5
fadein 0.5
)
}
}
animations
{
$path models/projectiles/M18_smoke_grenade
idle M18_smoke_grenade.skc
{
client
{
entry sound smokegrenade_exp_start
entry loopsound smokegrenade_exp_loop
entry commanddelay 29.9 sound smokegrenade_exp_end// <-- sound, change this to the same value as above, but -0.1, and the sound will keep going until your smoke is through.
}
}
}
Hope this works
Pk1>>models>>fx>>M18_smoke_grenadeexplosion_base.txt
init
{
server
{
classname SmokeGrenade
notsolid
life 30// <-- I think its this. 2 = 1 second: 30 - 15 secs. Make this bigger for longer time
// angles 0 0 0
alwaysdraw
toss
gravity .8
setsize "-2 -2 -2" "2 2 2"
//
// !!! these values should mimic those of the client-side effect below !!!
// NOTE: no other values currently exist that can be set on the server, and no ranges are allowed
//
spawnrate 1.5
bouncefactor 0.8
spawnlife 10
scalerate 0.6
velocity 24 0 4
spin 0.133
offset 0 0 30
scale 51.2 // 0.4 * 128, where 128 is the size of the texture and 0.4 is the max scale
fadedelay 7
fadein 1
maxalpha .9
}
client
{
//
// !!! these values should be mimicked by the server-side simulation above !!!
//
originemitter initial
(
spawnrate 1.5
model smokegrenade_allied.spr
color 1 1 1
spritegridlighting
alpha 1
collision
bouncefactor 0.8
life 10
scalerate 0.7
velocity 30
randvelaxis crandom 4 crandom 4 4
spin 0.133
offset crandom 10 crandom 10 range 20 20
angles 0 0 random 360
avelocity 0 0 crandom 20
scalemin 0.2
scalemax 0.4
fadedelay 5
fadein 0.5
)
}
}
animations
{
$path models/projectiles/M18_smoke_grenade
idle M18_smoke_grenade.skc
{
client
{
entry sound smokegrenade_exp_start
entry loopsound smokegrenade_exp_loop
entry commanddelay 29.9 sound smokegrenade_exp_end// <-- sound, change this to the same value as above, but -0.1, and the sound will keep going until your smoke is through.
}
}
}
Hope this works


-
KARR-PureEstonian
- Private
- Posts: 6
- Joined: Thu Apr 14, 2005 5:39 pm
Oh Boy! Have to say Thanks again
.
The life thing worked, but are you sure 2=1 seconds, because I put
130=65 seconds , but mine lasted 140, it makes that 1=1(almost) seconds. Anyway thanks Mj, I guess I had found it myself after of weeks of searching:P
!!! these values should mimic those of the client-side effect below !!!
// NOTE: no other values currently exist that can be set on the server, and no ranges are allowed.
Does this warning applies to the lower section?
The life thing worked, but are you sure 2=1 seconds, because I put
130=65 seconds , but mine lasted 140, it makes that 1=1(almost) seconds. Anyway thanks Mj, I guess I had found it myself after of weeks of searching:P
!!! these values should mimic those of the client-side effect below !!!
// NOTE: no other values currently exist that can be set on the server, and no ranges are allowed.
Does this warning applies to the lower section?
!!! these values should mimic those of the client-side effect below !!!
= copy top to bottom
// NOTE: no other values currently exist that can be set on the server, and no ranges are allowed.
Dont worry about it, its just meaning (i think) that it cannot be set by cfg
If you need a rundown of all that stuff so you can mod it, shout.
= copy top to bottom
// NOTE: no other values currently exist that can be set on the server, and no ranges are allowed.
Dont worry about it, its just meaning (i think) that it cannot be set by cfg
If you need a rundown of all that stuff so you can mod it, shout.


-
KARR-PureEstonian
- Private
- Posts: 6
- Joined: Thu Apr 14, 2005 5:39 pm
Everything worked, tried with clients too and there were no errors.
You could make a sticky for newbies, put same things there like here.
For example changing ammo if you want to change something what pak file should you open etc. Out of questions now
This is the best and friendliest forum I have ever visited
You could make a sticky for newbies, put same things there like here.
For example changing ammo if you want to change something what pak file should you open etc. Out of questions now
This is the best and friendliest forum I have ever visited
