From 973f88516fb5fd5500e928c30adc40efb56ff4f1 Mon Sep 17 00:00:00 2001 From: "Standing-StormStanding-Storm git config --global user.name Standing-Storm git config --global user.name Standing-Storm" Date: Sat, 7 Sep 2024 20:19:38 -0500 Subject: [PATCH] Add NPC traits --- .../eoc_spell_difficulty_modifiers.json | 32 ++++++++--------- .../mods/Magiclysm/itemgroups/itemgroups.json | 7 +++- data/mods/Magiclysm/items/books_lore.json | 24 +++++++++++++ data/mods/Magiclysm/npc/trait_groups.json | 34 ++++++++++++++++++- 4 files changed, 79 insertions(+), 18 deletions(-) diff --git a/data/mods/Magiclysm/eoc_spell_difficulty_modifiers.json b/data/mods/Magiclysm/eoc_spell_difficulty_modifiers.json index c8fc163ff1695..4ad5d75cbf7a3 100644 --- a/data/mods/Magiclysm/eoc_spell_difficulty_modifiers.json +++ b/data/mods/Magiclysm/eoc_spell_difficulty_modifiers.json @@ -48,8 +48,8 @@ "required_event": "opens_spellbook", "condition": { "u_has_trait": "NO_CASTING_CHANNELING_SPELLS" }, "effect": [ - { "math": [ "u_spellcasting_adjustment('difficulty', 'flag_whitelist': 'CHANNELING_SPELL')", "=", "1000" ] }, - { "math": [ "u_spellcasting_adjustment('cost', 'flag_whitelist': 'CHANNELING_SPELL')", "=", "1000" ] } + { "math": [ "u_spellcasting_adjustment('difficulty', 'flag_whitelist': 'CHANNELING_SPELL')", "=", "999" ] }, + { "math": [ "u_spellcasting_adjustment('cost', 'flag_whitelist': 'CHANNELING_SPELL')", "=", "999" ] } ] }, { @@ -59,8 +59,8 @@ "required_event": "opens_spellbook", "condition": { "u_has_trait": "NO_CASTING_EVOCATION_SPELLS" }, "effect": [ - { "math": [ "u_spellcasting_adjustment('difficulty', 'flag_whitelist': 'EVOCATION_SPELL')", "=", "1000" ] }, - { "math": [ "u_spellcasting_adjustment('cost', 'flag_whitelist': 'EVOCATION_SPELL')", "=", "1000" ] } + { "math": [ "u_spellcasting_adjustment('difficulty', 'flag_whitelist': 'EVOCATION_SPELL')", "=", "999" ] }, + { "math": [ "u_spellcasting_adjustment('cost', 'flag_whitelist': 'EVOCATION_SPELL')", "=", "999" ] } ] }, { @@ -70,8 +70,8 @@ "required_event": "opens_spellbook", "condition": { "u_has_trait": "NO_CASTING_CONJURATION_SPELLS" }, "effect": [ - { "math": [ "u_spellcasting_adjustment('difficulty', 'flag_whitelist': 'CONJURATION_SPELL')", "=", "1000" ] }, - { "math": [ "u_spellcasting_adjustment('cost', 'flag_whitelist': 'CONJURATION_SPELL')", "=", "1000" ] } + { "math": [ "u_spellcasting_adjustment('difficulty', 'flag_whitelist': 'CONJURATION_SPELL')", "=", "999" ] }, + { "math": [ "u_spellcasting_adjustment('cost', 'flag_whitelist': 'CONJURATION_SPELL')", "=", "999" ] } ] }, { @@ -81,8 +81,8 @@ "required_event": "opens_spellbook", "condition": { "u_has_trait": "NO_CASTING_ENHANCEMENT_SPELLS" }, "effect": [ - { "math": [ "u_spellcasting_adjustment('difficulty', 'flag_whitelist': 'ENHANCEMENT_SPELL')", "=", "1000" ] }, - { "math": [ "u_spellcasting_adjustment('cost', 'flag_whitelist': 'ENHANCEMENT_SPELL')", "=", "1000" ] } + { "math": [ "u_spellcasting_adjustment('difficulty', 'flag_whitelist': 'ENHANCEMENT_SPELL')", "=", "999" ] }, + { "math": [ "u_spellcasting_adjustment('cost', 'flag_whitelist': 'ENHANCEMENT_SPELL')", "=", "999" ] } ] }, { @@ -92,8 +92,8 @@ "required_event": "opens_spellbook", "condition": { "u_has_trait": "NO_CASTING_ENERVATION_SPELLS" }, "effect": [ - { "math": [ "u_spellcasting_adjustment('difficulty', 'flag_whitelist': 'ENERVATION_SPELL')", "=", "1000" ] }, - { "math": [ "u_spellcasting_adjustment('cost', 'flag_whitelist': 'ENERVATION_SPELL')", "=", "1000" ] } + { "math": [ "u_spellcasting_adjustment('difficulty', 'flag_whitelist': 'ENERVATION_SPELL')", "=", "999" ] }, + { "math": [ "u_spellcasting_adjustment('cost', 'flag_whitelist': 'ENERVATION_SPELL')", "=", "999" ] } ] }, { @@ -103,8 +103,8 @@ "required_event": "opens_spellbook", "condition": { "u_has_trait": "NO_CASTING_CONVEYANCE_SPELLS" }, "effect": [ - { "math": [ "u_spellcasting_adjustment('difficulty', 'flag_whitelist': 'CONVEYANCE_SPELL')", "=", "1000" ] }, - { "math": [ "u_spellcasting_adjustment('cost', 'flag_whitelist': 'CONVEYANCE_SPELL')", "=", "1000" ] } + { "math": [ "u_spellcasting_adjustment('difficulty', 'flag_whitelist': 'CONVEYANCE_SPELL')", "=", "999" ] }, + { "math": [ "u_spellcasting_adjustment('cost', 'flag_whitelist': 'CONVEYANCE_SPELL')", "=", "999" ] } ] }, { @@ -114,8 +114,8 @@ "required_event": "opens_spellbook", "condition": { "u_has_trait": "NO_CASTING_RESTORATION_SPELLS" }, "effect": [ - { "math": [ "u_spellcasting_adjustment('difficulty', 'flag_whitelist': 'RESTORATION_SPELL')", "=", "1000" ] }, - { "math": [ "u_spellcasting_adjustment('cost', 'flag_whitelist': 'RESTORATION_SPELL')", "=", "1000" ] } + { "math": [ "u_spellcasting_adjustment('difficulty', 'flag_whitelist': 'RESTORATION_SPELL')", "=", "999" ] }, + { "math": [ "u_spellcasting_adjustment('cost', 'flag_whitelist': 'RESTORATION_SPELL')", "=", "999" ] } ] }, { @@ -125,8 +125,8 @@ "required_event": "opens_spellbook", "condition": { "u_has_trait": "NO_CASTING_TRANSFORMATION_SPELLS" }, "effect": [ - { "math": [ "u_spellcasting_adjustment('difficulty', 'flag_whitelist': 'TRANSFORMATION_SPELL')", "=", "1000" ] }, - { "math": [ "u_spellcasting_adjustment('cost', 'flag_whitelist': 'TRANSFORMATION_SPELL')", "=", "1000" ] } + { "math": [ "u_spellcasting_adjustment('difficulty', 'flag_whitelist': 'TRANSFORMATION_SPELL')", "=", "999" ] }, + { "math": [ "u_spellcasting_adjustment('cost', 'flag_whitelist': 'TRANSFORMATION_SPELL')", "=", "999" ] } ] } ] diff --git a/data/mods/Magiclysm/itemgroups/itemgroups.json b/data/mods/Magiclysm/itemgroups/itemgroups.json index d7992908415b5..af94644b928d9 100644 --- a/data/mods/Magiclysm/itemgroups/itemgroups.json +++ b/data/mods/Magiclysm/itemgroups/itemgroups.json @@ -15,7 +15,12 @@ "type": "item_group", "id": "SUS_book_nonf_soft", "copy-from": "SUS_book_nonf_soft", - "extend": { "items": [ { "item": "book_nonf_magic_origin_of_species", "prob": 1 } ] } + "extend": { + "items": [ + { "item": "book_nonf_magic_origin_of_species", "prob": 1 }, + { "item": "book_nonf_empty_social_history_no_magic", "prob": 3 } + ] + } }, { "type": "item_group", diff --git a/data/mods/Magiclysm/items/books_lore.json b/data/mods/Magiclysm/items/books_lore.json index edfe596776f22..ce215aa7937c6 100644 --- a/data/mods/Magiclysm/items/books_lore.json +++ b/data/mods/Magiclysm/items/books_lore.json @@ -73,5 +73,29 @@ "material": [ "paper" ], "copy-from": "book_nonf_soft_tpl", "melee_damage": { "bash": 2 } + }, + { + "type": "BOOK", + "id": "book_nonf_empty_social_history_no_magic", + "name": { + "str": "Running on Empty: A Social History of those Born Without Magic", + "str_pl": "copies of Running on Empty: A Social History of those Born Without Magic" + }, + "description": "A history of the treatment of the \"Empty\", people born with the inability to master even the simplest of spells. From persecution to favored positions (since rulers could be sure the Empty had no magical means of plotting against them), this book chronicles their treatment across the ages.", + "intelligence": 7, + "symbol": "?", + "looks_like": "story_book", + "color": "light_gray", + "time": "20 m", + "chapters": 15, + "fun": 1, + "weight": "1000 g", + "volume": "885 ml", + "longest_side": "23 cm", + "price": "20 USD 89 cent", + "price_postapoc": "10 USD", + "material": [ "paper" ], + "copy-from": "book_nonf_soft_tpl", + "melee_damage": { "bash": 2 } } ] diff --git a/data/mods/Magiclysm/npc/trait_groups.json b/data/mods/Magiclysm/npc/trait_groups.json index 1837b5de42425..bdf91e8ee6e5a 100644 --- a/data/mods/Magiclysm/npc/trait_groups.json +++ b/data/mods/Magiclysm/npc/trait_groups.json @@ -145,7 +145,9 @@ { "group": "trait_group_fantasy_species", "prob": 50 }, { "group": "trait_group_MANA_REGEN", "prob": 15 }, { "group": "trait_group_MANA_MULT", "prob": 5 }, - { "group": "trait_group_MANA_ADD", "prob": 10 } + { "group": "trait_group_MANA_ADD", "prob": 10 }, + { "group": "trait_group_SCHOOL_DEFICIENCY_SINGLE", "prob": 15 }, + { "group": "trait_group_SCHOOL_DEFICIENCY_MULTIPLE", "prob": 2 } ] }, { @@ -317,5 +319,35 @@ { "trait": "MANA_SUB2", "prob": 15 }, { "trait": "MANA_SUB3", "prob": 1 } ] + }, + { + "type": "trait_group", + "id": "trait_group_SCHOOL_DEFICIENCY_SINGLE", + "subtype": "distribution", + "traits": [ + { "trait": "NO_CASTING_CHANNELING_SPELLS", "prob": 1 }, + { "trait": "NO_CASTING_EVOCATION_SPELLS", "prob": 1 }, + { "trait": "NO_CASTING_CONJURATION_SPELLS", "prob": 1 }, + { "trait": "NO_CASTING_ENHANCEMENT_SPELLS", "prob": 1 }, + { "trait": "NO_CASTING_ENERVATION_SPELLS", "prob": 1 }, + { "trait": "NO_CASTING_CONVEYANCE_SPELLS", "prob": 1 }, + { "trait": "NO_CASTING_RESTORATION_SPELLS", "prob": 1 }, + { "trait": "NO_CASTING_TRANSFORMATION_SPELLS", "prob": 1 } + ] + }, + { + "type": "trait_group", + "id": "trait_group_SCHOOL_DEFICIENCY_MULTIPLE", + "subtype": "collection", + "traits": [ + { "trait": "NO_CASTING_CHANNELING_SPELLS", "prob": 25 }, + { "trait": "NO_CASTING_EVOCATION_SPELLS", "prob": 25 }, + { "trait": "NO_CASTING_CONJURATION_SPELLS", "prob": 25 }, + { "trait": "NO_CASTING_ENHANCEMENT_SPELLS", "prob": 25 }, + { "trait": "NO_CASTING_ENERVATION_SPELLS", "prob": 25 }, + { "trait": "NO_CASTING_CONVEYANCE_SPELLS", "prob": 25 }, + { "trait": "NO_CASTING_RESTORATION_SPELLS", "prob": 25 }, + { "trait": "NO_CASTING_TRANSFORMATION_SPELLS", "prob": 25 } + ] } ]