From e22265586b67e9a60775d77bd0897ef746da2a3f Mon Sep 17 00:00:00 2001 From: Soyweiser Date: Wed, 17 Aug 2016 03:10:17 +0200 Subject: [PATCH 1/5] Removed default time = 0 fields. Updated json documentation. (please check for errors). --- data/json/mutations.json | 10 ++-------- doc/JSON_INFO.md | 23 +++++++++++++++++++++-- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/data/json/mutations.json b/data/json/mutations.json index ed4748e77ea21..cbdf3b71c6f91 100644 --- a/data/json/mutations.json +++ b/data/json/mutations.json @@ -1752,7 +1752,6 @@ "category" : ["MUTCAT_MYCUS"], "active" : true, "cost" : 8, - "time" : 0, "hunger" : true, "thirst" : true },{ @@ -1785,7 +1784,6 @@ "category" : ["MUTCAT_MYCUS"], "active" : true, "cost" : 10, - "time" : 0, "hunger" : true, "thirst" : true, "fatigue" : true @@ -2278,7 +2276,6 @@ "category" : ["MUTCAT_RAT"], "active" : true, "cost" : 10, - "time" : 0, "hunger" : true, "thirst" : true, "fatigue" : true @@ -3203,7 +3200,8 @@ "id" : "INT_UP_2", "name" : "Very Smart", "points" : 2, - "ugliness" : 0,"description" : "You are smarter. Intelligence + 2", + "ugliness" : 0, + "description" : "You are smarter. Intelligence + 2", "prereqs" : ["INT_UP"], "changes_to" : ["INT_UP_3"], "passive_mods" : { @@ -3682,7 +3680,6 @@ "changes_to" : ["VOMITOUS", "EATPOISON"], "category" : ["MUTCAT_ALPHA"], "active" : true, - "time" : 0 },{ "type" : "mutation", "id" : "VOMITOUS", @@ -3693,7 +3690,6 @@ "changes_to" : ["EATPOISON"], "category" : ["MUTCAT_SLIME", "MUTCAT_RAT", "MUTCAT_MEDICAL", "MUTCAT_ELFA"], "active" : true, - "time" : 0 },{ "type" : "mutation", "id" : "HUNGER", @@ -4105,7 +4101,6 @@ "category" : ["MUTCAT_SLIME"], "active" : true, "cost" : 40, - "time" : 0, "hunger" : true, "thirst" : true },{ @@ -4210,7 +4205,6 @@ "category" : ["MUTCAT_PLANT"], "active" : true, "cost" : 10, - "time" : 0, "hunger" : true, "thirst" : true, "attacks": [ diff --git a/doc/JSON_INFO.md b/doc/JSON_INFO.md index c369057745482..afd54392ebf62 100644 --- a/doc/JSON_INFO.md +++ b/doc/JSON_INFO.md @@ -376,14 +376,25 @@ Mods can modify this via "add:traits" and "remove:traits". "description": "Nothing gets you down!" // In-game description "starting_trait": true, // Can be selected at character creation (default: false) "valid": false, // Can be mutated ingame (default: true) +"purifiable": false, //Cannot be purified (default: true) +"initial_ma_styles" : [ "style_centipede", "style_venom_snake" ], //List of starting martial arts types. One of the list is selectable at start. Only works at character creation. "category": ["MUTCAT_BIRD", "MUTCAT_INSECT"], // Categories containing this mutation "prereqs": ["SKIN_ROUGH"], // Needs these mutations before you can mutate toward this mutation +"prereqs2": ["LEAVES"], //Also need these mutations before you can mutate towards this mutation. When both set creates 2 different mutation paths, random from one is picked. Only use together with "prereqs" +"threshreq": ["THRESH_SPIDER"], //Required threshold for this mutation to be possible "cancels": ["ROT1", "ROT2", "ROT3"], // Cancels these mutations when mutating "changes_to": ["FASTHEALER2"], // Can change into these mutations when mutating further "leads_to": [], // Mutations that add to this one +"passive_mods" : { //increases stats with the listed value. Negative means a stat reduction + "per_mod" : 1, //Possible values per_mod, str_mod, dex_mod, int_mod + "str_mod" : 2 +}, "wet_protection":[{ "part": "HEAD", // Wet Protection on specific bodyparts "good": 1 } ] // "neutral/good/ignored" // Good increases pos and cancels neg, neut cancels neg, ignored cancels both "vitamin_rates": [ [ "vitC", -1200 ] ], // How much extra vitamins do you consume per minute. Negative values mean production +"restricts_gear" : [ "TORSO" ], //list of bodyparts that get restricted by this mutation +"allow_soft_gear" : true, //If there is a list of 'restricts_gear' this sets if the location still allows items made out of soft materials (Only one of the types need to be soft for it to be considered soft). (default: false) +"destroys_gear" : true, //If true, destroys the gear in the 'restricts_gear' location when mutated into. (default: false) "encumbrance_always" : [ // Adds this much encumbrance to selected body parts [ "ARM_L", 20 ], [ "ARM_R", 20 ] @@ -391,7 +402,7 @@ Mods can modify this via "add:traits" and "remove:traits". "encumbrance_covered" : [ // Adds this much encumbrance to selected body parts, but only if the part is covered by not-OVERSIZE worn equipment [ "HAND_L", 50 ], [ "HAND_R", 50 ] -] +], "armor" : [ // Protects selected body parts this much. Resistances use syntax like `PART RESISTANCE` below. [ [ "ALL" ], // Shorthand that applies the selected resistance to the entire body @@ -401,7 +412,15 @@ Mods can modify this via "add:traits" and "remove:traits". [ "ARM_L", "ARM_R" ], // Overrides the above settings for those body parts { "bash" : 1 } // ...and gives them those resistances instead ] -] +], +"active" : true, //When set the mutation is an active mutation that the player needs to activate (default: false) +"starts_active" : true, //When true, this 'active' mutation starts active (default: false, requires 'active') +"cost" : 8, // Cost to activate this mutation. Needs one of the hunger, thirst, or fatigue values set to true. (default: 0) +"time" : 100, //Sets the amount of (turns * current player speed ) time units that need to pass before the cost is to be paid again. Needs to be higher than one to have any effect. (default: 0) +"hunger" : true, //If true, activated mutation increases hunger by cost. (default: false) +"thirst" : true, //If true, activated mutation increases thirst by cost. (default: false) +"fatigue" : true, //If true, activated mutation increases fatigue by cost. (default: false) +"note" : "Yes, I love documentation!", // Documentation of the mutation. Obviously ignored ingame. ``` ###VEHICLE GROUPS ```C++ From ffb3aaa5dcf44912204315ff80f6751d2c405a68 Mon Sep 17 00:00:00 2001 From: Soyweiser Date: Wed, 17 Aug 2016 06:22:58 +0200 Subject: [PATCH 2/5] Added missing profession documentation. --- doc/JSON_INFO.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/JSON_INFO.md b/doc/JSON_INFO.md index afd54392ebf62..6a0deeae63fe9 100644 --- a/doc/JSON_INFO.md +++ b/doc/JSON_INFO.md @@ -377,6 +377,7 @@ Mods can modify this via "add:traits" and "remove:traits". "starting_trait": true, // Can be selected at character creation (default: false) "valid": false, // Can be mutated ingame (default: true) "purifiable": false, //Cannot be purified (default: true) +"profession": true, //trait is a starting profession special trait. (default: false) "initial_ma_styles" : [ "style_centipede", "style_venom_snake" ], //List of starting martial arts types. One of the list is selectable at start. Only works at character creation. "category": ["MUTCAT_BIRD", "MUTCAT_INSECT"], // Categories containing this mutation "prereqs": ["SKIN_ROUGH"], // Needs these mutations before you can mutate toward this mutation From a0657d1a3b38afd1be11e8043f5953767ef18093 Mon Sep 17 00:00:00 2001 From: Soyweiser Date: Wed, 17 Aug 2016 06:28:22 +0200 Subject: [PATCH 3/5] Removed trailing comma's --- data/json/mutations.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/json/mutations.json b/data/json/mutations.json index cbdf3b71c6f91..e41f4736c519b 100644 --- a/data/json/mutations.json +++ b/data/json/mutations.json @@ -3679,7 +3679,7 @@ "prereqs" : ["WEAKSTOMACH"], "changes_to" : ["VOMITOUS", "EATPOISON"], "category" : ["MUTCAT_ALPHA"], - "active" : true, + "active" : true },{ "type" : "mutation", "id" : "VOMITOUS", @@ -3689,7 +3689,7 @@ "prereqs" : ["NAUSEA"], "changes_to" : ["EATPOISON"], "category" : ["MUTCAT_SLIME", "MUTCAT_RAT", "MUTCAT_MEDICAL", "MUTCAT_ELFA"], - "active" : true, + "active" : true },{ "type" : "mutation", "id" : "HUNGER", From b1cdbd2ff01d12793b7ce889bf3e3fda8ded2a16 Mon Sep 17 00:00:00 2001 From: Soyweiser Date: Wed, 17 Aug 2016 07:40:34 +0200 Subject: [PATCH 4/5] replaced all "//" with "note" (think it is better if we keep one type of comment field in the files. And I picked 'note' in the documentation earlier). --- data/json/mutations.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/data/json/mutations.json b/data/json/mutations.json index e41f4736c519b..ad3666b75e51e 100644 --- a/data/json/mutations.json +++ b/data/json/mutations.json @@ -630,7 +630,7 @@ "points" : -2, "description" : "You have problems with eating meat. It's possible for you to eat it, but you will suffer morale penalties due to nausea.", "starting_trait" : true, - "//" : "Intolerances are presumed a psychological issue unless stated otherwise, and cancelled by digestive mutations, which force the issue.", + "note" : "Intolerances are presumed a psychological issue unless stated otherwise, and cancelled by digestive mutations, which force the issue.", "valid" : false, "cancels" : ["CANNIBAL", "MEATARIAN", "ANTIFRUIT"] },{ @@ -665,7 +665,7 @@ "id" : "LACTOSE", "name" : "Lactose Intolerance", "points" : -1, - "//" : "Actual digestive issue, on even footing with the -vore mutations.", + "note" : "Actual digestive issue, on even footing with the -vore mutations.", "description" : "You like 75 percent of the world, cannot tolerate milk or milk based products. It's possible for you to eat them, but you will suffer morale penalties due to nausea.", "starting_trait" : true },{ @@ -681,7 +681,7 @@ "id" : "ANTIWHEAT", "name" : "Wheat Allergy", "points" : -2, - "//" : "Actual digestive issue, on even footing with the -vore mutations.", + "note" : "Actual digestive issue, on even footing with the -vore mutations.", "description" : "You have a rare allergy that prevents you from eating wheat. It's possible for you to eat them, but you will suffer morale penalties due to nausea.", "starting_trait" : true },{ @@ -4920,7 +4920,7 @@ "id" : "PROF_MED", "name" : "MD", "points" : 0, - "//" : "In the US, a medical 'residency' is essentially an extended post-graduate, on-the-job medical training. The idea here is that hopsital computer systems would recognize the PC as a valid user and grant access.", + "note" : "In the US, a medical 'residency' is essentially an extended post-graduate, on-the-job medical training. The idea here is that hopsital computer systems would recognize the PC as a valid user and grant access.", "description" : "You were just through with the administrative formalities for your residency when the cataclysm struck. \"Your\" hospital was overrun and evacuated, but there's always work for a good doctor.", "valid": false, "purifiable": false, From 1a26a471933378374767685d7331f93da945ea3b Mon Sep 17 00:00:00 2001 From: Soyweiser Date: Fri, 19 Aug 2016 21:43:09 +0200 Subject: [PATCH 5/5] Updated per DevapDin's comments --- data/json/mutations.json | 24 ++++++++++++------------ doc/JSON_INFO.md | 8 +++++--- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/data/json/mutations.json b/data/json/mutations.json index ad3666b75e51e..4d28cc4be08d8 100644 --- a/data/json/mutations.json +++ b/data/json/mutations.json @@ -231,7 +231,7 @@ "description" : "You are less likely to throw up from food poisoning, alcohol, etc. If you throw up nevertheless, you won't suffer a residual nausea.", "starting_trait" : true, "changes_to" : ["NAUSEA"], - "note" : "nope. This does NOT lead to EATPOISON. Stomach problems are part of the GI upgrades--one advantage to not having Robust Genetics.", + "//" : "nope. This does NOT lead to EATPOISON. Stomach problems are part of the GI upgrades--one advantage to not having Robust Genetics.", "cancels" : ["WEAKSTOMACH"] },{ "type" : "mutation", @@ -390,7 +390,7 @@ "category" : ["MUTCAT_FISH", "MUTCAT_SLIME", "MUTCAT_ALPHA", "MUTCAT_MEDICAL"] },{ "type" : "mutation", - "id" : "EAGLEEYED", "note" : "Can't change the ID as that breaks save-compatibility.", + "id" : "EAGLEEYED", "//" : "Can't change the ID as that breaks save-compatibility.", "name" : "Scout", "points" : 1, "description" : "You're an excellent navigator and your ability to spot distant landmarks is unmatched. Your sight radius on the overmap extends beyond the normal range.", @@ -630,7 +630,7 @@ "points" : -2, "description" : "You have problems with eating meat. It's possible for you to eat it, but you will suffer morale penalties due to nausea.", "starting_trait" : true, - "note" : "Intolerances are presumed a psychological issue unless stated otherwise, and cancelled by digestive mutations, which force the issue.", + "//" : "Intolerances are presumed a psychological issue unless stated otherwise, and cancelled by digestive mutations, which force the issue.", "valid" : false, "cancels" : ["CANNIBAL", "MEATARIAN", "ANTIFRUIT"] },{ @@ -665,7 +665,7 @@ "id" : "LACTOSE", "name" : "Lactose Intolerance", "points" : -1, - "note" : "Actual digestive issue, on even footing with the -vore mutations.", + "//" : "Actual digestive issue, on even footing with the -vore mutations.", "description" : "You like 75 percent of the world, cannot tolerate milk or milk based products. It's possible for you to eat them, but you will suffer morale penalties due to nausea.", "starting_trait" : true },{ @@ -681,7 +681,7 @@ "id" : "ANTIWHEAT", "name" : "Wheat Allergy", "points" : -2, - "note" : "Actual digestive issue, on even footing with the -vore mutations.", + "//" : "Actual digestive issue, on even footing with the -vore mutations.", "description" : "You have a rare allergy that prevents you from eating wheat. It's possible for you to eat them, but you will suffer morale penalties due to nausea.", "starting_trait" : true },{ @@ -2143,7 +2143,7 @@ "description" : "So it's fermented? Whatever, it's still good drinking. You've developed the ability to metabolize alcohol as a food source.", "prereqs" : ["TOLERANCE", "EATPOISON"], "prereqs2" : ["SAPROVORE", "EATPOISON"], - "note" : "It's unlikely but possible to get EATPOISON without ALCMET. Since EATPOISON's arguably a stronger version, it serves as both prereqs.", + "//" : "It's unlikely but possible to get EATPOISON without ALCMET. Since EATPOISON's arguably a stronger version, it serves as both prereqs.", "category" : ["MUTCAT_TROGLOBITE"], "valid" : false },{ @@ -2247,7 +2247,7 @@ "description" : "Your guts have developed the ability to handle poisonous food. Mostly.", "changes_to" : ["EATDEAD"], "prereqs" : ["NAUSEA", "VOMITOUS", "POISRESIST", "POISONOUS"], - "note" : "Yes, you eventually got over the massive digestive upset. Mutations aren't easy on a system!", + "//" : "Yes, you eventually got over the massive digestive upset. Mutations aren't easy on a system!", "prereqs2" : ["SAPROVORE", "TOLERANCE"], "threshreq" : ["THRESH_TROGLOBITE", "THRESH_CHIMERA", "THRESH_RAPTOR", "THRESH_RAT"], "category" : ["MUTCAT_TROGLOBITE", "MUTCAT_RAPTOR", "MUTCAT_RAT", "MUTCAT_CHIMERA"], @@ -2647,7 +2647,7 @@ "threshreq" : ["THRESH_MEDICAL"], "leads_to" : ["MUT_TOUGH"], "changes_to" : ["CENOBITE"], - "note" : "MASOCHIST_MED and NOPAIN don't cancel each other. By design. Poor painless folks...", + "//" : "MASOCHIST_MED and NOPAIN don't cancel each other. By design. Poor painless folks...", "category" : ["MUTCAT_MEDICAL"] },{ "type" : "mutation", @@ -2662,7 +2662,7 @@ "prereqs" : ["MASOCHIST_MED"], "prereqs2" : ["PAINREC3", "ADDICTIVE"], "threshreq" : ["THRESH_MEDICAL"], - "note" : "CENOBITE and NOPAIN also don't cancel each other. By design. Poor painless cenobites...", + "//" : "CENOBITE and NOPAIN also don't cancel each other. By design. Poor painless cenobites...", "category" : ["MUTCAT_MEDICAL"] },{ "type" : "mutation", @@ -2675,7 +2675,7 @@ "prereqs" : ["MASOCHIST", "PAINRESIST"], "prereqs2" : ["PAINREC3"], "threshreq" : ["THRESH_MEDICAL"], - "note" : "MASOCHIST_MED, CENOBITE, and NOPAIN don't cancel each other. By design. Poor painless people...", + "//" : "MASOCHIST_MED, CENOBITE, and NOPAIN don't cancel each other. By design. Poor painless people...", "category" : ["MUTCAT_MEDICAL"] },{ "type" : "mutation", @@ -3358,7 +3358,7 @@ "type" : "mutation", "id" : "MUT_JUNKIE", "name" : "Metallassomaiphile", - "note" : "name courtesy of wiktionary's Greek for 'mutate'. Greek-speakers, feel free to correct the term", + "//" : "name courtesy of wiktionary's Greek for 'mutate'. Greek-speakers, feel free to correct the term", "points" : -1, "visibility" : 0, "ugliness" : 0, @@ -4920,7 +4920,7 @@ "id" : "PROF_MED", "name" : "MD", "points" : 0, - "note" : "In the US, a medical 'residency' is essentially an extended post-graduate, on-the-job medical training. The idea here is that hopsital computer systems would recognize the PC as a valid user and grant access.", + "//" : "In the US, a medical 'residency' is essentially an extended post-graduate, on-the-job medical training. The idea here is that hopsital computer systems would recognize the PC as a valid user and grant access.", "description" : "You were just through with the administrative formalities for your residency when the cataclysm struck. \"Your\" hospital was overrun and evacuated, but there's always work for a good doctor.", "valid": false, "purifiable": false, diff --git a/doc/JSON_INFO.md b/doc/JSON_INFO.md index 6a0deeae63fe9..f29e72b286b78 100644 --- a/doc/JSON_INFO.md +++ b/doc/JSON_INFO.md @@ -49,6 +49,9 @@ groups of vehicle definitions with self-explanatory names of files: #raw jsons +###All files +"//" : "comment", // Preferred method of leaving comments inside json files. + ###BIONICS ```C++ "id" : "bio_batteries", // Unique ID. Must be one continuous word, @@ -376,8 +379,8 @@ Mods can modify this via "add:traits" and "remove:traits". "description": "Nothing gets you down!" // In-game description "starting_trait": true, // Can be selected at character creation (default: false) "valid": false, // Can be mutated ingame (default: true) -"purifiable": false, //Cannot be purified (default: true) -"profession": true, //trait is a starting profession special trait. (default: false) +"purifiable": false, //Sets if the mutation be purified (default: true) +"profession": true, //Trait is a starting profession special trait. (default: false) "initial_ma_styles" : [ "style_centipede", "style_venom_snake" ], //List of starting martial arts types. One of the list is selectable at start. Only works at character creation. "category": ["MUTCAT_BIRD", "MUTCAT_INSECT"], // Categories containing this mutation "prereqs": ["SKIN_ROUGH"], // Needs these mutations before you can mutate toward this mutation @@ -421,7 +424,6 @@ Mods can modify this via "add:traits" and "remove:traits". "hunger" : true, //If true, activated mutation increases hunger by cost. (default: false) "thirst" : true, //If true, activated mutation increases thirst by cost. (default: false) "fatigue" : true, //If true, activated mutation increases fatigue by cost. (default: false) -"note" : "Yes, I love documentation!", // Documentation of the mutation. Obviously ignored ingame. ``` ###VEHICLE GROUPS ```C++