Update modSyntax.md to include changed format for skills
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
This syntax is used all over the codebase, but there are two locations that hold the majority of them: [ModParser](../src/Modules/ModParser.lua) and [Skill Stats](../src/Data/SkillStatMap.lua).
|
||||
|
||||
The standard format of a mod looks like this: `mod(ModName, ModType, Value, source, modFlags, keywordFlags, extraTags)` See the function declaration [here](../src/Modules/ModTools.lua#L20-L46)
|
||||
In ModParser, the standard format of a mod looks like this: `mod(ModName, ModType, Value, source, modFlags, keywordFlags, extraTags)` See the function declaration [here](../src/Modules/ModTools.lua#L20-L46)
|
||||
For Skills, the format is [simplified slightly](../src/Modules/Data.lua#L51-L60) to remove the `source` parameter, as that is [added in automatically](../src/Modules/Data.lua#L70) based on the gem it came from.
|
||||
|
||||
### ModName
|
||||
Used as a key, so you can reference this mod elsewhere in PoB. Can really be anything, but look around the codebase to find ones you need (e.g. "Damage", "Life", "PhysicalDamageGainAsLightning", etc)
|
||||
@@ -62,4 +63,4 @@ Often a mod will only apply under certain conditions, apply multiple times based
|
||||
* ModFlagOr: Used when you only need one ModFlag to match, e.g. `["with axes or swords"] = { flags = ModFlag.Hit, tag = { type = "ModFlagOr", modFlags = bor(ModFlag.Axe, ModFlag.Sword) } },` needs `Hit`, but can use either of the other two flags
|
||||
* modFlags: Use `bor` as if you were adding ModFlags normally
|
||||
* KeywordFlagAnd: Used when you need all of the KeywordFlags to match
|
||||
* keywordFlags: Use `bor` as if you were adding KeywordFlags normally
|
||||
* keywordFlags: Use `bor` as if you were adding KeywordFlags normally
|
||||
|
||||
Reference in New Issue
Block a user