Universal x64 level compilers

  • Program Developer:
    • GCS Game Word
  • Compiler edits and build:
    • SkyLoader
  • Acknowledgements:
    • Abramcumner
    • K.D.
  • The version described in the article: 1.5
  • Ap-pro forum topic

About

Universal level compiler that supports the compilation format for games of all series and has many keys to compile

editor centered

Compilation of compilers

  • Geometry compiler (SoC, CS, CoP)
  • Grass compiler (SoC, CS, CoP)
  • AI grid compiler (SoC, CS, CoP)
  • Spawn Compiler (SoC, CS, CoP)

Features

  • Support for x64
  • Support for major games in the series (except for spawn formats)
  • All compilers united in one application
  • Interface completely rewritten in WinForms
  • Added compiler menu, where you can choose a project level, set certain settings and run the compilation
  • A system for saving and loading settings of recent projects has been added
  • The number of threads created is no longer fixed, but depends on the number of processor cores
  • Migration to DirectXTex library to replace FreeImage and nvDXT now obsolete
  • Removed rendering of RGB and Sun lighting components, leaving only Hemi
  • Some phases of compilation and code parsing of third-party libraries were made
  • Integrated Discord Rich Presence to be able to monitor the status of compilation on a remote PC
  • Added an option to automatically shutdown the PC after compilation
  • Implemented a progress bar in the taskbar to display the current compilation status when minimized
  • Added keys for the accelerated compilation of levels for testing purposes.
  • Added experimental switches to disable some compilation phases and bypass KKS parameters
  • Added major changes to past compilers
  • Expanded information output on some bugs
  • Fixed some crashes of the original compilers
  • Possibility to force the use of smoothing groups on a certain geometry even if the -nosmg key is present (To use smoothing groups on a model it is necessary to assign a compile shader with _smg in its name to its materials (e.g. def_vertex\def_vertex_smg). The compile shader itself is enough to declone from the original one and rename it with this postfix)
  • Possibility to disable tessellation on certain geometry (for example, on nosun boxes). To do this you need to name a compile shader with _no_tess in its name. Keep in mind that disabling tessellation can cause problems with UV
  • Ability to disable shadow baking from certain MU models. Compile shaders of MU models must have _no_mu_shadow in the name. The difference between this solution and the usual disabling of the Cast Shadow checkbox is that in this case self-darkening of the MU model will be applied and the model will not be highlighted

It requires Microsoft Visual C++ 2017 Redistributable x64 installed.

Setup

The files must be moved to the root folder of the SDK


Functionality

Buttons

File Button

ButtonDescription
Recent ProjectsRecent Projects
ExitExit

Язык/Language Button

ButtonDescription
EnglishEnglish language
РусскийRussian language

Help Button

ButtonDescription
HelpShows helpful information

About Button

ButtonDescription
AboutAbout the program

Level Name

ButtonDescription
SelectSelects the level for compilation

Level Format

  • Input Version: (Input version of the level format)
  • Output Version: (Output version of the level format)

Threads

CheckboxesDescription
High PriorityEnables high priority

Discord Rich Presence

  • Do not use
  • Show compilation status only
  • Show level name and status

Keys

The following keys are supported/required

KeyDescription
-? or -helpcall help with a list of all startup keys
-f <NAME>level name in gamedata\levels\<NAME>\
-version <NAME>output level format (shoc/cs/cop)
-fsltx <NAME>use custom fsgame.ltx
-log_name <NAME>create a log file with custom name
-discordenable discord rich presence with showing project name
-discord_senable discord rich presence without showing project name
-tbbuse TBB multithreading (not recommended)
-t <NUM>number of threads

Geometry Keys

