Skip to content

Commit

Permalink
Added "RequiredXPacks" to "Your first mod"
Browse files Browse the repository at this point in the history
  • Loading branch information
IllustrisJack committed Jan 23, 2022
1 parent 8b8602c commit 97b0e5f
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions content/modding/your-first-mod.md
Expand Up @@ -62,12 +62,23 @@ A url to the mod's website, repository, or a place where a user can find mod upd

### `HasVeniceEXT`

A boolean representing whether this mod contains VeniceEXT scripts that need to be executed.
A boolean representing whether this mod contains VeniceEXT scripts that need to be executed.

### `HasWebUI`

A boolean representing whether this mod contains a custom WebUI bundle (`ui.vuic`) that must be sent to joining players.

### `RequiredXPacks`

An array with the required DLC expansion packs which are needed to join a server.\
For example `[1, 2, 3, 4, 5]`

`1` Back to Karkand\
`2` Close Quarters\
`3` Armored Kill\
`4` Aftermath\
`5` End Game

### `Dependencies`

A key => value mapping of other mods this mod depends on. The key is the name of the mod and the value is a version matching expression. The version matching expression can follow several patterns:
Expand Down Expand Up @@ -140,7 +151,7 @@ print('Hello world!')
print(MyModVersion)
```

This might seem a bit confusing at first, so let's explain what we're doing here. In the `ext/shared/common.lua` file we're declaring a new global variable called `MyModVersion`. Then, from the client and server `__init__.lua` scripts, we're loading the `common.lua` script (using the `require()` directive), which makes it so its code gets executed and that variable gets declared. We then print this variable to the console. Also note that we're prefixing the required file path with `__shared`. This tells the VeniceEXT engine to look for that file inside the `Shared` folder (you can find more information about how requiring scripts works [here](/vext/guides/code-splitting/)). You should now restart your server and also launch your VU client and join it.
This might seem a bit confusing at first, so let's explain what we're doing here. In the `ext/shared/common.lua` file we're declaring a new global variable called `MyModVersion`. Then, from the client and server `__init__.lua` scripts, we're loading the `common.lua` script (using the `require()` directive), which makes it so its code gets executed and that variable gets declared. We then print this variable to the console. Also note that we're prefixing the required file path with `__shared`. This tells the VeniceEXT engine to look for that file inside the `Shared` folder (you can find more information about how requiring scripts works [here](/vext/guides/code-splitting/)). You should now restart your server and also launch your VU client and join it.

In the server console you should see something like this:

Expand Down

0 comments on commit 97b0e5f

Please sign in to comment.