Upvote Upvoted 2 Downvote Downvoted
Where can I find weapon script txt files?
posted in Customization
1
#1
0 Frags +

I need to edit the crosshairs for the new weapons and update the files for older weapons, where exactly can I find the weapon files? All I could find is ctx files that just show up as gibberish when converted

I need to edit the crosshairs for the new weapons and update the files for older weapons, where exactly can I find the weapon files? All I could find is ctx files that just show up as gibberish when converted
2
#2
6 Frags +

tf_weapon_rocketlauncher_fireball.txt - Flamethrower

WeaponData
{
	// Attributes Base.
	"printname"		"#TF_Weapon_RocketLauncher"
	"BuiltRightHanded"	"0"
	"weight"		"3"
	"WeaponType"		"primary"
	"ITEM_FLAG_NOITEMPICKUP" 	"1"

	// Primary Attributes.
	"Damage"		"90"
	"Range"			"0"
	"BulletsPerShot"	"1"
	"Spread"		"0.0"
	"PunchAngle"		"1.5"
	"TimeFireDelay"		"0.8"
	"TimeIdle"		"0.8"
	"TimeIdleEmpty"		"0.8"
	"TimeReloadStart"	"0.1"
	"TimeReload"		"0.83"
	"primary_ammo"		"TF_AMMO_PRIMARY"
	"ProjectileType"	"tf_projectile_balloffire"
	"HasTeamSkins_Viewmodel"	"1"

	// Secondary Attributes.
	"secondary_ammo"	"None"

	// Buckets.
	"bucket"		"0"
	"bucket_position"	"0"	

	"ExplosionEffect"		"ExplosionCore_wall"
	"ExplosionPlayerEffect"		"ExplosionCore_MidAir"
	"ExplosionWaterEffect"		"ExplosionCore_MidAir_underwater"

	"ExplosionSound"	"BaseExplosionEffect.Sound"

	// Muzzleflash
	"MuzzleFlashParticleEffect" "muzzle_dragons_fury"

	// Animation.
	//"viewmodel"     -viewmodel is now defined in _items_main.txt
	//"playermodel"   -playermodel is now defined in _items_main.txt
	"anim_prefix"		"gl"

	// Sounds.
	// Max of 16 per category (ie. max 16 "single_shot" sounds).
	SoundData
	{
		"single_shot"	"Weapon_RPG.Single"
		"double_shot"	"Weapon_FlameThrower.AirBurstAttack"
//		"reload"		"Weapon_RPG.WorldReload"
		"burst"			"Weapon_RPG.SingleCrit"	
	}

	// Weapon Sprite data is loaded by the Client DLL.
	TextureData
	{
		"weapon"
		{
				"file"		"sprites/bucket_rl"
				"x"		"0"
				"y"		"0"
				"width"		"200"
				"height"		"128"
		}
		"weapon_s"
		{	
				"file"		"sprites/bucket_rl"
				"x"		"0"
				"y"		"0"
				"width"		"200"
				"height"		"128"
		}
		"ammo"
		{
				"file"		"sprites/a_icons1"
				"x"		"55"
				"y"		"60"
				"width"		"73"
				"height"	"15"
		}
		"crosshair"
		{
				"file"	"vgui/replay/thumbnails/circle"
				"x"		"0"
				"y"		"0"
				"width"		"64"
				"height"	"64"
		}
		"autoaim"
		{
				"file"		"sprites/crosshairs"
				"x"		"0"
				"y"		"48"
				"width"		"24"
				"height"	"24"
		}
	}
}

