Files
jak-project/custom_assets
Hat Kid 710f3ac117 custom levels: etie and build actor support for jak2/3 (#3851)
Custom levels for Jak 2/3 now support envmapped TIE geometry. The TIE
extract was also changed to ignore materials that have the specular flag
set, but are missing a roughness texture.

Jak 2/3 now also support the `build-actor` tool.

The `build-custom-level` and `build-actor` macros now have a few new
options:

- Both now have a `force-run` option (`#f` by default) that, when set to
`#t`, will always run level/art group generation even if the output
files are up to date.
- `build-custom-level` has a `gen-fr3` option (`#t` by default) that,
when set to `#f`, will skip generating the FR3 file for the custom level
and only generate the GOAL level file to skip the potentially slow
process of finding and adding art groups and textures. Useful for when
you want to temporarily edit only the GOAL side of the level (such as
entity placement, etc.).
- `build-actor` has a `texture-bucket` option (default 0) which will
determine what DMA sink group the model will be placed in, which is
useful to determine the draw order of the model. Previously, this was
omitted, resulting in shadows not drawing over custom actors because the
actors were put in a bucket that is drawn after shadows (this behavior
can be restored with `:texture-bucket #f`).
2025-02-01 18:04:26 +01:00
..
2024-05-18 18:18:25 +02:00

Custom Levels

Disclaimer: custom levels are still in development and are missing most features.

The first three steps are already done for "test zone", so this can be used as a starting point.

1: File Setup

To create a custom level, copy the layout of custom_assets/jak1/levels/test-zone. See test-zone.jsonc for information on how to name things. The .gd file also contains the level name.

2: Modify the engine

Modify goal_src/jak1/engine/level/level-info.gc to add level info for each custom level. There is level info for test-zone at the bottom that can be used as an example.

3: Modify the build system

Modify goal_src/jak1/game.gp and add a custom level target:

(build-custom-level "test-zone")
;; the DGO file
(custom-level-cgo "TESTZONE.DGO" "test-zone/testzone.gd")

4: Export the GLTF file from blender.

For now, all meshes are displayed and treated as ground collision. This causes buggy collision because walls shouldn't use "floor" mode.

Blender will create a .glb file, which must have the name specified in the .jsonc file and should be located in custom_assets/jak1/levels/your_level

5: Rebuild the game

Any time the .glb file is changed, you must rebuild the game. Launch the compiler (goalc) and run (mi) to rebuild everything. It's recommended to leave the compiler open - it will remember files that haven't changed and skip rebuilding them.

6: Go to the custom level

Start the game in debug mode gk.

In the compiler window, run (lt) to connect to the game. You must run this again every time you restart the game. If this doesn't work, there could be a firewall issue and you must allow goalc/gk to use the network. They don't make any outside connections.

In the compiler window, run a command like (bg-custom 'test-zone-vis) to load and start at a custom level.