Skip to content

Custom Scripting

Lê Hàn Minh Khang edited this page Jun 15, 2024 · 5 revisions

About

This will be about programming with included parser library

RHAI Scripting

Within src/modules, there are some interesting pre-made functionalities that can be scripted with RHAI.

I recommend checking out source code to know about the existing functions

Example:

In my_script.rhai

let smd = new_smd("./examples/duplicate.smd");

smd.duplicate_triangle("neon_blue", "yesman");

smd.write("./examples/duplicate_out.smd");

In the shell

$ ./gchimp custom_script my_script.rhai

Using APIs

At the moment, you can manipulate .map, .smd, .wad, and .qc formats.

Those are the bases of gchimp.

You can write your own functionality too!

Feel free to check out

Clone this wiki locally