Anarchy Arcade

Anarchy Arcade

Not enough ratings
Keep Calm and Hack your own Cabinet
By Oke_Doke
This is a strait forward (FILDI-&-hack-it) resource to point you in the right direction and get your custom cabinet compiled and into Anarchy Arcade.

It includes:
A checklist of the tools and files you will need to make a basic working cabinet.
A set of template files.
A general outline on what the template files are.
Links to more information.

What this is not:
A step by step walkthrough of the modeling process or tool configuration. If the UI's don't make what to do it obvious, Google is your friend.
   
Award
Favorite
Favorited
Unfavorite
Checklist
  • This Guide (hint: you're reading it.)
  • Crowbar
  • The location of Anarchy Arcade's gameinfo.txt.
  • The location of Anarchy Arcade's studiomdl.exe.
  • Text editor suitable for coding.
    • Notepad ++
  • Modeling Program with a source plugin
    • Blender
      • Blender Source Tools
  • files
    • model_template.qc
    • model_template_reference.smd
    • model_template_physics.smd
    • model_template_anims\idle.smd
    • dynamic textures (all textures provided here originally by Smsithlord for Anarchy Arcade)
      • DynMarquee.tga
      • DynMarqueeGlow.tga
      • DynScreen.tga
      • DynScreenGlow.tga
    • four_player_arcade_skin.tga (example static texture, optional)
    • model_template.cat

Hi I'm a code block. I will show you what the contents of a file will look like when you need it
Crowbar
A GUI for decompiling and compiling models to source engine. In our case Anarchy Arcade.
Get it from the link below.

Crowbar's Steam Page

Extract it to a directory that is convinient for you.
I put mine in:
\Steam\SteamApps\common\Anarchy Arcade\Crobar\
Locate Anarchy Arcade's gameinfo.txt
Find the location where Anarchy Arcade is installed on your machine. You'll need it for "Setting Up Games" in Crowbar.
\Steam\SteamApps\common\Anarchy Arcade\aarcade\gameinfo.txt
Locate Anarchy Arcade's studiomdl.exe
Find the location where Anarchy Arcade's compiler is installed on your machine. You'll need it for "Setting Up Games" in Crowbar.
\Steam\SteamApps\common\Anarchy Arcade\bin\studiomdl.exe
Text Editor
Your free to chose which ever plane text editor you see fit for making simple changes to the template files. It should be capable of finding and replacing text. I use Notepad ++[notepad-plus-plus.org].
3D Modeling Program with a source plugin
Chose a 3d modeling program which is capable of importing and exporting source models in smd format.

here is a convenient list of capable modeling programs.

I am using Blender.
Here is Blender's Source Tools[steamreview.org]. See the page in that link for more Information on Installation and use.
Files
Here are some template files ready to import into a suitable modeling program to get you started.

https://drive.google.com/open?id=0B3cPVXd70lRQaDVid1ZfU3J3UTA

(all textures provided here originally by Smsithlord for Anarchy Arcade)

model_template.qc
The QC file contains scripts used to compile your model.

model_template.qc
// Created by Crowbar 0.24.0.0 $modelname "cabinets\model_template.mdl" $staticprop $bodygroup "Body" { studio "model_template_reference.smd" } $cdmaterials "models\cabinets\" $cdmaterials "models\smarcade\" $surfaceprop "metal" $contents "solid" // NOTE: The following commented-out $definebone lines might be needed, as is often the case for view models. When needed, simply remove the two slashes '//' from the start of each line. // $definebone "static_prop" "" 0 0 0 0 0 0 0 0 0 0 0 0 $sequence "idle" "model_template_anims\idle.smd" { fps 30 } $collisionmodel "model_template_physics.smd" { $mass 1 $inertia 1 $damping 0 $rotdamping 0 }

Don't panic. Keep Calm and Find and Replace all instances of "model_template", including the file name, to that of the given name of your custom cabinet.

A template QC file is ready to hack use in the zip file included with this guide.
Open it up and have a look. For a simple cabinet, there's not much too it actually.

\hack_a_cabinet\model_template\model_template.qc
SMD
SMD (Studiomdl Data) files holds model data for your prop. It's generated by model export tools and de-compilers. and is used by compilers to form MDL files. You you wont need to open or edit these files in a text editor. as long as you have them with your QC file, they are named correctly and are well formed by the tools you're using, you are good to go.

model_template_reference.smd
This file contains the visible form, the dynamic and static textures of the cabinet.

In your modeling program remember to:
  • apply smooth shading to your entire mesh.
  • If your using your own textures. consult this guide on prop materials.
  • correctly name the materials of your model which should be dynamic. See Dynamic Textures.

model_template_physics.smd
This file contains a simplified mesh which represents the collide-able parts of your model. This is essential to a functional cabinet as a collision model is needed to be able to select and edit the shortcut in Anarchy Arcade.

A model collision can be composed of several unconnected meshes so long as they are apart of the same vertex / shader group (confirmation needed) for an arcade cabinet, a single mesh is usually sufficient.

To avoid compile errors remember to:
  • apply smooth shading to all parts of the collision mesh
  • all parts of the collision mesh solid and convex shaped. (no holes or indents)
  • each component of the collision mesh should have no more than 40 faces. (confirmation needed)

idle.smd
This file defines animations for the model. Since we won't be animating our cabinet, There's not much to see here. Remember to rename the directory it's in from "model_template_anims" to that of your custom cabinet and your fine.

All files and folders with "model_template" in their name will need to be renamed to that of the cabinet you are creating.
Dynamic Textures
All the magic of an Anarchy Arcade cabinet happens with Dynamic Textures. Name the materials of the screens and marquees of your cabinet accordingly to make your cabinet come alive.

There are 4 variations for dynamic textures. Each corresponds to one of two dynamic attributes of the cabinet, the Screen and the Marquee. (are there more?)

Material names
  • DynScreenGlow
    • Self explanitory
  • DynScreen
    • unlit version
  • DynMarqueeGlow
    • Self explanitory
  • DynMarquee
    • unlit version

Example TGA textures are included in the zip file with this guide. You can use them to preview and aid in modeling your cabinet in your modeling program. You can use what ever textures you wish to represent your dynamic textures. So long as the name of the material exactly matches the desired dynamic texture, the cabinet will function.
model_template.cat (LEGACY ONLY)
The final piece of the puzzle, Anarchy Arcade uses CAT files to categorize your prop as a cabinet.

model_template.cat
"preset" { "filename" "resource\models\model_template.cat" "name" "Model Template" "category" "Frames" "model" "models\cabinets\model_template.mdl" "type" "cabinet" "description" "A Template for hacking together your own cabinet. Feel free to decompile this model." "instructions" "place the .cat file for this prop into the directory aarcade\resource\models\" }



  • You must replace all instances of "model_template" where it appears, including the file name, to that of the custom cabinet.
  • You must give your cabinet a unique name next to the "name" property in order for it to appear as a cabinet in Anarchy Arcade.
  • The cat file must also be moved to the "arcade\resource\models" folder where Anarchy Arcade is installed.

Failing to correctly follow any of the above points will result in a missing cabinet and/or an ordinary prop with dynamic textures. How boring!
MDL
The main component of the compiled model. If you were to compile the template files as is it would produce model_templait.mdl (among others) and be automatically placed in the correct directories in your installation of Anarchy Arcade.

You can use Crowbar to de-compile an existing arcade model to see how it ticks, they are located in the models sub-directory of Anarchy Arcade.

https://developer.valvesoftware.com/wiki/MDL
Workflow outline
Here is the general process, taken from my situation. Your situation may vary.

  • Configure Crobar's "game to compile for".
  • Find a model I would like to clone
  • decompile it in Crowbar
  • import it into blender, duplicate, rename or simply hide and use as a resource for modeling the cabinet.
  • model and name the reference and physics models. unique, but mimicking the naming convention of the imported model.
  • assign the correct textures and matrials
  • remember to shade smooth
  • delete the old imported model.
  • remember to configure the Scene's Soure Engine export panel.
  • export the new models to their own project folder.
  • Copy and rename the qc file and animation folder.
  • open and rename the model in the qc file
  • copy and rename the cat file in the aarcade\resource\models folder. (Legacy Only)
  • open and rename the model in the cat file
  • compile in crowbar
  • test in Anarchy Arcade
  • repeat edit/compile cycles until happy
Conclusion
I've outlined above the general process and materials required to make a custom cabinet and get it in to Anarchy Arcade in the simplest way possible. I'm certain there are best practices that I do not follow here. Such as making a cabinets subfolder for mods under our own name. Paths in the cat and QC file would need to change accordingly.

I settled on this workflow after plenty of help from Smsithlord. He was generous enough to provide live on Anarchy TV[www.twitch.tv] over several weeks. The process is also partially the result of reverse engineering by mimicing the naming conventions and object structure of de-compiled cabinet models. This may have resulted in a few cargo cult errors that could be streamlined and improved. Comments, corrections and feedback welcome.
Appendix
Crowbar
http://steamcommunity.com/groups/CrowbarTool
QC
https://developer.valvesoftware.com/wiki/QC
SMD (Studiomdl Data)
https://developer.valvesoftware.com/wiki/Studiomdl_Data
Creating a Material
https://developer.valvesoftware.com/wiki/Creating_a_Material
Blender
http://www.blender.org/
Blender Source Tools
http://steamreview.org/BlenderSourceTools/
3D Modeling Tools for Source
https://developer.valvesoftware.com/wiki/3D_Modeling_Programs


Free template files
https://drive.google.com/open?id=0B3cPVXd70lRQaDVid1ZfU3J3UTA

(all textures provided here originally by Smsithlord for Anarchy Arcade)
many thanks to Smsithlord for taking time to help when he was busy doing other things like hosting a freaking twitch stream.

4 Comments
Oke_Doke  [author] Jan 7, 2017 @ 9:25am 
zip was broken again, link updated.
Oke_Doke  [author] Jun 13, 2016 @ 10:56am 
Overly aggressive spring cleaning i guess. Fixed.
ChillCreep Jun 13, 2016 @ 10:42am 
Zip file here is broken.
VeGas GhOst Jun 1, 2015 @ 3:09pm 
Yes thank you, this was exactly what i was looking for. Now i can slowly migrate some of my custom models over to AA.