Files and File Structure

This Document will change over time and still is partially Under Construction, if you need anything, feel free to contact us any way you like.  It is also assumed that you have created a model in the source engine before.

Required files needed to make a complete sword

  • smd file for the sword model.
              This is the sword mesh exported from your 3d program of choice
  • smd file for the sword physics model.
              This is the exported bounding box for the sword model, the bounding box does not affect gameplay
  • .qc file for compiling.
              This is a text file that holds the properties of the model.
  • .vtf texture for the diffuse material.
              this is the ‘base’ texture for your sword
  • .vtf texture for the normal map/specular material.
              this image contains the normal map in the RGB channels, and a specular mask in the alpha channel
  • .vtf texture for the exponent material. (Optional)
              look into how exponent textures work in the source engine here
  • .vmt file for the material.
              this file dictates how the textures are applied in-game and what shader to use, see more info here

File structure

Any place you see YOUR64bitSteamID replace it with your actual 64 bit Steam ID, for example: 76561197968428216 is a 64bit steam ID. Any place that refers to a folder will be in the Steam\steamapps\common\Blade Symphony\ folder. The folder structure should be as follows:

Workshop Folder Structure

If you’re already competent in making content for the source engine, this should be enough to get you started, if not, read on


Creating a Sword

You can actually use most 3d modelling programs common to game development to make swords in Blade Symphony, 3ds Max is common but at puny human we use many different programs, you can in general use this guide to do the same thing in other programs if you’re familiar with them already.

Required versions and plug-ins for 3ds max

  1. 3ds max 9, 2008, 2009, 2010, 2011, 2012.

  2. An smd export plug-in for 3ds max which can be found here: http://www.wunderboy.org/3dapps.php  Note that this only works for the above listed versions of 3ds max.

  3. A VTF plug-in to view the vtf files in 3ds max. This can also be found here: http://www.wunderboy.org/3dapps.php  Note that this only works for the above listed versions of 3ds max.

Directions for 3ds Max

  1. Before completing your sword make sure that in the left viewport the sword is positioned so that the grip is on the left and the tip is on the right.  In the top viewport the hilt should be at the top and the blade tip should be at the bottom. The sharp part of the blade should be facing up.  The blade should be positioned near [0,0,0].  The exact location can be adjusted once the bone has been added.

  2. Once you have created your sword model that fits the following requirements [See workshop requirements below] you need to create a bone in the top viewport located at [0,0,0], rotated [90,0,-90] and named “sword_grip”.  The sword should positioned relative to the bone location.  This location will be where the sword is attached to the players hand.  This will most likely need to be adjusted after the sword is in game in order to get it positioned correctly.

  3. Add a standard material to your sword model.  In the diffuse slot add your sword material.  This will be the .vtf that is located in the workshop\materials\models\YOUR64bitSteamID\yourswordname folder. (Assuming that the sword .vtf material has already been created)


    3ds_Applying_Material01

    3ds_Applying_Material02
    3ds_Applying_Material03
    3ds_Applying_Material04
    3ds_Applying_Material05

  4. Attach a skin modifier to the sword model and add the “sword_grip” bone.
    workshop_max_layout
  5. Select both the sword model and the “sword_grip” bone. Go to File->Export and export it as an .smd to any folder. The smd file should be named something like yourswordname_ref.smd.  The folder and file name do not matter but you will need to reference them in the .qc file.
  6. To export the collision model you will need to add a smooth modifier to it and assign a smoothing group to it.  Select the collision mesh and the bone and repeat steps 2-4.  The smd file should be named something like yourswordname_phys.smd and saved to the same folder used in the previous step.  Once again, the file name does not matter but you will need to reference it in the .qc file.  Collision models should be convex and a low poly version of the sword.
  7. Create your .qc file(.txt file) in the same folder (see below for details)
  8. Drag the .qc file onto studiomdl_workshop.bat which is located in Steam\steamapps\common\Blade Symphony\bin\  This will automatically create your sword model.

Sword QC File Example

$modelname "YOUR64bitSteamID\yourswordname\yourswordname.mdl"
$cdmaterials "models\YOUR64bitSteamID\yourswordname"
$surfaceprop "metal"
$bonemerge sword_grip
$scale 1.0
$body "Body" "yourswordname_ref.smd"
$sequence idle "yourswordname_ref.smd" loop fps 1.00
$collisionmodel "yourswordname_phy.smd"
{
$mass 1
}

Setting up your Sword Material

After your mesh is created and ready in game, it requires a texture, heres how to make that happen.

We recommend using the vmt given below as it will add the features required of your sword (charge effects and other miscellaneous bits and pieces)

Also make sure the paths referenced by your vmt are correct as having incorrect references may break your VPK file when you attempt to publish

  1.  Create a .vmt file in the workshop/materials/models/YOUR64bitSteamID folder.  A .vmt file is a text file that contains the materials properties. Example: yourswordname.vmt.  At a minimum the file should contain the following:
