From 0fe2c468f867e9afe755a7d4e619cbbc04396002 Mon Sep 17 00:00:00 2001 From: Wires77 Date: Sat, 16 Dec 2023 01:32:14 -0600 Subject: [PATCH] Update modSyntax.md to include changed format for skills --- docs/modSyntax.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/modSyntax.md b/docs/modSyntax.md index f36698e9..6efba66f 100644 --- a/docs/modSyntax.md +++ b/docs/modSyntax.md @@ -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 \ No newline at end of file + * keywordFlags: Use `bor` as if you were adding KeywordFlags normally