botany3
requested to merge pull/6734/babeyouknowabouttheautumnwhentheleavesarefallingdownohandalltheprettyflowersslowlywithertotheground into Bleeding-Edge
Created by: 9600bauds
Botany3, Return of Botany1 Like eight months late
BIG THANKS TO
- PJB3005, for combing through the entire code and make sure I didn't fuck anything up, as well as providing code samples on how to fix the shit I did fuck.
- wwjnc, for being a math nerd and the only person in the world who was able to figure out what the fuck was I even doing
- PJB, wwjnc, Clusterfack and everyone else in the IRC for their help with my coding questions.
- Kurfursten, Killete2, TermedClepe, Probe1, ihadtoregisterforthis, and everyone else who dared to brave the test server and helped me make sure this wasn't terribly broken.
- Zuhayr, for some parts of the code used, as well as the original inspiration
- u
Overhaul to the Mutation System
- Mutations will no longer give random stat penalties: All stat changes are now strictly positive. The tedium of mutating has been replaced with other milder challenges, in an effort to hopefully create a much better game experience.
- The amount of mutagen that you use per dose AND your plant's stats now have a huge impact on the resulting mutation:
- Mutations are now sub-divided into categories, roughly: bad, good, weird, and dangerous. Which category of mutation you'll get depends on the mutagen dosage: If you only use small amounts at a time, you'll mostly only get good things, but if you use more than 10u at a time, you can get potentially dangerous effects!
- However, as your plants are improved, they will start to build up resistance to small mutagen doses. Past a certain point, you may start to experience diminishing returns on your good mutations: if you want to get your plant over 50-75ish potency, you'll find that 10 mutagen is no longer doing the trick, and you may want to use more. This way, mutations turn from this boring and tedious "just roll the dice over and over" into what I hope will be a more fun approach: "how fast and how much you can improve your plant depends on how much risk you want to face"
- For stat-increasing positive mutations, the amount of stat increase will depend on how much mutagen you use. For example, using 10u mutagen will give you twice as much potency increase than using 5u.
- Because of all the above, mutations are 100% guaranteed when adding mutagen (as opposed to the current system where even getting a mutation at all is a diceroll), just that small doses will give weak effects.
- Some reagents can now be used to mutate your plant to alter a few specific stats. See "Changes to Hydroponics in General" below.
- Baby plants (<60ish seconds of life) react differently to mutagen: 30% chance to mutate species if capable of doing so, otherwise, get a guaranteed bad mutation. Adult plants will no longer randomly mutate species.
- Why To This Change: Discourages you from just plant-b-gone and replanting if you get an undesired mutation, since you won't be able to mutate for a little while if you do that (or encourages you to frankenstein the undesirable mutation out through xenobotany!). Allows you to stat-mutate your vanilla grown plants without them constantly mutating species. Makes logical sense since the plant magically becomes a baby plant again when it mutates into a new species (¿?¿?)
- Added a few new mutations, some of them shamelessly copied from @Zuhayr's https://github.com/Baystation12/Baystation12/pull/8038:
- Thorny: Plant and fruit both become covered in sharp thorns. Plants can't be harvested without gloves, fruits can't be picked up without gloves. Gives the plant some force when used as a weapon, but nothing really worthwhile. Acts like a glass shard when stepped on without shoes.
- Stinging: Plant and fruit both gain a cover of chemical stingers. When the plant/fruit comes in contact with unprotected skin (touched without gloves, stepped on without shoes, used to attack someone on an unprotected area, NOT when thrown), it will inject reagents into the body.
- Juicy/Slippery: At strength 1, splatters like a tomato when thrown. At strength 2, causes you to slip when walked over.
- Ligneous: Can't be harvested without using a sharp instrument. Has Kudzu uses.
- Hematophage: Plant can only gain nutriment from blood.
- You can examine fruits to see if they have some of these traits, such as stinging or slippery.
- Fixed/added the "change room temperature" mutation, which, apparently, had never worked or done anything at all, for as long as I know (it likely never did anything, ever).
- Some effects that could previously only be gotten through exotic seeds, such as plants with non-matching icons (apple tree growing bananas), exotic chemicals, and exuding gas.
- Plants that gain bioluminescence through mutations will now have a completely random color.
- Highly carnivorous plants now do fun things with mice.
Changes to Hydroponics in General
- Changes to the way plants react to some reagents:
- Robust Harvest no longer improves your effective yield, that function is now covered by the Floral Somatoray. (I considered this use to be very cheesy and a bit shallow since it was trivial to get the chemical and had no downsides, it was also allowing people to get infinite Diona seeds without ordering exotic seeds crates.) Instead: Robust Harvest will gradually improve your plant's potency (up to a soft cap), with the downsides of increasing pests+weeds (it's making your weeds more robust too!) and rarely decreasing your plant's yield (a downside that can't easily be rid of, since it's FREE POTENCY)
- Left 4 Zed makes your plant more susceptible to future doses of mutagen, making it so that you require less mutagen for the same results.
- Diethylamine used to be practically useless before, now it will also speed up your plant's growth (both to maturity and make it fruit faster), gradually increase it's lifespan and endurance, and also remove weeds.
- Clonexadone (not cryox) now greatly heals your plant. However, it will also cause your plant to rapidly age backwards! Too much clonexadone, and your plant will revert into a seed packet. I admit, I had a lot of fun with this one.
- Plant Analyzers can now print plant reports on paper. Shamelessly stolen from https://github.com/Baystation12/Baystation12/pull/8038. Using a Plant Analyzer on yourself will also show you the last plant scan on memory. Made the Plant Analyzer popup a little bigger by default. Referenced the Plant Analyzer window to the item itself, so you can have one popup open for every analyzer (can compare two seeds side-by-side with two analyzers)
- Floral Somatorays are now a lot less shit.
- Renamed "increase yield" mode to "improve harvest", so people stop thinking it increases the yield stat. Changed yield_mod (the thing "improve harvest" actually affects) to multiply effective yield rather than add to it. You will now get a message when trying to increase yield_mod past the cap. Effectively: Fire a few "improve harvest" Somatoray shots to your plant until you get a "it's lush" message, and it's next harvest will be doubled in size.
- Somatoray's "induce mutations" mode now works consistently, rather than than fucking 10% of the time. When mutating your plant with the "induce mutations" mode, you have a chance to get an additional mutation that permanently increases yield. You can change how strong your mutation will be, emulating the usage of from 1 to 15 mutagen. Can be emagged or soldered to go up to 25 mutagen.
- You can how use any object in harm intent to attack plants in trays, this is so you don't need plant-b-gone to kill a spreading plant in a tray. Plant-b-gone is still faster, though.
- Upgrades to hydroponics trays:
- Trays will now change name depending on what's growing on them.
- You can now set a label for your tray, like using a handheld labeler.
- You will now be warned when your plant is dying from old age, rather than using the same message of dying from other causes.
- The tray's warning light will also tell you if your plant is suffering from improper lighting, improper gas environment, improper room pressure, or improper temperature.
- Improper conditions (all of those above plus lack of water/nutriment) will now slightly slow down your plant's growth, since the health penalty is rather shittily implemented and a slap on the wrist. Take care of your plants!
- Bio-luminescent plants thrive in all light levels, to prevent low light tolerance exotic seeds from killing themselves with their own glow.
- Toxicity now works: This mechanic was incredibly half-assed and half-dummied out in the code, I believe at first the value that stores it was supposed to go from 1-100 and was later capped to 1-10. As a result it basically didn't fucking work. This won't really mean much in terms of gameplay, just that some obviously harmful chemicals like polyacid (which should never be in the tray anyways) will require you to dilute the tray with water or they'll keep damaging the plant.
- TL;DR: If you dump fucking chlorine in your tray for whatever god-forsaken reason give it water or anti-toxin you asshat otherwise this really doesn't matter much
- Pests now have a worthwhile chance to appear, previously the rate at which they increased was EXTREMELY slow. I bet a lot of you people have never seen the pest spray sprite before, and I don't blame you.
- Bees will now try to not cause accelerated aging when making your plant produce fruit faster.
- Ported https://github.com/Baystation12/Baystation12/pull/11420: Some roundstart plants will now have slight variations in their ideal lighting, ideal heat, and light/heat tolerance. This makes it less tedious for the wrong reasons to find genes through xenobotany without mandating exotic seeds, as well as add a little harmless flavor.
- Plants that don't require water or nutriment will now not consume water or nutriment, as opposed to: still consume it, still show nutriment and water warnings, just not take damage from lack thereof.
- Blood Tomatoes now have a lot more blood in them, though they have slightly less yield.
- Kudzu plant now produces more anti-toxin, on the premise that, come on, it's goddamn Kudzu and it's goddamn anti-tox.
- Farmbots will now still fertilize and de-weed empty trays by default. Can be changed in their control panel.
- The Seed Extractor storage has been updated to scan for all plant traits. Now won't lump, for example, glowing and non-glowing plants in the same pile. As well, it now has a small "notes" section that displays non-stat plant traits, such as the presence of a carnivore gene, thorns gene, etc.
- Tweaks to Exotic Seeds:
- Will now have more reasonable amounts of nutriment, though still more than common plants.
- Toned their nutrient consumption a little, as it was usually extremely high compared to common plants.
- Variance in ideal temperature will now always be tame enough to only require adjusting the room's thermostat. The intended way to handle exotic temperature requirements was to bring a canister of gas to said temperature and use a closed system of atmos port connectors to feed the plant, which MAY or may not have worked in Bay where there's an actual research botanist title with an actual research botanist office that has port connectors and access to freezers and heaters and whatnot. However, this is as far from reality as it gets in our server, where a botanist has none of those things at their disposal. The only things you can feasibly do are give the plant a new environment gene or set the thermostat, and I don't want to force the former.
- Will no longer have atrociously high production times.
- Now have more varied lifetime spans, rather than having only ONE harvest cycle plus change.
- Can have all of the new mutations.
- Can have Potassium as exotic chemical once again. Can now have Leporazine. Can also have Neurotoxin, beacuse you already have cyanide, because you already have chloral, because you already have zombiepowder, and because I'm a huge fucker.
-
Honey heals--deity beat me to it -
Bees cause your plant to--deity beat me to it -
Bees are good for--deity and I had pretty much exactly the same ideas for beekeeping, it's uncanny
Changes to Kudzu
- Improved Kudzu visuals, it now does a little thing when spreading and will twitch somewhat when growing or hurt. (this is actually a bug but it looks nice so now it's a feature)
- Changes how spreading plants work when planted:
- Will no longer just make the seed disappear and create new vines on the spot, leaving behind an empty tray. Instead, you can now cultivate spreading plants just as normal, and they will only kudzu-ify when mature and when the hydroponics tray has less than 80% water and nutrient. This means that you can "tame" spreading plants by keeping them well fed!
- As well, this change makes it so that you can't just run around the station dragging a tray and plant 500 vines everywhere (of which I am guilty as antag).
- Kudzu now has a limited growth radius from the tile where it originated, previously it was supposed to have this but it was broken. The radius is based on the plant's potency.
- Space vines now have a proper health variable. Vines will properly be damaged when attacked, will lose health in improper environments, and will regen health slowly. You can now attack Space vines with any item, with sharp and hot items being ideal (previously only a short list of TERRIBLY hardcoded shit would work)
- Re-added improper environments: Kudzu will now stop spreading and slowly die when subjected to freezing/searing temperatures, or extremely high pressure. Yes, you can kill it with fire.
- However... Kudzu can still grow at 0KPA and does not need light. Otherwise, killing kudzu would be extremely easy, just vent the room or turn off the lights.
- Scythes now apply a 1s cooldown when used, same cooldown as attacking something with a weapon. This is because scythes were honestly, horrendously obscene if you just clickspammed. However, scythes are now work 100% of the time rather than 80%.
- Added a Heavy-Duty Pneumatic Scythe to Robotics. Can be attached to Ripleys, guaranteed to work on any type of kudzu from within the impervious shell of a giant robot.
- Plant-b-Gone now affects kudzu on a 3x3 square centered around itself, however, the kudzu's toxins resistance now affects the damage that it will take. If a certain strand of kudzu was mutated or engineered to be toxin-resistant, Plant-b-Gone will quickly prove ineffective.
- Polyacid in a spray bottle now insta-melts Kudzu like Plant-b-Gone used to, no matter the strand. This really isn't as good as it sounds.
- Kudzu will act differently if it has some mutations:
- Heavily Carnivorous (strength 2) kudzu will occasionally grab you from one tile away, unless you're wearing magboots! You can still break free before anything bad happens, provided you have something sharp in hand.
- Thorny Kudzu will cause brute damage per exposed limb if you walk through it unprotected. I admit, this will mince you alive if you try to walk through it naked, but then again, you should never be inside kudzu anyways.
- Stinging Kudzu will sting you on touch as well, transferring reagents to your bloodstream.
- Hematophage Kudzu sucks your blood when you're tangled up. ...It's really extremely tame compared to all the other things kudzu can do to you while tangled up.
- Ligneous Kudzu is resistant to sharp things! Don't expect to cut it down with a hatchet.
- Goats will still munch on all strands of kudzu just the same.
- Kudzu that is not at full health will not apply special effects, such as stinging, thorny, grab you from far away, etc.
- Fixed the "creeping packet" mutation (Spreading strength 1), it will create limited growth Kudzu that can't grow more than 4 tiles in every direction and won't grab you. You're still valid for releasing it.
- Kudzu that has polyacid as part of it's chems melts away the station's plating as it grows! This really isn't as good as it sounds, because firelocks will come down and stop it's spread.
- The speed at which Kudzu will spread depends on it's stats, namely, Maturation and Potency.
- If you don't have anything to cut down the kudzu with, now you can break free of it's grab by using the Resist verb. Previously you could only break free by using your empty hand on the vines, which was terribly unintuitive.
- Spreading Kudzu vines now fruit more often and use different sprites when harvestable.
Changes to Xenobotany
- Gave all the genes really nerdy names to make it look like xenobotany is hard.
- Liberally applied "refresh UI" code all over the xenobotany machines much like how a madman applies WD-40 over the entire metallic surface of a squeaky door hinge, which will hopefully mostly slay the floatiness and laggyness that the xenobotany machines used to have.
- Separated the bioballistic delivery system into two modes: SPLICE and PURGE.
- "Purge" will destroy the previous plant's genes and replace them with your new ones, much like how xenobotany mostly used to work. However, there are two notable exceptions: The chemicals the plant produces, and the product list ("tutti-frutti" plants producing deathberries and apples and chanterelle etc). When you copy these genes under the "purge" mode, the previous list of chemicals/products will be destroyed.
- "Splice" will instead try to 'mix' the genes: It will average the relevant stats in the genome for both plants (10 potency + 30 potency = 20ish potency), and add special traits together rather than overwrite them (for example, if you splice thorny apples into stinging apples, you'll get thorny AND stinging apples). As well, it will allow you to frankenstein tutti-frutti plants and multiple chemical plants together like before.
- Added two new genes and re-touched existing genes (elaborated below), with the following guidelines:
- Enough diversity in what they do to prevent the "i just did 3 genes in a row and none of them did anything" syndrome. Also compounded by the general ideal heat/light changes elaborated before. Should be relatively simple to identify all the genes WITHOUT requiring exotic seeds.
- Enough consequentiality to make gene-altering require strategy in how you apply the genes due to collateral stat alteration, e.g. you don't want to have a gene with only one worthwhile trait (unless it's fairly inconsequential, like biolum) because then it's a braindead improvement to ANY plant regardless of stats. As part of this, I have bundled repeat_harvest together with the production time gene. Sorry, everyone, 1 production time infinite harvest plants were something that had to go, both because it was a braindead improvement, and because now that botany1 is back in full swing, you won't need crutches to mass-produce shit.
- Allow for creative customization: This is largely supplanted by the new "splice" mode. You'll be able to, for example, splice wheat together with other plants that have chemicals inside them, previously this was a pain in the ass as it mostly caused microwaves to fucking explode. You can also blend biolum colors together!
- The new genes are as follow:
- Phytochemistry: The chemicals your plant produces, it's potency, and whether it teleports stuff when splattered (Bluespacetomato's special trait)
- Morphology: Your plant's product list (apples+bananas+oranges etc), Thorny trait, Stinging trait, Ligneous trait, and splattering/juicy trait.
- Bioluminiscence: Your plant's bioluminiscence and bioluminiscence color.
- Ecology: Ideal heat level, ideal light level, tolerance to heat variation, tolerance to light variation, tolerance to pressure variation.
- Ecophysiology: Toxins tolerance, pest tolerance, weed tolerance. How long your plant's lifespan is, how much endurance/health it has.
- Metabolism: How much water and nutriment your plant consumes. Whether the plant can alter the room's temperature. Whether the plant exudes foreign gases into the atmosphere.
- Nutrition: Whether your plant is carnivorous, whether it's parasitic, whether it's a specialized hematophage, whether it consumes a certain gas from environment.
- Development: Your plant's maturation and production time. Whether your plant can be harvested repeatedly or not. How much yield it produces. Whether it can spread out of it's tray (kudzu-ing).
Other
- spellchecking :^)
- Hydroponics vending machines now start with 2 droppers, for precise mutagen/fertilizer dosage. I sincerely doubt this will be a balance issue given that the same machine dispenses syringes.
- Eat shit buddy
- Condensed Capsaicin (pepperspray) no longer requires fucking Plasma, now requires capsaicin and ethanol.
- The All-in-One grinder now produces more ketchup and soymilk per each tomato and soybeans, respectively. I felt that the return on these two was extremely low, considering it'd take you dozens of tomatoes to half-fill a single ketchup bottle.
- IV Drips now give their increased transfer speed to any container that has only blood inside it, rather than have it only work with specifically IV bags. In my mind this was supposed to go with blood tomatoes but I kinda slipped it inside this non-atomic PR like a PDA in bread
Technicalities
- Someone is gonna yell at me over this
- Fertilizers are no longer childs of "toxin", meaning they are no longer extremely long-acting, individually stackable poisons. I believe the only reason people didn't abuse this is because noone even realized it existed, it's so fucking dumb.
- Fixed weedkiller reagents CAUSING weeds.
- Fixed being able to generate infinite metal by... screwdivering open and then... crowbarring soil. And being able to unwrench it, too. I mean, damn.
- Fixed being able to put a tank inside a hydro tray (inheritance from a canister) and never being able to take it out afterwards. Maybe someday you could have the tray draw atmos from a tank rather than require it to be connected to a goddamn connector.
- Generalized a lot of shit that could really use some generalizing
- Made a Slip() proc, to prevent shitcode and copypasting
- Some checks now use proper procs, such as check_body_part_coverage
- Crudely copied chemistry-reagents.dm to make a new system for processing reagents in plant trays, since no matter how shit the system I made is, it can't be worse than the array spaghetti we had before.
- Unfucked the light readings on trays and light checks for plants, which were seriously fucked for reasons NOBODY could explain
- Horribly, horribly butchered and cannibalized the seed controller from https://github.com/Baystation12/Baystation12/pull/8038. Hopefully should make kudzu process smoother.
- Made the seed extractor storage code not shit. It was previously shit.
- Removed the "flowers" and some other unused variables.
To Do / Known Issues / SHIT I WAS GOING TO DO AT ONE POINT BUT I WANT TO STOP WORKING ON THIS
-
Get yelled at for whatever dumb shit I fucked up -
Write non-exhaustive changelog 4theplayers -
Fix the confrictu -
Write this -
Remove world << debug messages, after testing some more -
Make it possible to extract and transfer the new traits using xenobotany -
Update the seed extractor to work with the new mutations, add a "special notes" tab to display special traits of the seed. -
Allow using plant scanner on vines -
Update the wiki and the in-game books or whatever
Maybe
Things that I was planning on at one point, we'll see if these are actually good ideas or not before I work on them.
- Plant analyzer generating like three fucking different messages when scanning something, why?
- Refactor deathnettles
- Bio-lum on fruits is wonky. If you have multiple glowing fruits together, their luminosity will add up, so that even 1 potency glowing apples will become THE FUCKING SUN if you fill up a plantbag full of them. If I could make it so that their luminosity wouldn't stack, I could make them glow a little brighter.
- Tray built-in label interaction is very, very slightly buggy when used in conjunction with a handheld labeler - but who will even notice? If you can set labels directly, you won't be using the labeler on top of it anyways
- Plant display names are inconsistent on whether they're singular or plural, which causes a whole load of autism-triggering messages.
- Kudzu/Stinging plants almost always inject you with nutriment, which causes pretty much all strains of kudzu and stinging plants to make you fucking fat. I want to change that sometime.
- High potency bananas leave behind high potency banana peels, which slip harder.
- Non-seed mutations: I was planning to make it so that dumping tons of mutagen on an empty tray that has a high weed level may spontaneously cause kudzuing or immediately create mutant weeds. Another idea was that using mutagen on a plant with a high pest rating could spawn spiderlings (with some code to ensure that they can never grow up into a nurse and thus cause a spiderpocalypse) or tiny worms or w/e
- Sound-sensitive mutation: Plant stops growing for 30 seconds whenever it hears anyone say anything. Immediately dies whenever it hears the words "Woody got wood".
- Mandrake mutation: Plant SCREAMS when harvested or low on health. Fruits SCREAM when eaten, thrown, or destroyed. Add a SCREAMing cooldown on the seed datum itself, so the whole species of plant can only scream once every so (no polyaciding a stack of 50 screaming fruits to make them all scream at once). Hmm, I wonder if this worked on kudzu?...
- Mutation that causes plant to periodically fire neurotoxin to the nearest human, mutation that causes plant to create soporific smoke. Probably not, considering how awful smoke is.
- Maybe re-implement amanitin in some way, since it's a really cool poison.
NEEDS FEEDBACK, NOT FINAL
- The speed at which Kudzu now grows.
- The effect that new mutations have on trying to fight back against Kudzu invasions.
- All of the mutation chances. Do they allow you to improve your plant too fast? Are dangerous mutations too common/not common enough? Etc.
Performing of the Autoclose
Realization of #3678 (closed)
Fixes #6504 (closed)
Fixes #4795 (closed)
Fixes #5334 (closed)
Fixes #6733 (closed)
Fixes #3327 (closed) (was never a bug to begin with)
Does not... really do #6095 (closed), I'm afraid of doing that.