"Patch"
{
"include" "materials/models/shared/swords.vmt" // import to ensure that common requirements are met, for example the charge effect on swords, player models
"insert"
{
"$basetexture"  "models/YOUR64bitSteamID/yourswordname" //the name of your diffuse vtf
"$bumpmap" "models/YOUR64bitSteamID/yourswordname_nrm" //the name of your normal map vtf
"$normalmapalphaenvmapmask" "1" //use the alpha channel in your normal map as the specular map.
}
}
  1. Create the .vtf textures listed below using a digital imaging program (i.e. Photoshop, gimp) to make either a .vtf or .tga.  If a .vtf is created save it directly into the folder listed in step

    note If a .tga is created, place the tga file in Steam\steamapps\common\Blade Symphony\materialsrc and drag it from there onto vtex_workshop.bat which is located in Steam\steamapps\common\Blade Symphony\bin\. The new vtf can be found in Steam\steamapps\common\Blade Symphony\workshop\materials now.

  2. Create a .vtf texture for the diffuse material in the workshop/materials/models/YOUR64bitSteamID folder. Example: yourswordname.vtf

  3. Create a .vtf texture for the normal map and specular material in the workshop/materials/models/YOUR64bitSteamID folder. Example: yourswordname_nrm.vtf

 

Creating a Scabbard

Directions for 3ds Max

  1. To be completed in the future.

 

Scabbard QC File Example

$modelname "YOUR64bitSteamID\yourswordname\yourswordname_scabbard.mdl"
$cdmaterials "models\YOUR64bitSteamID\yourswordname"
$surfaceprop "metal"
$bonemerge sheathe_attach_back //only use this if the scabbard will be on the back
$bonemerge sheathe_attach_hip //only use this if the scabbard will be on the hip
$attachment "anim_sheathe" "sheathe_attach_back" 0 0 0 rotate 0 0 0 //only use this if the scabbard will be on the back
$attachment "anim_sheathe" "sheathe_attach_hip" 0 0 0 rotate 0 0 0 //only use this if the scabbard will be on the hip

$hboxset "default"
$scale 1.0
$body "Body" "yourswordname_scabbard_ref.smd"
$sequence idle "yourswordname_scabbard_ref.smd" loop fps 1.00


Testing your Sword

  1. Ensure that your model and material files are placed in the correct directories below the Blade Symphony\workshop folder.

  2. Start the game and navigate to the workshop menu, do so by selecting ‘Settings’, ‘Game’, ‘Workshop’

  3. Open the workshop sword list by clicking on ‘MY SWORDS’ in the Workshop dialog

  4. Create a new sword by clicking on ‘Create’

  5. The new dialog presents a list of options to you that allow you to customize your new sword. The minimum information that is needed is merely a sword model and an in-game name for your sword.

  1. Enter a name for your sword in the ‘Sword name’ field.

  2. Choose your sword model by clicking on ‘Sword model’. The file selection dialog will start you off in the workshop/models/YOUR64bitSteamID/ directory, your sword needs to be in here or in a subdirectory.

  1. Fill out the other options as you see fit. You can edit them later before uploading your sword too so there is no rush.

  2. Click on ‘OK’ to create a new sword.

  3. Go to the customization menu. You will notice a new element right above the sword name that shows you the current sword group. There are three groups: Default, Local and Workshop. Your new sword can be found in the ‘Local’ group right now, select it and accept the customization changes.

  4. You will now have to turn cheats on in the console, otherwise you will not be able to use your local sword. To do so, open the console with F10 (default binding) and type sv_cheats 1.

  5. Go to ‘Play Online’, ‘Host Game’ to start a new game on your machine. This is important, because you cannot use your local sword on any server online.

  6. If you have cheats enabled and your local sword selected you should now be able to test your sword out!

* at this stage, you should probably check that the ‘local’ file inside steam\steamapps\common\Blade Symphony\workshop_temp is the right size, it should be at least a couple MB considering image file sizes etc. if it’s incorrect or super small, perhaps look at your vmt files to make sure the material references are correct, this is known to break vpks

Publishing your Sword

  1. Go back to the ‘MY SWORDS’ dialog that was described above.

  2. Click on your local sword and select ‘Edit’ to apply final adjustments to your sword. You will currently not be able to edit your sword after publishing it.

  3. In the edit menu, ensure that your sword has a Workshop title and a preview image. You can take a preview image by clicking on the ‘Preview image’ button at the bottom of the list.

    • After taking a preview image, a new jpeg file will be created in Blade Symphony/workshop_temp/ with the prefix ‘local_’ and an incrementing number. You can change/replace this image as you see fit, as long as it stays a jpeg.
  4. Accept any changes from the edit menu and go back to the Workshop swords dialog.

  5. Select your local sword that you want to publish and click on ‘Publish’ at the bottom.

    1. The game will now upload all related data to steam and show you a confirmation dialog when it’s done, this step might take awhile depending on your model/texture sizes and the speed of your internet connection.

  6. After the sword was successfully published you may be prompted to accept the Steam Workshop Agreement, do so by opening your steam overlay or clicking on the ‘View item online’ button of the confirmation dialog.

 

