RimWorld

RimWorld

Age Matters 2.0 [1.2+]
 This topic has been pinned, so it's probably important
troopersmith1  [developer] 6 Aug, 2021 @ 2:25am
Bug Reports
If you experience a bug, I would like a Hugslog from you, from as soon as you notice the issue. Please use the export logs function, and post the link, do not copy/paste a wall of text into the chat. Include a brief description of what version of Rimworld you are running, and anything that occurred just before the issue cropped up.
Last edited by troopersmith1; 7 Aug, 2021 @ 2:38pm
< >
Showing 1-15 of 44 comments
Crimson Bolt 6 Aug, 2021 @ 2:52am 
Rimworld Version 1.3.3080

Huglog (for anyone curious, press CTRL + F12 to get this log): https://gist.github.com/5e9fc0096c688438881b7d85a822b614

I have noticed that the Logann characters (using Logann Race continued) always seemed to have the elderly tag (but only had 1 or 2 of those since the 1.3 update) so I did not think much of it.

Today though I noticed that all of my colonists seem to be labeled elderly now.

The event that seemed to happen before it appeared was a ritual duel between 2 slaves that caused a new character to join.

The new character joined via the "wanderer joins" event and when he arrived on the map he had no hediffs (even in dev mode, this should have hediffs from Age matters and Children and learning at least) and he also had a battery level as well as the option to "use battery" when selected like an android from the Android tiers mod.

I have not used any age altering magic, items, or the biosculptor in this game yet.

My mod load order is also leaving a lot to be desired...so working on that now to see if anything helps.
Last edited by Crimson Bolt; 6 Aug, 2021 @ 3:01am
Stealthkibbler 6 Aug, 2021 @ 4:20am 
Rimworld version 1.3.3080

https://gist.github.com/HugsLibRecordKeeper/f2c6cb07040a7a29064ae0c1d9319228

Started a brand new save and my pawns are becoming elderly immediately, when I remove the hediffs they immediately become elderly again not a moment later after unpausing the game.
FiLiAndra 6 Aug, 2021 @ 5:44am 
Rimworld version 1.3.3080

https://gist.github.com/HugsLibRecordKeeper/7c9c5bc7eb12feff1eacec9a329194cb

The same issue but with teenger pawn turning adult. It seems like something happens at save-load and, probably, not every single time.
In the example above, I started a new game with a 17 year old pawn, which had the correct teenager headiff and correct bodysize 0.7. I saved the game immediatly (this will be save Zero). Then at some point save One was created. When loading save One the pawn turns Adult and with body size 1.0. Growth value in the save tuned into 0.95... something. When loading save Zero, the pawn was teenager. Sometimes it would load with body size 1.0, sometimes with 0,7, but the headiff was correct every time. Then I re-wrote save Zero and it began to behave same as save One.

Then I did more testing: I created three pawns, a teenager and two adults with different age. Everything was fine before saving and loading save. After that teenager pawn headiff turned adult and adult pawn turned elders.

So, at least in my game, pawn are created correctly, and begin to change headiff to older ones after saving and loading.

Hope this helps somehow)
Crimson Bolt 6 Aug, 2021 @ 11:31am 
Ok, can confirm, it is a loading issue.

I sorted out my mod list and started a new game and played for a few hours. Reloaded and on loading everyone was elderly
Mooneye 6 Aug, 2021 @ 12:00pm 
Originally posted by Crimson Bolt:
Ok, can confirm, it is a loading issue.

I sorted out my mod list and started a new game and played for a few hours. Reloaded and on loading everyone was elderly

