ModMaker
Version 1.5
ModMaker is a utility to aid with the creation and development of modifications using the Source game engine. This article is intended to introduce you to features of ModMaker and walk you through some of the more complex workings.
Prerequisites
ModMaker is Microsoft .NET framework application and should run on Windows XP or newer Windows OS. ModMaker requires Steam to be installed and the appropriate version of the Source SDK for the mod(s) you will be working on.
Installation
Download the ModMaker zip file and extract the ModMaker folder and it's contents. Run ModMaker.exe to start the utility.
|
|
This is the main ModMaker window from which you select the mod you want to work with and launch the utilities that operate on that mod.
Mods are listed on the left hand side along with their respective icons. These are detected automatically by ModMaker, however you can refresh the list using the Refresh menu option. Hovering the cursor over a mod in the list will tell you where that mod is installed to.
New Source 2013 mods can be created through the File->New menu option. See the New Mod Wizard section for more information about setting up a new mod.
Here you can see I have the mod “Exterminatus – Beta 8” selected. I can launch this mod (with various options) from the Play section on the right.
The folder and Tools icons are specific to the selected mod.
The Help menu contains links to many websites that are useful as a reference for Source moding. |
Folders
The “Install” folder opens the folder where the mod is installed to and it's gameinfo.txt can be found. This is the folder that you distribute to players to allow them to play your mod.
The “SDK Tools” folder opens the folder where SDK version used by this mod keeps it's binary tools like the Hammer VRAD, and VTEX.
The “Source” folder is where ModMaker thinks the source (un-compiled maps, models, sourcecode, raw PSDs) for the mod is kept. It tries to deduce wher this folder is in relation to the map sources are stored in Hammer. If the mod has not been set up in the SDK the Source file will not be listed. You can use the “Setup Source SDK” tool to specify the Source folder and add the selected mod to the Hammer configuration.
In this documentation you may see files refereed to by paths relative to these “standard” folders.
Additional folders can be added by dragging their icons into this list from Windows Explorer. ModMaker stores these shortcuts in it's options/mods.txt file.
Tools
Tool options vary depending on the version of the SDK that the selected mod uses. The screenshot above shows the tools that are compatible wit the 2013 version of the SDK.
The “Compiler” tool is a drag and drop way of launching utilities associated with files of that type. IE drag a QC script on to the the compiler icon and it will try and compile it with StudioMdl. You can associate additional programs with file types in the File->Options menu item.
“Setup Source SDK” is designed to configure the appropriate SDK version to use the current mod and specify where to save it's source files. This tool will also add references to and FGD files in the Install folder. This is very useful for mappers to help them get Hammer configured quickly with a new mod. See the Setup Source SDK for a step by step guide.
“Hammer” , “Model Viewer” and “Face Poser” are all shortcuts to lunch the 2013 version of these tools from the SDK. Mods based on earlier versions will get a “Source SDK” launcher tool instead.
“SMD to Prop” is a tool to help turn SMD or OBJ model sources into working Source prop models with a minimum of fuss. This tool generates a QC script based on the model source, converts any materials used by the model to VTFs and VMTs and compiles the QC script to create the model in your mod's Install/Models folder.
“FGD editor” is used to create Forge Game Data files for configuring Hammer to work with custom entities in your mod. FGD editor can also generate boilerplate C++ code from the entity definitions, saving you coding time. See the FGD editor section for a more detailed walk through.
The “RES Editor” tool is used to manage the layout of VGUI panels used in the HUD, menus and such for Source games. A basic selection of VGUI controls are supported in the shipped version, but you can specify additional types of panel in the options/vgui_controls.txt.
“Lights” is a tool for visually managing the configuration of light emitting materials in you mod's maps and other advanced lighting features. Lights operates on the RAD files used to configure the VRAD utility that adds lighting to maps. See the Lights section for how to configure a light emitting material.
“Sound Scripter” is a very basic tool that scans you mod's Install folder for sounds that are not included in the sound manifest and creates script entries for them and adds them to the sound manifest. This is a very quick of integrating a large batch of sounds delivered by an artists into the mod that still allows you to tweak their parameters at a later date.
The “Localization” tool is designed to help you translate your mod into other languages and add translation tokens to the localization files used by the client VGUI.
“Cleanup” is a basic tool that clears out all the temporary and user specific files that Source creates while you are developing and testing your mod from the Install folder. This is a recommend step before distributing your mod to other players or just saving some disk space.
“Steampipe Packer” is only available to Source 2013 and later mods. It adds any loose files it can from your mods Install folder into VPK archives for faster loading and adds them to your mods gameinfo.txt. The key and list file I generates are stored in your mods Source folder.
“Make Patch” adds any files from your Install folder that have been changed since you last ran it to a zip (or 7z) archive. This is very useful for distributing updates to testers on a regular basis, without having to send them the entire mod each time. So you don't spend time distributing junk the Cleanup tool will be run first giving you the option to clean up your Install folder before packaging.
The “Make Installer” produces a self installing executable containing your mod's entire Install folder using NSIS. Players love these installers as they don't even need to think about where to extract the mod to, it does it all itself. So you don't waste space distributing junk the Cleanup tool will be run first giving you the option to clean up your Install folder before building and installer. Installer scripts (NSI files) are saved to your mod's Source folder, so you can manually tweak them.
Shortcuts
You can drag other files into the mod tools list to add a shortcut to the view. This is useful for organizing you design document or project and solution files. Mods created through the wizard add a shortcut to the solution file here automatically. Shorcuts are stored in the options/mods.txt file.
Mod Maker includes the ability to create new Source SDK 2013 mods. It does this by downloading mod source from Valve's GIT distribution and customizing it to your computer and mod choices.
|
|
Before it starts downloading the default mod from GIT Hub the wizard will prompt you for some information about the mod you want to create.
Once you've entered a name for the mod it can suggest a name for it's Install folder and suggest a location for the Souce folder.
Once you click OK the default mod will be downloaded to your Source folder and the necessary parts extracted and customized to your settings. |
Here you can see the suggested naming an locations for a new mod I am creating
Once you click OK ModMaker wil begin downloading and configuring a default mod. This can take some time depending on the speed of your internet connection, CPU and storage, so ModMaker keeps you informed with this neat little progress window.
|
|
|
ModMaker sets up your new mod for the latest version of visual studio it can find on your machines and sets the project to compile to and debug from your mod's Install folder. Once you mod has been configured it will be listed in ModMaker and you are ready to begin modding for real.
Many vital pieces of information and settings about what kind of mod you are making are kept in a file called Install/GameInfo.txt . Clicking on the Title or Icon for the selected mod will open an editor to allow you to easily tweak many of these settings. The editor is split into 3 tabss:
|
|
Library This tab allows you to edit the information about you mod that is displayed in the Steam library. Click the icon (or it's place holder) to specify a file to use as your mods icon. |
|
|
Menus Several game menu options can be configured through the menu tab. Ttile1 and 2 are displayed on the main menu using a title font specified in resources/clientscheme.res the default (halef-life2) font for this is missing lots of letters, so unless you change that font a custom title will not look right. |
|
|
Maps Typing certain commands into the console (map, changelevel etc) will offer auto-complete suggestions from the list of maps. Ticking maps off from here will prevent those maps form being suggested. |
Since the gameinfo.txt is crucial to the functioning of your mod the editor will make a date stamped backup of the file before saving any edits. You should clear out these backups before distributing your mod as the clean-up utility is not yet backup aware.
Hammer and the Source SDK in general use GameConfig.txt in the SDK Tools folder to store mod and game based configuration. This tool adds configuration for the selected mod to that file automatically, making the mod ready to work with in Hammer. Simply select the mod you want to set up from the list in ModMaker and click the Source SDK Setup. The setup will want to know where you want to save the source (and map) files for this mod.
Here I am selecting the Source folder for the cyperpunk NEOTOKYO mod that I just installed. Almost immediately i'll be asked if I want to run the Source SDK (NEOTOKYO uses the 2006 version of Source), the setup has completed already.
If I say yes, and pick the 2006 engine from the Source SDK engine version I can see that the mod has been added to the list of games.
The Lights tool works with RAD files , which enable configuration of 3 kinds of lighting in VRAD:
Light emitting materials
Materials that don't cast shadows
and Models who's textures should cast shadows
The tool lists one kind of setting at a time, you can switch between these views using the View menu. Frankly I've never had call to use anything except light emitting textures, but the option is there if you are hardcore enough to use it.
To add a light emitting texture enter it's path, relative to the materials folder in the botx at the top of the list and click the + button. You can then edit the colour and intensity of the light emitted on the right hand side. Click the square areas to pick a color. If you leave the HDR selling black or 0 intensity it will use the same settings as as the LDR colour and intensity.
Non shadowing materials and shadow casting models can be added in a similar way.
To create an FGD file for your mod you will probably want to inherit some features of existing standard entities, so I recommend copying base.fgd from the SDK Tools folder into your Install folder.
Next save an empty FGD file into your Install folder and Include base.fgd by entering it's name in the include menu. Sorry this is incredibly crude and cumbersome but ModMaker is just too dumb to work out how to include other FGDs on it own. This process should get you a whole bunch of useful base classes you can build your own entity types on top of.
Next pick Entities->New to start creating a new entity type for your mod. You should see something like this:
I recommend prefixing all your custom entity types so your mappers can find them easily. Types control how instances of the entity are edited in Hammer. Description should appear in the entity properties in Hammer and bases let you use features from Base entities in this FGD or included FGDs, what you see here are the Base classes provided by base.fgd. If you already have the entity type coded you can paste the DATADESC macro in here and it will work out the properties, inputs and outputs for us.
Above you can see the settings i'm using for a demo entity type, a brush entity called dfr_checkpoint. If I click OK the new entity will be added to the FGD we're editing and selected from the list. Bellow you can see the properties dfr_checkpoint has inherited from it's base classes.
Looking though the tabs you can see that it has also inherited many useful inputs and outputs.
|
|
|
You can add features, like properties and Inputs to the selected entity from the Add menu, which will prompt you for a name for the new feature.
|
|
|
Bellow you can see me setting up a new property of the dfr_checkpoint entity. If you decide you don't want a feature just click the X to remove it.
Save your FGD and add it to the options in Hammer and you can start mapping with it. Here is how my demo entity looks in Hammer.
The FGD editor has one more trick up it's sleeve, you can export C++ code to base your new entities on from the File menu. Here's the code it generates for dfr_checkpoint
|
dfr_checkpoint.h
|
dfr_checkoint.cpp
|