Adjusting Guns

Grab your favourite IDE and tinker with the innards of game engines

Adjusting Guns

Postby stukabomber44 on Thu Mar 31, 2011 12:55 am

Hey,

just a question Im trying to find an answer to. Is it possible to rename guns and their damage?? If so can someone please tell me how ??

Thanks!

SB44
stukabomber44
Regular
Regular
 
Joined: Sun Nov 14, 2010 7:33 pm
Location: Canada

Re: Adjusting Guns

Postby Dr. Delta on Thu Mar 31, 2011 2:03 am

In the txt files in /scripts/ in your mod (or valve game) folder, you can change the name, for example in 'weapon_pistol.txt' you can change
Code: Select all
"printname"   "#HL2_Pistol"

to what ever you want


^No, incorrect, it's different but I can't come up with it, I should know this and I knew it, but it's gone atm :\

Damage can be changed using the skill.cfg in your /cfg/ folder of your mod/game using the sk_plr_dmg_*weapon* for the player's gun and for enemy npc's sk_npc_smg_*weapon*.

Try using the Valve Developer Communitymore often, they have quite some info on almost anything.
User avatar
Dr. Delta
Veteran
Veteran
 
Joined: Thu Dec 27, 2007 1:18 pm
Location: People's Republic of Porygon

Re: Adjusting Guns

Postby Jman on Thu Mar 31, 2011 2:55 am

gamename_english.txt in the resource folder will do names, or just edit their weapon script to make it support only a single language.

For damage, if it's hl2, use the console commands such as sk_plr_dmg_weapon, if hl2mp based, the weapon scripts usually contain the damage setting.
User avatar
Jman
Veteran
Veteran
 
Joined: Wed Mar 30, 2005 11:01 pm

Re: Adjusting Guns

Postby Dr. Delta on Thu Mar 31, 2011 11:09 am

Jman wrote:For damage, if it's hl2, use the console commands such as sk_plr_dmg_weapon, if hl2mp based, the weapon scripts usually contain the damage setting.


Do you think using the console commands is better than changing the variables those commands get their value from?
User avatar
Dr. Delta
Veteran
Veteran
 
Joined: Thu Dec 27, 2007 1:18 pm
Location: People's Republic of Porygon

Re: Adjusting Guns

Postby stoopdapoop on Thu Apr 21, 2011 11:19 pm

this is a bit of a bump, but It really depends on how you're packaging your content.

If it's a map pack, then the console command is obviously the way to go, because it would be silly to make players overwrite their stock configs just so they can play a community map. but if it's a mod, then the cfg is the obvious choice because you won't have to reset it each time you play.
I'm Brown
Image
User avatar
stoopdapoop
Veteran
Veteran
 
Joined: Sun Aug 21, 2005 2:14 am
Location: Ann Arbor, MI

Re: Adjusting Guns

Postby Dr. Delta on Thu Apr 21, 2011 11:22 pm

stoopdapoop wrote:this is a bit of a bump, but It really depends on how you're packaging your content.

If it's a map pack, then the console command is obviously the way to go, because it would be silly to make players overwrite their stock configs just so they can play a community map. but if it's a mod, then the cfg is the obvious choice because you won't have to reset it each time you play.


Well you can't rename guns using console commands, afaik. :)
User avatar
Dr. Delta
Veteran
Veteran
 
Joined: Thu Dec 27, 2007 1:18 pm
Location: People's Republic of Porygon

Return to Programming

Who is online

Users browsing this forum: No registered users