An utility application to automate the creation of thumbnails within Source games
It starts by scanning your game's map directory for a list of available maps, then it feeds that into Preprocessors
that determines whether to add that map to queue for processing.
Examples of preprocessors would be checking if map is already processed, if map name starts with X, size of map file, etc.
It then starts the game and start the processing cycle for each map, after each map is processed, it then proceeds to call to Postprocessors
that can be used to determine what to do with the processed data.
Examples of postprocessors would be storing the data to database, generating meta files, data aggregation, moving screenshots to directory, etc.
-
Download and install the latest 1.11 Metamod from Metamod to your game folder
-
Download and install the latest release of Source Map Thumbnail for your system
- Extract contents of
server
to your game folder - Create a folder where you want destination screenshot to be and extract
config.toml
andSource-Map-Thumbnails
binary - Configure config.toml to your environment
- Extract contents of
-
Populate the game maps folder with the maps you wish to process
-
Execute the
Source-Map-Thumbnails
binary
For experienced users, you may want to create your own pre/post processors that furthers extends the functionalities within preprocessor
and/or postprocessor
directory.
Note that pre and post processors are chainable, and its order is the order the handle was registered
package preprocessor
type NameCheck_t struct {}
func (n NameCheck_t) Initiate() bool {
// Perform any initiation operations (obtaining file handle, etc)
// Return true if successful, false otherwise
}
func (n NameCheck_t) Handle(m string) bool {
if m == "some_desired_map_name" {
return true // Let it be added to queue
}
return false // Don't add to queue
}
package postprocessor
import (
"github.com/rumblefrog/Source-Map-Thumbnails/meta"
)
type DatabaseInsertion_t struct {
Database *SomeDatabaseConnectionPTR
}
func (db *DatabaseInsertion_t) Initiate() bool {
// Perform connections, schema setup, etc
// Return true if successful, false otherwise
return true
}
// Note that it has a void return type
func (db *DatabaseInsertion_t) Handle(m meta.Map_t) {
// Insert data into database
}
For more examples, view preprocessor
and postprocessor
directories respectively.
- Clone and install the latest AMBuild
- Clone the latest Metamod Source
- Clone the latest hl2sdk
- Navigate to extension and create a build directory and navigate to it
- Run
../configure.py
with necessary path options from the build directory - Run
ambuild
within the build directory
- Download and install Golang
- Clone latest master
- Run
go build
within the source directory
GNU General Public License v3.0