TDP :: Data Architecture:: Gamedata

Version 1.0 - Jean-René Bédard - 17/12/2004 - Initial

The Gamedata is composed from functional compiled data that would be ready to be shipped with the mod. The data is loadable by the engine.
The Data Pipeline describes how the rawdata and gamedata are tied together.


Here is the root of the Gamedata located in “C:\Program Files\Valve\Steam\SteamApps\SourceMods\troydp”

“..\SourceMods\troydp”

TDP root contains configuration text files.

troydp.fgd Troy : Divine Playground's definition file.
Define all the entities coded for TDP and include the generic ones . (@include "base.fgd").

PointClass Point entities.
SolidClass Brush entities.
BaseClass Whole entities.

We can place external text files here :

gameinfo.txt Informations on our game
maplist.txt List of the map included with our mod
credits.txt Credits
motd.txt HTML configuration for messages of the day.

“..\SourceMods\troydp\bin Binaries
Latest Debug or Release build of the client and server :

client.dll Local client dll (Handles drawing, inputs, everything that does'nt affect the game world, but will tell the server about it if it needs to.)
server.dll Local server dll (Handles game logic, event-player loop, network)

“..\SourceMods\troydp\cfg Configuration files
Configurations files for our mod.

config.cfg Keyboard and joystick binds, customization, performance defines
valve.rc Configuration batch

“..\SourceMods\troydp\maps

Gamedata Maps
The "maps" directory contains compiled maps

.BSP Compiled map in binary space partition

The compiled BSP map is generated from the Hammer .vmf and .vmx files.
The corresponding VMF file must be in the rawdata ("troydp/mapsrc")

“..\SourceMods\troydp\materials

Gamedata Materials
The “materials” directory contains materials and textures for maps and models.

.VMT Editable text file that describe how the material is gooing to be rendered (Shader). Contains Material Proxies.
.VTF Binary texture/map file.

The material files (VMT and VTF) are generated from the tool tga2vtf.bat (Vtex.exe). This tool takes a .tga and an optionnal text file describing the compile information . The source TGA and the TXT file with the same name must be in the rawdata ("troydp/materialsrc") under the same category as in the gamedata.

All the materials shared between maps(BSP) are put in the directory “materials/mapname”

The materials for models are put in categories such as player, weapon, vehicles. The files are then put in the directory corresponding to the name of the model.

“..\SourceMods\troydp\models

Gamedata Models
The "model" directory contrains models files for each models put in its category folder (player, props, vehicles, weapons, etc).

The differents files that compose an animated model :

.DX80.VTX DirectX 8.0 Vertex / Indices / Bones / LOD.
.DX90.VTX DirectX 9.0 Vertex / Indices / Bones / LOD..
.MDL Model data : geometries, animations, AI hooks
Viewable in HLMV (run_hlmv.bat)
.PHY Binary physic files, natively the physbox for collision detections
.SW.VTX Software Vertex / Indices / Bones / LOD..
.VTX Intermediate texture.
.VVD Binary, ?



Model files in gamedata are generated from SMD files and a QC file using studiomdl.exe. Those files must be in the rawdata ("troydp/modelsrc") under the same category as in the gamedata.

“..\SourceMods\troydp\resource Resource
Contains resources like fonts (.ttf) and icons (.ico)

“..\SourceMods\troydp\scripts

Scripts
Contains the scripts for the mod:

liblist.gam Editable Valve mod game information file.
game.txt Game specific definitions
gameinfo.txt Valve Game Info file
game_sounds_manifest.txt Call the other game_sounds_* files to preload sound
game_sounds_vehicles.txt Sound configuration for vehicles
game_sounds_weapons.txt Sound configuration for weapons
HudLayout.res Editable HUD layout.
kb_* Keyboard binding
weapon_(weaponName).txt TDP Weapon data associated with our code

and other scripts that we'll develop....


“..\SourceMods\troydp\sound

Gamedata Sounds
Contains sounds (.wav) ?.

soundscapes.txt Soundscapes defintions of sounds to be played in-game. (DSP effects, playback, randomizing, looping, crossfading)