Mesh Format Uses: CCMESH vs CSMESH

You can rebuild the asm file or simply hack it to look for csmesh instead of ccmesh. I'm pretty sure it is animation. A smesh is a static mesh(the c prefix is just for the cpu memory portion of the file and a g prefix is for the gpu memory). A cmesh is a character mesh, which would be used on a weapon so it could animate.
 
You can rebuild the asm file or simply hack it to look for csmesh instead of ccmesh. I'm pretty sure it is animation. A smesh is a static mesh(the c prefix is just for the cpu memory portion of the file and a g prefix is for the gpu memory). A cmesh is a character mesh, which would be used on a weapon so it could animate.
How would one go about rebuilding an asm file or 'hack' it, what tools would I need for that

Edit: iv done some looking around didnt find much in end I just used a hex editor to open it
Iv found a way to change the smesh into a cmesh in the asm but does the gmesh need changing as I cant find it or does the asm only call on the cmesh and smesh and the gmesh works in relation to the c & s mesh's and not the asm, kinda like how the cpeg and gpeg system works

2j3grva.jpg
 
Last edited:
Hex editor is what I was (poorly) suggesting. The asm defined a logical file, which is both cpu and gpu files. Thinking about it a bit more you should change the primitive type from 5 to 20 as well. 5 is character mesh and 20 is static mesh. The type comes directly after the name of the primitive. Don't forget that 20 in hex is 14, so you will see a 14 for a csmesh primitive and a 5 for a ccmesh.

Another option is to grab vpkg from the github and extract the asm as xml, edit the xml and then rebuild the asm file.
 
Hex editor is what I was (poorly) suggesting. The asm defined a logical file, which is both cpu and gpu files. Thinking about it a bit more you should change the primitive type from 5 to 20 as well. 5 is character mesh and 20 is static mesh. The type comes directly after the name of the primitive. Don't forget that 20 in hex is 14, so you will see a 14 for a csmesh primitive and a 5 for a ccmesh.

Another option is to grab vpkg from the github and extract the asm as xml, edit the xml and then rebuild the asm file.
I think the latter sounds best

Iv just got that tool wish I knew about this before this means so much for modding atm, I can add new entrys to an asm so happy atm :p
but I have no idea how to use command line based tools :') I keep trying how id asume they work but I keep gettin syntax errors
any help or if you could give me the command line I should enter to get this to work the tool tells me
im entering this <-extract_asm [items_preload_containers.asm_pc]>
Im doing somthing rong but I dont know what, Im used to just dragging files onto tools or using a GUI

