BlackAeronaut

[Mod Request] Balanced Pacu

Recommended Posts

Issues:
 
Wild Pacu - you can stick them in a single cell of water, never feed them, never care for them, and they'll still spit out eggs for you like some freakish biological perpetual motion machine. It's a cheat, pure and simple.
 
Tame Pacu - virtually the exact opposite: requires insane amounts of food that is hard to produce. Just one requires more algae than a single algea distiller can produce with 100% uptime, and two ranches of tame Pufts to produce the needed slime. And this isn't getting into the amount P-H2O you need to have laying around to get the needed P-O2 for those Pufts.
 
Thoughts for fixes:
 
Wild Pacu: no longer act like egg factories. Set reproduction so only one egg is laid, and only near the end of it's life cycle.
 
Tame Pacu: reduce food requirement from 140kg per cycle to 40kg per cycle (this makes it so one algae distiller at 100% uptime can sustain 3 Pacu) and set egg laying interval to 4 cycles and incubation time (with lullabying) to 2 cycles.
 
That, I think, will make it so the Pacu is still a powerful food producer, but nowhere nearly as broken as it currently is in the game. If anyone has any suggestions, I'm open to them.
 
As for making the mod...
 
I'm no programmer. All I know is that ONI runs on the Harmony engine, and that runs on C#. That's about all I know.  This mod will only happen one of two ways: either someone just goes ahead and makes it...
 
...Or someone walks me through the process.
 
I wouldn't mind doing the later - I have dabbled with HTML in the past, so I have the basic ideas behind software coding in mind. But I simply do not know the language of C# or how it works, so it'd still take a bit of time for someone to talk me through it. So it would probably be a lot faster if someone that knows C# and Harmony did it instead.
 
Any takers or suggestions?

Share this post


Link to post
Share on other sites
AzeTheGreat    78

Critter rebalancing is something I've been toying with, but you start running into a lot of issues that make it clear why they are as they are.  We'll see if I feel like putting more work into it.

Also, nobody will walk you through writing a mod.  There are existing resources you can learn from.  As long as you put in genuine effort most of us will be super helpful, but don't ask to be spoonfed.

Share this post


Link to post
Share on other sites

The trouble with the resources that are out there is that they come in one of two varieties.

Variety One: Specific - made with the understanding that you already know the basics of C#, and only provides the extra bit you need to know to mod in Harmony.

Variety Two: Broad - assumes you have no knowledge of C# and basically teaches you to code from the ground-up.

There's practically nothing in between.  With one I'll be totally lost.  With the other, I'll have to sit through about 15 hours of YouTube videos, and I got rent to make.

Not that I'm trying to make excuses for myself - these are just the hard, cold facts of the matter.  I have no idea how people find time for this.

The only other option for me is to sit through just one or two videos a day and take a assload of notes along the way.  (Trust me, with the way I'm wired I'll have to write a damn text book for myself in my own shorthand.)  That will take a few weeks.  Just to learn the basics.  And then, like you said, I'll have to do a lot of work just figuring out the balance and probably learning more nuanced code along the way.

It sucks being ADD, because the effort-reward part of your brain is all screwed up, and even knowing about it doesn't really help much.

Share this post


Link to post
Share on other sites
Cairath    889

As much as we usually help pretty much everyone, you sound really entitled. Nobody here will teach you C# from scratch because that's not something you just teach someone in a day (and don't try to compare html to this because it has nothing in common).

Heck, we recently released a quite detailed guide how to get your first mod running. If you're unwilling to go through the resources we've prepared, then I'm afraid nobody will be willing to help more. If you don't put in the effort, then why should we? 

Share this post


Link to post
Share on other sites
Candide    22

Wow, so negative. I think that was just flowers of speech.

The change is quite simple, IF you have practise. Haven't tested it, but I am quite sure this works:

[HarmonyPatch(typeof(EntityTemplates), "ExtendEntityToFertileCreature")]
public class PacuPatch
{
	public static float kg_ore_eaten_per_cycle = 40f;	// default 140
	public static float fertility_cycles = 15f;			// default 15
	public static float incubation_cycles = 10f;		// default 5
	
	// changes diet
	public static void OnLoad()
	{
		float calories_per_kg_of_ore = PacuTuning.STANDARD_CALORIES_PER_CYCLE / PacuPatch.kg_ore_eaten_per_cycle;
		
		AccessTools.Field(typeof(BasePacuConfig), "CALORIES_PER_KG_OF_ORE")?.SetValue(null, calories_per_kg_of_ore);
	}
	
	// changes egg interval and incubation time
	public static void Prefix(GameObject prefab, ref float fertility_cycles, ref float incubation_cycles)
	{
		if (prefab.name == PacuConfig.ID || prefab.name == PacuTropicalConfig.ID || prefab.name == PacuCleanerConfig.ID)
		{
			fertility_cycles = PacuPatch.fertility_cycles;
			incubation_cycles = PacuPatch.incubation_cycles;
		}
	}
}

Havn't found out how wild and tame are separated, but the egg interval is pretty much already what you asked for (cycle 15 of 20).

I have no IDE on this computer, so I cannot compile it. Feel free to steal my code.

Share this post


Link to post
Share on other sites

I'll do some research and see if I can grok how to implement this.  Thanks for the assist, @Candide.  This really is how I learn best - start with a usable example relevant to what I want, figure out how it ticks and tocks, and go from there.

EDIT: Regarding how Wild and Tame are separated...

Now that I'm thinking about it, from what I've seen about how the system is set up, I believe that Wild is the original stats, and Tame is a modifier with set integers applied once the conditions of Tame have been met.  (Same with Happy and Glum.)  For example, all eggs have their own set amount of time they need to hatch, but once they're lulabied by a dupe, all eggs will hatch 5x faster for the duration of one cycle.

I suspect that with Pacu, the devs wanted something that worked radically different, but kinda painted themselves into a corner by making the modifiers for Tame global.

This is just supposition on my part.  I'll have to dig into it a little bit more and compare some figures to be sure.

Edited by BlackAeronaut
Adendum

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