How put a skin on Portal Gun?
Quote from Jo-chan on April 8, 2014, 8:05 pmAaaaand... Don't work...
Well... You have any skin for Portal Gun like that? Then make the Portal Gun clear? And one it work, please
Aaaaand... Don't work...
Well... You have any skin for Portal Gun like that? Then make the Portal Gun clear? And one it work, please

Quote from josepezdj on April 9, 2014, 4:06 amThat on Gamebanana seems to be the old method of editing the pack01_dir.VPK file on Notepad++ to make it point to different portalgun's material files. This method could work out IF done correctly. The basic idea is to have all your portalgun files with one letter changed (in this case it's 'c_portalgun' instead of the usual 'v_portalgun' name of the viewmodel's file) into a local materials/weapons/v_models/v_portalguun folder, and to edit the pak01_dir.VPK to locate and change ALL 'v_portalgun' entries by 'c_portalgun'.
And I'm not so sure that the guy who posted those skins on Gamebanana made it correctly:
On the other hand, for God's sake, don't download and try to use anyone's pak01_dir.VPK file!! >.< If you want to use this method, just do it yourself. Edit your own pak01_dir.VPK file, and bare in mind you will lose any change after verifying your local files cache...
Take a look to Sickle's tutorial on how to reskin your portalgun.
What I personally do is to have an hexed portalgun model somewhere under my /models folder that points to my custom textures. Then I edit the weapon_portalgun.txt file (located into the portal 2/portal/scripts folder) to include the path to my model:
- Code: Select all
// PortalgunWeaponData
{
// Weapon data is loaded by both the Game and Client DLLs.
"printname" "#Portal_Portalgun"
"viewmodel" "models/weapons/v_portalgun.mdl"
"playermodel" "models/weapons/w_portalgun.mdl"
"anim_prefix" "portalgun"
"bucket" "0"
"bucket_position" "2""clip_size" "1"
"primary_ammo" "None"
"secondary_ammo" "None""weight" "4"
"item_flags" "0"
"damage" "9"
"autoswitchto" "1"
// Sounds for the weapon. There is a max of 16 sounds per category (i.e. max 16 "single_shot" sounds)
SoundData
{
"single_shot" "Weapon_Portalgun.fire_blue"
"double_shot" "Weapon_Portalgun.fire_red"// NPC SECTION
"single_shot_npc" "Weapon_Portalgun.fire_blue_npc"
"double_shot_npc" "Weapon_Portalgun.fire_red_npc"
}// Weapon Sprite data is loaded by the Client DLL.
TextureData
{
"weapon"
{
"font" "WeaponIcons"
"character" "C"
}
"weapon_s"
{
"font" "WeaponIconsSelected"
"character" "C"
}
"ammo"
{
"font" "WeaponIcons"
"character" "M"
}
"crosshair"
{
"font" "Crosshairs"
"character" "."
}
"autoaim"
{
"file" "sprites/crosshairs"
"x" "0"
"y" "48"
"width" "24"
"height" "24"
}
}
}
That on Gamebanana seems to be the old method of editing the pack01_dir.VPK file on Notepad++ to make it point to different portalgun's material files. This method could work out IF done correctly. The basic idea is to have all your portalgun files with one letter changed (in this case it's 'c_portalgun' instead of the usual 'v_portalgun' name of the viewmodel's file) into a local materials/weapons/v_models/v_portalguun folder, and to edit the pak01_dir.VPK to locate and change ALL 'v_portalgun' entries by 'c_portalgun'.
And I'm not so sure that the guy who posted those skins on Gamebanana made it correctly:
On the other hand, for God's sake, don't download and try to use anyone's pak01_dir.VPK file!! >.< If you want to use this method, just do it yourself. Edit your own pak01_dir.VPK file, and bare in mind you will lose any change after verifying your local files cache...
Take a look to Sickle's tutorial on how to reskin your portalgun.
What I personally do is to have an hexed portalgun model somewhere under my /models folder that points to my custom textures. Then I edit the weapon_portalgun.txt file (located into the portal 2/portal/scripts folder) to include the path to my model:
- Code: Select all
// PortalgunWeaponData
{
// Weapon data is loaded by both the Game and Client DLLs.
"printname" "#Portal_Portalgun"
"viewmodel" "models/weapons/v_portalgun.mdl"
"playermodel" "models/weapons/w_portalgun.mdl"
"anim_prefix" "portalgun"
"bucket" "0"
"bucket_position" "2""clip_size" "1"
"primary_ammo" "None"
"secondary_ammo" "None""weight" "4"
"item_flags" "0"
"damage" "9"
"autoswitchto" "1"
// Sounds for the weapon. There is a max of 16 sounds per category (i.e. max 16 "single_shot" sounds)
SoundData
{
"single_shot" "Weapon_Portalgun.fire_blue"
"double_shot" "Weapon_Portalgun.fire_red"// NPC SECTION
"single_shot_npc" "Weapon_Portalgun.fire_blue_npc"
"double_shot_npc" "Weapon_Portalgun.fire_red_npc"
}// Weapon Sprite data is loaded by the Client DLL.
TextureData
{
"weapon"
{
"font" "WeaponIcons"
"character" "C"
}
"weapon_s"
{
"font" "WeaponIconsSelected"
"character" "C"
}
"ammo"
{
"font" "WeaponIcons"
"character" "M"
}
"crosshair"
{
"font" "Crosshairs"
"character" "."
}
"autoaim"
{
"file" "sprites/crosshairs"
"x" "0"
"y" "48"
"width" "24"
"height" "24"
}
}
}
Quote from Jo-chan on April 9, 2014, 4:40 pmOk, i follow the tutorial... and don't work! This is never work?!?!? I try put then into a folder named portal2_dlc1 but... don't work , and i don't have any file named VPK.exe, so... I'll left the original Portal Gun.... I don't know if i don't make right, if it's the game... So.... Really thanks.
PS. if somebody have a skin file working to test, because i give up this skin...
Ok, i follow the tutorial... and don't work! This is never work?!?!? I try put then into a folder named portal2_dlc1 but... don't work , and i don't have any file named VPK.exe, so... I'll left the original Portal Gun.... I don't know if i don't make right, if it's the game... So.... Really thanks.
PS. if somebody have a skin file working to test, because i give up this skin...
Quote from greykarel on April 10, 2014, 12:48 pmApparently, if you don't have VPK.exe in your .../Steam/steamapps/common/portal 2/bin folder, you don't have Portal 2 Authoring Tools installed on your PC. If you are not going to deal with hammer mapping don't bother to install it.
I attached my file for you to test. Put the folder from the archive in .../Steam/steamapps/common/portal 2. If it works give me your file and I'll pack it for you.
Apparently, if you don't have VPK.exe in your .../Steam/steamapps/common/portal 2/bin folder, you don't have Portal 2 Authoring Tools installed on your PC. If you are not going to deal with hammer mapping don't bother to install it.
I attached my file for you to test. Put the folder from the archive in .../Steam/steamapps/common/portal 2. If it works give me your file and I'll pack it for you.