cabmoomoo / Rimworld-MiscRobotsPlusPlus

A mod for Rimworld which expands upon the parent Misc. Robots mod by adding various types and tiers of robots and research
0 stars 0 forks source link

Harvesting not working as it should. #1

Open dickmotherfuckinggrayson opened 1 month ago

dickmotherfuckinggrayson commented 1 month ago

Hi,

There has been an issue I've seen mentioned a few times over the many forks and branches that Misc Robots ++ has been released in, but it does not seem fixed and it is quite frustrating. I have done some functional testing on the issue to see if I could determine exactly what is going on, but I have yet to pinpoint an exact cause or pattern.

The situation is as follows;

Yet the droids will not harvest most of it unless the crops are specifically marked for harvest. The strange thing however, is that there seems to be some sort of pattern in a few they do harvest on their own. (Likely 5% of the entire field if added up together.) Furthermore I seem to have noticed a behavior that when I delete / deconstruct the bots and rebuild new ones, they will shortly go out and harvest perhaps four tiles before returning to their stations. They do however begin sowing the moment they can, so they will always be active sowing fields, but when everything is sowed they'll return to their stations and go in to 'Standing'. They will then idle until either a cooking/butchering job opens up or a colonist harvest something / a plant rots away (thus creating a sowing job).

I have tested this with various tiers of both Kitchen and Omnibots. At one point plants were as old as 2 quandrums and unharvested. I have also limited areas at one point so they had no other available jobs but harvesting. When creating a new save I find they seem to work fine on a small field, but I have yet to test with a large field and with more playtime / storages / etc.

cabmoomoo commented 1 month ago

I can confirm this to be true. It was entertaining watching the strange patterns in which bots plant crops in a field colonists cannot access. But no, it would seem that any crop that has a skill requirement at all won't be automatically harvested by the bots. At a guess, this is an issue with the way vanilla Rimworld does harvest jobs. I'll poke around the C# of the base game to see if there's anything obvious, but if that is where the issue lies, I must confess my knowledge to be quite lacking. We shall see.

Okay... I have no idea what is going on. In further testing, I had a large field surrounded by several smaller fields. Anything in the large field would be harvested just fine, no matter the skill level, and planted as appropriate by the tiers of bots. The smaller fields would only be planted. Deleting a smaller field and absorbing it into the larger one would cause those plants to also be harvested automatically. And then I deleted the larger field and remade it as it was and now every field except the big one is getting harvested??? That strangeness may have something to do with how the game seems to use a For Loop limited to 40 tiles or 2400 total work (I think) when making jobs. Perhaps the game is fairly conservative regarding when it runs these loops for areas normal colonists can't access. Given how the robots are handled (somewhere between colonist and animal), I have no idea if this is the cause or if it's fixable.

dickmotherfuckinggrayson commented 1 month ago

The weird thing is it used to work in older versions just fine, so something about either the mod or the game's logic must've changed since after the Biotech update. When I was playing during Biotech's release, all other expansions included, I had no issues with my droid harvest. Seeing as how drug production tends to be the backbone of my colonies economy, I began noticing in this playthrough something strange was going on.

Either way, yeah, the behaviour is really weird and I can't find any rhyme or reason to it. It'd be nice if you or some other kind coder could fix it, but in the end we'll just have to wait and see. For now I'll live with my colonists cutting the plants, omnibots close on their tail to collect and replant.

Thanks for checking and even bothering with the mod. Lord knows many have tried and fallen.