About taming thrumbo's through healer-bonding

Started by Miridor, February 16, 2017, 03:48:06 PM

Previous topic - Next topic

Miridor

I read a lot of forum posts/wiki stuff etc. over the last week about taming thrumbos. Here is why; I heal-bonded a 29 yo thrumbo female early in game and wanted to have a mate for her. However, all male thrumbo's (five of 'em through several events) that followed would rather get killed than being tamed or bond. So I began thinking. Was it a fluke, was it because of her low age, should I use animal beds or medicine? It slowly drove me 'mad'. So I eventually decided to decompile and look in the Assembly. Of course things can (and probably will) change with new releases. This is from Alpha 16 sources.

I'm posting this as a new topic, because previous topics about this subject are already some months old (or older) and necroing them might not be appropriate.


I can't find any spoiler tags so, please stop reading here if you do not want to.
.
.
.
.


For me it's quite obvious. Of course I left out a lot of code and added some stuff in brackets to summarize or clarify parts. But for the bond chance, this is basically it.

// RimWorld.TendUtility
public static void DoTend(Pawn doctor, Pawn patient, Medicine medicine)
{
...
if (doctor != null && doctor.RaceProps.Humanlike && patient.RaceProps.Animal && RelationsUtility.TryDevelopBondRelation(doctor, patient, 0.004f) && doctor.Faction != null && doctor.Faction != patient.Faction)
{
InteractionWorker_RecruitAttempt.DoRecruit(doctor, patient, 1f, false); (this function only formalizes the bond and does some UI stuff)
}
...
}


// RimWorld.RelationsUtility
public static bool TryDevelopBondRelation(Pawn humanlike, Pawn animal, float baseChance)
{
... (breaking conditions, like the bond already exists, or animal already has a bond are handled first)
...
int num = 0; (base chance is reduced through animal or humanlike having other, active (as in not dead), direct relations)
List<DirectPawnRelation> directRelations = animal.relations.DirectRelations;
for (int i = 0; i < directRelations.Count; i++)
{
if (directRelations[i].def == PawnRelationDefOf.Bond && !directRelations[i].otherPawn.Dead)
{
num++;
}
}
int num2 = 0;
List<DirectPawnRelation> directRelations2 = humanlike.relations.DirectRelations;
for (int j = 0; j < directRelations2.Count; j++)
{
if (directRelations2[j].def == PawnRelationDefOf.Bond && !directRelations2[j].otherPawn.Dead)
{
num2++;
}
}
if (num > 0)
{
baseChance *= Mathf.Pow(0.2f, (float)num);
}
if (num2 > 0)
{
baseChance *= Mathf.Pow(0.55f, (float)num2);
}
...
if (Rand.Value < baseChance) (Rand.Value is a random float between (and including) 0 and 1)
{
... (relation is added)
return true
}
return false
}



TryDevelopBondRelation is called with a bond chance of .004 So that makes this base chance 1 in 250, which is only modified (chances diminish) by other active bonds.

Nothing about the faction patching you up, had riddled you with bullets just earlier, comfortable animal beds, a good roof, the animals skill... just a base chance on every heal applied. This is not mentioned as a critique of any kind, it's just what it is, and means I just have to try a little harder to get Antonina her mate.


OFWG

Interesting info, thanks!

Also that first if statement seems to indicate that doctors can be non-human :D
Quote from: sadpickle on August 01, 2018, 05:03:35 PM
I like how they saw the naked guy with no food and said, "what he needs is an SMG."

Hans Lemurson

So...it seems that you want to down a Thrumbo with a large number of low-damage injuries in order to maximize the number of treatments you can give.
Mental break: playing RimWorld
Hans Lemurson is hiding in his room playing computer games.
Final straw was: Overdue projects.

Miridor

Yes, or just any other animal. It isn't exclusive to Thrumbos. Also, if an animal wakes up and walks away, it may bleed to death. So, stabbing is risky as is shooting. But in that regard, Thrumbos are melee monsters. No colonist survives long if the wrath of a Thrumbo is upon him and he's in melee range. So... well ... taking on Thrumbos is risky business ;)

Bozobub

Yup, just checked, no spoiler tags are available =p .  Odd.
Thanks, belgord!

makapse

Quote from: Hans Lemurson on February 16, 2017, 04:36:49 PM
So...it seems that you want to down a Thrumbo with a large number of low-damage injuries in order to maximize the number of treatments you can give.

Actually, you want to do maximum pain with minimum open wounds as many a times, the thrombo will bleed out rather than bond as it will have 150 bleeding wounds(assuming killbox abuse), each having a 1-3% bleeding rate making stopping the bleeding hard.

This makes burn damage so useful,it causes the maximum amount of pain per damage dealt while it also doesn't bleed just don't let the fire grow to big. Just be sure to cause a lot of injuries with small weapons also to ensure there are many wounds to treat.