Source Documentation

From Spacebase DF-9 Wiki
Jump to: navigation, search
Under Construction

Introduction[edit | edit source]

This Source Documentation page is intended to provide information and links to resources regarding the released Spacebase-DF9 source code. This page is not intended to specifically provide class lists or class members but rather cover topics in structure and how the games inner systems work. Eventually we would love to provide code documentation generated directly from the source (i.e. luadocs) but at this time (as far as we know) is unavailable. Right now we are working on getting this and other resources put together to assist people in modding the game so please be patient.

Licensing[edit | edit source]

Open source license available at: http://opensource.org/licenses/cpal_1.0

Debugging[edit | edit source]

Debug Mode[edit | edit source]

To launch the game in debug mode locate the bootconfig.cfg in the savegame directory (Windows: My Documents\SpacebaseDF9\Saves Linux: *user*/.local/share/doublefine/spacebasedf9/Saves) and set the line "dev_mode" to true. Once debug mode is configured starting the game will display DEBUG VERSION under the game version at the bottom of the splash screens and starting menu.

Debug Mode Key Bindings[edit | edit source]

Key Function
~ (tilde) Toggle Enables/Disables Debug Mode keybindings
F2 FPS/Render/Draw Profiling
F3 Perf
F4 Debug Info
F6 Toggle UI
F10 Profiling/Shiny Start?
F11 Demo Save Cycle
F12 Perf Save Cycle
CTRL+R Reset/Restart Game
CTRL+L Load Savegame/Autosave
CTRL+Z Add Disasters Menu (Pizza Icon)
CTRL+P Toggle Particle Effects
CTRL+H Toggle Power Requirements
SHIFT+1 Force Event Forecast Reroll
SHIFT+4 Add 1000 Matter
SHIFT+6 Force Next Event
SHIFT+A Place Asteroid
SHIFT+B Place Blood Decal
SHIFT+C Place Citizen
SHIFT+D Destroy Tile
SHIFT+E Toggle Edit Mode
SHIFT+F Place Fire
SHIFT+H Place Raider
SHIFT+K Place Killbot
SHIFT+L Place Malady
SHIFT+M Place Monster
SHIFT+N Place/Test Animated Sprite
SHIFT+P Flip Check?
SHIFT+S Place Spawner
SHIFT+W Place Breaching Ship
SHIFT+Z Delete Character/Entity Mode

Debug Info Overlay Subpages[edit | edit source]

After pressing F4 to get the debug information overlay these keys let you cycle through debug pages related to the selected object

Key Function
1 Display Basic Debug Information
2 Display Needs Information
3 Display Friendship Information
4 Display Last Decision Information
5 Display Task History

File Formats[edit | edit source]

General[edit | edit source]

  • .lua - Primary scripting language files, these files contain programming logic for the game
  • .log - Log / Debug / Profiling output textual files
  • .tmp - temporary data generated by an application
  • .zip - compressed archive of data, used for mods
  • .sav - A savegame file, contains state information about a game session and other blob/serialized data important for the game
  • .setting - Setting/Configuration file
  • .cfg - Setting/Configuration file

Graphic and Animation[edit | edit source]

  • .rig - Generated LUA data structures containing reference/meta data for companion .brig files
  • .brig- Binary files containing rigging/skeleton data for entity animations
  • .anim - Generated LUA data structures containing reference/meta data for companion .banim files
  • .banim - Binary files containing animations
  • .tex - Compresses .dds images with custom headers containing sprite sheets, textures, etc...
  • .texparams - Generate LUA files containing texture meta data
  • .material - LUA files that define values related to game shaders
  • .matmod - Contains extra information for materials/shaders (possibly transitions?)
  • .bshd - Binary files for shaders
  • .particles - LUA files that define the behavior of particle effects
  • .effect - LUA files that are associated with .particles files (not entirely sure if used yet)

Audio[edit | edit source]

  • .fsb - Soundbanks/Packages of audio that contain sound effects, music, etc...
  • .fev - FMOD project files?

Extra[edit | edit source]

  • .lib - linked library file commonly found on WIN based operating systems
  • .so - shared object file on *NIX based systems generally the equivalent of .lib files
  • .exp - Export files associated with linked .lib files

Profiling[edit | edit source]

Scene Manager[edit | edit source]

Data Cache[edit | edit source]

User Interface[edit | edit source]

Assets[edit | edit source]

Contributing[edit | edit source]

If you'd like to contribute to this documentation or help out with something else please join us in the Talk section or on irc.freenode.net #SBDF9modding (WebClient)