tf_weapon_rocketpack.txt - Jetpack

	WeaponData
{
	// Attributes Base.
	"printname"			"#TF_Weapon_RocketPack"
	"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"
	clip_size				"-1"
	default_clip			"2"

	// Buckets.	
	"bucket"				"1"
	"bucket_position"		"0"

	// Model & Animation
	"viewmodel"			"models/weapons/c_models/c_rocketpack/c_rocketpack.mdl"
	"playermodel"			"models/weapons/c_models/c_rocketpack/c_rocketpack.mdl"

	// Sounds for the weapon. There is a max of 16 sounds per category (i.e. max 16 "single_shot" sounds)
	SoundData
	{
		"melee_miss"		"Weapon_FireAxe.Miss"
		"melee_hit"			"Weapon_FireAxe.HitFlesh"
		"melee_hit_world"	"Weapon_FireAxe.HitWorld"
		"burst"				"Weapon_FireAxe.MissCrit"
	}

	// Weapon Sprite data is loaded by the Client DLL.
	TextureData
	{
		"weapon"
		{
				"file"		"sprites/bucket_fireaxe"
				"x"		"0"
				"y"		"0"
				"width"		"200"
				"height"		"128"
		}
		"weapon_s"
		{	
				"file"		"sprites/bucket_fireaxe"
				"x"		"0"
				"y"		"0"
				"width"		"200"
				"height"		"128"
		}

		"ammo"
		{
				"file"		"sprites/a_icons1"
				"x"		"55"
				"y"		"60"
				"width"		"73"
				"height"	"15"
		}

		"crosshair"
		{
				"file"	"vgui/replay/thumbnails/sniper"
				"x"		""
				"y"		"0"
				"width"		"64"
				"height"	"64"
		}	

		"autoaim"
		{
				"file"		"sprites/crosshairs"
				"x"		"0"
				"y"		"48"
				"width"		"24"
				"height"	"24"
		}
	}
}
tf_weapon_rocketlauncher_fireball.txt - Flamethrower
[code]WeaponData
{
// Attributes Base.
"printname" "#TF_Weapon_RocketLauncher"
"BuiltRightHanded" "0"
"weight" "3"
"WeaponType" "primary"
"ITEM_FLAG_NOITEMPICKUP" "1"

// Primary Attributes.
"Damage" "90"
"Range" "0"
"BulletsPerShot" "1"
"Spread" "0.0"
"PunchAngle" "1.5"
"TimeFireDelay" "0.8"
"TimeIdle" "0.8"
"TimeIdleEmpty" "0.8"
"TimeReloadStart" "0.1"
"TimeReload" "0.83"
"primary_ammo" "TF_AMMO_PRIMARY"
"ProjectileType" "tf_projectile_balloffire"
"HasTeamSkins_Viewmodel" "1"

// Secondary Attributes.
"secondary_ammo" "None"

// Buckets.
"bucket" "0"
"bucket_position" "0"

"ExplosionEffect" "ExplosionCore_wall"
"ExplosionPlayerEffect" "ExplosionCore_MidAir"
"ExplosionWaterEffect" "ExplosionCore_MidAir_underwater"

"ExplosionSound" "BaseExplosionEffect.Sound"

// Muzzleflash
"MuzzleFlashParticleEffect" "muzzle_dragons_fury"

// Animation.
//"viewmodel" -viewmodel is now defined in _items_main.txt
//"playermodel" -playermodel is now defined in _items_main.txt
"anim_prefix" "gl"

// Sounds.
// Max of 16 per category (ie. max 16 "single_shot" sounds).
SoundData
{
"single_shot" "Weapon_RPG.Single"
"double_shot" "Weapon_FlameThrower.AirBurstAttack"
// "reload" "Weapon_RPG.WorldReload"
"burst" "Weapon_RPG.SingleCrit"
}

// Weapon Sprite data is loaded by the Client DLL.
TextureData
{
"weapon"
{
"file" "sprites/bucket_rl"
"x" "0"
"y" "0"
"width" "200"
"height" "128"
}
"weapon_s"
{
"file" "sprites/bucket_rl"
"x" "0"
"y" "0"
"width" "200"
"height" "128"
}
"ammo"
{
"file" "sprites/a_icons1"
"x" "55"
"y" "60"
"width" "73"
"height" "15"
}
"crosshair"
{
"file" "vgui/replay/thumbnails/circle"
"x" "0"
"y" "0"
"width" "64"
"height" "64"
}
"autoaim"
{
"file" "sprites/crosshairs"
"x" "0"
"y" "48"
"width" "24"
"height" "24"
}
}
}[/code]
tf_weapon_rocketpack.txt - Jetpack
[code] WeaponData
{
// Attributes Base.
"printname" "#TF_Weapon_RocketPack"
"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"
clip_size "-1"
default_clip "2"

// Buckets.
"bucket" "1"
"bucket_position" "0"

// Model & Animation
"viewmodel" "models/weapons/c_models/c_rocketpack/c_rocketpack.mdl"
"playermodel" "models/weapons/c_models/c_rocketpack/c_rocketpack.mdl"

// Sounds for the weapon. There is a max of 16 sounds per category (i.e. max 16 "single_shot" sounds)
SoundData
{
"melee_miss" "Weapon_FireAxe.Miss"
"melee_hit" "Weapon_FireAxe.HitFlesh"
"melee_hit_world" "Weapon_FireAxe.HitWorld"
"burst" "Weapon_FireAxe.MissCrit"
}

// Weapon Sprite data is loaded by the Client DLL.
TextureData
{
"weapon"
{
"file" "sprites/bucket_fireaxe"
"x" "0"
"y" "0"
"width" "200"
"height" "128"
}
"weapon_s"
{
"file" "sprites/bucket_fireaxe"
"x" "0"
"y" "0"
"width" "200"
"height" "128"
}

"ammo"
{
"file" "sprites/a_icons1"
"x" "55"
"y" "60"
"width" "73"
"height" "15"
}

"crosshair"
{
"file" "vgui/replay/thumbnails/sniper"
"x" ""
"y" "0"
"width" "64"
"height" "64"
}

"autoaim"
{
"file" "sprites/crosshairs"
"x" "0"
"y" "48"
"width" "24"
"height" "24"
}
}
}
[/code]
3
#3
2 Frags +