Workshop requirements

General

  1. The file paths below including the YOUR64bitSteamID directories will be created when the game is started once so you don’t have to create them by hand.

  2. Models must be compiled into workshop/models/YOUR64bitSteamID/ using studiomdl_workshop.bat.

  3. Materials/textures for models must be placed into workshop/materials/models/YOUR64bitSteamID/ using vtfedit or vtex_workshop.bat

  4. Materials/textures for other things (tracers) must be placed into workshop/materials/YOUR64bitSteamID/

  5. ANY shared resources (i.e. metallic phongwarp, shared swords vmt) will NOT be copied into the workshop file but they can be used,

  6. Custom sounds and particles cannot be added.

  7. The preview image can be found in the workshop_temp path. It’s okay to edit it with an external program before publishing in workshop. The dimension/size is not limited in any way but it should probably not be too large.

  8. A sword model is mandatory.  The scabbard and tracer are optional.

Swords

  1. Must have a root bone named sword_grip located at (0,0,0).

  2. Must have less than 4000 triangles.

  3. Must not have include models.

  4. All vertices must be located between two bounding boxes. The following are coordinates for the maximum bounding box (measured from sword_grip bone):  min -15, -10, -10 max 55, 10, 10. The following are coordinates for the minimum bounding box (measured from sword_grip bone):  min -5, -0.5, -0.5 max 35, 0.5, 0.5. The coordinates are relative to the bone, meaning the longer part will be on the x-axis.

  5. Max texture resolution: 1024 * 1024 pixels (ratio variable, for example 512 * 2048).
    .

  6. Max texture file size: 4096 kbytes (DXT formats), 1024 kbytes (any format).
    .

  7. Cannot have more than two materials.

  8. Must not have LODs.

  9. Max jiggle bones: 5.

  • If you’re getting ‘your sword is too big’ messages even though your sword is inside the bounding box check the following:
    • Ensure your “sword_grip” bone is at 0,0,0.
    • Check your sword/bone orientation (sword_grip bone at 90,0,-90)
    • Check for floating vertices outside the box.

Scabbards

  1. Must have a root bone named either sheathe_attach_hip or sheathe_attach_back located at (0,0,0) depending on if it’s attached on the hip or back. (the name is not relevant in-game but it’s relevant for HLMV)

  2. Must have exactly one attachment named anim_sheathe (attached to root bone).

  3. Must not have more than 4000 triangles.

  4. Must not have include models.

  5. All vertices must be located between two bounding boxes. The following are coordinates for the maximum bounding box (measured from sheathe_attach_hip or sheathe_attach_back bone):  min -10, -12, -12 max 60, 12, 12. The following are coordinates for the minimum bounding box (measured from sheathe_attach_hip or sheathe_attach_back bone):  min -5, -0.5, -0.5 max 35, 0.5, 0.5. The coordinates are relative to the bone, meaning the longer part will be on the x-axis.

  6. Max texture resolution: 1024 * 1024 pixels (ratio variable, for example 512 * 2048).

  7. Max texture file size: 4096 kbytes (DXT formats), 1024 kbytes (any format).

  8. Cannot have more than two materials.

  9. Must not have LODs.

  10. There should only be one animation, an idle sequence.

  11. Max jiggle bones: 5.

Tracers:

  1. Max texture resolution: 1024 * 1024 pixels (ratio variable, for example 512 * 2048) Textures are generally 1024×256.

  2. Max texture file size: 4096 kbytes (any format).


Design Guidelines

Try to design your sword so that both of the characters’ hands fit on the sword’s grip (Judgement heavy stance is a good reference to check against) You should consider exaggerating the swords grip so that both hands fit.

You can also add player color tint effects to your sword. To do this you will need to create an exponent map for your sword, the color tinting is controlled by the blue channel of your exponent map (Solid white areas will be fully color tinted and solid black areas will be ignored). You can take a look at the games default swords that have color tinting (Alpha Baseline Sword) .VTF’s and .VMT’s to gain a better understanding on exponent maps and color tinting.

Custom tracer textures (If you decide to make them) should always have a near solid white line running from the bottom left of the texture to the bottom right of the texture, this indicates the tracer bounds at the sword tip end of the sword and gives the tracer a sense of range and is therefore very important, you should look at the games default tracers .VTF’s and .VMT’s to gain a better understanding.