Recommended Posts

staring_frog    19

Goals:
- make ONI more realistic regarding energy and matter conservation laws;
- introduce new fun challenges to overcome with wit but not grinding;
- keep being fun to play;
- making it more hardcore.

Status:
- dupe CO2 output = O2 intake = 100 g/s

This mod is intended for ONI veterans looking for tougher experience. If you're new to ONI it would very likely make it too tough to have fun. Vanilla ONI is being gentle to newcomers and that's great.

For a long time I was thinking about making ONI more realistic in terms of energy and matter conservation laws. It happens to be a popular idea. So here it is. I'll be progressing gradually and posting updates here, join me if you like. It's already fun :D

Here is the first version. All it has is dupes output CO2 same amount as they take O2. Which is already hardcore O.O due to slow gases moving.

It's safe to turn this mod on and off. All things would get back to usual.

More Realism!.zip


Source: https://github.com/staring-frog/oni-mod-more_realism

Edited by staring_frog
  • Like 1

Share this post


Link to post
Share on other sites
staring_frog    19

Some issues to solve:
if dupes output same CO2 as original O2 input, then there's a very fast CO2 build-up early on,
if I lower O2 intake then there's too much O2 on the map.
 

Share this post


Link to post
Share on other sites
SharraShimada    748

Where´s the Carbon coming from? Its coming from the material dupes eat and drink. Its combined with Oxygen and produces CO². Thats 1 Carbon and 2 Oxygen. So its not a 1:1 ratio in any sense. Its carbon exhaled x 2 oxygen. Carbon rate is based on the power level of the body. Because they are dupes, and not humans. you can assume any value you see fit for a balanced ratio. 

  • Thanks 1

Share this post


Link to post
Share on other sites
staring_frog    19
8 hours ago, SharraShimada said:

Where´s the Carbon coming from? Its coming from the material dupes eat and drink. Its combined with Oxygen and produces CO². Thats 1 Carbon and 2 Oxygen. So its not a 1:1 ratio in any sense. Its carbon exhaled x 2 oxygen. Carbon rate is based on the power level of the body. Because they are dupes, and not humans. you can assume any value you see fit for a balanced ratio. 

You're right they actually breath out more mass. On the other hand gas mass in-game represents pressure as well. Currently breathing dupes drop pressure, by quickly eating up gas :D
UPD To be exact that's O2 (16*2) to CO2 (12+16*2), i.e. 32 to 44 or 1 to 1,375

Edited by staring_frog

Share this post


Link to post
Share on other sites
Sanchozz    63

You also need to change the gas conversion rate in the Algae Terrarium, Oxychren, CO2 Scrubber and Slicksters

and seriously? you are patch a method that will be called every tick and overwrite these variables over and over again

[HarmonyPatch(typeof(OxygenBreather), "Sim200ms")]
public class Patch
{
	public static void Prefix(OxygenBreather __instance, float dt)
	{
		__instance.O2toCO2conversion = 1f;
		__instance.minCO2ToEmit = 0.6f;
	}
}

the more correct way is to patch them once when a new duplicate is created

[HarmonyPatch(typeof(MinionConfig), "CreatePrefab")]
public class Patch
{
	public static void Postfix(GameObject __result)
	{
       	OxygenBreather oxygenBreather = __result.GetComponent<OxygenBreather>();
		oxygenBreather.O2toCO2conversion = 1f;
		oxygenBreather.minCO2ToEmit = 0.6f;
	}
}

 

  • Thanks 1

Share this post


Link to post
Share on other sites
staring_frog    19

@Sanchozz You're right, CO2-related rebalance is yet to be done.
OMG, you decompiled my mod :D True, there are better ways to do that, I'll look into that.
Thanks for input.

Edited by staring_frog

Share this post


Link to post
Share on other sites
ChrisBit    10

Nice, I've been wanting to see how the game would be with more realism regarding mass and energy. Regarding the O2 to CO2 conversion, considering atomic mass of the elements, for 32 mass units of O2 consumed there would be 44 mass units of CO2 produced, as the carbon adds a bit of mass. So the ratio of mass out to mass in should be 44/32, which means even more CO2 than with the 1 to 1 ratio.

Dupes consumes 1000 kcal of food per cycle (amounts to whooping 7kW of power!). Assuming pure carbohydrates for simplicity, that amounts to 250 g metabolized carbohydrate per cycle. Using the chemical reaction for burning of glucose, C6H12O6 + 6O2 -> 6CO2 + 6H2O, that would result in for every 30 g metabolized carbohydrate they would consume 32 g O2 and produce 44 g CO2 and 18 g H2O. For a 600 second cycle, the 100 g/s O2 is therefore way to high for their metabolism. Keeping their metabolism, it would be merely 250/600/30*32 g/s = 0.44 g/s of O2 consumption. That would require quite significant rebalancing. I don't really know what would be the best way to go about it to keep similar dynamics for the oxygen management. Reducing the consumption that much would mean that the oxygen would last 100 times longer.

In reality, all power production except steam and solar should consume O2 as well. An efficiency in conversion of chemical to electrical energy of 20% might be considered somewhat realistic for these. For the 600W coal generator, that would mean an input of 3KW of thermal power. Coal has around 32 MJ/kg, so roughly that would mean 0.1 g/s of coal consumption compared to the 1000 g/s in the game. It would have O2 consumption of 0.27 g/s and CO2 production of 0.37 g/s. Giving it 2% efficiency instead would bring it back up to 10 dupes worth of CO2 production. However, I think it may be difficult to also do realistic O2 production if the power building consumes O2 - I think it would require the introduction of an O2 vent for any of those power buildings to be useful. However, with a relatively larger initial supply of O2, it would be possible to make the game a challenge of establishing renewable energy and oxygen supply before the initial oxygen is consumed by dupes and power buildings. Realistically it does not make sense to burn coal/hydrocarbons/food (and oxygen) to produce oxygen by electrolysis of water.

A thermoelectric generator could be an option for an early game power source, making use of the temperature difference between the biomes. A simple heat radiation model could possibly be applied to the topmost space exposed tiles both for possible power generation and for heat management.

Anyway, I wish you the best of luck in attempting to improve on the realism. Currently I don't have much free time to spend on neither the game nor helping out unfortuneatly, but I'll make sure to check back in the future - hoping I will have time to play it when the DLC comes out.

  • Like 1

Share this post


Link to post
Share on other sites
staring_frog    19

@ChrisBit
thanks for interesting ideas and some numbers!
Dupes converting food into some water and making some buildings consume O2 both are easy to implement and sounds interesting. Providing O2 through vents is fine, I usually do it that way anyway, there's no problem with that : D
Thermoelectric generator sounds fun, challenging to make though. I did a peltier cooler before it was definitely fun : D

As of now I've run into a problem that generating even 100g/s CO2 per dupe with 3 dupes leads to it building up in one place and not moving down fast enough even with 3-tile way.
I don't have much spare time too. Anyway.. DLC is not out yet, need to find ways to have fun : D

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now