http://www.teamfortress.tv/35367/vtf-crosshair-pack/?page=6#159

http://www.teamfortress.tv/35367/vtf-crosshair-pack/?page=6#159
4
#4
11 Frags +

to get the files you have to extract them from tf/tf2_misc_dir.vpk using gfcscrape, in scripts you'll find compiled .ctx files, to decompile them use vice
using command prompt run:

cd [path to the folder with vice.exe]
vice.exe -d -x .txt -k E2NcUkG2 *.ctx

this will decompile all .ctx files in the folder, no need to compile them back since tf2 can handle .txt

to get the files you have to extract them from [b]tf/tf2_misc_dir.vpk[/b] using [url=http://nemesis.thewavelength.net/index.php?p=26]gfcscrape[/url], in scripts you'll find compiled .ctx files, to decompile them use [url=http://www8.zippyshare.com/v/YInhf1e5/file.html]vice[/url]
using command prompt run:
[code]
cd [path to the folder with vice.exe]
vice.exe -d -x .txt -k E2NcUkG2 *.ctx[/code]
this will decompile all .ctx files in the folder, no need to compile them back since tf2 can handle .txt
5
#5
1 Frags +

thank you for this

thank you for this
6
#6
2 Frags +
deguto get the files you have to extract them from tf/tf2_misc_dir.vpk using gfcscrape, in scripts you'll find compiled .ctx files, to decompile them use vice
using command prompt run:
cd [path to the folder with vice.exe]
vice.exe -d -x .txt -k E2NcUkG2 *.ctx
this will decompile all .ctx files in the folder, no need to compile them back since tf2 can handle .txt

So tl;dr use vice to convert ctx files? got it thanks

[quote=degu]to get the files you have to extract them from [b]tf/tf2_misc_dir.vpk[/b] using [url=http://nemesis.thewavelength.net/index.php?p=26]gfcscrape[/url], in scripts you'll find compiled .ctx files, to decompile them use [url=http://www8.zippyshare.com/v/YInhf1e5/file.html]vice[/url]
using command prompt run:
[code]
cd [path to the folder with vice.exe]
vice.exe -d -x .txt -k E2NcUkG2 *.ctx[/code]
this will decompile all .ctx files in the folder, no need to compile them back since tf2 can handle .txt[/quote]
So tl;dr use vice to convert ctx files? got it thanks
Please sign in through STEAM to post a comment.