dependencies
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
Previous revisionLast revision | |||
— | dependencies [2020/07/14 13:14] – maxime | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Dependencies ====== | ||
+ | |||
+ | ===== Hard dependency ===== | ||
+ | |||
+ | If your mod depends on features/ | ||
+ | |||
+ | To declare dependencies for your mod, add a ''" | ||
+ | |||
+ | <file json mod.json [enable_line_numbers=" | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | |||
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | ... | ||
+ | ] | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | ===== 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 [[foundation-library-functions: | ||
+ | |||
+ | |||
+ | <file json mod.json [enable_line_numbers=" | ||
+ | -- Test if the mod I depend on is loaded | ||
+ | if (foundation.isModLoaded(" | ||
+ | .... | ||
+ | else | ||
+ | .... | ||
+ | end | ||
+ | </ | ||
dependencies.txt · Last modified: 2020/07/14 13:15 by maxime