RimWorld

RimWorld

Humanoid Alien Races
This topic has been locked
GarGhuul Jun 19, 2017 @ 10:19pm
Stutter Hunt
Okay, I'm just going to start this because I don't want to clutter up the comments further.
Right now I'm trying to think and check what -else- in the game happens at -20 other than trees.
Also checking other biomes just to be sure it is only Boreal that gets a stutter.

Edit: It is not, I have managed to get stutter in Tropical Rainforest at about -15C. I think that is also the temp Colonists get mood malus, isn't it?

Human Base Pawn Temp
Max 32
Min -14.3

It does not appear to happen if you start off with a map at -30 or so. So something is being triggered, I'm just not sure what.

Obviously I don't know if HAR needs to hook in and re-direct for custom races that have higher or lower temperature tolerances than the vanilla pawns. I don't think the temperature tolerant/intolerant traits are part of the Vanilla game. I could be wrong.

Since a Colonist Pawn with Heatstroke (Or Hypothermia) triggers an alert, and wild animals or raiders with the same do not then it would appear colonist pawns have an additional set of instructions with thier temperature tolerance checks. Although that may simply be "Send an alert yes/no?" flag.

I have to admit I haven't looked at those alerts hard enough to see if they are a "Bob has $condition and needs help!" generic message or are specific to each condition.
< >
Showing 1-15 of 20 comments
erdelf  [developer] Jun 20, 2017 @ 5:29am 
the temperature traits are vanilla. And I don't really have any temperature specific code, so this seems like it's more a combination of things or an indirect cause.
GarGhuul Jun 20, 2017 @ 8:44am 
Hmm, thanks for the info.
Firp.
There is the check for the "Need warm clothing" alert but that's about the same thing.
As was reported there does not appear to be a stutter (Or it is much less noticable) if there are few plants or trees, such as in the Cold Desert biome.
Well what else is there... there is the breath fog effect when it gets cold enough. But again, if there is no part of HAR that works with that it isn't applicable.

The moodlets are slightly different for too cold than for too hot. I've had enough heat waves that I would think I'd have noticed the stutter if that was the cause.

On the off chance it is somehow disabled mods being read, I'm going to try to produce the effect in my next run with nothing but HAR subscribed. HAR does not require Hugslib, I think. I didn't get an error when I ran without Hugs.
I could use a hug about now though. j/k
Which reminds me to backup and delete my workshop folder, then revalidate the local files... I may have some sort of corruption in the mod install. Which is possible if only three (so far) folks are noticing the stutter.

The other check to make I guess is to load up with Alien races, and make sure I have pawns of those races. See what happens.

And as usual with an "aha!" moment, the memory leak may not be vanilla. It didn't seem to show up in the Rainforest test. And in hindsight I realise I had a bunch of other mods loaded to try and hit @3GB of RAM use. I may whittle that down to see which one was the culprit there... after I get all these other checks done.

Although... does HAR make any repeated checks after putting in the Alien races which are enabled? Like herabivore checks for edible plants?
Meowtown Jun 20, 2017 @ 12:23pm 
Okay. I think I got closer to the actual cause and here are some things I know so far.

Occurs in Boreal Areas
Occurs when it gets cold out
The Issue subsides at night when everything is sleeping
The issue went away when i made most of the map concrete and had my hunters target every animal.
The Issue came back the next day when 2 herds of animals came in
The issue went away as soon as i killed those 2 herds using dev tools.
The Issue goes away even when only shooting at the animals, causing them to flem to flee ( noticed this when i had my hunters go and kill some small rodents that spawned and started to cause lag)

Possible causes: Something to do with animals entering the map and interacting with cold vegetation.

Last edited by Meowtown; Jun 20, 2017 @ 12:51pm
ignis Jun 20, 2017 @ 1:25pm 
I suppose it is caused by pathfinding. Animals are desperately trying to find some food, for no avail at frozen map, and pathfinding on boreal map with its marshes and deep snow is heavy.

Try drafting all your colonists to see if animals are to blame. I had stuttering when ordered to tame animal while having no suitable food as well. And even when there is a food.
Meowtown Jun 20, 2017 @ 1:44pm 
Im pretty sure it has everything to do with animals and food now. I tested by putting a wall around all of the map except a couple places so my hunters could easily kill anything that came on the map wihout having to run all over. After killing all the wild animals i realized it was my own animals doing it (they had just ran out of their hay supply). I then gave kibble to them and left a ton of kibble out for wild animals to eat and I have not seen the issue. I think you are right with the boreal pathing and contantly looking for food which is causing the lag. Maybe making tree bark a food source and have other animals hibernate during winter months can help this. Otherwise i need to leave piles of kibble all over the map lol
GarGhuul Jun 20, 2017 @ 3:28pm 
That may all be true, however...
Hmm. Okay, I can maybe see increased load with the combo of animals looking for food and tracking tree growth/death. Perhaps it is an engine limitation. Certainly I'm not taxing my CPU or RAM. Could try forcing multi-core, I think you could do that through nVidia control panel. But that doesn't solve the problem.

But then how does it connect to Humanoid Aliens 2.0?
Colonist Pawns (Vanilla) will only go after berries and such if they have been picked,
I wouldn't expect even a herbivore/carnivore check adding to the load to cause this sort of stutter. Unless we are hitting an engine limitation. And I'm not even sure where such a check would be made, either in the vanilla code or injected by HAR.

On the other hand we do have races like the Equus, which do that sort of hunt for a viable food source as grass and trees are viable for them to simply consume.

Well at the very least it's another angle to look at this from, when I do the run with Aliens added in I will be sure to have the Equus in the mix. I would expect they would make the stutter much worse.

