Skip to content

Command‐line interface

Lê Hàn Minh Khang edited this page Jan 13, 2025 · 8 revisions

About

Command-line interface is supported along with graphical interface. This will help integrate gchimp into your workflow easily

Usage

khang@fedora:~/gchimp$ ./target/release/gchimp --help
map2prop-rs

Available modules:
custom_script
light_scale
rotate_prop_static
texture_scale
s2g
missing_texture
illegal_brush
map2mdl
split_model
loop_wave
resmake
smd_compile
khang@fedora:~/gchimp$ ./target/release/gchimp s2g
error: the following required arguments were not provided:
  --path <PATH>

Usage: gchimp s2g --path <PATH>

For more information, try '--help'.

Simply running the binary with AT LEAST ONE extra argument will print out the CLI help. By then, you can choose a command and it will show you help text.

custom_script

Refer to Custom Scripting

light_scale

Scales every light entity by some numbers.

rotate_prop_static

Rotates every prop_static. It is a thing because Source models are slightly rotated when port the maps.

This can also rename prop_static classname into something else.

texture_scale

Scales every texture by a number. If texture still has low scaling, scale that again.

s2g

Eh, just read the help text

missing_texture

Finds missing textures in a map from given WAD(s)

illegal_brush

Finds brushes with more than 32 faces

map2mdl

Refer to https://github.com/khanghugo/gchimp/wiki/Map2Mdl

split_model

Takes in a pre-made QC file. That QC file will point to an SMD that has too many vertices. The script will then modify both SMD and QC so that there will be new QC(s) and SMD(s) that you can compile. This is to circumvent the "too many vertices" error.

Can be used in conjunction with BLBH if your model has too many vertices and fails the compiler step.

loop_wave

Loops your .wav. This functionality will also re-encode your .wav to 22050 Hz, Mono, and PCM16U.

resmake

Creates .RES file and then also .ZIP.

smd_compile

Compiles a static mesh (.smd) without writing a .qc file.

Need-to-knows

I don't maintain this part as well as it should be like the graphical part. So some of the times there will be missing features for command-line because I don't have the motivation to add that.

Clone this wiki locally