RimWorld

RimWorld

Humanoid Alien Races
This topic has been locked
Zookes 30 Apr, 2020 @ 7:45pm
BUG - Caravan UI Lag When Reaching 'Unlimited' Days of Food
I have reduced my mod list to the following:
Harmony
Core
Royalty
Hugs Lib
Mod Manager

When loading the linked* save file using this mod list, I can make a caravan with all pawns and animals and experience no UI lag from the Form Caravan option in the world screen.

When my mod list includes Humanoid Alien Races 2.0 like this:

Harmony
Core
Royalty
Hugs Lib
Humanoid Alien Races 2.0
Mod Manager

I have a very bad lag spike in the Form Caravan UI when "Days of Food" counter achieves "Unlimited" after selecting enough pawns to add (usually last 2).

I have built a mod list - without Humanoid Alien Races 2.0 - containing more than 200 mods and do not experience this caravan UI lag issue.

When I add this version of Humanoid Alien Races 2.0 WITHOUT dependent race mods to the giant mod list, the caravan UI lag issue begins again. It is this mod causing the problem.

When I add this version of Humanoid Alien Races 2.0 WITH dependent race mods, the caravan UI lag issue becomes worse (subjectively).


The lag issues extends also to formed caravans roaming the world.
In the World screen and having no caravan selected, selecting a moving caravan having Unlimited days of food causes the game to hang.


*Linked save file for testing (saved without any mods active):
Filebin (expires 1 week):
https://filebin.net/wvq6g4gx5orjp47l
File.io:
https://file.io/SbBWhh5Y


I have seen others historically report bugs like this without success. Hope this helps.
< >
Showing 1-13 of 13 comments
Zookes 30 Apr, 2020 @ 8:15pm 
Sorry I forget to make proper bug report:
There are no errors or log entries produced by this issue in dev mode.

STEPS TO REPRODUCE
(using linked save)

1. Make Humanoid Alien Races 2.0 active in mod list, include all requirements for it.
2. Load save.
3. Go to World.
4. Select colony tile and select "Form Caravan".
5. In caravan UI, select all pawns.
6. Try to add items like food.

Result:
You will see the UI hangs on every click until pawns are deselected or days of food is no longer "Unlimited".

The save file contains 10 controllable colonist pawns. Pawns in the save file have all 20s in all skills.
I do not know the relationship between pawn skills and this bug, but having low skill pawns does not cause it so much?

OK hope this is enough info.
erdelf  [developer] 17 May, 2020 @ 4:25am 
how did you even get that much food ? After adding 30k meat I get around a quarter second delay, without it having to be unlimited. A slight delay because of that many pieces of food needing to be checked for the races involved.

While it is slightly annoying, it obviously isn't as bad as you describe. Do you have any additional info ?
Zookes 17 May, 2020 @ 2:18pm 
It is specifically the pawns having high foraging ability that does this. Unlimited food happens when the skill is high enough. Try with pawns having all 20 in skills?

10 colonists having all 20s in the caravan should make the UI lag significant I think.
Last edited by Zookes; 17 May, 2020 @ 2:19pm
nectarq 20 May, 2020 @ 6:33pm 
Hi there! I've been suffering from this issue for a while, until my brain lagged and i started adding pack animals first, not the colonist as i usually do - that helped. I suggest you try it. Looks like it needs some weight space to work properly
Zookes 20 May, 2020 @ 9:41pm 
I have tried this also.
Normally there is many Paraceratheriums from Megafauna on the caravans. Adding first or last does not matter for me. When food reaches "unlimited", UI becomes very unresponsive tho only while this mod is installed.

