--- tags: Rework, Viro, Nanite, Global --- # 1. Comprehensive viro+nanite rework [WIP] ## 1.1 Intro The rework is aimed at combining nanites and viruses together and expanding the system with micro- (bacteria) and macro- (parasites) organisms, along with a total overhaul of how pathogens (terminology WIP) interact with their hosts and each other. To ensure the system does not feel completely alien, for any station inhabitant it should have outcomes and game loops relatively similar to what is already available, except for the biotechnician, for whom the interactions should become much more complex. In order to make the system more realistic and robust, it will be necessary to include new "organs": circulatory, lymphatic and neural systems and tissues. Although not necessarily as physical organs one could cut out and eat. - [ ] TODO: figure out a way to add new organs without making them actual organs. # 2. Pathogens Pathogens will be a blueprint class for infections which will contain their general stats and traits. Local stats dependent on the infected body will be adjusted by a separate infection class. ## 2.1 Pathogen families There will be 4 pathogen types available for use, each with their distinct benefits and maluses as well as traits unique to them. Sorted by their very approximate scales: 1. Viruses - 20-400nm. 2. Nanites - 300-900nm. 3. Microorganisms - 200nm-750μm. 4. Macroorganisms - 1mm-1m. A pathogen's complexity will determine its (relative) scale. It will be harder to reach absolute population thresholds with larger agents. A unit of organ volume can house a unit of pathogen, which will be an arbitrary number modified by its scale. An extra lore-friendly number to tell how many agents are in a single unit can be added as well, although whether a unit contains millions of viruses or a couple worms won't have a mechanical effect. ## 2.2 Pathogen creation The current plan is to make a single (?) machine with an extensive UI which will allow you to construct any pathogen of the 4 types given from scratch and quickly insert any traits and manage stats without RNG and repetitive hassle (disk-shuffling to program nanites or RNG reagents for viro). As soon as your pathogen blueprint is finished, the machine will list the chems necessary to print the culture. However, as a printer can't disassemble and alter what it has already printed, the capacity to edit living pathogens will be limited. - [ ] TODO: discuss how machine upgrades will affect the printer. It is possible it will be necessary to limit how many pathogens can be printed over time in order to ensure there is no lag from thousands of infections and cultures going around. - [ ] TODO: research how lag-prone will the system be. ## 2.3 Pathogen dispersal Spreading the pathogens will be similar to current viro - automatic spread via symptoms and manual spread through consumption and injectors. - [ ] TODO: discuss the limitations of SS13 interpersonal interactions and offsetting them for infectivity. ## 2.4 Pathogen life cycles Each pathogen type will have several life cycles, which will determine whether the pathogen population counts towards activity thresholds or not. For example, parasites will go through a possible lifecycle of egg->newborn->young->adult->aging with only young and adult populations counting towards the active goal and only adult+aging counting towards reproduction. Inactive populations will have their own usages, however. In the example of a virus, it will be virus<->infected cell with the possible addition of a few more (slightly contrived) states for variability purposes, same for bacteria and nanites. - [ ] TODO: figure out whether extra age bins for simpler pathogens are a good idea. ## 2.5 Pathogen thresholds There are many possible thresholds that can be imposed on pathogens, some of which are: total volume, local volume, total population, local population (more on these in the section 3). In order for a pathogen population to exert its effects, its active count must reach thresholds, which will be defined by chosen traits and symptoms. - [ ] TODO: discuss more threshold possibilities. ## 2.6 Pathogen tropism and trophism levels Each pathogen will have a number of organs it "likes" to reside in (tropism) and consume the tissues of (trophism), which may be separate. Defined by 4 (?) coefficients (Primary, Secondary, Tertiary, Transitory), tropism will determine the total volume of an organ that a population can occupy and its tendency to migrate from organs it deems inhospitable or overcrowded. - [ ] TODO: determine whether 4 tropism coefficients are sufficient. Trophism is currently less worked out and will define how heavily, if at all, the pathogen consumes the selected organs for its own sake. Both these properties along with traits will determine how harshly the immune system reacts to the pathogen. ## 2.7 Pathogen traits Aside from residence and aggression towards organs, which are already sufficient to mimic many real-world counterparts, there will be traits with effects not tied to an organ's health. For example, a pathogen consuming the brain will deal damage to it, conferring brain traumas without the need of extra mechanisms. However, for the sake of variability, especially on the beneficial side, old ones will have to be carried over from viro (and nanites) and new ones invented. To balance the system, some traits will be exclusive while others will be locked behind conditionals, whether it be general research or pathogen experience. - [ ] TODO: discuss super-traits and their availability. - [ ] TODO: discuss adding separate points for biotech research. ## 2.8 Pathogen experience A gamey system that rewards continuous involvement of a biotech with a pathogen. Experience will represent how vulnerable and elaborate pathogens are. A freshly-minted bacterium can have many faults and vulnerabilites to drugs, but one that has survived through multiple generations of monkeys (sentient = better) stuffed with antibiotics, will be impossible to kill and, as a reward, be allowed to have the strongest traits available. Although it's a possibility, there is no plan to add random mutations. All post-print trait modifications will be done by the pathogen printer. Instead of having to always print one from scratch, it will also be possible to find a pre-made culture with some field experience to modify. - [ ] TODO: discuss random mutations. Currently, there are 4 types of experience pondered: trait experience (generic RPG experience), drug resistance, mob affinity, foreign pathogen-specific modifiers (defense/offense). - [ ] TODO: work out the experience types. # 3. Infections Infections will be handled in a completely new manner: each mob will have a table of cultures it has in its body, all of them travelling between, inhabiting and interacting with organs depending on their stats and traits. Simplemob interactions at the moment are not worked out at all, but mobs with organs will have a graph map defining how easy it is to transfer from one organ to the other and back. For example, it will be relatively easy to jump from blood vessels to functional organs and vice-versa, but impossible to do so directly from stomach to brain. - [ ] TODO: simplemob infections. ## 3.1 Infection bins Each infection will be a per-mob instance of a single pathogen that will contain information about the population counts of the pathogen in all organs of the body (very importantly, including removed ones) and handle its mechanisms like reproduction, migration and death. A single infection in a single organ will look like an array of floats equal in size to the pathogen's life cycles - one float for each state of the pathogen. Each float will represent an "age bracket" of a single population. ## 3.2 Foreign organs and mob deletion If an organ gets removed, a mob's infection should still track the populations in it until it gets destroyed or instered in a different mob, which will either create a new infection and assign the population to it, or assign it to an existing one of the same pathogen. - [ ] TODO: research the case when a mob housing the infections gets deleted. ## 3.3 Infection mechanics An infection class of a pathogen will process all the population bins in all organs and move them to their next age brackets and calculate: migration, death, reproduction, organ damage & nutrition, drug effects, attacks, defenses and experience. ### 3.3.1 Migration Pathogens will always migrate in some numbers which will be affected by the remaining volume of an organ, how hospitable it is to the pathogen, pathogen's life cycle (eggs and viruses mostly just drift, while grown organisms can travel) and organ transmissivity graph. A percentage of a population will be drawn for moving, then it will be spread amongst adjacent organs weighted by moving difficulty. Traits can be made that will allow to make this process more deliberate. - [ ] TODO: discuss purposeful movement traits. ### 3.3.2 Death The last age bracket of a pathogen will experience natural death, while others may be killed in the process by medicine, immune system, overpopulation or other pathogens. A separate age bracket for the dead may also be added for extra interactions. - [ ] TODO: discuss whether dead bins should be made. ### 3.3.3 Reproduction Age brackets that are allowed reproduction (e.g. infected cells for viruses, adults and olds for parasites) will populate the appropriate age brackets. This process will be affected by nutrition and environment hostility. - [ ] TODO: determine whether reproduced populations will progress through their brackets as a result. ### 3.3.4 Organ damage and nutrition Pathogen's trophism will determine how much organ integrity is converted into food. All pathogens will have a small base level of nourishment, assumed to be taken from the environment in a non-damaging way, which can be enhanced by certain chems (e.g. sugar). A damaged organ will decrease in volume, making it so that organs near death are barely habitable. Even dead organs will have a small amount of volume left to use. ### 3.3.5 Drug effects Chems will have a multitude of effects on pathogens and their age brackets (e.g. eggs will not be affected by a drug that may kill all other hatched parasites). Some will enhance their functions, some will inhibit them (e.g. stopping reproduction using a bacteriostatic drug) and some will outright kill them. Almost every property and coefficient can be made to be affected by one chem or another, making a huge variety of interactions potentially plausible. - [ ] TODO: define the range of affected properties. ### 3.3.6 Attacks and defenses A martial mechanism is necessary so that anti-pathogens can be made and to make sure they can fight each other for organ volume. As immune cells will be a simulated microorganism, they too should have offensive capabilities. - [ ] TODO: invent attack & defense. ### 3.3.7 Infection experience Pathogen experience can only be solidified in a new strain when an infection with field experience is used as a template. Depending on their circumstances, infections will have different experience levels and some will likely be better to use than others. - [ ] TODO: determine how will experience be collected. # 4. Immune system and pre-existing cultures The immune system can be simulated by a microorganism infection with age brackets for different types of immune cells. A number of pre-existing cultures like gut bacteria, cancer, opportunistic skin bacteria, etc. can also be simulated (to ensure that completely losing your immune cells doens't go unnoticed). - [ ] TODO: determine the immune age bins and the optimal amount of pre-existing cultures that won't clutter scanners/cause lag. ## 4.1 Immune cells Immune cells will be generated in the lymphatic system and from there they will travel around the body (both deliberately and randomly) and innoculate pathogens that are too populous and/or dangerous. Different cells will have different effects on age brackets. ## 4.2 Organ-specific immune responses Organs can be granted special immune actions that will help the body fight pathogens, e.g. sneezing, that will expel some of them, swelling that will decrease available volume and habitability, and others. - [ ] TODO: discuss possible organ immune reactions and their effects. ## 4.3 Pre-existing cultures Symbiotic pre-made cultures like gut bacteria can be made to give mild bonuses to players as long as they keep them healthy. It will be potentially possible to extract some of the more experienced ones from random people to enhance their properties using the printer. - [ ] TODO: discuss the system of re-introducing a modified infection to its predecessor. Hostile cultures like cancer and mildly hostile cultures like staphylococcus can also be introduced to incentivise keeping the immune system healthy. - [ ] TODO: discuss what kinds of infections can the crew carry randomly roundstart/acquire from random encounters (maint rats, space ruins, etc).