dependencies
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| dependencies [2020/07/14 13:15] – created - external edit 127.0.0.1 | dependencies [2026/10/05 16:38] (current) – maxime | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Dependencies ====== | + | ====== Dependencies |
| ===== Hard dependency ===== | ===== Hard dependency ===== | ||
| - | If your mod depends on features/ | + | If your mod depends on features/ |
| - | To declare dependencies for your mod, add a ''" | + | To declare |
| - | <file json mod.json [enable_line_numbers=" | + | The same is done to declare DLC dependencies, |
| + | |||
| + | <file json mod.json [enable_line_numbers=" | ||
| { | { | ||
| " | " | ||
| Line 13: | Line 15: | ||
| " | " | ||
| " | " | ||
| + | |||
| + | " | ||
| " | " | ||
| Line 30: | Line 34: | ||
| ===== Soft dependency ===== | ===== Soft dependency ===== | ||
| - | If your mod uses another mod's content but can still work without it, this other mod is considered as a soft dependency. In this case, you can test in your script if this mod is already loaded with '' | + | If your mod uses a DLC's or another mod's content but can still work without it, this DLC or other mod is considered as a soft dependency. In this case, you can test in your script if this DLC/mod is already loaded with '' |
| + | <file json mod.json [enable_line_numbers=" | ||
| + | -- Test if the DLC I depend on is loaded | ||
| + | if (foundation.isDlcEnabled(" | ||
| + | .... | ||
| + | else | ||
| + | .... | ||
| + | end | ||
| - | <file json mod.json [enable_line_numbers=" | ||
| -- Test if the mod I depend on is loaded | -- Test if the mod I depend on is loaded | ||
| if (foundation.isModLoaded(" | if (foundation.isModLoaded(" | ||
dependencies.1594746929.txt.gz · Last modified: 2020/07/14 13:15 by 127.0.0.1
