[
  {
    "type": "talk_topic",
    "id": "TALK_PERK_MENU_MAIN",
    "dynamic_line": "Lifestyle Perks:\nLevel <u_val:current_level>.\n<u_val:num_perks> perk points to spend.\nCurrent EXP: <u_val:available_exp>.\nEXP to next level: <u_val:exp_to_perk>.",
    "responses": [
      {
        "condition": { "and": [ { "not": { "u_has_trait": "perk_STR_UP" } }, { "not": { "u_has_trait": "perk_STR_UP_2" } } ] },
        "text": "Gain [<trait_name:perk_STR_UP>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_STR_UP>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_STR_UP>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_STR_UP", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "No Requirements",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "not": { "u_has_trait": "perk_STR_UP_2" } } }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_STR_UP_2" } },
        "text": "Gain [<trait_name:perk_STR_UP_2>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_STR_UP_2>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_STR_UP_2>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_STR_UP_2", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "Must have the <trait_name:perk_STR_UP> perk",
            "target_var": { "context_val": "trait_requirement_description" }
          },
          { "set_condition": "perk_condition", "condition": { "u_has_trait": "perk_STR_UP" } }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "and": [ { "not": { "u_has_trait": "perk_DEX_UP" } }, { "not": { "u_has_trait": "perk_DEX_UP_2" } } ] },
        "text": "Gain [<trait_name:perk_DEX_UP>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_DEX_UP>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_DEX_UP>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_DEX_UP", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "No Requirements",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "not": { "u_has_trait": "perk_DEX_UP_2" } } }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_DEX_UP_2" } },
        "text": "Gain [<trait_name:perk_DEX_UP_2>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_DEX_UP_2>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_DEX_UP_2>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_DEX_UP_2", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "Must have the <trait_name:perk_DEX_UP> perk",
            "target_var": { "context_val": "trait_requirement_description" }
          },
          { "set_condition": "perk_condition", "condition": { "u_has_trait": "perk_DEX_UP" } }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "and": [ { "not": { "u_has_trait": "perk_INT_UP" } }, { "not": { "u_has_trait": "perk_INT_UP_2" } } ] },
        "text": "Gain [<trait_name:perk_INT_UP>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_INT_UP>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_INT_UP>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_INT_UP", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "No Requirements",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "not": { "u_has_trait": "perk_INT_UP_2" } } }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_INT_UP_2" } },
        "text": "Gain [<trait_name:perk_INT_UP_2>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_INT_UP_2>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_INT_UP_2>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_INT_UP_2", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "Must have the <trait_name:perk_INT_UP> perk",
            "target_var": { "context_val": "trait_requirement_description" }
          },
          { "set_condition": "perk_condition", "condition": { "u_has_trait": "perk_INT_UP" } }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "and": [ { "not": { "u_has_trait": "perk_PER_UP" } }, { "not": { "u_has_trait": "perk_PER_UP_2" } } ] },
        "text": "Gain [<trait_name:perk_PER_UP>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_PER_UP>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_PER_UP>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_PER_UP", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "No Requirements",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "not": { "u_has_trait": "perk_PER_UP_2" } } }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_PER_UP_2" } },
        "text": "Gain [<trait_name:perk_PER_UP_2>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_PER_UP_2>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_PER_UP_2>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_PER_UP_2", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "Must have the <trait_name:perk_PER_UP> perk",
            "target_var": { "context_val": "trait_requirement_description" }
          },
          { "set_condition": "perk_condition", "condition": { "u_has_trait": "perk_PER_UP" } }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_sight_beyond_sight" } },
        "text": "Gain [<trait_name:perk_sight_beyond_sight>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_sight_beyond_sight>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_sight_beyond_sight>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_sight_beyond_sight", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "Requires perception 13",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          {
            "set_condition": "perk_condition",
            "condition": { "math": [ "u_val('perception_base') + u_val('perception_bonus') >= 13" ] }
          }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_mighty_thews" } },
        "text": "Gain [<trait_name:perk_mighty_thews>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_mighty_thews>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_mighty_thews>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_mighty_thews", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "Requires strength 13",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          {
            "set_condition": "perk_condition",
            "condition": { "math": [ "u_val('strength_base') + u_val('strength_bonus') >= 13" ] }
          }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_pantherish_grace" } },
        "text": "Gain [<trait_name:perk_pantherish_grace>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_pantherish_grace>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_pantherish_grace>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_pantherish_grace", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "Requires dexerity 13",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          {
            "set_condition": "perk_condition",
            "condition": { "math": [ "u_val('dexterity_base') + u_val('dexterity_bonus') >= 13" ] }
          }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_eagle_eyes" } },
        "text": "Gain [<trait_name:perk_eagle_eyes>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_eagle_eyes>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_eagle_eyes>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_eagle_eyes", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "Requires preception 13",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          {
            "set_condition": "perk_condition",
            "condition": { "math": [ "u_val('perception_base') + u_val('perception_bonus') >= 13" ] }
          }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_holdout_pocket" } },
        "text": "Gain [<trait_name:perk_holdout_pocket>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_holdout_pocket>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_holdout_pocket>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_holdout_pocket", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "No Requirements",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "math": [ "0 == 0" ] } }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_built_tough" } },
        "text": "Gain [<trait_name:perk_built_tough>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_built_tough>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_built_tough>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_built_tough", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "No Requirements",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "math": [ "0 == 0" ] } }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_hauler" } },
        "text": "Gain [<trait_name:perk_hauler>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_hauler>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_hauler>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_hauler", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "No Requirements",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "math": [ "0 == 0" ] } }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_vacationer" } },
        "text": "Gain [<trait_name:perk_vacationer>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_vacationer>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_vacationer>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_vacationer", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "No Requirements",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "math": [ "0 == 0" ] } }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_gymrat" } },
        "text": "Gain [<trait_name:perk_gymrat>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_gymrat>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_gymrat>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_gymrat", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "Requires athletics 3",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "math": [ "u_skill('swimming') >= 3" ] } }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_bellringer" } },
        "text": "Gain [<trait_name:perk_bellringer>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_bellringer>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_bellringer>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_bellringer", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "Requires unarmed 4 or bashing weapons 4",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          {
            "set_condition": "perk_condition",
            "condition": { "or": [ { "math": [ "u_skill('bashing') >= 4" ] }, { "math": [ "u_skill('unarmed') >= 4" ] } ] }
          }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_safety_net" } },
        "text": "Gain [<trait_name:perk_safety_net>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_safety_net>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_safety_net>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_safety_net", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "No Requirements",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "math": [ "0 == 0" ] } }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_lucky_dodge" } },
        "text": "Gain [<trait_name:perk_lucky_dodge>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_lucky_dodge>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_lucky_dodge>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_lucky_dodge", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "No Requirements",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "math": [ "0 == 0" ] } }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_thick_skull" } },
        "text": "Gain [<trait_name:perk_thick_skull>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_thick_skull>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_thick_skull>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_thick_skull", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "No Requirements",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "math": [ "0 == 0" ] } }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_way_openpalm" } },
        "text": "Gain [<trait_name:perk_way_openpalm>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_way_openpalm>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_way_openpalm>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_way_openpalm", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "Must not have <trait_name:perk_way_closedfist>, <trait_name:perk_way_pinchedfingers>.  Requires unarmed 2 and cutting 1",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          {
            "set_condition": "perk_condition",
            "condition": {
              "and": [
                { "not": { "or": [ { "u_has_trait": "perk_way_closedfist" }, { "u_has_trait": "perk_way_pinchedfingers" } ] } },
                { "and": [ { "math": [ "u_skill('unarmed') >= 2" ] }, { "math": [ "u_skill('cutting') >= 1" ] } ] }
              ]
            }
          },
          {
            "set_string_var": "Taking this means you can't take <trait_name:perk_way_closedfist> or <trait_name:perk_way_pinchedfingers>",
            "target_var": { "context_val": "trait_additional_details" },
            "i18n": true
          }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_way_closedfist" } },
        "text": "Gain [<trait_name:perk_way_closedfist>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_way_closedfist>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_way_closedfist>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_way_closedfist", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "Must not have <trait_name:perk_way_openpalm>, <trait_name:perk_way_pinchedfingers>.  Requires unarmed 2 and bashing 1",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          {
            "set_condition": "perk_condition",
            "condition": {
              "and": [
                { "not": { "or": [ { "u_has_trait": "perk_way_openpalm" }, { "u_has_trait": "perk_way_pinchedfingers" } ] } },
                { "and": [ { "math": [ "u_skill('unarmed') >= 2" ] }, { "math": [ "u_skill('bashing') >= 1" ] } ] }
              ]
            }
          },
          {
            "set_string_var": "Taking this means you can't take <trait_name:perk_way_openpalm> or <trait_name:perk_way_pinchedfingers>",
            "target_var": { "context_val": "trait_additional_details" },
            "i18n": true
          }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_way_pinchedfingers" } },
        "text": "Gain [<trait_name:perk_way_pinchedfingers>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_way_pinchedfingers>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_way_pinchedfingers>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_way_pinchedfingers", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "Must not have <trait_name:perk_way_closedfist>, <trait_name:perk_way_openpalm>.  Requires unarmed 2 and piercing 1",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          {
            "set_condition": "perk_condition",
            "condition": {
              "and": [
                { "not": { "or": [ { "u_has_trait": "perk_way_closedfist" }, { "u_has_trait": "perk_way_openpalm" } ] } },
                { "and": [ { "math": [ "u_skill('unarmed') >= 2" ] }, { "math": [ "u_skill('stabbing') >= 1" ] } ] }
              ]
            }
          },
          {
            "set_string_var": "Taking this means you can't take <trait_name:perk_way_closedfist> or <trait_name:perk_way_openpalm>",
            "target_var": { "context_val": "trait_additional_details" },
            "i18n": true
          }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_bloody_mess" } },
        "text": "Gain [<trait_name:perk_bloody_mess>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_bloody_mess>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_bloody_mess>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_bloody_mess", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "Must not have <trait_name:perk_surgical_strikes>",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "not": { "u_has_trait": "perk_surgical_strikes" } } },
          {
            "set_string_var": "Taking this means you can't take <trait_name:perk_surgical_strikes>",
            "target_var": { "context_val": "trait_additional_details" },
            "i18n": true
          }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_surgical_strikes" } },
        "text": "Gain [<trait_name:perk_surgical_strikes>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_surgical_strikes>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_surgical_strikes>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_surgical_strikes", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "Must not have <trait_name:perk_bloody_mess>.  Melee or guns 2",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          {
            "set_condition": "perk_condition",
            "condition": {
              "and": [
                { "not": { "u_has_trait": "perk_bloody_mess" } },
                { "or": [ { "math": [ "u_skill('melee') >= 2" ] }, { "math": [ "u_skill('gun') >= 2" ] } ] }
              ]
            }
          },
          {
            "set_string_var": "Taking this means you can't take <trait_name:perk_bloody_mess>",
            "target_var": { "context_val": "trait_additional_details" },
            "i18n": true
          }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_quickdraw" } },
        "text": "Gain [<trait_name:perk_quickdraw>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_quickdraw>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_quickdraw>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_quickdraw", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "Requires handguns 2",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "math": [ "u_skill('pistol') >= 2" ] } }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_vengeful" } },
        "text": "Gain [<trait_name:perk_vengeful>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_vengeful>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_vengeful>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_vengeful", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "No requirements",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "math": [ "0 == 0" ] } }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_undying_loyalty" } },
        "text": "Gain [<trait_name:perk_undying_loyalty>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_undying_loyalty>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_undying_loyalty>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_undying_loyalty", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "Must have the <trait_name:SOCIAL1> or <trait_name:SOCIAL2> trait\n\nMust not have the <trait_name:PRED1>, <trait_name:PRED2>, <trait_name:PRED3>, <trait_name:PRED4>, or <trait_name:SAPIOVORE> traits",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          {
            "set_condition": "perk_condition",
            "condition": {
              "and": [
                { "or": [ { "u_has_trait": "SOCIAL1" }, { "u_has_trait": "SOCIAL2" } ] },
                { "not": { "u_has_any_trait": [ "PRED1", "PRED2", "PRED3", "PRED4", "SAPIOVORE" ] } }
              ]
            }
          }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_ghost_stealth" } },
        "text": "Gain [<trait_name:perk_ghost_stealth>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_ghost_stealth>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_ghost_stealth>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_ghost_stealth", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "No Requirements",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "math": [ "0 == 0" ] } }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_big_eater" } },
        "text": "Gain [<trait_name:perk_big_eater>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_big_eater>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_big_eater>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_big_eater", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "No Requirements",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "math": [ "0 == 0" ] } }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_tuck_and_roll" } },
        "text": "Gain [<trait_name:perk_tuck_and_roll>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_tuck_and_roll>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_tuck_and_roll>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_tuck_and_roll", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "No Requirements",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "math": [ "0 == 0" ] } }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_grit_your_teeth" } },
        "text": "Gain [<trait_name:perk_grit_your_teeth>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_grit_your_teeth>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_grit_your_teeth>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_grit_your_teeth", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "Must have the <trait_name:perk_built_tough> perk.\n\nMust not have the <trait_name:MORE_PAIN>, <trait_name:MORE_PAIN2>, or <trait_name:MORE_PAIN3> Traits",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          {
            "set_condition": "perk_condition",
            "condition": {
              "and": [ { "u_has_trait": "perk_built_tough" }, { "not": { "u_has_any_trait": [ "MORE_PAIN", "MORE_PAIN2", "MORE_PAIN3" ] } } ]
            }
          }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_recycler" } },
        "text": "Gain [<trait_name:perk_recycler>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_recycler>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_recycler>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_recycler", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "Requires survival 4",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "math": [ "u_skill('survival') >= 4" ] } }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_tingly" } },
        "text": "Gain [<trait_name:perk_tingly>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_tingly>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_tingly>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_tingly", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "No Requirements",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "math": [ "0 == 0" ] } }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_static_stockpile" } },
        "text": "Gain [<trait_name:perk_static_stockpile>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_static_stockpile>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_static_stockpile>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_static_stockpile", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "Must have the <trait_name:perk_tingly> perk",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "u_has_trait": "perk_tingly" } }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_jumpy" } },
        "text": "Gain [<trait_name:perk_jumpy>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_jumpy>", "target_var": { "context_val": "trait_name" } },
          { "set_string_var": "<trait_description:perk_jumpy>", "target_var": { "context_val": "trait_description" } },
          { "set_string_var": "perk_jumpy", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "No Requirements",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "math": [ "0 == 0" ] } }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_quick_recovery" } },
        "text": "Gain [<trait_name:perk_quick_recovery>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_quick_recovery>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_quick_recovery>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_quick_recovery", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "Requires dexterity 10",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          {
            "set_condition": "perk_condition",
            "condition": { "math": [ "u_val('dexterity_base') + u_val('dexterity_bonus') >= 10" ] }
          }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_hobbyist" } },
        "text": "Gain [<trait_name:perk_hobbyist>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_hobbyist>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_hobbyist>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_hobbyist", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "No Requirements",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "math": [ "0 == 0" ] } }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_non_combatant" } },
        "text": "Gain [<trait_name:perk_non_combatant>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_non_combatant>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_non_combatant>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_non_combatant", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "Must have the <trait_name:PACIFIST> trait",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "u_has_trait": "PACIFIST" } }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_troubleseeker" } },
        "text": "Gain [<trait_name:perk_troubleseeker>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_troubleseeker>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_troubleseeker>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_troubleseeker", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "No Requirements",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "math": [ "0 == 0" ] } }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_blood_drinker" } },
        "text": "Gain [<trait_name:perk_blood_drinker>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_blood_drinker>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_blood_drinker>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_blood_drinker", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "Must not have the <trait_name:SQUEAMISH>, <trait_name:VEGETARIAN>, <trait_name:HERBIVORE>, or <trait_name:VEGAN> traits.",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          {
            "set_condition": "perk_condition",
            "condition": { "not": { "u_has_any_trait": [ "SQUEAMISH", "VEGETARIAN", "HERBIVORE", "VEGAN" ] } }
          }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_blood_drinking_heal" } },
        "text": "Gain [<trait_name:perk_blood_drinking_heal>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_blood_drinking_heal>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_blood_drinking_heal>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_blood_drinking_heal", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "Must have <trait_name:perk_blood_drinker>.",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "u_has_trait": "perk_blood_drinker" } }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_long_shot" } },
        "text": "Gain [<trait_name:perk_long_shot>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_long_shot>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_long_shot>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_long_shot", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "Requires perception 10",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          {
            "set_condition": "perk_condition",
            "condition": { "math": [ "u_val('perception_base') + u_val('perception_bonus') >= 10" ] }
          }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_absit_invidia" } },
        "text": "Gain [<trait_name:perk_absit_invidia>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_absit_invidia>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_absit_invidia>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_absit_invidia", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "Requires the Spiritual trait",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "u_has_trait": "SPIRITUAL" } }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_firstest_aid" } },
        "text": "Gain [<trait_name:perk_firstest_aid>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_firstest_aid>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_firstest_aid>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_firstest_aid", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "Requires health care 4",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "math": [ "u_skill('firstaid') >= 4" ] } }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_popeye" } },
        "text": "Gain [<trait_name:perk_popeye>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_popeye>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_popeye>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_popeye", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "No Requirements",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "math": [ "0 == 0" ] } }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_crafty_hands" } },
        "text": "Gain [<trait_name:perk_crafty_hands>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_crafty_hands>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_crafty_hands>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_crafty_hands", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "No Requirements",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "math": [ "0 == 0" ] } }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_sleepy" } },
        "text": "Gain [<trait_name:perk_sleepy>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_sleepy>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_sleepy>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_sleepy", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "No Requirements",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "math": [ "0 == 0" ] } }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_early_to_rise" } },
        "text": "Gain [<trait_name:perk_early_to_rise>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_early_to_rise>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_early_to_rise>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_early_to_rise", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "No Requirements",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "math": [ "0 == 0" ] } }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_duck_and_weave" } },
        "text": "Gain [<trait_name:perk_duck_and_weave>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_duck_and_weave>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_duck_and_weave>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_duck_and_weave", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "Requires dexterity 12",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          {
            "set_condition": "perk_condition",
            "condition": { "math": [ "u_val('dexterity_base') + u_val('dexterity_bonus') >= 12" ] }
          }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_perfect_time" } },
        "text": "Gain [<trait_name:perk_perfect_time>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_perfect_time>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_perfect_time>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_perfect_time", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "No Requirements",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "math": [ "0 == 0" ] } }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_all_terrain" } },
        "text": "Gain [<trait_name:perk_all_terrain>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_all_terrain>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_all_terrain>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_all_terrain", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "No Requirements",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "math": [ "0 == 0" ] } }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_bedtime_reader" } },
        "text": "Gain [<trait_name:perk_bedtime_reader>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_bedtime_reader>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_bedtime_reader>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_bedtime_reader", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "Cannot have the Hates Books or Illiterate traits",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          {
            "set_condition": "perk_condition",
            "condition": { "and": [ { "not": { "u_has_trait": "HATES_BOOKS" } }, { "not": { "u_has_trait": "ILLITERATE" } } ] }
          }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_chainsmoker" } },
        "text": "Gain [<trait_name:perk_chainsmoker>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_chainsmoker>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_chainsmoker>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_chainsmoker", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "No Requirements",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "math": [ "0 == 0" ] } }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_praise" } },
        "text": "Gain [<trait_name:perk_praise>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_praise>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_praise>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_praise", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "No Requirements",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "math": [ "0 == 0" ] } }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_belowthebelt" } },
        "text": "Gain [<trait_name:perk_belowthebelt>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_belowthebelt>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_belowthebelt>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_belowthebelt", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "Requires Melee 1",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "math": [ "u_skill('melee') >= 1" ] } }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_thickblood" } },
        "text": "Gain [<trait_name:perk_thickblood>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_thickblood>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_thickblood>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_thickblood", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "No Requirements",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "math": [ "0 == 0" ] } }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_dream_armor" } },
        "text": "Gain [<trait_name:perk_dream_armor>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_dream_armor>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_dream_armor>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_dream_armor", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "No Requirements",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "math": [ "0 == 0" ] } }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_redrage" } },
        "text": "Gain [<trait_name:perk_redrage>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_redrage>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_redrage>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_redrage", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "No Requirements",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "math": [ "0 == 0" ] } }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_peer_pressure" } },
        "text": "Gain [<trait_name:perk_peer_pressure>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_peer_pressure>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_peer_pressure>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_peer_pressure", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "No Requirements",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "math": [ "0 == 0" ] } }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_poison_painkill" } },
        "text": "Gain [<trait_name:perk_poison_painkill>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_poison_painkill>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_poison_painkill>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_poison_painkill", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "No Requirements",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "math": [ "0 == 0" ] } }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_unopenable_grip" } },
        "text": "Gain [<trait_name:perk_unopenable_grip>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_unopenable_grip>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_unopenable_grip>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_unopenable_grip", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "No Requirements",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "math": [ "0 == 0" ] } }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_radio_infusion" } },
        "text": "Gain [<trait_name:perk_radio_infusion>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_radio_infusion>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_radio_infusion>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_radio_infusion", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "No Requirements",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "math": [ "0 == 0" ] } }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_dice_addition_damage" } },
        "text": "Gain [<trait_name:perk_dice_addition_damage>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_dice_addition_damage>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_dice_addition_damage>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_dice_addition_damage", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "Must have the <trait_name:PROF_DICEMASTER> trait",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "u_has_trait": "PROF_DICEMASTER" } }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "math": [ "u_no_playstyle == 0" ] },
        "text": "Playstyle Perks",
        "topic": "TALK_PERK_MENU_PLAYSTYLE"
      },
      {
        "condition": { "mod_is_loaded": "magiclysm" },
        "text": "Metamagic Perks",
        "topic": "TALK_PERK_MENU_METAMAGIC"
      },
      {
        "condition": { "mod_is_loaded": "mindovermatter" },
        "text": "Psionic Perks",
        "topic": "TALK_PERK_MENU_PSIONICS"
      },
      { "text": "Settings", "topic": "TALK_PERK_MENU_CONFIG" },
      { "text": "Quit.", "topic": "TALK_DONE" }
    ]
  },
  {
    "type": "talk_topic",
    "id": "TALK_PERK_MENU_PLAYSTYLE",
    "dynamic_line": "Playstyle Perks:\nLevel <u_val:current_level>.\n<u_val:num_perks> perk points to spend.\nCurrent EXP: <u_val:available_exp>.\nEXP to next level: <u_val:exp_to_perk>.",
    "responses": [
      {
        "condition": { "not": { "u_has_trait": "perk_frakenstein" } },
        "text": "Gain [<trait_name:perk_frakenstein>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_frakenstein>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_frakenstein>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_frakenstein", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "Requires electronics 4, and health care 4",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          {
            "set_condition": "perk_condition",
            "condition": { "and": [ { "math": [ "u_skill('electronics') >= 4" ] }, { "math": [ "u_skill('firstaid') >= 4" ] } ] }
          }
        ],
        "topic": "TALK_PERK_MENU_SELECT_PLAYSTYLE"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_jugg" } },
        "text": "Gain [<trait_name:perk_jugg>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_jugg>", "target_var": { "context_val": "trait_name" } },
          { "set_string_var": "<trait_description:perk_jugg>", "target_var": { "context_val": "trait_description" } },
          { "set_string_var": "perk_jugg", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "No Requirements",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "math": [ "0 == 0" ] } }
        ],
        "topic": "TALK_PERK_MENU_SELECT_PLAYSTYLE"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_olde_guns" } },
        "text": "Gain [<trait_name:perk_olde_guns>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_olde_guns>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_olde_guns>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_olde_guns", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "No Requirements",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "math": [ "0 == 0" ] } }
        ],
        "topic": "TALK_PERK_MENU_SELECT_PLAYSTYLE"
      },
      {
        "condition": { "not": { "u_has_trait": "revolvers_are_cool" } },
        "text": "Gain [<trait_name:revolvers_are_cool>]",
        "effect": [
          { "set_string_var": "<trait_name:revolvers_are_cool>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:revolvers_are_cool>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "revolvers_are_cool", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "No Requirements",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "math": [ "0 == 0" ] } }
        ],
        "topic": "TALK_PERK_MENU_SELECT_PLAYSTYLE"
      },
      {
        "condition": { "not": { "u_has_trait": "22_is_cool" } },
        "text": "Gain [<trait_name:22_is_cool>]",
        "effect": [
          { "set_string_var": "<trait_name:22_is_cool>", "target_var": { "context_val": "trait_name" } },
          { "set_string_var": "<trait_description:22_is_cool>", "target_var": { "context_val": "trait_description" } },
          { "set_string_var": "22_is_cool", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "No Requirements",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "math": [ "0 == 0" ] } }
        ],
        "topic": "TALK_PERK_MENU_SELECT_PLAYSTYLE"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_empath" } },
        "text": "Gain [<trait_name:perk_empath>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_empath>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_empath>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_empath", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "No Requirements",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "math": [ "0 == 0" ] } }
        ],
        "topic": "TALK_PERK_MENU_SELECT_PLAYSTYLE"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_chainsaw" } },
        "text": "Gain [<trait_name:perk_chainsaw>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_chainsaw>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_chainsaw>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_chainsaw", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "No Requirements",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "math": [ "0 == 0" ] } }
        ],
        "topic": "TALK_PERK_MENU_SELECT_PLAYSTYLE"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_eating_window" } },
        "text": "Gain [<trait_name:perk_eating_window>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_eating_window>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_eating_window>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_eating_window", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "No Requirements",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "math": [ "0 == 0" ] } }
        ],
        "topic": "TALK_PERK_MENU_SELECT_PLAYSTYLE"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_moonstruck" } },
        "text": "Gain [<trait_name:perk_moonstruck>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_moonstruck>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_moonstruck>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_moonstruck", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "No Requirements",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "math": [ "0 == 0" ] } }
        ],
        "topic": "TALK_PERK_MENU_SELECT_PLAYSTYLE"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_rage_against_unnatural" } },
        "text": "Gain [<trait_name:perk_rage_against_unnatural>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_rage_against_unnatural>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_rage_against_unnatural>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_rage_against_unnatural", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "No Requirements",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "math": [ "0 == 0" ] } }
        ],
        "topic": "TALK_PERK_MENU_SELECT_PLAYSTYLE"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_nocturnal" } },
        "text": "Gain [<trait_name:perk_nocturnal>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_nocturnal>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_nocturnal>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_nocturnal", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "No Requirements",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "math": [ "0 == 0" ] } }
        ],
        "topic": "TALK_PERK_MENU_SELECT_PLAYSTYLE"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_skeleton" } },
        "text": "Gain [<trait_name:perk_skeleton>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_skeleton>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_skeleton>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_skeleton", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "No Requirements",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "math": [ "0 == 0" ] } }
        ],
        "topic": "TALK_PERK_MENU_SELECT_PLAYSTYLE"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_ascetic_empowerment" } },
        "text": "Gain [<trait_name:perk_ascetic_empowerment>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_ascetic_empowerment>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_ascetic_empowerment>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_ascetic_empowerment", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "Must not have the <trait_name:GOURMAND> trait",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "not": { "u_has_trait": "GOURMAND" } } }
        ],
        "topic": "TALK_PERK_MENU_SELECT_PLAYSTYLE"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_speedballing" } },
        "text": "Gain [<trait_name:perk_speedballing>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_speedballing>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_speedballing>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_speedballing", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "No Requirements",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "math": [ "0 == 0" ] } }
        ],
        "topic": "TALK_PERK_MENU_SELECT_PLAYSTYLE"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_flawless_memory" } },
        "text": "Gain [<trait_name:perk_flawless_memory>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_flawless_memory>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_flawless_memory>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_flawless_memory", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "No Requirements",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "math": [ "0 == 0" ] } }
        ],
        "topic": "TALK_PERK_MENU_SELECT_PLAYSTYLE"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_forge_blood" } },
        "text": "Gain [<trait_name:perk_forge_blood>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_forge_blood>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_forge_blood>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_forge_blood", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "No Requirements",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "math": [ "0 == 0" ] } }
        ],
        "topic": "TALK_PERK_MENU_SELECT_PLAYSTYLE"
      },
      { "text": "Playstyle Perks: Stormwrought", "topic": "TALK_PERK_MENU_PLAYSTYLE_STORMWROUGHT" },
      { "text": "Lifestyle Perks", "topic": "TALK_PERK_MENU_MAIN" },
      { "text": "Settings", "topic": "TALK_PERK_MENU_CONFIG" },
      { "text": "Quit.", "topic": "TALK_DONE" }
    ]
  },
  {
    "type": "talk_topic",
    "id": "TALK_PERK_MENU_PLAYSTYLE_STORMWROUGHT",
    "dynamic_line": "Stormwrought Playstyle Perks:\nLevel <u_val:current_level>.\n<u_val:num_perks> perk points to spend.\nCurrent EXP: <u_val:available_exp>.\nEXP to next level: <u_val:exp_to_perk>.",
    "responses": [
      {
        "condition": { "not": { "u_has_trait": "perk_portal_storm_mutator_bird" } },
        "text": "Gain [<trait_name:perk_portal_storm_mutator_bird>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_portal_storm_mutator_bird>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_portal_storm_mutator_bird>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_portal_storm_mutator_bird", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "Must not have another Stormwrought perk.",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          {
            "set_condition": "perk_condition",
            "condition": {
              "not": {
                "u_has_any_trait": [
                  "perk_portal_storm_mutator_bird",
                  "perk_portal_storm_mutator_feline",
                  "perk_portal_storm_mutator_insect",
                  "perk_portal_storm_mutator_lupine",
                  "perk_portal_storm_mutator_plant",
                  "perk_portal_storm_mutator_spider"
                ]
              }
            }
          }
        ],
        "topic": "TALK_PERK_MENU_SELECT_PLAYSTYLE"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_portal_storm_mutator_feline" } },
        "text": "Gain [<trait_name:perk_portal_storm_mutator_feline>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_portal_storm_mutator_feline>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_portal_storm_mutator_feline>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_portal_storm_mutator_feline", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "Must not have another Stormwrought perk.",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          {
            "set_condition": "perk_condition",
            "condition": {
              "not": {
                "u_has_any_trait": [
                  "perk_portal_storm_mutator_bird",
                  "perk_portal_storm_mutator_feline",
                  "perk_portal_storm_mutator_insect",
                  "perk_portal_storm_mutator_lupine",
                  "perk_portal_storm_mutator_plant",
                  "perk_portal_storm_mutator_spider"
                ]
              }
            }
          }
        ],
        "topic": "TALK_PERK_MENU_SELECT_PLAYSTYLE"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_portal_storm_mutator_insect" } },
        "text": "Gain [<trait_name:perk_portal_storm_mutator_insect>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_portal_storm_mutator_insect>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_portal_storm_mutator_insect>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_portal_storm_mutator_insect", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "Must not have another Stormwrought perk.",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          {
            "set_condition": "perk_condition",
            "condition": {
              "not": {
                "u_has_any_trait": [
                  "perk_portal_storm_mutator_bird",
                  "perk_portal_storm_mutator_feline",
                  "perk_portal_storm_mutator_insect",
                  "perk_portal_storm_mutator_lupine",
                  "perk_portal_storm_mutator_plant",
                  "perk_portal_storm_mutator_spider"
                ]
              }
            }
          }
        ],
        "topic": "TALK_PERK_MENU_SELECT_PLAYSTYLE"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_portal_storm_mutator_lupine" } },
        "text": "Gain [<trait_name:perk_portal_storm_mutator_lupine>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_portal_storm_mutator_lupine>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_portal_storm_mutator_lupine>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_portal_storm_mutator_lupine", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "Must not have another Stormwrought perk.",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          {
            "set_condition": "perk_condition",
            "condition": {
              "not": {
                "u_has_any_trait": [
                  "perk_portal_storm_mutator_bird",
                  "perk_portal_storm_mutator_feline",
                  "perk_portal_storm_mutator_insect",
                  "perk_portal_storm_mutator_lupine",
                  "perk_portal_storm_mutator_plant",
                  "perk_portal_storm_mutator_spider"
                ]
              }
            }
          }
        ],
        "topic": "TALK_PERK_MENU_SELECT_PLAYSTYLE"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_portal_storm_mutator_plant" } },
        "text": "Gain [<trait_name:perk_portal_storm_mutator_plant>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_portal_storm_mutator_plant>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_portal_storm_mutator_plant>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_portal_storm_mutator_plant", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "Must not have another Stormwrought perk.",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          {
            "set_condition": "perk_condition",
            "condition": {
              "not": {
                "u_has_any_trait": [
                  "perk_portal_storm_mutator_bird",
                  "perk_portal_storm_mutator_feline",
                  "perk_portal_storm_mutator_insect",
                  "perk_portal_storm_mutator_lupine",
                  "perk_portal_storm_mutator_plant",
                  "perk_portal_storm_mutator_spider"
                ]
              }
            }
          }
        ],
        "topic": "TALK_PERK_MENU_SELECT_PLAYSTYLE"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_portal_storm_mutator_spider" } },
        "text": "Gain [<trait_name:perk_portal_storm_mutator_spider>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_portal_storm_mutator_spider>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_portal_storm_mutator_spider>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_portal_storm_mutator_spider", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "Must not have another Stormwrought perk.",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          {
            "set_condition": "perk_condition",
            "condition": {
              "not": {
                "u_has_any_trait": [
                  "perk_portal_storm_mutator_bird",
                  "perk_portal_storm_mutator_feline",
                  "perk_portal_storm_mutator_insect",
                  "perk_portal_storm_mutator_lupine",
                  "perk_portal_storm_mutator_plant",
                  "perk_portal_storm_mutator_spider"
                ]
              }
            }
          }
        ],
        "topic": "TALK_PERK_MENU_SELECT_PLAYSTYLE"
      },
      { "text": "Playstyle Perks", "topic": "TALK_PERK_MENU_PLAYSTYLE" },
      { "text": "Lifestyle Perks", "topic": "TALK_PERK_MENU_MAIN" },
      { "text": "Settings", "topic": "TALK_PERK_MENU_CONFIG" },
      { "text": "Quit.", "topic": "TALK_DONE" }
    ]
  },
  {
    "type": "talk_topic",
    "id": "TALK_PERK_MENU_METAMAGIC",
    "dynamic_line": "Metamagic Perks:\nLevel <u_val:current_level>.\n<u_val:num_perks> perk points to spend.\nCurrent EXP: <u_val:available_exp>.\nEXP to next level: <u_val:exp_to_perk>.",
    "responses": [
      {
        "condition": { "not": { "u_has_trait": "perk_metamagic_quicken" } },
        "text": "Gain [<trait_name:perk_metamagic_quicken>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_metamagic_quicken>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_metamagic_quicken>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_metamagic_quicken", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "Requires a spell known of level 2 or above",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "math": [ "u_spell_level('null') >= 2" ] } }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_metamagic_widen" } },
        "text": "Gain [<trait_name:perk_metamagic_widen>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_metamagic_widen>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_metamagic_widen>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_metamagic_widen", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "Requires a spell known of level 2 or above",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "math": [ "u_spell_level('null') >= 2" ] } }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_metamagic_reach" } },
        "text": "Gain [<trait_name:perk_metamagic_reach>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_metamagic_reach>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_metamagic_reach>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_metamagic_reach", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "Requires a spell known of level 2 or above",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "math": [ "u_spell_level('null') >= 2" ] } }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": {
          "and": [
            { "not": { "u_has_trait": "perk_metamagic_silent" } },
            { "or": [ { "mod_is_loaded": "magiclysm" }, { "mod_is_loaded": "xedra_evolved" } ] }
          ]
        },
        "//": "Not relevant to MoM, so won't be available if that is the only magic mod.",
        "text": "Gain [<trait_name:perk_metamagic_silent>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_metamagic_silent>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_metamagic_silent>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_metamagic_silent", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "Requires a spell known of level 2 or above",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "math": [ "u_spell_level('null') >= 2" ] } }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": {
          "and": [
            { "not": { "u_has_trait": "perk_metamagic_still" } },
            { "or": [ { "mod_is_loaded": "magiclysm" }, { "mod_is_loaded": "xedra_evolved" } ] }
          ]
        },
        "//": "Not relevant to MoM, so won't be available if that is the only magic mod.",
        "text": "Gain [<trait_name:perk_metamagic_still>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_metamagic_still>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_metamagic_still>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_metamagic_still", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "Requires a spell known of level 2 or above",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "math": [ "u_spell_level('null') >= 2" ] } }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_metamagic_careful" } },
        "text": "Gain [<trait_name:perk_metamagic_careful>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_metamagic_careful>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_metamagic_careful>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_metamagic_careful", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "Requires a spell known",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "math": [ "u_spell_level('null') >= 0" ] } }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_metamagic_efficient" } },
        "text": "Gain [<trait_name:perk_metamagic_efficient>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_metamagic_efficient>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_metamagic_efficient>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_metamagic_efficient", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "Requires a spell known",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "math": [ "u_spell_level('null') >= 0" ] } }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      {
        "condition": { "not": { "u_has_trait": "perk_metamagic_intuitive" } },
        "text": "Gain [<trait_name:perk_metamagic_intuitive>]",
        "effect": [
          { "set_string_var": "<trait_name:perk_metamagic_intuitive>", "target_var": { "context_val": "trait_name" } },
          {
            "set_string_var": "<trait_description:perk_metamagic_intuitive>",
            "target_var": { "context_val": "trait_description" }
          },
          { "set_string_var": "perk_metamagic_intuitive", "target_var": { "context_val": "trait_id" } },
          {
            "set_string_var": "Requires a spell known of level 8 or above",
            "target_var": { "context_val": "trait_requirement_description" },
            "i18n": true
          },
          { "set_condition": "perk_condition", "condition": { "math": [ "u_spell_level('null') >= 8" ] } }
        ],
        "topic": "TALK_PERK_MENU_SELECT"
      },
      { "text": "Back", "topic": "TALK_PERK_MENU_MAIN" },
      { "text": "Settings", "topic": "TALK_PERK_MENU_CONFIG" },
      { "text": "Quit.", "topic": "TALK_DONE" }
    ]
  },
  {
    "type": "talk_topic",
    "id": "TALK_PERK_MENU_FAIL",
    "dynamic_line": "You don't have a perk point, or meet the prerequisites for this perk.",
    "responses": [ { "text": "Go Back.", "topic": "TALK_PERK_MENU_MAIN" }, { "text": "Quit.", "topic": "TALK_DONE" } ]
  },
  {
    "type": "talk_topic",
    "id": "TALK_PERK_MENU_SELECT",
    "dynamic_line": "<context_val:trait_name>: \"<context_val:trait_description>\"\n<context_val:trait_requirement_description>.\n<context_val:trait_additional_details>",
    "responses": [
      {
        "text": "Select Perk.",
        "topic": "TALK_PERK_MENU_MAIN",
        "condition": {
          "and": [
            { "or": [ { "math": [ "u_no_prerecs > 0" ] }, { "get_condition": "perk_condition" } ] },
            { "math": [ "u_num_perks > 0" ] }
          ]
        },
        "failure_explanation": "Requirements Not Met",
        "failure_topic": "TALK_PERK_MENU_FAIL",
        "effect": [
          { "u_mutate_towards": { "context_val": "trait_id" }, "category": "ANY", "use_vitamins": false },
          { "math": [ "u_num_perks--" ] }
        ]
      },
      {
        "text": "Go Back.",
        "effect": [ { "set_string_var": "", "target_var": { "context_val": "trait_additional_details" } } ],
        "topic": "TALK_PERK_MENU_MAIN"
      },
      { "text": "Quit.", "topic": "TALK_DONE" }
    ]
  },
  {
    "type": "talk_topic",
    "id": "TALK_PERK_MENU_SELECT_PLAYSTYLE",
    "dynamic_line": "<context_val:trait_name>: \"<context_val:trait_description>\"\nCosts <u_val:playstyle_cost> + 1 perk points, <context_val:trait_requirement_description>.\n<context_val:trait_additional_details>",
    "responses": [
      {
        "text": "Select Perk.",
        "topic": "TALK_PERK_MENU_MAIN",
        "condition": {
          "and": [
            { "or": [ { "math": [ "u_no_prerecs > 0" ] }, { "get_condition": "perk_condition" } ] },
            { "math": [ "u_num_perks >= u_playstyle_cost + 1" ] }
          ]
        },
        "failure_explanation": "Requirements Not Met",
        "failure_topic": "TALK_PERK_MENU_FAIL",
        "effect": [
          { "u_mutate_towards": { "context_val": "trait_id" }, "category": "ANY", "use_vitamins": false },
          { "math": [ "u_num_perks", "-=", "u_playstyle_cost + 1" ] }
        ]
      },
      {
        "text": "Go Back.",
        "effect": [ { "set_string_var": "", "target_var": { "context_val": "trait_additional_details" } } ],
        "topic": "TALK_PERK_MENU_PLAYSTYLE"
      },
      { "text": "Quit.", "topic": "TALK_DONE" }
    ]
  }
]
