Engine tools: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (added entity placement tool)
(New description, add info on creating new tools, loading tools in older branches and 64-bit builds, remove speculation, fix grammar)
Line 9: Line 9:
[[File:Deferred_phong_ref.png|thumb|The [[Light editor]].]]
[[File:Deferred_phong_ref.png|thumb|The [[Light editor]].]]
[[File:Shadereditor_tutorial_assign.png|thumb|The [[Source shader editor]].]]
[[File:Shadereditor_tutorial_assign.png|thumb|The [[Source shader editor]].]]
Bundled with {{Source|4}} are various engine related tools that help with doing various tasks.
'''Engine tools''' are in-game {{Source|4}} tools that may be used to aid in development, ease repetitive tasks, or otherwise manipulate the game in real time.


== List ==
== List of Tools ==
# [[Particle Editor]]
Official tools created and used internally by {{Valve|4.1}}:
# [[Material Editor]]
* [[Particle Editor]]
# [[ActBusy Script Editor]]
* [[Material Editor]]
#[[Entity Placement Tool]]{{only|{{l4d2}}}}
* [[ActBusy Script Editor]]
# [[Commentary Editor]]
* [[Entity Placement Tool]] {{only|{{l4d2}}}}
# [[Foundry]]
* [[Commentary Editor]]
# [[Source Filmmaker]]
* [[Foundry]]
# [[Light editor]] {{asd|only|addtext={{p2d}}{{lw}}}}
* [[Source Filmmaker]]
# [[:Category:SourceShaderEditor|Source Shader Editor]] {{only|{{asd}}}}
[[:Category:Third Party Engine Tools|Third-party Engine Tools]]


== Usage ==
== Usage ==
Line 30: Line 30:


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.
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.
Launching the [[Source shader editor]]:
  hl2.exe -shaderedit "path to gameinfo"


== Setting Key Bindings ==
== Setting Key Bindings ==
Line 43: Line 40:
{{Todo|Explain the Key Bindings Editor}}
{{Todo|Explain the Key Bindings Editor}}


=== Loading new tools ===
=== Loading New Tools ===
{{warning|You are likely to encounter instability if you try to mix engine branches.}}
{{warning|You are likely to encounter instability if you try to mix engine branches.}}


In {{l4d2|4.1}} and later you can manage tool availability with the <code>toolload</code> and <code>toolunload</code> console commands or by editing the engine's <code>bin/enginetools.txt</code> file. There is a GUI window for this too but it's currently broken.
In {{l4d2|4.1}} and later, you can manage tool availability with the <code>toolload</code> and <code>toolunload</code> console commands or by editing the engine's <code>bin/enginetools.txt</code> file. There is a GUI window for this too, but it's currently broken.
 
In earlier engine branches, tools must be specified in <code>bin/sdkenginetools.txt</code> in order to load:
<pre>
"enginetools"
{
"library" "tools/commedit.dll"
"library" "tools/pet.dll"
"library" "tools/vmt.dll"
}
</pre>
 
For 64-bit engine builds, use <code>bin/x64/sdkenginetools.txt</code>. Due to a [[VPC]] script bug, 64-bit tool modules are placed in <code>bin/tools/x64</code> instead of <code>bin/x64/tools</code>. Therefore, loading 64-bit tools requires directory traversal:
<pre>
"enginetools"
{
"library" "../tools/x64/commedit.dll"
"library" "../tools/x64/pet.dll"
"library" "../tools/x64/vmt.dll"
}
</pre>


In earlier engine builds the tools system is locked down, probably to ensure that we don't run any of the tools that were leaked in 2007 from Valve in the initial {{tf2|4.1}} beta. They can still be run by obtaining a less-than-legal copy of the beta but of course that restricts you to a ''very'' old build of the game.


== Development ==
== Development ==
The SDK provides some header files at <code>public\toolframework\</code> with which new editor tools can theoretically be written. There is no sample source code, however.
The SDK provides header files at <code>public\toolframework\</code> with which new editor tools can be written.
 
Tool framework modules must expose an interface derived from <code>IToolDictionary</code> using <code>VTOOLDICTIONARY_INTERFACE_VERSION</code>. Tools provided by the dictionary are derived from <code>IToolSystem</code>.
 
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.
 
[[Category:Modding]]<!--Why?-->
[[Category:Modding]]<!--Why?-->
[[Category:Official Source Tools]]
[[Category:Official Source Tools]]
[[Category:Source]]
[[Category:Source]]

Revision as of 05:15, 4 March 2025

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.