Thank you tho for ideas to try! Others maybe will find success if they read this.
Altiplano 28 May, 2020 @ 5:21am 
I'm experiencing this as well - 5 second lag spikes when a pawn is removed or added to a caravan.
The CanEverEat patch seems to be to blame - the vanilla function just does a bitwise check on pawn food preference vs food type, HARF seems to do some fairly involved data manipulation instead, even for vanilla races that have just a <foodType> def, and neither a <foodList> block or a <onlyEatRaceRestrictedFood> restriction.
Last edited by Altiplano; 28 May, 2020 @ 5:24am
erdelf  [developer] 28 May, 2020 @ 8:28am 
that patch only exists for a few days by now. so can't really be the issue for something people have been reporting for 2 months
Altiplano 28 May, 2020 @ 8:43am 
Uh, from what I see the patch was introduced in 5204a807efd9a9a3c0225151129fe97a86efb92d back in 2017.
And it's definitely the cause for me, Dubs Performance Analyzer showed it as the culprit of the long frame times in caravan menu, and removing just HAR from my modlist fixed the issue for me.
Last edited by Altiplano; 28 May, 2020 @ 8:43am
Altiplano 28 May, 2020 @ 1:44pm 
Okay, so some extra obsevations.
I added some logging and apparently RaceProperties.CanEverEat gets called on "virtual" items generated by what I think is a simulation of foraged food inventory.
It will get called only for actual caravan inventory when pawns are not self-sufficient, but can get called an arbitrary amount of times for pawns with with high Plants skill, I get thousands+ of calls for RawBerries when adding a farmer to the caravan and the amount of times it gets called is proprotional to the caravan's foraging power vs food consumption.

erdelf  [developer] 28 May, 2020 @ 8:03pm 
ah that one. well nothing really complex there. Also doesn't appear in my profiler as anything noteworthy. But then again... I don't get the lag.
Last edited by erdelf; 28 May, 2020 @ 8:04pm
Borsek 28 Jun, 2020 @ 5:42am 
Same thing happening here. https://imgur.com/kfrEVRo

Seems to be connected to good foragers going with me, at least I now know to have negative food caravans to avoid lag, if there is no fix.
Quantum Projects 5 May, 2021 @ 5:28am 
@erdelf, I took it that the bug exists somewhere (not necessarily on your mod) and that you were unable to pinpoint where it is because you couldn't reproduce the issue. I decided to inform you that I also experience the bug so that you know how pervasive it is and that it is still present.

On my end, the caravans only have baseline humans, so there are no extraneous races to check for food availability. The bug, as stated by others, happen only when food availability becomes unlimited due to high foraging skills.

Also, from what I could understand from this report, the problem could derive from the RaceProperties.CanEverEat getting called thousands of times, every time you add or remove a pawn/creature from the caravan. On a slow computer and with mods that add more food (VPG Garden, Vanilla Extended, Rimbees), it seems algorithm complexity could increase exponentially if the function does not merely perform linear calculations.

It is not exactly game breaking, though. Anyway, if you deem it worthy of investigation and if I can help you with that in any way, just let me know!
Last edited by Quantum Projects; 5 May, 2021 @ 5:32am
Myst Leissa 23 May, 2021 @ 1:05pm 
This bug happens when the caravan calculates the Food Used per route. It's definitely something in the base game and not directly a problem with mods as it effects several. Basically to avoid the bug you can remove any special dietary requirements from pawns.

An Alternative Workaround a normal player can do is to untick the "Automatically Add Supplies" Tickbox BEFORE selecting which pawns go on the trip. This will mean you will need to manually adjust supplies for the food/medicine/etc but it will not lag.


Additional Information: The Reason the OP says it's this mod is because he obviously had no idea what a "Framework" is, which is what this mod represents. A "Framework" is a mod loaded in order to allow functionality in other submods that may or may not be by the same creator. HAR is a framework in that it adds no content of its own, instead enabling the usage of alternative races by modding. IF this is a HAR Issue, then it is also true it is a Giddy Up Issue, as well as several other effected mods with special pawn that do not rely on HAR. It's a problem with the base game because it involves the process by which the game handles modded content to begin with.
Last edited by Myst Leissa; 23 May, 2021 @ 1:26pm
< >
Showing 1-13 of 13 comments
Per page: 1530 50