yeah, same... -.-"
troopersmith1  [developer] 6 Aug, 2021 @ 12:03pm 
The problem is 100% tied to the growth Stat. Which is new in 1.3, and seems to control lifestages a pawn is in, rather than their age. I will need to create a workaround
Gimel_93 6 Aug, 2021 @ 12:54pm 
So, I did some poking in the base game code... It looks like the issue comes from how lifestages are calculated in 1.3. Changing the growth value is changing what the PawnAgeTracker.RecalculateLifeStageIndex() method is outputting. That method is setting the lifestage based on the number of lifeStageAges in the RaceProps interpolated between zero and the current value for <growth>. This is why changing the value of the <growth> tag in the save files is more or less fixing the problem. Afaict there isn't an easy way to workaround that without moving away from using lifestage to set the hediffs and doing your own calcs since the base game isn't setup to do any aging beyond the adult stage. Maybe you could do something with the birthdayHediff stuff, but I imagine that would be a pretty substantial rewrite of your code. Maybe just work with PawnAgeTracker.AgeBiologicalYears directly and do the math in your code so it can spitout something your existing code can play with? Though I have no idea how that would work with alien races (I don't use them myself). Just my two cents :)
Lacero 6 Aug, 2021 @ 3:09pm 
It should work fine with the addition of elderly as the last life age stage. The code in AdultMinAge just uses the last one.
I'm not sure enough on how loading works to say why we see differences on load, I see them too but it could be another mod interfering.

One thing I see in the code is the Pawn_AgeTracker.CalculateGrowth() function can be very non linear in how it increases growth. Because TicksToAdulthood is recalculated based on the current age every update the growth stat will tend to increase faster and faster as the creature ages, potentially hitting "adulthood" very early.
I assume this is an intentional way to correct for starvation based slowdown in growing in the same code, but together these two features mean growth just does not mean the same thing as age any more. I expect base game teenagers age to adult weirdly too, it's just such a small amount of difference and so rare no players noticed or cared yet?

I guess this is what troopersmith1 noticed above.
FiLiAndra 6 Aug, 2021 @ 4:40pm 
Originally posted by Lacero:
I see them too but it could be another mod interfering.

I think it does. I did some testing, and on pure Rimworld (with DLCs) + Harmony + Hugslib + Age Matters I was not able to reproduce this glitch with several save-load cicles

Log if needed: https://gist.github.com/HugsLibRecordKeeper/884e15a931ede7a617e28c40ba601ec5


On the other hand, when I added Children, School and Learning, the first time save loaded correctly, then - save, load - and adults are elders and teens are adults once again:
https://gist.github.com/521f01d7969708ece20b25b0f8837d3e
Mod order changed nothing in this case.

So, unfortunately, it seems there is some strange interaction between Age Matters and Children, School and Learning.
Also, I have noticed some changes in pawn bodysize value:

In Vanilla and in Vanilla + Age Matters this value is 0.85 for a teenager pawn.
When Children, School and Learning is added, this value changes to 0.7
This might not be related to this problem, but this is something I have noticed.



A quick update without a log because hugslib keeps saying "Bad request". On the same configuaration: Rimworld (+ DLCs), Harmony, Hugslib, Age Matters and Children, School and Learning (in any order). Turned off pawn scaling in CSL. The pawn that previosly had body size 0.7 ended up with body size 1.00 (same as adults) and Teenager headiff, that transformed into Adult headiff in literaly 10 second (I was switching between the pawns and checking their headiffs) without saves, loads or any notifications in dev mode. Then I saved and loaded the game, and this pawn stayed Adult, while other pawns turned into Elders, and several save-load cicles did nothing changed after that (I mean, the previously teenger pawn never turned into elder this way).


!!! Second update and I think I have found the culprit, at least for this issue with pawns getting older on save-load. This happens when the new option in Children, School and Learning is on. I refert to "Try fix growth/life stage too small" and "Try fix growth/life stage too large" under Children section of SCL options tab. With those turned off (they are on by default) saving and loading on the spot does not seem to change pawns headiff.
Log just in case: https://gist.github.com/HugsLibRecordKeeper/b51823b9ba05333789ab679d0cabef28
Last edited by FiLiAndra; 6 Aug, 2021 @ 5:19pm
Gimel_93 6 Aug, 2021 @ 5:31pm 
So CSL has a setting that corrects pawns' growth stage. I tested a new game with just CSL and AM: With the growth stage settings turned on, the pawns get bugged age hediffs after reload; with both settings off, I can reload multiple times and no signs of the elderly hediff bugs.
troopersmith1  [developer] 6 Aug, 2021 @ 6:08pm 
@Gimel_93

In you testing, did you notice if load order made a difference for that issue with CSL?
Gimel_93 6 Aug, 2021 @ 6:21pm 
I didn't test specifically for load order. I had CSL before AM when I did that. I can run that again real quick.

Edit: No change with AM before CSL. With the two CSL settings disabled, the correct hediffs persist between reloads. With the two CSL settings on, the hediffs are bugged on reload. Also, the two settings are the "Correct for growth/lifestage..." under the "Children" section in CSL's mod settings.
Last edited by Gimel_93; 6 Aug, 2021 @ 6:27pm
Crimson Bolt 6 Aug, 2021 @ 9:43pm 
Ok so CSL is definitely the problem.

I switched the above options off in CSL and then used a spell to alter the age of the pawns and it has corrected itself (whereas before it would never change from elderly).

I have age matters near the top of my load list and CSL just a little below it.
Last edited by Crimson Bolt; 6 Aug, 2021 @ 9:44pm
tanyfilina 7 Aug, 2021 @ 1:55am 
Hello! Here is the log https://gist.github.com/b43c52eb4e04745e46b2533ee8e73f61
I've noted that when I use DevMode to change pawns' age, it changes for a moment, but changes back in about 10-20 seconds.
troopersmith1  [developer] 7 Aug, 2021 @ 3:35am 
@all

Children School and Learning just pushed an update to attempt to address this issue, do some testing after verifying you have his update, see if the issue persists.
< >
Showing 1-15 of 44 comments
Per page: 1530 50