Cars 2 (released in 2011) is a video game based on the film of the same name. It is available for Macintosh (Mac), Microsoft Windows (PC), Nintendo DS, Nintendo 3DS, PlayStation 3, PlayStation Portable (PSP), Wii, iOS and Xbox 360. For the purposes of this wiki, only the PC and Xbox 360 versions will be researched. These versions were developed by Avalance Software, who also developed Cars 3: Driven to Win.

All activities, races, entities and so on are scripted through LUA. Most of the scripts are uncompiled, but the core/system/engine scripts are compiled. All UI/HUD stuff is done with Adobe Flash (SWF files) and can be edited easily.

File system

All files are individually packed into semi-standard .zip containers. No special tools are needed to open them, however they do have a special chunk that will not allow them to be modified. To fix that issue, extract the contents of the .zip, delete the original, then re-zip the files using any standard program. Once that is complete open the .zip in hex editor and copy the final 22 bytes of data, then insert (not overwrite) it to the very start of the file and save.

LUA files are compiled using LUA 5.1.4. Use unluac.jar to decompile them. This requires the Java Runtime Environment to work. Instructions on how to execute the decompiler are on the Unluac web page. Should the files need to be compiled, LUA 5.1.4 binaries can be found here, under the Tools/Executables section.

  • /AI/ contains two LUA scripts. GoldStar.lua focuses on requirements to complete challenges
  • OCT files are the model, texture and animation data
  1. For characters, there are two separate versions: /assets/characters/[CHARACTER NAME] for racing and /assets/frontend/[CHARACTER NAME] for when in the menus. File sizes look to be mostly identical, so maybe it won't matter on PC which model you modify, so long as you change it in both places.
  2. Textures are stored inside the OCT file, and are DDS (Direct Draw Surface). Specifically they are the DXT5 variant. Using TextureFinder2.1 and MUASkinner new textures can be injected in. A tutorial needs to be modified slightly for our purposes, but the original tutorials for these programs and their downloads can be found at MarvelMods.
  • BMX files store behavior data
  • BENT files are used as an animation table specific to each character
  • SX files seem to be script objects
  • /tables/ >> surftype.tbl is related to the types of surfaces driven on/collided into
  • XML files are unencrypted and are in a standard XML format (human readable)
  • / >> playerdb.tupa is unencrypted and seems to do with unlocking missions
  • / >> luatables/carsinfo.lua contains info on player characters, but the lua is compiled
  • Sounds are located in FMod sound banks and tools are out on the web to edit these.
  • In the /modifiers/ folder there are several references to Toy Story 3 (which Avalanche also developed). They don't appear to be used in Cars 2.
  • Discord channel:
Community content is available under CC-BY-SA unless otherwise noted.