[b]if you're coming here because someone bumped this I don't think this works anymore.[/b]
Here's a simple way of doing things.
Foreword: Your own server only, doesn't work for others. It uses .ctx files which are serverside.
What you need:
[url=http://nemesis.thewavelength.net/index.php?p=26]GCFScape[/url]
[url=http://www.mediafire.com/?sharekey=d6e96cfb3600ee636b21be4093fab7ace04e75f6e8ebb871]CTXHack[/url], link by Onirik. **SHOULD WORK WITH UNLOCKS!!**
Step 1: Navigate to your Steam folder.
Click Steamapps. Find team fortress 2 content.gcf, and open it.
Go to tf, then scripts. Find the weapon you want to mod. They are named oddly (some).
Don't attempt the unlocks, if it isn't something normal (tf_bat, tf_shotgun_hwg, etc) then don't try it. I don't know what can happen.
Extract it to a folder with CTXHack. Out of the .GCF
[highlight]:siren: I don't know if this is me, but I can't mod Unlocks. it comes up as funny chars. So don't try them. [/highlight]:siren:
Open up CTXHack, then drag & drop your weapon .CTX file.
Make sure it is set to "Decode"
Decode them. Open it in Notepad.
Step 2: Editing!!1
You should see a bunch of stuff. I'll use the Minigun for an example.
[code]WeaponData
{
// Attributes Base.
"printname" "#TF_Weapon_Minigun"
"BuiltRightHanded" "0"
"weight" "3"
"WeaponType" "primary"
"ITEM_FLAG_NOITEMPICKUP" "1"
// Attributes TF.
"Damage" "9"
"Range" "8192"
"BulletsPerShot" "4"
"Spread" "0.08"
"TimeFireDelay" "0.1"
"ProjectileType" "projectile_bullet"
"BrassModel" "models/weapons/shells/shell_minigun.mdl"
"UseRapidFireCrits" "1"
"TracerEffect" "bullet_tracer01"
// Ammo & Clip.
"primary_ammo" "TF_AMMO_PRIMARY"
"secondary_ammo" "TF_AMMO_PRIMARY"
clip_size -1
// Buckets.
"bucket" "0"
"bucket_position" "0"
// Animation.
"viewmodel" "models/weapons/v_models/v_minigun_heavy.mdl"
"playermodel" "models/weapons/w_models/w_minigun.mdl"
"anim_prefix" "ac"
// Muzzleflash
"MuzzleFlashParticleEffect" "muzzle_minigun"
// Sounds.
// Max of 16 per category (ie. max 16 "single_shot" sounds).
SoundData
{
"reload" "Weapon_Minigun.Reload"
"empty" "Weapon_Minigun.ClipEmpty"
"double_shot" "Weapon_Minigun.Fire"
"special1" "Weapon_Minigun.WindUp"
"special2" "Weapon_Minigun.WindDown"
"special3" "Weapon_Minigun.Spin"
"burst" "Weapon_Minigun.FireCrit"
}
// Weapon Sprite data is loaded by the Client DLL.
TextureData
{
"weapon"
{
"file" "sprites/bucket_minigun"
"x" "0"
"y" "0"
"width" "200"
"height" "128"
}
"weapon_s"
{
"file" "sprites/bucket_minigun"
"x" "0"
"y" "0"
"width" "200"
"height" "128"
}
"ammo"
{
"file" "sprites/a_icons1"
"x" "55"
"y" "60"
"width" "73"
"height" "15"
}
"crosshair"
{
"file" "sprites/crosshairs"
"x" "64"
"y" "64"
"width" "64"
"height" "64"
}
"autoaim"
{
"file" "sprites/crosshairs"
"x" "0"
"y" "48"
"width" "24"
"height" "24"
}
}
}
[/code]
Now, unless you know what you are doing, DO NOT MODIFY ANYTHING BUT Attributes TF. and Ammo section!
[code] // Attributes TF.
"Damage" "9"
"Range" "8192"
"BulletsPerShot" "4"
"Spread" "0.08"
"TimeFireDelay" "0.1"
"ProjectileType" "projectile_bullet"
"BrassModel" "models/weapons/shells/shell_minigun.mdl"
"UseRapidFireCrits" "1"
"TracerEffect" "bullet_tracer01"
// Ammo & Clip.
"primary_ammo" "TF_AMMO_PRIMARY"
"secondary_ammo" "TF_AMMO_PRIMARY"
clip_size -1
[/code]
Here, I'm going to say, make it, shoot rockets. Here's how.
Change "ProjectileType" "projectile_bullet" to "ProjectileType" "projectile_rocket".
Save it. Now, you want MORE than 200 ammo, right? Right? Well, the minigun is a douche like that, because you probably can't. I'll show you how in other weapons.
Now, you have your notepad file with edited Minigun stats. Save a copy of the OLD .CTX, and rename it to minigun_OLD.ctx so you know for future editing.
Now, pull out your CTXHack and rag and drop only with ENCODE on this time. Get that new .CTX file, and drag it into "steam/steamapps/USERNAME/team fortress 2/tf/scripts".
Load up your game and enjoy! Create Server, does NOT work in other servers unless they have the same
script, or whatever .CTX they have will be used!
Oh, here's a Grenade launcher. I'll show how to modify ammo here.
[code]// Ammo & Clip.
"primary_ammo" "TF_AMMO_PRIMARY"
"secondary_ammo" "None"
"clip_size" "99999999"
"default_clip" "99999999"
"ProjectileType" "projectile_pipe"[/code]
Here's my modded one like that seen in the "What happens when you give demos modded nade launchers? video. This is ammo count. Change the "99999999"s into whatever.
Projectile List for editing:
[b]projectile_bullet
projectile_rocket
projectile_pipebomb [/b](Normal bombs)[b]
projectile_pipebomb_remote[/b] (Sticky bombs)[b]
projectile_syringe
projectile_flare
projectile_sentryrocket
projectile_arrow
projectile_jar[/b]
last but not least: projectile_ball. Not sure. Will test.
Also, according to others, projectile_science is the Octopus Gun. Someone test, too!
All I know of for now. I think there's a projectile for the ball, but seeing as I can't edit sandman, I don't know.
If you've got stuff to add, by all means POST IT!
[b]Saza's Side Notes[/b]
When changing fire rates, don't make them 0.0. 0.00000001 and stuff like that. I recommend for a minigun type weapon 0.1
Don't edit anything you don't know.
Don't edit sounds/animations/models. Unless it's still the same classes, I think.
[b]What we've learned from others![/b]
Concerning unlocks:
"Yeah, if you open up the unlock weapons, all you have to do is open it in Notepad++ and it should work.
(At least it works for me when I do that)"
Thanks, tylizzle!
Also, more about the Unlocks thing; they use different encryption codes.
Awesome, Thanks for clearing this up!
No prob :D
Happy weapon modding!
Also, With this, Could i create my own weapon, And see it in my backpack, You could copy the ctx and change the name?
Well, you'd have to modify an existing one in game_items which I don't know how. There's things about it out there.
I don't think you can create brand new weapons. Maybe try addig the respective things to game_items which MAY WORK, but ONLY DO IT IF YOU KNOW WHAT YOU'RE DOING.
If you're fairly new to this stuff don't try it.
I was wondering if i could try to do this, I could Re-Make the beta stuff if its possible!
I was literally just about to google this, thank you for the guide, Rated Hearts.
Yeah, if you open up the unlock weapons, all you have to do is open it in Notepad++ and it should work.
(At least it works for me when I do that)
Ha, I already knew about all this, but everything is so well-explained and clear. Good job.
Thanks :D
Also; adding the notepad++ thing.
[url=http://www.mediafire.com/?sharekey=d6e96cfb3600ee636b21be4093fab7ace04e75f6e8ebb871]Here's a working link for ctxhack[/url]
Legit, I just downloaded it and tried on the sandman's ctx.
Dug up couple more projectiles.
projectile_flare
projectile_sentryrocket
And this came up when I killed a bot with Sandman secondary:
[code][KotSC] Polly killed Bot01 with ball.[/code]
So I guess the name for the ball is just "ball"
So how do you edit the damage done, the in the pistol's text file it says it it fifteen, I replaced the bullets with rockets, and I would like the damage to be correct.
[QUOTE=Man in the Moon;21222026]So how do you edit the damage done, the in the pistol's text file it says it it fifteen, I replaced the bullets with rockets, and I would like the damage to be correct.[/QUOTE]
Change 15 to whatever.
Also: Shotgun Rockets don't work. I've tried.
[editline]10:50PM[/editline]
[QUOTE=Onirik;21221806][url=http://www.mediafire.com/?sharekey=d6e96cfb3600ee636b21be4093fab7ace04e75f6e8ebb871]Here's a working link for ctxhack[/url]
Legit, I just downloaded it and tried on the sandman's ctx.[/QUOTE]
Still comes up with the characters that are weird.
Dunno man.
[QUOTE=Saza;21222557]
Still comes up with the characters that are weird.
Dunno man.[/QUOTE]
That's what I get with the bat, and I believe this is a perfectly fine ctx. Maybe you've edited it too much or something, I always take them straight from the gcf to start all over again, I never edit the ctxs I've already edited.
[code]WeaponData
{
// Attributes Base.
"printname" "#TF_Weapon_Bat"
"BuiltRightHanded" "0"
"MeleeWeapon" "1"
"weight" "1"
"WeaponType" "melee"
"ITEM_FLAG_NOITEMPICKUP" "1"
// Attributes TF.
"Damage" "35"
"TimeFireDelay" "0.5"
"TimeIdle" "5.0"
// Ammo & Clip
"primary_ammo" "TF_AMMO_GRENADES1"
"secondary_ammo" "None"
// Buckets.
"bucket" "2"
"bucket_position" "0"
// Model & Animation
"viewmodel" "models/weapons/v_models/v_bat_scout.mdl"
"playermodel" "models/weapons/w_models/w_bat.mdl"
"anim_prefix" "bat"
// Sounds for the weapon. There is a max of 16 sounds per category (i.e. max 16 "single_shot" sounds)
SoundData
{
"melee_miss" "Weapon_Bat.Miss"
"melee_hit" "Weapon_BaseballBat.HitFlesh"
"melee_hit_world" "Weapon_BaseballBat.HitWorld"
"burst" "Weapon_Bat.MissCrit"
"special1" "Weapon_Baseball.HitWorld"
"special2" "Weapon_BaseballBat.HitBall"
}
// Weapon Sprite data is loaded by the Client DLL.
TextureData
{
"weapon"
{
"file" "sprites/bucket_bat_red"
"x" "0"
"y" "0"
"width" "200"
"height" "128"
}
"weapon_s"
{
"file" "sprites/bucket_bat_blue"
"x" "0"
"y" "0"
"width" "200"
"height" "128"
}
"ammo"
{
"file" "sprites/a_icons1"
"x" "55"
"y" "60"
"width" "73"
"height" "15"
}
"crosshair"
{
"file" "sprites/crosshairs"
"x" "32"
"y" "32"
"width" "32"
"height" "32"
}
"autoaim"
{
"file" "sprites/crosshairs"
"x" "0"
"y" "48"
"width" "24"
"height" "24"
}
}
}
[/code]
[QUOTE=Onirik;21222763]
code[/quote]
-snip-
That's the reg. bat.
Yeah, my bad, I wrote sandman, but I was talking about the regular bat.
I hope you're an organ donor cause I just let you have another heart.
Thank's a bundle!
What if I wanted a minigun that fired Jarate.
The site for gcfscape won't work... Someone mind uploading it to filesmelt?
[editline]05:18AM[/editline]
I found it in my bitcomet directory, gonna upload it since that file is down.
[editline]05:19AM[/editline]
[url]http://filesmelt.com/dl/gcfscape1751.exe[/url]
There you go. :buddy:
I thought this thread would be about how to attach silencers and scopes... :smith:
How would I do this for Half Life ? Because I tried the same concept and could only change ammo.
Really helpful btw thanks !
I did this slightly back when I decided to fuck up my TF2, but mostly I played around with items_game.ctx, mainly changing class limitations so the scout could use nearly everything. I even tried to make my own item (a chargin' targe that increased your health but reduced your speed), but it didn't show up in game.
Now what would be interesting is if we could manipulate the game to modify weapons on the fly (and it's possible, I think one of _Kilburn's friends did it in a sourcemod plugin) and then give those specific modifications to admins for use on their server.
"Melon's BanHammer, level 9000 Homewrecker. Does 1200% More Damage, Adds 6000% More health to wearer."
So you want to rip of my thread title? :v:
[QUOTE=Campin Carl;21226648]So you want to rip of my thread title? :v:[/QUOTE]
Lmao Campin :v:
[QUOTE=BlackWind;21227259]Lmao Campin :v:[/QUOTE]
You are banished to the confines of failure.
That wasn't funny. :colbert:
As I read this topic someone said that the Sandman Ball was just "ball" for a projectile type, so I whipped up a ctx hack of a Flare Gun that shoots Sandman balls. All I did was change "projectile_flare" into "ball".
Link:
[url]http://www.mediafire.com/?mzbmdymfwe3[/url]
This is untested. If someone can test it and make a video of it that would be great.
[QUOTE=Saza;21221018]I don't know if this is me, but I can't mod Unlocks. it comes up as funny chars that look Chinese/Japanese/Asian. So don't try them.[/QUOTE]
If I remember right, unlocks use a different encryption key. I remember I had to try a few different programs before I gave up and decrypted them with vice.
What number do i need to change to increase the fire and reload speed? Or a rockets speed, How do i change that?
Sorry, you need to Log In to post a reply to this thread.