[Tutorial] Editing Valve's 7.5 format .VTF files
Error loading VTF texture:
Error:
File version 7.5 does not match 7.0 to 7.4
Here is how to open and edit one:
- Using GFCScape (or a similar program) extract the materials you want out of the Pak01_dir.vpk- Open your texture in a Hex editor (you can find some free ones on the net. A good example is PspPad)- We want to edit the number 05 in the first line into 04 so then your VTF editing program can read the file. The number should be in the 8th hex digit value.
E.G. So you change:
Into:

DO NOT SAVE OVER VALVE'S ORIGINAL FILE IN THE VPK. CREATE A SEPARATE FILE UNDER A DIFFERENT NAME.- Edit to your hearts' content.
Until VTFedit and different plugins are updated this will be the only method to edit custom textures (other than using Valve's console texture convertor).
...except the newest versions of VTFEdit and the PDN VTF plugin can open, edit, and save VTF 7.5 files.
Yeah, Nem's site is confusing. Grab a copy of the latest VTFEdit here:
walropodes wrote:
Yeah, Nem's site is confusing. Grab a copy of the latest VTFEdit here.
I downloaded the newest version a day ago and it didn't work. Gosh I feel stupid now :S
For those who are as lazy as
and have problems with Nems newest version: I whipped a program together, which does the Binary work stuff.
Donload: #### ChickenMobile did not approve of my program.
VTFer.exe
Enjoy.
Edit: It reqires Microsoft .Net Framework 4
Discofix wrote:
You saved my Year!For those who are as lazy as
and have problems with Nems newest version: I whipped a program together, which does the Binary work stuff.
Download:
VTFer.exeEnjoy.
Edit: It reqires Microsoft .Net Framework 4
I don't like the look of this post. People don't download the link.
ChickenMobile wrote:
I don't like the look of this post. People don't download the link.
Well... new user with only one post and a link to a extern file-hoster for a .exe
I checked it with virustotal.com:
https://www.virustotal.com/de/file/6f5f ... 370167217/
Analysis and File details are looking normal and code size is in range for such a small prog.
Also, I read the post yesterday and it didn't include the link...
Anyways, no viruses/malware/spyware with Smart Security 6.0 and Avast 8.0.... Hmmm... maybe other kind of dangerous thinghie?
The old version of vtfedit works, but when the version error shows up. And the latest version just dont start (Side by side problem). I also installed the visual c++ service pack (64 bit). Still doesnt work :/
EDIT: Finally Works. @Haggis If you have a 64 bit system, just download the archived version of vtfedit and run the 32 bit .exe (x86)
I don't quite know if how I can prove it is safe.At least here is the Source-code and if anyone wants the C# Project, send me a PM. I know I should have used the simple URL method.
Code
||using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
bool did = false;
private void Form1_Load(object sender, EventArgs e)
{
if (MessageBox.Show("The User (you) is responsable for any corrupted, damaged or lost data.\r\nThe Creator of this Program is NOT responsable for any corrupted, damaged or lost data.\r\nDo you accept?\r\nTIPP: Always make backups!", "Terms of Servive", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.No)
{
MessageBox.Show("\r\n\r\nBecause you didn't accept, I may not give you access to this program :sad:\r\n\r\n", "No Access...", MessageBoxButtons.OK, MessageBoxIcon.Error);
Application.Exit();
}
else
{
this.AllowDrop = true;
this.DragEnter += new DragEventHandler(Form1_DragEnter);
this.DragDrop += new DragEventHandler(Form1_DragDrop);
}
}
void Form1_DragEnter(object sender, DragEventArgs e)
{
if (e.Data.GetDataPresent(DataFormats.FileDrop))
{
e.Effect = DragDropEffects.Copy;
did = false;
lbs.Items.Clear();
lba.Items.Clear();
lbe.Items.Clear();
TopMost = true;
Activate();
}
else
e.Effect = DragDropEffects.None;
}
private void Form1_DragDrop(object sender, DragEventArgs e)
{
int i = 0;
string[] fileList = (string[])e.Data.GetData(DataFormats.FileDrop, false);
if (!did)
{
while (i < fileList.Length)
{
byte[] text = File.ReadAllBytes(fileList*);
switch (text[8])
{
case 5:
text[8] = 4;
File.WriteAllBytes(fileList*, text);
lbs.Items.Add(fileList*);
break;
case 4:
lba.Items.Add(fileList*);
break;
default:
lbe.Items.Add(fileList*);
break;
}
i++;
}
MessageBox.Show("Finished", "Finished Converting!", MessageBoxButtons.OK, MessageBoxIcon.Information);
TopMost = false;
did = true;
}
}
}
}||
Sorry for that.
Only that I don't find a good catagory.