francogp wrote:
I have a question. I use the official "alternative" rule for critic skill check (if you roll 20, add +5 to the final result, if you roll 1, substract 5 to the final result). What code line should I modify to do this? (I need a label saying "Critic" too)
nobody?

Assuming this rule is used only for Ability- and Skill-checks here is some code that does what you want. Just replace the "d20Check" macro on the "Lib:Execute" lib token with the code below.
Code:
<!-- d20Check-->
[H: DNT_Skill = json.get(macro.args, "Skill")]
[H: DNT_Ability = json.get(macro.args, "Ability")]
[H: DNT_AidTarget = json.get(macro.args, "Target")]
[H: DNT_RawMod = if(json.get(macro.args, "Mod") == "", 0, json.get(macro.args, "Mod"))]
[H: DNT_Mod = eval(string(DNT_RawMod))]
[H: DNT_ModFormat = "%{DNT_RawMod}(%{DNT_Mod})"]
<!-- Determines skill and ability to use-->
[H, if(DNT_Ability == "" && DNT_Skill != ""): DNT_Ability = json.get(json.get(DNA_SkillsList, DNT_Skill), 3)]
[H, if(DNT_Skill == ""): DNT_CheckPenalty = 0; DNT_CheckPenalty = if(json.get(json.get(DNA_AbilityScores, DNT_Ability), 3) == 1, if(DNA_CheckPenalty == "", 0, DNA_CheckPenalty), 0)]
[h, if(DNT_Skill == ""): DNT_SkillRating = 0; DNT_SkillRating = json.get(json.get(DNA_SkillsList, DNT_Skill), 2)]
[H: DNT_AbilityRating = json.get(json.get(DNA_AbilityScores, DNT_Ability), 2)]
[H: DNT_LvlBonusAdd = if(DNT_Ability == "", 0, DNA_LevelBonus)]
<!-- Assembles the Output numers-->
[H: Die = if(json.get(macro.args, "GMDieRoll") == "", 1d20, json.get(macro.args, "GMDieRoll"))]
[H: Rating = DNT_AbilityRating + DNT_SkillRating + DNT_CheckPenalty + DNT_LvlBonusAdd + if(Die == 20,5,if(Die == 1,-5,0))]
[H: Mod = if(isNumber(DNT_RawMod) == 1, DNT_RawMod, strformat(DNT_ModFormat))]
<!-- Output Names-->
[H, if(DNT_Ability == ""): DNT_AbilityName = ""; DNT_AbilityName = json.get(json.get(getProperty("DNA_AbilityScores"), DNT_Ability), 0)]
[H, if(DNT_Skill == ""): DNT_SkillName = ""; DNT_SkillName = json.get(json.get(getProperty("DNA_SkillsList"), DNT_Skill), 0)]
[R: if(isGM() == 1 && getLibProperty("GMScreen", "Lib:Information") == 1, "<b>[Rolls behind the GM Screen]</b><br>", "")]
[R: getLibProperty("GameMessage", "Lib:Information")] [R: if(json.get(macro.args, "Output") == "", "", token.name + ":")] I make a [R: if(DNT_SkillName == "", DNT_AbilityName, "")] <span color="black">[R: macroLink(DNT_SkillName, "Info@Lib:Sheet", "none", json.set("", "WindowType", "Skill", "Skill", DNT_SkillName), currentToken())]</span> check [R: if(DNT_Skill != "" && json.get(macro.args, "Ability") != "", "together with " + DNT_AbilityName, "")] [R, if(DNT_AidTarget != ""), CODE:{to aid [R: getName(DNT_AidTarget)]};{[H: ""]}] and get a [R: if(Die == 20 || Die == 1,"<b>critical</b> ","")][R, if(json.get(macro.args, "HideRoll") == "1"), CODE:{[gt, st, t(Die + Rating + DNT_Mod): Die + Rating + Mod]};{[t(Die + Rating + DNT_Mod): Die + Rating + Mod]}].