Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 45 additions & 2 deletions docs/Modding/guides/tools/rpakmodding.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,42 @@ Inside the mod's folder, create a new folder, called ``paks``. Move your .rpak f
![ModStructure](https://user-images.githubusercontent.com/66967891/181840035-3cfa24e0-efdd-49fa-85f6-60e6c4cc9a12.png)

Inside the ``paks`` folder that you created, make a new .json file called ``rpak.json``.
In this example, the ``camo_skin04_col.rpak`` rpak is completely replaced by ``example.rpak``.
This is fine for camo RPaks, but isn't suitable for more complex RPaks
In this example, the ``example.rpak`` RPak is loaded on every map.
This is fine for camo RPaks, but isn't suitable for more complex RPaks.

```json

{
"example.rpak": "."
}
```

#### Dynamic Map loading


To dynamically load your RPak, add an entry to the ``rpak.json`` that matches the path to the RPak (relative to the ``rpak.json`` file) and
set the value to some Regex that matches the maps that you wish.

```json

{
"foo.rpak": ".",
"bar.rpak": "mp_",
"baz.rpak": "mp_glitch",
"qux.rpak": "mp_coliseum|mp_colony02|mp_glitch"
}
```

- ``foo.rpak``: this RPak will be loaded on all maps.
- ``bar.rpak``: this RPak will be loaded on all maps that contain ``mp_`` in their name
- ``baz.rpak``: this RPak will be loaded on all maps that contain ``mp_glitch`` in their name (``mp_glitch`` being the intended map)
- ``qux.rpak``: this RPak will be loaded on all maps that contain either ``mp_coliseum``, ``mp_colony02``, or ``mp_glitch`` in their name.
So ``mp_glitch``, ``mp_colony02``, ``mp_coliseum`` and notably, also ``mp_coliseum_column``.

#### RPak loading - OLD

!!! warning
Using this old mod structure for your ``rpak.json`` file is deprecated and may stop being supported by Northstar at any time.

```json

Expand All @@ -202,6 +236,9 @@ This is fine for camo RPaks, but isn't suitable for more complex RPaks

#### Preload

!!! warning
"Preload" is now deprecated. New RPak mods should use dynamic map loading to load their RPaks.

This field tells Northstar whether or not to load a specific RPak as soon as RPak loading starts.

The field is a boolean. (``true`` or ``false``) and should be formatted like ``"<target_rpak>": true`` or ``"<target_rpak>": false``
Expand All @@ -210,6 +247,9 @@ Example: ``"my_new.rpak": true``

#### Aliases

!!! warning
"Aliases" is now deprecated. New RPak mods should use dynamic map loading to load their RPaks.

This field tells Northstar that a specific RPak should never be loaded, and a different RPak should be loaded instead.

The field should be formatted like ``"<target_rpak>": "<replacement_rpak>"``
Expand All @@ -218,6 +258,9 @@ Example: ``"common.rpak": "my_new.rpak"``

#### Postload

!!! warning
Postload is now deprecated. New RPak mods should use dynamic map loading to load their RPaks.

Comment on lines +257 to +259

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Due to R2Northstar/NorthstarLauncher#821 we probably shouldn't deprecate Postload. In fact, it should probably be moved out of the "old" section

This field tells Northstar that a specific RPak must be loaded directly after another specified RPak has finished loading.

The field should be formatted like ``"<target_rpak>": "<rpak_to_load_after>"``
Expand Down