Engine tools

From Valve Developer Community
Revision as of 05:15, 4 March 2025 by KiwifruitDev (talk | contribs) (New description, add info on creating new tools, loading tools in older branches and 64-bit builds, remove speculation, fix grammar)
Jump to navigation Jump to search
English (en)Translate (Translate)

Engine tools are in-game Source Source tools that may be used to aid in development, ease repetitive tasks, or otherwise manipulate the game in real time.

List of Tools

Official tools created and used internally by Valve Valve:

Third-party Engine Tools

Usage

To launch a game or mod in tools mode, run a command like this:

hl2.exe -tools -nop4 -game "path to gameinfo"

Failure to specify -nop4 will lead to the engine exiting silently.

When the game has loaded you will be presented with the first tool that was loaded, probably the Actbusy one. To change to a different tool use the Tools item in the main menu.

Setting Key Bindings

to set key bindings click Edit -> Key Bindings

the Key Bindings Editor window will appear

KeyBindingsEditor.jpg

Todo: Explain the Key Bindings Editor

Loading New Tools

Warning.pngWarning:You are likely to encounter instability if you try to mix engine branches.

In Left 4 Dead 2 Left 4 Dead 2 and later, you can manage tool availability with the toolload and toolunload console commands or by editing the engine's bin/enginetools.txt file. There is a GUI window for this too, but it's currently broken.

In earlier engine branches, tools must be specified in bin/sdkenginetools.txt in order to load:

"enginetools"
{
	"library"	"tools/commedit.dll"
	"library"	"tools/pet.dll"
	"library"	"tools/vmt.dll"
}

For 64-bit engine builds, use bin/x64/sdkenginetools.txt. Due to a VPC script bug, 64-bit tool modules are placed in bin/tools/x64 instead of bin/x64/tools. Therefore, loading 64-bit tools requires directory traversal:

"enginetools"
{
	"library"	"../tools/x64/commedit.dll"
	"library"	"../tools/x64/pet.dll"
	"library"	"../tools/x64/vmt.dll"
}


Development

The SDK provides header files at public\toolframework\ with which new editor tools can be written.

Tool framework modules must expose an interface derived from IToolDictionary using VTOOLDICTIONARY_INTERFACE_VERSION. Tools provided by the dictionary are derived from IToolSystem.

Engine tools are usable throughout any mod that depends on the targeted SDK version, making it possible to load custom tools into others' mods.

Custom engine tools are responsible for implementing their own UI code.