Any info about mutations/CBMs/etc that passively spawn/recharge items over time, along with related drawbacks?

So, I’d like to do some modding on my own end to add mutations, and possible CBMs and other things that change a survivor’s body, which can passively drain things like nutrients, mana, etc. from the survivor’s body, in order to create items over time which can then be used by the survivor, like a mutation that allows plant mutants to grow fruits over time, or a cyst-like sac that slowly collects fluids the body generates (naturally or otherwise) that can maybe be used for recipes or fuel.

I already have ideas for some parts of how this would work, like adding integrated containers in which the item will spawn, as well as reducing spoilage rate and preventing more items, and of course copying the manner in which self-recharging items in mods such as Magiclysm are made to do so. I also know that there are certain values that can allow mutations, CBMs, and other things to change the rate at which the character gains/loses calories/thirst/fatigue/etc., which could be used to simulate the various nutrients that get used to make the spawned items.

However, I feel like just having a constant modifier to the rate of resource gain/consumption is an overly reductive solution for simulating something that would need more complexity in order to be properly simulated realistically (like tying the rate at which the items are spawned, and thus the rate at which needed bodily resources are drained, to the amount of said resource in the survivor’s body).

I also would like to be able to implement other drawbacks where they would be realistically applicable, such as potential injuries that could occur if the container isn’t regularly drained and begins to overfill. However, I have no idea how I could make that happen. Like, I could potentially use different pockets to represent different stages of the container being overfilled instead of being within normal limits, but I have no idea how to make pockets that injure the player character or cause other problems beyond encumbrance if they contain things, nor do I know how to force those pockets to be emptied in a particular order to represent the reduction of the contents of the container overall.

So… does anyone have any ideas on how I could do this?

You might be able to achieve a few of these effects with the newer Event on Condition Stuff - I haven’t looked deep into it but its an attempt to put something comparable to light scripting into the game, worth looking into.

For most of this though, your probably looking at adding specific C++ code to the game to handle the new functionality. You can fork the repo, add what you need, and keep it up to date on your side, no permission needed. Or try and get it merged into mainline and then use the functionality in a main-packaged mod if its accepted as such. Magicalysm did similar implementing a bunch of base-game functions for itself to then be used in the mod.

Oof… I barely know how to code in json, let alone in C++. I guess I could just try do the best I can in json, and hope that it’s good enough to be worth including in the game. If not… well, I suppose I could suggest it on the github, and hope that the devs like the idea. Still, thank you for suggesting the new EOC stuff! I haven’t been able to look much into it either, but it does sound interesting.

I know the bombastic perks mod has a perk that generates soft drinks randomly and another that randomly generates a nearby zombie, although I know nothing about coding

Interesting… I’ll check it out. Thank you!

1 Like