Besides vfstool, or its equivalent, you'll need MeshConverter.exe. Before you'll scream - 'Where can I get it?', you can safely read - in the SEARCH button on this forum. Try Shai Hulud's posts.
What you'll want (but is not nessesary)
1. Official Modding Tools, by ALTAR Interactive. Most of them are useless for our task, but in doc directory you'll find lgwexport format description (no, it IS there). While these are for Aftermath, not Aftershock, model formats are compatible... to some extent.
2. Excelent Shai Hulud's Model Viewer. Again, using SEARCH really helps.
K, let's get this party started. For simplicty sake we'll use something simple - silencer.txt model file for... silencer (wonderful, isn't it?). Thing to note - this files are BINARIES, i.e. modifying them with Notepad, Notepad++, UltraEdit or ANY other TEXT editor is a BAD idea. Using MS Word is BAD and stupid idea.
That's where we'll need MeshConverter, since this tool is used for binary model - text model conversion.
As an end result, you'll get something like
CODE
#!TXT#MODEL#
MODEL "noname"
EXPORT_VERSION 5
SOURCE_FILE "#lgwsave#"
MATERIAL_LIST
MATERIAL 0 "ak47 _addons"
REQUIRED_TEXCOORDS 2 0 0
TEXTURE 0
FILE_NAME "Tactical/Textures/weapons/humans/9mm.dds"
U_WRAP V_WRAP W_CLAMP
MAG_FILTER LINEAR
MIN_FILTER LINEAR_MIPMAP_LINEAR
ANISO_LEVEL 0
MIPMAP_ON
IMMUTABLE
MODE MODULATE
END_OF_TEXTURE
TEXTURE 1
FILE_NAME "Tactical/Textures/weapons/humans/9mm_specular.dds"
U_WRAP V_WRAP W_CLAMP
MAG_FILTER LINEAR
MIN_FILTER LINEAR_MIPMAP_LINEAR
ANISO_LEVEL 0
MIPMAP_ON
IMMUTABLE
MODE MODULATE
END_OF_TEXTURE
BLENDMODE BM_NONE
ALPHATEST 0
PROGRAM
EFFECT "diffuseMap" ENABLED
EFFECT "glossMap" ENABLED
EFFECT "specular" ENABLED
PARAMETERS_BEGIN
PARAMETER
NAME "shininess"
SEMANTIC VALUE
TYPE FLOAT
SIZE 1
DATA 10
END_OF_PARAMETER
END_OF_PARAMETERS
END_OF_PROGRAM
END_OF_MATERIAL
END_OF_MATERIAL_LIST
MATERIAL_TABLE
MESH 0 USES 0
END_OF_MATERIAL_TABLE
HELPER "point-f"
TYPE 1
PIVOT 0.00251295 -0.999905 0.0135196 -0.0101927 0.00229558 0.0135254 0.999906 20.9619 -0.999994 -0.00248168 0.00232935 0 0 0 0 1
LINKINFO LINK_TYPE NORMAL
PARENT "silencer"
PIVOT 1 0 0 -0.0232849 0 1 0 10.1721 0 0 1 -0.0389931 0 0 0 1
END_OF_PARENT
END_OF_LINKINFO
END_OF_HELPER "point-f"
MESH "silencer_rifle"
FIXED_VERTEX_ATTRIBS 7 3 2 3 0 0 0 0
VERTS 60
1.21907 20.3547 -0.267831 0.832055 0.597496 -0.950035 -9.96886e-008 0.312142
...
; total 60 rows
...
1.97674 1.26635 -3.50309 0.97213 0.978347 0.5 -1.48721e-008 -0.866025
GENERIC_ATTRIBS
GENERIC_ATTRIBS_END
PRIMITIVE_GEOMETRY_GROUPS 1
GROUP 0 TYPE_LIST
COUNT 162
0 1 2 2 3 0 4 0 3 3 5 4 6 4 5 5 7 6 8 6 7 7 9 8 10 8 9 9 11 10 12 13 14 15 14 13 13 16 15 17 15 16 16 18 17 19 17 18 18 20 19 21 19 20 20 22 21 22 12 21 14 21 12 23 24 25 25 26 23 27 23 26 26 28 27 29 27 28 28 30 29 31 29 30 30 32 31 33 31 32 32 34 33 35 36 37 36 38 37 39 37 38 38 40 39 41 39 40 40 42 41 43 41 42 42 44 43 45 43 44 44 35 45 37 45 35 46 47 48 48 49 46 50 46 49 49 51 50 52 50 51 51 53 52 54 52 53 53 55 54 56 54 55 55 57 56 58 56 57 57 59 58
END_OF_GROUP 0
END_OF_MESH "silencer_rifle"
END_OF_MODEL
MODEL "noname"
EXPORT_VERSION 5
SOURCE_FILE "#lgwsave#"
MATERIAL_LIST
MATERIAL 0 "ak47 _addons"
REQUIRED_TEXCOORDS 2 0 0
TEXTURE 0
FILE_NAME "Tactical/Textures/weapons/humans/9mm.dds"
U_WRAP V_WRAP W_CLAMP
MAG_FILTER LINEAR
MIN_FILTER LINEAR_MIPMAP_LINEAR
ANISO_LEVEL 0
MIPMAP_ON
IMMUTABLE
MODE MODULATE
END_OF_TEXTURE
TEXTURE 1
FILE_NAME "Tactical/Textures/weapons/humans/9mm_specular.dds"
U_WRAP V_WRAP W_CLAMP
MAG_FILTER LINEAR
MIN_FILTER LINEAR_MIPMAP_LINEAR
ANISO_LEVEL 0
MIPMAP_ON
IMMUTABLE
MODE MODULATE
END_OF_TEXTURE
BLENDMODE BM_NONE
ALPHATEST 0
PROGRAM
EFFECT "diffuseMap" ENABLED
EFFECT "glossMap" ENABLED
EFFECT "specular" ENABLED
PARAMETERS_BEGIN
PARAMETER
NAME "shininess"
SEMANTIC VALUE
TYPE FLOAT
SIZE 1
DATA 10
END_OF_PARAMETER
END_OF_PARAMETERS
END_OF_PROGRAM
END_OF_MATERIAL
END_OF_MATERIAL_LIST
MATERIAL_TABLE
MESH 0 USES 0
END_OF_MATERIAL_TABLE
HELPER "point-f"
TYPE 1
PIVOT 0.00251295 -0.999905 0.0135196 -0.0101927 0.00229558 0.0135254 0.999906 20.9619 -0.999994 -0.00248168 0.00232935 0 0 0 0 1
LINKINFO LINK_TYPE NORMAL
PARENT "silencer"
PIVOT 1 0 0 -0.0232849 0 1 0 10.1721 0 0 1 -0.0389931 0 0 0 1
END_OF_PARENT
END_OF_LINKINFO
END_OF_HELPER "point-f"
MESH "silencer_rifle"
FIXED_VERTEX_ATTRIBS 7 3 2 3 0 0 0 0
VERTS 60
1.21907 20.3547 -0.267831 0.832055 0.597496 -0.950035 -9.96886e-008 0.312142
...
; total 60 rows
...
1.97674 1.26635 -3.50309 0.97213 0.978347 0.5 -1.48721e-008 -0.866025
GENERIC_ATTRIBS
GENERIC_ATTRIBS_END
PRIMITIVE_GEOMETRY_GROUPS 1
GROUP 0 TYPE_LIST
COUNT 162
0 1 2 2 3 0 4 0 3 3 5 4 6 4 5 5 7 6 8 6 7 7 9 8 10 8 9 9 11 10 12 13 14 15 14 13 13 16 15 17 15 16 16 18 17 19 17 18 18 20 19 21 19 20 20 22 21 22 12 21 14 21 12 23 24 25 25 26 23 27 23 26 26 28 27 29 27 28 28 30 29 31 29 30 30 32 31 33 31 32 32 34 33 35 36 37 36 38 37 39 37 38 38 40 39 41 39 40 40 42 41 43 41 42 42 44 43 45 43 44 44 35 45 37 45 35 46 47 48 48 49 46 50 46 49 49 51 50 52 50 51 51 53 52 54 52 53 53 55 54 56 54 55 55 57 56 58 56 57 57 59 58
END_OF_GROUP 0
END_OF_MESH "silencer_rifle"
END_OF_MODEL
To make long story short,
CODE
TEXTURE 0
FILE_NAME "Tactical/Textures/weapons/humans/9mm.dds"
FILE_NAME "Tactical/Textures/weapons/humans/9mm.dds"
show us texture used (or specular map, or normal map, or else)
CODE
MATERIAL_TABLE
MESH 0 USES 0
END_OF_MATERIAL_TABLE
MESH 0 USES 0
END_OF_MATERIAL_TABLE
determines which mesh uses which 'material'
CODE
HELPER "point-f"
determines either link points (such as scope, underbarrel, muzzle), or point of fire.
CODE
MESH "..."
...
END_OF_MESH "..."
...
END_OF_MESH "..."
Is the beginning and end of every mesh.
CODE
1.21907 20.3547 -0.267831 0.832055 0.597496 -0.950035 -9.96886e-008 0.312142
First 3 numbers are x, y, z coordinates for vertex, 4th and 5th are texture coordinates, and last 3 determine normals.
CODE
COUNT 162
0 1 2 2 3 0 4 0 3 3 5 4 6 4 5 5 7 6 8 6 7 7 9 8 10 8 9 9 11 10 12 13 14 15 ...
0 1 2 2 3 0 4 0 3 3 5 4 6 4 5 5 7 6 8 6 7 7 9 8 10 8 9 9 11 10 12 13 14 15 ...
To quote model.html from Official Modding Tools, 'The data of a geometry group consists of COUNT integers which are indices of vertices. The way indices forms triangles depends on the geometry group type, TYPE_LIST means that every three indices forms a triangle'.
If model file defines muliple meshes, they do not depent on each other.
Once you'll edit things you'll want, be them vertex coordinates, linkpoint PIVOT's, texture paths or polygons count, just convert back your text file to binary, feed'em to Model Viewer (or game), and watch the result.
Example - adding 10 to second float in every row of VERTS group moves silencer far from barrel, such as
CODE
before
SSSSSSS
WWWWWSSSSSS
SSSSSSS
after
SSSSSSS
WWWWW SSSSSS
SSSSSSS
SSSSSSS
WWWWWSSSSSS
SSSSSSS
after
SSSSSSS
WWWWW SSSSSS
SSSSSSS
To answer some questions before they asked:
1. All above is compiled information from public sources. Namely, this forum and Official Modding Tools documentation. Since I don't have access to this super-secret wiki for Aftershock modders (I'm too lazy
2. And no, you can not edit model files with 3DMax. Only ALTAR can do it.
3. And surely I can not help you if you're unable to launch MeshConverter with correct command line options, or install .NET Framework for Model Viewer to work.
4. And yes, MeshConverter assumes that you place dds files in the same relative path you wrote in model file. Why this thing needs them is a mystery to me.
5. And yes, that means Aftermath models can be converted to Aftershock format. It is just now worth it, IMO, due to low polygon count (to compare, Aftermath AK47 model has 96 polygons, and Aftershock AK47 model has 488).
Comments, suggestions and discussion are welcome.