Edit: Iv had potch about and is ther any chance you could point me in right direction for writing a batch file to extract the asm
Iv got this so far, but it dont do any thing :(, I kno thers no dir but I guessed that it would just use default and unpack to folder that the batch file is run from, iv also got the asm in the same folder
Code:
vpkg_wd

<-extract_asm [items_preload_containers.asm_pc]>

pause

Edit: Ignore the code part above Idol sorted it out for me :D, but im stuck on another problem, im trying to use 'vpkg_wd' for SRTT but it works in a diffrent way I was wondering how I would go about extracting an asm with that and turning it into a xml doc, I dont see no option for it, I wanted to use the asm from SRTT as a refrence for porting over weapons

Iv worked out most of the table for the asm but im stuck on 2 parts mainly 1

I have no idea what I would put this value as
Code:
<base_offset>180</base_offset>
as I dont know what it is

also the values for size such as
Code:
compressed_data_size>44763</compressed_data_size>

im guessing that I could leave this as any value then use update asm option with minimauls tools while repacking the stream file for the new weapon id be adding, as im guessing thats what it does when you use it normaly?
 
Last edited:
I actually just hacked up the SR3 version that uses xml last night for some mod work I was doing. I originally wrote vpkg to try to magically understand what you wanted to do, but that got to be too much very quickly, so I converted the SR4 version to use xml. I'll try to push out the SR3 version soon.

The base offset is the offset into the str2 file where the data begins. We actually don't read them like packfiles(we have the asm to tell use the file sizes, order, etc) so we need to know how much to skip over. The compressed size is the compressed size of the packfile data itself, so total size - base offset. These are the two sticky areas that I need to fix as vpkg doesn't handle it very well yet. The plan is to be able to update an asm in xml or binary form from an str2 and fill in data like that.

For SR4, the base offset depends entirely on the header size, which is variable. In SR3 the header parts are 2k aligned, so a vast majority of the headers will be exactly 6k or 6144. I don't know of an easy way to get the values, so if Mini's update tool will fill that in, I would do that for now.
 
I actually just hacked up the SR3 version that uses xml last night for some mod work I was doing. I originally wrote vpkg to try to magically understand what you wanted to do, but that got to be too much very quickly, so I converted the SR4 version to use xml. I'll try to push out the SR3 version soon.

The base offset is the offset into the str2 file where the data begins. We actually don't read them like packfiles(we have the asm to tell use the file sizes, order, etc) so we need to know how much to skip over. The compressed size is the compressed size of the packfile data itself, so total size - base offset. These are the two sticky areas that I need to fix as vpkg doesn't handle it very well yet. The plan is to be able to update an asm in xml or binary form from an str2 and fill in data like that.

For SR4, the base offset depends entirely on the header size, which is variable. In SR3 the header parts are 2k aligned, so a vast majority of the headers will be exactly 6k or 6144. I don't know of an easy way to get the values, so if Mini's update tool will fill that in, I would do that for now.

I realy hope that you can push out that SR3 one soon that would be so epic, im used to working with tabels so id love to be able to just take the values and info needed from the SRTT asm and just copy it into the SRIV would save so much time

and only down side I found so far about the VPKG as it makes the table from the asm it doesnt have any of them handy descriptions about what each element that makes up the table is.

and yes Minimauls tools done an epic job of filling in the missing data it updated all my file sizes and im pretty sure it also done my offset
and moved it im guessing to where it needed to be in the asm as I added it at the bottom updated then unpacked it again and it was in the middle of the tabble so im realy glad about that

so far iv added in new containers to the asm, made SRIV versions of the SRTT containers repacked and updated asm but still having ishues loading them into game, iv updated needed tabels aswell I think the ishue is on my end tho so im going to do more testing before I bother you with that

if you could give me some info on how the game groups toghter the Killbane gloves that would be epic as thats what im trying to do its 2 seprate mesh's for left and right and its also that way in the weapons table but when it gets to the store table its listed as gloves insted of glove so they have been merged im confused on how this is done :S

Btw thanks for all your help over all these posts I have on the go, Dont know what this community would do without you Knobby ;D
 
New vpkg for SR3 up on github. Vpkg is a very young tool and as such doesn't have much in the way of comments and documentation. Hopefully this will come about "soon". Between now and then, feel free to ask any questions you'd like about any of it. Anything that has havok data is going to be a non-starter, but I'm working on something there for you guys.

For your specific question about the gloves, I believe there is just one weapon, but it has an offhand mesh assigned to it. So the weapon mesh is the right handed fist and the weapon has an offhand mesh for the left handed fist.

<Offhand_Weapon_Mesh>Killbane_gloves2</Offhand_Weapon_Mesh>
 
New vpkg for SR3 up on github. Vpkg is a very young tool and as such doesn't have much in the way of comments and documentation. Hopefully this will come about "soon". Between now and then, feel free to ask any questions you'd like about any of it. Anything that has havok data is going to be a non-starter, but I'm working on something there for you guys.

For your specific question about the gloves, I believe there is just one weapon, but it has an offhand mesh assigned to it. So the weapon mesh is the right handed fist and the weapon has an offhand mesh for the left handed fist.

<Offhand_Weapon_Mesh>Killbane_gloves2</Offhand_Weapon_Mesh>
Edit: Just found the command line arguments so ignore that part :P, and Id like to say you done an epic job it seems much more logical to use than the older version and suites my needs much beter

:D you dont know how happy that has made me to hear the vpkg is up for SR3 (its been bugging me what does vpkg stand for :p), does it work in the same way as the SRIV one
would this work as batch file for that aswell

Code:
vpkg_wd -extract_asm items_preload_containers.asm_pc
pause

are the command line arguments listed anywhere for it

also this is the code used in the weapons table for the gloves
Code:
<Weapon>
       <Name>Killbane_gloves</Name>
       <Weapon_Class>knuckles</Weapon_Class>
       <Trigger_Type>single</Trigger_Type>
       <Magazine_Size>0</Magazine_Size>
       <Range_Max>2</Range_Max>
       <Damage_Max>
         <NPC_Damage>0</NPC_Damage>
         <Player_Damage>0</Player_Damage>
       </Damage_Max>
       <_Editor>
         <Category>Entries:weapon_radial:melee</Category>
       </_Editor>
       <Animation_Group>KB_Gloves</Animation_Group>
       <AI_Ideal_Range_Max>2</AI_Ideal_Range_Max>
       <Flags>
         <Flag>melee can dislodge movers</Flag>
         <Flag>not allowed with human shield</Flag>
         <Flag>use box shape for melee casts</Flag>
         <Flag>do not hide when sprinting</Flag>
         <Flag>allow offhand grenade</Flag>
         <Flag>gibs victims</Flag>
         <Flag>attach to forearm</Flag>
         <Flag>bullets damage tanks</Flag>
         <Flag>explosions damage tanks</Flag>
       </Flags>
       <melee_damage_to_anchored_scaler>0.2</melee_damage_to_anchored_scaler>
       <Category>WPNCAT_MELEE</Category>
       <Time_Management>
         <Refire_Delay>0</Refire_Delay>
         <min>0</min>
         <max>0</max>
       </Time_Management>
       <Inv_Slot>melee</Inv_Slot>
       <Ammo_per_Shot>1</Ammo_per_Shot>
       <Audio>
         <Hit_Wall_Sound>IMP_METAL_HIT</Hit_Wall_Sound>
         <Spinning_Snd_Pitch_End>1</Spinning_Snd_Pitch_End>
         <Weapon_Model>KILLBANE_GLOVES</Weapon_Model>
         <looping>False</looping>
         <Sound_Radius>8</Sound_Radius>
         <alt_looping>False</alt_looping>
         <Soundbank_Name>Wep_Chainsaw</Soundbank_Name>
       </Audio>
       <Constant_Effects/>
       <Melee_Damage_Overrides>
         <NPC>150</NPC>
         <Player>2000</Player>
         <Online>150</Online>
       </Melee_Damage_Overrides>
       <Alt_Trigger_Type>single</Alt_Trigger_Type>
       <Strafe_Angles>Default</Strafe_Angles>
       <AI_Ideal_Range_Min>5.0</AI_Ideal_Range_Min>
       <Ragdoll_Force_Shoot>0.0</Ragdoll_Force_Shoot>
       <Effect_Situations/>
       <Ammo_Regeneration>0.0</Ammo_Regeneration>
       <Riot_Shield_Damage_Multiplier>1.0</Riot_Shield_Damage_Multiplier>
       <Offhand_Weapon_Mesh>Killbane_gloves2</Offhand_Weapon_Mesh>
       <Melee_Attack_Info>2hm</Melee_Attack_Info>
       <Diversion_Kill_Multiplier>1.0</Diversion_Kill_Multiplier>
       <Blood_Decal_Scale>1.0</Blood_Decal_Scale>
       <vehicle_damage_scale>1.5</vehicle_damage_scale>
       <Camera_Info>
         <Player_Hit_Camera_Shake>bullet_hit</Player_Hit_Camera_Shake>
         <Player_Hit_Camera_Shake_Intensity>0.5</Player_Hit_Camera_Shake_Intensity>
       </Camera_Info>
     </Weapon>
     <Weapon>
       <Name>Killbane_gloves2</Name>
       <Weapon_Class>knuckles</Weapon_Class>
       <Trigger_Type>single</Trigger_Type>
       <Magazine_Size>0</Magazine_Size>
       <Range_Max>2</Range_Max>
       <Damage_Max>
         <NPC_Damage>0</NPC_Damage>
         <Player_Damage>0</Player_Damage>
       </Damage_Max>
       <_Editor>
         <Category>Entries:weapon_radial:melee</Category>
       </_Editor>
       <Animation_Group>KB_Gloves</Animation_Group>
       <AI_Ideal_Range_Max>2</AI_Ideal_Range_Max>
       <Flags>
         <Flag>melee can dislodge movers</Flag>
         <Flag>not allowed with human shield</Flag>
         <Flag>use box shape for melee casts</Flag>
         <Flag>do not hide when sprinting</Flag>
         <Flag>allow offhand grenade</Flag>
         <Flag>gibs victims</Flag>
         <Flag>no random give</Flag>
         <Flag>attach to forearm</Flag>
       </Flags>
       <melee_damage_to_anchored_scaler>0.2</melee_damage_to_anchored_scaler>
       <Category>WPNCAT_MELEE</Category>
       <Time_Management>
         <Refire_Delay>0</Refire_Delay>
         <min>0</min>
         <max>0</max>
         <npc_refire_type>1. Random Range</npc_refire_type>
       </Time_Management>
       <Inv_Slot>melee</Inv_Slot>
       <Ammo_per_Shot>1</Ammo_per_Shot>
       <Audio>
         <Hit_Wall_Sound>IMP_METAL_HIT</Hit_Wall_Sound>
         <Spinning_Snd_Pitch_End>1</Spinning_Snd_Pitch_End>
         <Weapon_Model>KILLBANE_GLOVES</Weapon_Model>
         <looping>False</looping>
         <Sound_Radius>8</Sound_Radius>
         <alt_looping>False</alt_looping>
         <Soundbank_Name>Wep_Chainsaw</Soundbank_Name>
       </Audio>
       <Constant_Effects/>
       <Melee_Damage_Overrides>
         <NPC>150</NPC>
         <Player>300</Player>
         <Online>150</Online>
       </Melee_Damage_Overrides>
       <Alt_Trigger_Type>single</Alt_Trigger_Type>
       <Strafe_Angles>Default</Strafe_Angles>
       <AI_Ideal_Range_Min>5.0</AI_Ideal_Range_Min>
       <Ragdoll_Force_Shoot>0.0</Ragdoll_Force_Shoot>
       <Effect_Situations/>
       <Ammo_Regeneration>0.0</Ammo_Regeneration>
       <Riot_Shield_Damage_Multiplier>1.0</Riot_Shield_Damage_Multiplier>
       <Melee_Attack_Info>2hm</Melee_Attack_Info>
       <Diversion_Kill_Multiplier>1.0</Diversion_Kill_Multiplier>
       <Blood_Decal_Scale>1.0</Blood_Decal_Scale>
     </Weapon>

so im a bit confused where to find it set up as a single weapon :(

also as I know your prob the best person to ask about tools is ther any chance that we will be getting a pre release of a Matlib - Xml tool :p
it would be the best thing ever as Im hoping then I could add in new weapon camos

I have a few more ishues but I wont bother you with them untill I have done further testing dont want to bother you with to much at the same time :)
 
There is a readme in the folder with the vpkg executable in github and you can also just run it with no command line options and it will spew out the options.

vPkg is the a volition package tool. I didn't come up with anything fancy to call it. :) We typically prefix our libraries with v.

The way we handle dual wielded weapons is to use the Offhand_Weapon_Mesh to define what goes into the offhand when you equip the "weapon" which is in the main hand. This works for dual pistols, swords and the fists.
 
Back
Top