KeyDescription
-silentClose the program after compilation
-sleepShutdown the computer after compilation
-nohemiDisable baking lighting
-staticBake static lighting
-undergroundBake as underground level
-cformexport only collision level
-nosmgDo not use smooth groups
-notessdo not tessellate geometry
-noiseDo not create geometry of Progressive-type
-skipinvalidSkip invalid faces
-removeinvalidSkip and remove invalid faces
-skipthmIgnore missing thm-s and textures
Additional keys for geometry compilation
KeyDescription
-ppm <float>Hemi lighmaps quality (by default: use value from SDK)
-weld_dist <float>Weld distance (by default: use value from SDK)
-hemi_bias <float>Position bias for hemi calc (default: 0.1, vanilla: 0.001)
-highHigher priority for the threads
-silentClose the program after compilation
-sleepTurn off computer after compilation
-staticBake rgb+sun components of static lighting (doesn't work with -nohemi)
-nohemiDisable light and hemi calculating
-noimplDon't bake lighting for terrain
-undergroundDon't bake directional light for underground levels
-nomergeDon't merge geometry
-noweldDon't weld geometry
-nopoolDon't reload pool
-notessDon't tessellate geometry
-nosmgDon't use smooth groups (for cs/cop levels)
-noiseDon't create geometry of Progressive-type
-nocformDon't create level.cform
-nostripDisable geometry striptification
-dx_optOptimize geometry with D3DX optimizer instead of NvTriStrip
-cformExport level cform only
-no_mt_cdb_packDisable multithreaded collision packing
-giEnable Radiosity phase
-skipinvalidSkip invalid faces
-removeinvalidSkip and remove invalid faces
-skipthmSkip surfaces and .thm files if they don't exist
-noresizeDon't resize bigger textures to 1024x1024
-no_mt_muDon't run the lighting calculation for Multiple Usage objects in parallel with the main compilation
-no_rnd_deflDisable randomize deflectors
-tex_rgbaDon't compress lightmap textures
-tex_bc7Compress lightmap textures with BC7 format (DX11 Only)
-qual_draftset the quality of the scene in Draft (does not affect the exposed shaders)
-qual_highset the quality of the scene to High (does not affect the exposed shaders)
-saveobj_basesave level objects as .obj models to temp folder (base UV)
-saveobj_lmapsave level objects as .obj models to temp folder (lighmap UV)
-saveobj_cformsave level collision as .obj models to temp folder
-force_default_shaderforced replacement of "def_vertex" shaders with "default"
-force_vertex_shaderforced replacement of "default" shaders with "def_vertex"
-no_bcformSkip building rcast model and creating build.cform (works with -nohemi only)
-old_mergeUse old merging algorithm
-lmap_size <NUM>Lightmap size (default: 1024)
-border <NUM>BORDER parameter, experimental key (default: 1)
-subdiv_size <NUM>Box size for subdiving gemetry, experimental key (default: 32)
-bparams_extSupport for advanced level settings exported by Yara SDK

Grass

KeyDescription
-silentClose the program after compilation
-sleepShutdown the computer after compilation
-nohemiDisable baking lighting
-staticBake static lighting
-skipthmIgnore missing thm-s and textures
-noresizeDon't resize bigger textures to 1024x1024

AI-Map

Build Ai-Map

KeyDescription
-draftDo not calculate covers
-skipthmIgnore missing thm-s and textures
-f <NAME>Make AI-map
-large_aimapBuild for large AI-map (requires a modified game engine and SDK to work!)
-force_large_aimapForce opening of AI-grid of original format with a large number of AI-nodes (more than 8 million). The key is experimental, correctness of AI-grid is not guaranteed. For correct export you need AI-grid of new format

Check Ai-Map

KeyDescription
-noverboseDo not show info about single nodes

Spawn

KeyDescription
-no_separator_checkDisable some conflicts
-insert_graphEnable adding graphs to common spawn when building a SoC Level (Key for SoC only)
-actor_level <level_name>Select a level to spawn an actor. Avoids the routine of manually deleting an actor from each level. Only the actor from the selected level will be spawned, the others will be ignored. If it is not on the level, it will be automatically created in zero coordinates
-no_levels_sectionIgnore the list of levels from the [levels] section. Allows not to write each level to this section.
-skip_invalid_classSkip the "Can't create entity" crash. All objects with invalid and unknown classes will be ignored and will not be included in the common spawn
Additional spawns
ButtonsDescription
AddAdd spawn file
RemoveRemove spawn file
ClearClear spawn files
Spawn name
CheckboxesDescription
by defaultRenames the .spawn file by default (name chosen from the folder name)
  • Spawn name - Spawn name