Dub's Hygiene adds to the checks and stats made on colonists, so if we're talking engine limitation that could be expected to have a similar issue. As might the H.P.Lovecraft Cults mod.
What else is there mod-wise that adds to the engine-load of things to track?
erdelf  [developer] Jun 20, 2017 @ 3:39pm 
you do make an interesting point. It could be food.. alien race does make a check there.. since a few days, because race authors can decide to limit the food their race eats. I did not expect it to have such a heavy performance hit however.
GarGhuul Jun 20, 2017 @ 3:40pm 
Equium test going to the top of the list then.

Update: Well... that actually seems to have a significantly greater impact. I forbade all the survival meals and when it hit -15 /-20 Even the UI was getting a bit clunky.
The stutter at normal speed was what I was getting with just vanilla colonists at x3 speed. x3 with the horse people was... not quite a slide-show, but working on it. I did go all-in with 6 Equium colonists.

Obviously I'm hardly a programmer, but if there is a limit to how much the engine is allowed to put towards thinking about food for animals, I would guess we are hitting it.

This was with only HAR 2.0, Equium Race, and Prepare Carefully enabled. No other mods subscribed to.

P.S. And this was in a Temperate Forest.

PPS: Does the option to select foods automatically apply itself to Vanilla Colonists? That might be putting them into the "hunt for food" track, which may muck things up because I'm guessing Colonist checks have higher priority. Even if the check is "Don't check."

PPPS: (Because I'm spammy that way) To pull these tests off, I *am* doing some extreme things. Many players may never see this issue in normal play.
Last edited by GarGhuul; Jun 20, 2017 @ 5:12pm
erdelf  [developer] Jun 20, 2017 @ 6:43pm 
the thing you are describing now is simply rimworld vanilla behaviour.. it will stutter after a few hours on tripple speed.
GarGhuul Jun 21, 2017 @ 1:13pm 
Summation:

One thought that occurs to me is to somehow divorce food preference for colonists from being able to "forage." So they stick to harveted foods, and use the vanilla colonist food search code.

In "real world" terms this is reasonable: the harvesting process presumably removes parasites and the like. Cooking the food takes this further, thus why (I think) "raw" foods have a higher chance of food poisoning whereas meals and Kibble or Silage have a fairly low chance.

Without looking, I don't think there is a "vegan" trait, but there is the "Cannibal" trait.
This may be a different vector to apply dietary restrictions that sidesteps the problem. I think.


<blather invoked>

Well at this point, I'm guessing the following:
The task of animals finding something to eat is complicated by also figuring out how fast they move, compared to how far away the food is, and whether or not they will reach it before the food dies. And also if any other animal has reserved that food item.

Due to the nature of programming (What little I know) you have to put an upper limit on how much the CPU/Engine can commit to any one task. Current digital Computers generally do not deal well with the concept of infinity. (Please correct me if I'm wrong)
This is how one hits engine limitations that have nothing to do with available resources. Especially in 32-bit code, where there is a hard limit set to how much resources will "ever" be available.
<nerd joke> But really, 640k should be enough for just about anybody right? </nerd joke>

Under normal circumstances, I would think the animals are supposed to have "migrated" off the map before this becomes an issue in a forest biome as the season changes. But then again, this is Rimworlf.
The Colonists being added to the set of checks for animals finding food, normally would not be an issue except in the specific circumstances of an abrupt shift in seasonal temperature.

One thought that occurs to me is to somehow divorce food preference for colonists from being able to "forage." So they stick to harveted foods, and use the vanilla colonist food search code.

In "real world" terms this is reasonable: the harvesting process presumably removes parasites and the like. Cooking the food takes this further, thus why (I think) "raw" foods have a higher chance of food poisoning whereas meals and Kibble or Silage have a fairly low chance.

Without looking, I don't think there is a "vegan" trait, but there is the "Cannibal" trait.
This may be a different vector to apply dietary restrictions that sidesteps the problem. I think.

<blather ends>
Last edited by GarGhuul; Jun 21, 2017 @ 1:28pm
erdelf  [developer] Jun 21, 2017 @ 1:21pm 
ok. I think I was able to at least limit the performance impact. Please tell if it worked properly.
GarGhuul Jun 21, 2017 @ 1:22pm 
Originally posted by erdelf:
ok. I think I was able to at least limit the performance impact. Please tell if it worked properly.
I'll give it a shot. First with Volcanic Winter/Cold Snaps, and then I'll give it a run with just starting in fall with a forested biome that hits -20 in winter and see what happens.
Last edited by GarGhuul; Jun 21, 2017 @ 1:23pm
ignis Jun 21, 2017 @ 2:05pm 
Much better now.
GarGhuul Jun 21, 2017 @ 2:22pm 
The Equium are doing much better. Strangely it feels like one slightly longer intermitant pause than a bunch of rapid-fire ones.

Update: With the more gradual seasonal change to -20 degree weather I honestly can't say if there is a stutter or if it's just usual Rimworld. This was with only HAR enabled, so all vanilla colonists.

Unrelated note: With the Equium run, I had re-subscribed to a bnch of mods that were left inactive, and the memory leak returned. With the gradual run, I had unsubbed back so only HAR was on the mod list. And it was not noticable if it was there.
Last edited by GarGhuul; Jun 21, 2017 @ 6:14pm
Meowtown Jun 21, 2017 @ 6:51pm 
I tried to replicate the stutter with only vanilla after erasing all mods and reinstalling the game and the animals would eventually migrate off of the map. I also noticed in my stuttering game they would not eat the berry bushes- I think i remember animals eating those in winter to keep fed (at least my tamed bunnies in an earlier version seemed to last all winter off one bush that wouldnt die).
Last edited by Meowtown; Jun 21, 2017 @ 6:54pm
< >
Showing 1-15 of 20 comments
Per page: 1530 50