mod-management-functions
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionNext revisionBoth sides next revision | ||
mod-management-functions [2020/05/06 16:49] – created maxime | mod-management-functions [2020/07/17 14:35] – maxime | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Mod management functions ====== | ====== Mod management functions ====== | ||
+ | |||
+ | All these functions are available on your mod object | ||
===== dofile ===== | ===== dofile ===== | ||
Line 19: | Line 21: | ||
Register a new game asset | Register a new game asset | ||
- | '' | + | '' |
^ Name ^ Type ^ Description ^ | ^ Name ^ Type ^ Description ^ | ||
Line 41: | Line 43: | ||
Override an existing game asset (see [[: | Override an existing game asset (see [[: | ||
- | '' | + | '' |
^ Name ^ Type ^ Description ^ | ^ Name ^ Type ^ Description ^ | ||
Line 62: | Line 64: | ||
Assign an asset ID to an asset in the mod's directory | Assign an asset ID to an asset in the mod's directory | ||
- | '' | + | '' |
^ Name ^ Type ^ Description ^ | ^ Name ^ Type ^ Description ^ | ||
Line 74: | Line 76: | ||
Registers a component to a prefab (see [[: | Registers a component to a prefab (see [[: | ||
- | '' | + | '' |
^ Name ^ Type ^ Description ^ | ^ Name ^ Type ^ Description ^ | ||
Line 88: | Line 90: | ||
} | } | ||
myMod: | myMod: | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== registerBehaviorTree ===== | ||
+ | |||
+ | Registers a new behavior tree (see [[: | ||
+ | |||
+ | '' | ||
+ | |||
+ | ^ Name ^ Type ^ Description ^ | ||
+ | | //'' | ||
+ | |||
+ | ==== Example ==== | ||
+ | |||
+ | <code lua> | ||
+ | myMod: | ||
+ | Id = " | ||
+ | VariableList = { | ||
+ | ... | ||
+ | }, | ||
+ | Root = { | ||
+ | ... | ||
+ | } | ||
+ | }) | ||
</ | </ | ||
Line 96: | Line 123: | ||
Registers an asset processor to a file (see [[: | Registers an asset processor to a file (see [[: | ||
- | '' | + | '' |
^ Name ^ Type ^ Description ^ | ^ Name ^ Type ^ Description ^ | ||
Line 118: | Line 145: | ||
Configure a prefab with a list of flags | Configure a prefab with a list of flags | ||
- | '' | + | '' |
^ Name ^ Type ^ Description ^ | ^ Name ^ Type ^ Description ^ | ||
Line 127: | Line 154: | ||
<code lua> | <code lua> | ||
- | local flagArray = { " | + | local flagArray = { " |
myMod: | myMod: | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== registerClass ===== | ||
+ | |||
+ | Registers a new data type, or a new type extending an existing one | ||
+ | |||
+ | '' | ||
+ | |||
+ | ^ Name ^ Type ^ Description ^ | ||
+ | | //'' | ||
+ | |||
+ | ==== Example ==== | ||
+ | |||
+ | Definition of a new component type with two properties, and an init function | ||
+ | |||
+ | <code lua> | ||
+ | local newClassInfo = { | ||
+ | TypeName = " | ||
+ | ParentType = " | ||
+ | Properties = { | ||
+ | { Name = " | ||
+ | { Name = " | ||
+ | } | ||
+ | } | ||
+ | |||
+ | function newClassInfo: | ||
+ | self.CurrentPosition = self: | ||
+ | end | ||
+ | |||
+ | myMod: | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== registerEnumValue ===== | ||
+ | |||
+ | Registers a new dynamic enumeration value | ||
+ | |||
+ | '' | ||
+ | |||
+ | ^ Name ^ Type ^ Description ^ | ||
+ | | //'' | ||
+ | | //'' | ||
+ | |||
+ | ==== Example ==== | ||
+ | |||
+ | <code lua> | ||
+ | myMod: | ||
</ | </ | ||
mod-management-functions.txt · Last modified: 2022/10/07 11:18 by maxime