diff --git a/code/controllers/configuration/entries/dynamic.dm b/code/controllers/configuration/entries/dynamic.dm new file mode 100644 index 0000000000..1bc2581103 --- /dev/null +++ b/code/controllers/configuration/entries/dynamic.dm @@ -0,0 +1,41 @@ +/datum/config_entry/flag/dynamic_voting + +/datum/config_entry/number/dynamic_high_pop_limit + config_entry_value = 55 + min_val = 1 + +/datum/config_entry/number/dynamic_pop_per_requirement + config_entry_value = 6 + min_val = 1 + +/datum/config_entry/number/dynamic_midround_delay_min + config_entry_value = 15 + min_val = 1 + +/datum/config_entry/number/dynamic_midround_delay_max + config_entry_value = 35 + min_val = 1 + +/datum/config_entry/number/dynamic_latejoin_delay_min + config_entry_value = 5 + min_val = 1 + +/datum/config_entry/number/dynamic_latejoin_delay_max + config_entry_value = 25 + min_val = 1 + +/datum/config_entry/keyed_list/dynamic_cost + key_mode = KEY_MODE_TEXT + value_mode = VALUE_MODE_NUM + +/datum/config_entry/keyed_list/dynamic_weight + key_mode = KEY_MODE_TEXT + value_mode = VALUE_MODE_NUM + +/datum/config_entry/keyed_list/dynamic_requirements + key_mode = KEY_MODE_TEXT + value_mode = VALUE_MODE_NUM_LIST + +/datum/config_entry/keyed_list/dynamic_high_population_requirement + key_mode = KEY_MODE_TEXT + value_mode = VALUE_MODE_NUM diff --git a/code/controllers/configuration/entries/game_options.dm b/code/controllers/configuration/entries/game_options.dm index 0ba52c23f1..80c179d639 100644 --- a/code/controllers/configuration/entries/game_options.dm +++ b/code/controllers/configuration/entries/game_options.dm @@ -371,45 +371,3 @@ /datum/config_entry/number/auto_transfer_delay config_entry_value = 72000 min_val = 0 - -/datum/config_entry/flag/dynamic_voting - -/datum/config_entry/number/dynamic_high_pop_limit - config_entry_value = 55 - min_val = 1 - -/datum/config_entry/number/dynamic_pop_per_requirement - config_entry_value = 6 - min_val = 1 - -/datum/config_entry/number/dynamic_midround_delay_min - config_entry_value = 15 - min_val = 1 - -/datum/config_entry/number/dynamic_midround_delay_max - config_entry_value = 35 - min_val = 1 - -/datum/config_entry/number/dynamic_latejoin_delay_min - config_entry_value = 5 - min_val = 1 - -/datum/config_entry/number/dynamic_latejoin_delay_max - config_entry_value = 25 - min_val = 1 - -/datum/config_entry/keyed_list/dynamic_cost - key_mode = KEY_MODE_TEXT - value_mode = VALUE_MODE_NUM - -/datum/config_entry/keyed_list/dynamic_weight - key_mode = KEY_MODE_TEXT - value_mode = VALUE_MODE_NUM - -/datum/config_entry/keyed_list/dynamic_requirements - key_mode = KEY_MODE_TEXT - value_mode = VALUE_MODE_NUM_LIST - -/datum/config_entry/keyed_list/dynamic_high_population_requirement - key_mode = KEY_MODE_TEXT - value_mode = VALUE_MODE_NUM diff --git a/config/config.txt b/config/config.txt index 0501d1fd2f..e71c2587b7 100644 --- a/config/config.txt +++ b/config/config.txt @@ -5,6 +5,7 @@ $include dbconfig.txt $include comms.txt $include antag_rep.txt $include donator_groupings.txt +$include dynamic_config.txt # You can use the @ character at the beginning of a config option to lock it from being edited in-game # Example usage: diff --git a/config/dynamic_config.txt b/config/dynamic_config.txt new file mode 100644 index 0000000000..f364b80bfd --- /dev/null +++ b/config/dynamic_config.txt @@ -0,0 +1,141 @@ +## Injection delays: how long (in minutes) will pass before a midround or latejoin antag is injected. +DYNAMIC_MIDROUND_DELAY_MIN 15 +DYNAMIC_MIDROUND_DELAY_MAX 35 +DYNAMIC_LATEJOIN_DELAY_MIN 5 +DYNAMIC_LATEJOIN_DELAY_MAX 25 + +## How many roundstart players required for high population override to take effect. +DYNAMIC_HIGH_POP_LIMIT 80 #80 instead of 55 because fewer robust players + +## Pop range per requirement. +## If the value is five the range is: +## 0-4, 5-9, 10-14, 15-19, 20-24, 25-29, 30-34, 35-39, 40-54, 45+ +## If it is six the range is: +## 0-5, 6-11, 12-17, 18-23, 24-29, 30-35, 36-41, 42-47, 48-53, 54+ +## If it is seven the range is: +## 0-6, 7-13, 14-20, 21-27, 28-34, 35-41, 42-48, 49-55, 56-62, 63+ +## Options outside this range can be used, of course. +DYNAMIC_POP_PER_REQUIREMENT 9 # 9 instead of 6 because 1/3 of players are probably not doing much? + +## 1 -> 9, probability for this rule to be picked against other rules. +## Note that requirements must also be met, and some requirements are impossible to meet. +DYNAMIC_WEIGHT TRAITOR 5 +DYNAMIC_WEIGHT MALF_AI 1 +DYNAMIC_WEIGHT TRAITORBRO 4 +DYNAMIC_WEIGHT CHANGELING 1 +DYNAMIC_WEIGHT WIZARD 1 +DYNAMIC_WEIGHT CULT 3 +DYNAMIC_WEIGHT NUCLEAR 3 +DYNAMIC_WEIGHT REVOLUTION 2 +# All below are impossible-by-default +DYNAMIC_WEIGHT EXTENDED 3 +DYNAMIC_WEIGHT CLOCKWORK_CULT 3 +DYNAMIC_WEIGHT CLOWNOPS 3 +DYNAMIC_WEIGHT DEVIL 3 +DYNAMIC_WEIGHT MONKEY 3 +DYNAMIC_WEIGHT METEOR 3 + +## Midround antags +DYNAMIC_WEIGHT MIDROUND_TRAITOR 7 +DYNAMIC_WEIGHT MIDROUND_MALF_AI 3 +DYNAMIC_WEIGHT MIDROUND_WIZARD 1 +DYNAMIC_WEIGHT MIDROUND_NUCLEAR 5 +DYNAMIC_WEIGHT BLOB 4 +DYNAMIC_WEIGHT XENOS 3 +DYNAMIC_WEIGHT NIGHTMARE 3 + +## Latejoin antags +DYNAMIC_WEIGHT LATEJOIN_TRAITOR 7 +DYNAMIC_WEIGHT LATEJOIN_REVOLUTION 2 + +## Threat cost. This is decreased from the mode's threat when the rule is executed. +DYNAMIC_COST TRAITOR 10 +DYNAMIC_COST MALF_AI 35 +DYNAMIC_COST TRAITORBRO 10 +DYNAMIC_COST CHANGELING 30 +DYNAMIC_COST WIZARD 30 +DYNAMIC_COST CULT 35 +DYNAMIC_COST NUCLEAR 45 +DYNAMIC_COST REVOLUTION 40 +# All below are impossible-by-default +DYNAMIC_COST EXTENDED 0 +DYNAMIC_COST CLOCKWORK_CULT 0 +DYNAMIC_COST CLOWNOPS 40 +DYNAMIC_COST DEVIL 0 +DYNAMIC_COST MONKEY 0 +DYNAMIC_COST METEOR 0 + +## Midround antags +DYNAMIC_COST MIDROUND_TRAITOR 10 +DYNAMIC_COST MIDROUND_MALF_AI 35 +DYNAMIC_COST MIDROUND_WIZARD 20 +DYNAMIC_COST MIDROUND_NUCLEAR 35 +DYNAMIC_COST BLOB 10 +DYNAMIC_COST XENOS 10 +DYNAMIC_COST NIGHTMARE 10 + +## Latejoin antags +DYNAMIC_COST LATEJOIN_TRAITOR 5 +DYNAMIC_COST LATEJOIN_REVOLUTION 20 + +## Rule will not be generated with threat levels below requirement at a pop value. Pop values are determined by dynamic's pop-per-requirement. +## By default it's 0-8, 9-17, 18-26, 27-35, 36-44, 45-53, 54-60, 61-69, 70-78, 79+. +## This means that 40 30 30 20 20 20 15 15 15 10 will not generate below 40 at 0-8, 30 at 9-17 etc. +DYNAMIC_REQUIREMENTS TRAITOR 40 30 20 15 15 15 15 15 15 15 +DYNAMIC_REQUIREMENTS TRAITORBRO 50 40 30 20 20 15 15 15 15 15 +DYNAMIC_REQUIREMENTS MALF_AI 101 101 80 70 60 60 50 50 40 40 +DYNAMIC_REQUIREMENTS CHANGELING 101 101 101 101 101 101 101 101 101 101 +DYNAMIC_REQUIREMENTS WIZARD 100 90 70 40 30 20 15 15 15 15 +DYNAMIC_REQUIREMENTS CULT 100 90 80 60 40 30 15 15 15 15 +DYNAMIC_REQUIREMENTS NUCLEAR 100 90 90 80 60 40 30 20 15 15 +DYNAMIC_REQUIREMENTS REVOLUTION 101 101 70 40 30 20 15 15 15 15 +# All below are impossible-by-default +DYNAMIC_REQUIREMENTS EXTENDED 101 101 101 101 101 101 101 101 101 101 +DYNAMIC_REQUIREMENTS CLOCKWORK_CULT 100 90 80 60 40 30 15 15 15 15 +DYNAMIC_REQUIREMENTS CLOWNOPS 101 101 101 101 101 101 101 101 101 101 +DYNAMIC_REQUIREMENTS DEVIL 101 101 101 101 101 101 101 101 101 101 +DYNAMIC_REQUIREMENTS MONKEY 101 101 101 101 101 101 101 101 101 101 +DYNAMIC_REQUIREMENTS METEOR 101 101 101 101 101 101 101 101 101 101 + +## Midround antags +DYNAMIC_REQUIREMENTS MIDROUND_TRAITOR 50 40 30 20 15 15 15 15 15 15 +DYNAMIC_REQUIREMENTS MIDROUND_MALF_AI 101 101 80 70 60 60 50 50 40 40 +DYNAMIC_REQUIREMENTS MIDROUND_WIZARD 90 90 70 40 30 20 15 15 15 15 +DYNAMIC_REQUIREMENTS MIDROUND_NUCLEAR 90 90 90 80 60 40 30 20 15 15 +DYNAMIC_REQUIREMENTS BLOB 101 101 101 80 60 50 30 20 15 15 +DYNAMIC_REQUIREMENTS XENOS 101 101 101 70 50 40 20 15 15 15 +DYNAMIC_REQUIREMENTS NIGHTMARE 101 101 101 70 50 40 20 15 15 15 + +## Latejoin antags +DYNAMIC_REQUIREMENTS LATEJOIN_TRAITOR 40 30 20 15 15 15 15 15 15 15 +DYNAMIC_REQUIREMENTS LATEJOIN_REVOLUTION 101 101 70 40 30 20 20 20 20 20 + +## An alternative, static requirement used instead when pop is over mode's high_pop_limit. +DYNAMIC_HIGH_POPULATION_REQUIREMENT TRAITOR 15 +DYNAMIC_HIGH_POPULATION_REQUIREMENT MALF_AI 15 +DYNAMIC_HIGH_POPULATION_REQUIREMENT TRAITORBRO 15 +DYNAMIC_HIGH_POPULATION_REQUIREMENT CHANGELING 101 +DYNAMIC_HIGH_POPULATION_REQUIREMENT WIZARD 15 +DYNAMIC_HIGH_POPULATION_REQUIREMENT CULT 15 +DYNAMIC_HIGH_POPULATION_REQUIREMENT NUCLEAR 15 +DYNAMIC_HIGH_POPULATION_REQUIREMENT REVOLUTION 15 +# All below are impossible-by-default +DYNAMIC_HIGH_POPULATION_REQUIREMENT EXTENDED 101 +DYNAMIC_HIGH_POPULATION_REQUIREMENT CLOCKWORK_CULT 101 +DYNAMIC_HIGH_POPULATION_REQUIREMENT CLOWNOPS 101 +DYNAMIC_HIGH_POPULATION_REQUIREMENT DEVIL 101 +DYNAMIC_HIGH_POPULATION_REQUIREMENT MONKEY 101 +DYNAMIC_HIGH_POPULATION_REQUIREMENT METEOR 101 + +## Midround antags +DYNAMIC_HIGH_POPULATION_REQUIREMENT MIDROUND_TRAITOR 15 +DYNAMIC_HIGH_POPULATION_REQUIREMENT MIDROUND_MALF_AI 35 +DYNAMIC_HIGH_POPULATION_REQUIREMENT MIDROUND_WIZARD 50 +DYNAMIC_HIGH_POPULATION_REQUIREMENT MIDROUND_NUCLEAR 15 +DYNAMIC_HIGH_POPULATION_REQUIREMENT BLOB 50 +DYNAMIC_HIGH_POPULATION_REQUIREMENT XENOS 50 +DYNAMIC_HIGH_POPULATION_REQUIREMENT NIGHTMARE 50 + +## Latejoin antags +DYNAMIC_HIGH_POPULATION_REQUIREMENT LATEJOIN_TRAITOR 15 +DYNAMIC_HIGH_POPULATION_REQUIREMENT LATEJOIN_REVOLUTION 50 diff --git a/config/game_options.txt b/config/game_options.txt index 8fe5ae4382..38242aa2ea 100644 --- a/config/game_options.txt +++ b/config/game_options.txt @@ -254,152 +254,6 @@ EVENTS_MIN_TIME_MUL 1 ## Set to 0 to make dangerous events avaliable for all populations. EVENTS_MIN_PLAYERS_MUL 1 - - -### DYNAMIC MODE ### - -## Injection delays: how long (in minutes) will pass before a midround or latejoin antag is injected. -DYNAMIC_MIDROUND_DELAY_MIN 15 -DYNAMIC_MIDROUND_DELAY_MAX 35 -DYNAMIC_LATEJOIN_DELAY_MIN 5 -DYNAMIC_LATEJOIN_DELAY_MAX 25 - -## How many roundstart players required for high population override to take effect. -DYNAMIC_HIGH_POP_LIMIT 80 #80 instead of 55 because fewer robust players - -## Pop range per requirement. -## If the value is five the range is: -## 0-4, 5-9, 10-14, 15-19, 20-24, 25-29, 30-34, 35-39, 40-54, 45+ -## If it is six the range is: -## 0-5, 6-11, 12-17, 18-23, 24-29, 30-35, 36-41, 42-47, 48-53, 54+ -## If it is seven the range is: -## 0-6, 7-13, 14-20, 21-27, 28-34, 35-41, 42-48, 49-55, 56-62, 63+ -## Options outside this range can be used, of course. -DYNAMIC_POP_PER_REQUIREMENT 9 # 9 instead of 6 because 1/3 of players are probably not doing much? - -## 1 -> 9, probability for this rule to be picked against other rules. -## Note that requirements must also be met, and some requirements are impossible to meet. -DYNAMIC_WEIGHT TRAITOR 5 -DYNAMIC_WEIGHT MALF_AI 1 -DYNAMIC_WEIGHT TRAITORBRO 4 -DYNAMIC_WEIGHT CHANGELING 1 -DYNAMIC_WEIGHT WIZARD 1 -DYNAMIC_WEIGHT CULT 3 -DYNAMIC_WEIGHT NUCLEAR 3 -DYNAMIC_WEIGHT REVOLUTION 2 -# All below are impossible-by-default -DYNAMIC_WEIGHT EXTENDED 3 -DYNAMIC_WEIGHT CLOCKWORK_CULT 3 -DYNAMIC_WEIGHT CLOWNOPS 3 -DYNAMIC_WEIGHT DEVIL 3 -DYNAMIC_WEIGHT MONKEY 3 -DYNAMIC_WEIGHT METEOR 3 - -## Midround antags -DYNAMIC_WEIGHT MIDROUND_TRAITOR 7 -DYNAMIC_WEIGHT MIDROUND_MALF_AI 3 -DYNAMIC_WEIGHT MIDROUND_WIZARD 1 -DYNAMIC_WEIGHT MIDROUND_NUCLEAR 5 -DYNAMIC_WEIGHT BLOB 4 -DYNAMIC_WEIGHT XENOS 3 -DYNAMIC_WEIGHT NIGHTMARE 3 - -## Latejoin antags -DYNAMIC_WEIGHT LATEJOIN_TRAITOR 7 -DYNAMIC_WEIGHT LATEJOIN_REVOLUTION 2 - -## Threat cost. This is decreased from the mode's threat when the rule is executed. -DYNAMIC_COST TRAITOR 10 -DYNAMIC_COST MALF_AI 35 -DYNAMIC_COST TRAITORBRO 10 -DYNAMIC_COST CHANGELING 30 -DYNAMIC_COST WIZARD 30 -DYNAMIC_COST CULT 35 -DYNAMIC_COST NUCLEAR 45 -DYNAMIC_COST REVOLUTION 40 -# All below are impossible-by-default -DYNAMIC_COST EXTENDED 0 -DYNAMIC_COST CLOCKWORK_CULT 0 -DYNAMIC_COST CLOWNOPS 40 -DYNAMIC_COST DEVIL 0 -DYNAMIC_COST MONKEY 0 -DYNAMIC_COST METEOR 0 - -## Midround antags -DYNAMIC_COST MIDROUND_TRAITOR 10 -DYNAMIC_COST MIDROUND_MALF_AI 35 -DYNAMIC_COST MIDROUND_WIZARD 20 -DYNAMIC_COST MIDROUND_NUCLEAR 35 -DYNAMIC_COST BLOB 10 -DYNAMIC_COST XENOS 10 -DYNAMIC_COST NIGHTMARE 10 - -## Latejoin antags -DYNAMIC_COST LATEJOIN_TRAITOR 5 -DYNAMIC_COST LATEJOIN_REVOLUTION 20 - -## Rule will not be generated with threat levels below requirement at a pop value. Pop values are determined by dynamic's pop-per-requirement. -## By default it's 0-8, 9-17, 18-26, 27-35, 36-44, 45-53, 54-60, 61-69, 70-78, 79+. -## This means that 40 30 30 20 20 20 15 15 15 10 will not generate below 40 at 0-8, 30 at 9-17 etc. -DYNAMIC_REQUIREMENTS TRAITOR 40 30 20 15 15 15 15 15 15 15 -DYNAMIC_REQUIREMENTS TRAITORBRO 50 40 30 20 20 15 15 15 15 15 -DYNAMIC_REQUIREMENTS MALF_AI 101 101 80 70 60 60 50 50 40 40 -DYNAMIC_REQUIREMENTS CHANGELING 101 101 101 101 101 101 101 101 101 101 -DYNAMIC_REQUIREMENTS WIZARD 100 90 70 40 30 20 15 15 15 15 -DYNAMIC_REQUIREMENTS CULT 100 90 80 60 40 30 15 15 15 15 -DYNAMIC_REQUIREMENTS NUCLEAR 100 90 90 80 60 40 30 20 15 15 -DYNAMIC_REQUIREMENTS REVOLUTION 101 101 70 40 30 20 15 15 15 15 -# All below are impossible-by-default -DYNAMIC_REQUIREMENTS EXTENDED 101 101 101 101 101 101 101 101 101 101 -DYNAMIC_REQUIREMENTS CLOCKWORK_CULT 100 90 80 60 40 30 15 15 15 15 -DYNAMIC_REQUIREMENTS CLOWNOPS 101 101 101 101 101 101 101 101 101 101 -DYNAMIC_REQUIREMENTS DEVIL 101 101 101 101 101 101 101 101 101 101 -DYNAMIC_REQUIREMENTS MONKEY 101 101 101 101 101 101 101 101 101 101 -DYNAMIC_REQUIREMENTS METEOR 101 101 101 101 101 101 101 101 101 101 - -## Midround antags -DYNAMIC_REQUIREMENTS MIDROUND_TRAITOR 50 40 30 20 15 15 15 15 15 15 -DYNAMIC_REQUIREMENTS MIDROUND_MALF_AI 101 101 80 70 60 60 50 50 40 40 -DYNAMIC_REQUIREMENTS MIDROUND_WIZARD 90 90 70 40 30 20 15 15 15 15 -DYNAMIC_REQUIREMENTS MIDROUND_NUCLEAR 90 90 90 80 60 40 30 20 15 15 -DYNAMIC_REQUIREMENTS BLOB 101 101 101 80 60 50 30 20 15 15 -DYNAMIC_REQUIREMENTS XENOS 101 101 101 70 50 40 20 15 15 15 -DYNAMIC_REQUIREMENTS NIGHTMARE 101 101 101 70 50 40 20 15 15 15 - -## Latejoin antags -DYNAMIC_REQUIREMENTS LATEJOIN_TRAITOR 40 30 20 15 15 15 15 15 15 15 -DYNAMIC_REQUIREMENTS LATEJOIN_REVOLUTION 101 101 70 40 30 20 20 20 20 20 - -## An alternative, static requirement used instead when pop is over mode's high_pop_limit. -DYNAMIC_HIGH_POPULATION_REQUIREMENT TRAITOR 15 -DYNAMIC_HIGH_POPULATION_REQUIREMENT MALF_AI 15 -DYNAMIC_HIGH_POPULATION_REQUIREMENT TRAITORBRO 15 -DYNAMIC_HIGH_POPULATION_REQUIREMENT CHANGELING 101 -DYNAMIC_HIGH_POPULATION_REQUIREMENT WIZARD 15 -DYNAMIC_HIGH_POPULATION_REQUIREMENT CULT 15 -DYNAMIC_HIGH_POPULATION_REQUIREMENT NUCLEAR 15 -DYNAMIC_HIGH_POPULATION_REQUIREMENT REVOLUTION 15 -# All below are impossible-by-default -DYNAMIC_HIGH_POPULATION_REQUIREMENT EXTENDED 101 -DYNAMIC_HIGH_POPULATION_REQUIREMENT CLOCKWORK_CULT 101 -DYNAMIC_HIGH_POPULATION_REQUIREMENT CLOWNOPS 101 -DYNAMIC_HIGH_POPULATION_REQUIREMENT DEVIL 101 -DYNAMIC_HIGH_POPULATION_REQUIREMENT MONKEY 101 -DYNAMIC_HIGH_POPULATION_REQUIREMENT METEOR 101 - -## Midround antags -DYNAMIC_HIGH_POPULATION_REQUIREMENT MIDROUND_TRAITOR 15 -DYNAMIC_HIGH_POPULATION_REQUIREMENT MIDROUND_MALF_AI 35 -DYNAMIC_HIGH_POPULATION_REQUIREMENT MIDROUND_WIZARD 50 -DYNAMIC_HIGH_POPULATION_REQUIREMENT MIDROUND_NUCLEAR 15 -DYNAMIC_HIGH_POPULATION_REQUIREMENT BLOB 50 -DYNAMIC_HIGH_POPULATION_REQUIREMENT XENOS 50 -DYNAMIC_HIGH_POPULATION_REQUIREMENT NIGHTMARE 50 - -## Latejoin antags -DYNAMIC_HIGH_POPULATION_REQUIREMENT LATEJOIN_TRAITOR 15 -DYNAMIC_HIGH_POPULATION_REQUIREMENT LATEJOIN_REVOLUTION 50 - ## AI ### ## Allow the AI job to be picked.