Editing and Customization > Community Content

Map Script Creation and Validation Utility

(1/1)

Entropy-Soldier:
After running my own server for a bit, it's become obvious that it can be a pain to properly install custom maps.  Many map downloads lack the proper script files, and nearly all of them lack a reslist.  This is no surprise as GE:S has quite a few different script files, with some of them only being used by servers, so it's rather easy to miss one or two.

To fix that, I've created this small application to create and check all script files a map release might need.  Non-existent script files are created with inferred parameters, while existing ones are checked for syntax and valid content.  This allows map creators to check their own script files and server owners to ensure all files are valid and present before uploading the map to their server.


If you're a mapper, I'd recommend running this on your map distribution at least once before releasing it.  If you're a server owner, I'd recommend running this on every custom map you download to make sure all existing script files are valid, and to automate the creation of the reslist and fastdownload files.


What This Program Does

* Automatically creates GE:S map script, music script, and reslist files if they don't already exist in the proper locations.
* Checks already existing map script, music script, and reslist files if they do exist.  Reports any issues if found.
* Can check all script files in a given GE:S install, to detect possible errors with custom maps that are already installed.
* Can automatically compress all relevant files to .bz2 format for easy uploading to a fast-download server.


How to Use It

The program is designed to be run on a map release directory.  This includes the map itself, and all the files it requires to run correctly, in a file tree that represents their final destinations within the GE:S install.  A typical map release file tree might look something like this:



--- Code: ---
gesource 
|   
+---maps 
|       target_map.bsp 
|         
+---scripts 
|   |   soundscapes_target_map.txt 
|   |     
|   +---maps 
|   |       target_map.txt 
|   |         
|   \---music 
|           level_music_target_map.txt 
--- End code ---

Where "gesource" is the root directory.

The absolute easiest way to use the program is to drag and drop the target directory on top of the exe file.  Another straightforward way to use the program is to drop the .exe file in the root directory of the map install and run it.  It will assume its local directory is the root directory of your map release, and it will attempt to locate your local GE:S install in the usual locations.  If you're more savvy with the command line, however, just run it with the command line and specify the root map release directory as the first positional argument to the program. 

However you run it, the application will then scan through the map's root directory, scanning any existing script files for validity, and creating any files that do not exist. 

A local GE:S install is required for complete music script scans, though syntax can still be checked without it.  If the application is failing to locate your local GE:S install, the path to it can be specified using the -g command line parameter.

If you're a server owner downloading a custom map, running the application on the command line with the -c parameter will individually compress all relevant files to .bz2 format following a successful script validation.  It will place the resulting file tree in a folder in the root directory's parent directory called gesource_compressed.  The resulting file tree can then be uploaded straight to your fast download server!  Such a command would look like this:


--- Code: ---
ges_scriptutility.exe path/to/map/download/rootdir -g path/to/local/ges/install  -c
--- End code ---

Running the program with the -f flag will cause it to scan every script file in the specified GE:S install.  This is useful if you haven't been checking your scripts up to this point and want to make sure they're all working correctly.


--- Code: ---
ges_scriptutility.exe -g path/to/target/ges/install  -f
--- End code ---

For a full list of parameters, just run the program with --help and it will list all parameters along with what they do.


Program Download

Program Source Code

Multiplayer_X_:
GENIUS!  You tha man sir!    Thank you!

Navigation

[0] Message Index

Go to full version