Skip to content

Instantly share code, notes, and snippets.

@SciresM
Last active March 6, 2026 22:38
Show Gist options
  • Select an option

  • Save SciresM/95a9dbba22937420e75d4da617af1397 to your computer and use it in GitHub Desktop.

Select an option

Save SciresM/95a9dbba22937420e75d4da617af1397 to your computer and use it in GitHub Desktop.
Mewgenics breeding overview: // From analysis of glaiel::CatData::breed
1) All furniture effects are calculated.
* Most of these are unused, presumably due to simplified stats during development.
2) Stats are inherited.
* For each stat, either the mom or dad's is taken.
* There is a (1.0 + 0.01*Stimulation) / (2.0 + 0.01*Stimulation) chance of the better of the two stats being inherited.
* This means stimulation is surprisingly weak:
* At 0 stimulation, it is a 50/50.
* At 25 stimulation, there is a 5/9 chance of the better stat being inherited.
* At 50 stimulation, there is a 3/5 chance of the better stat being inherited.
3) Apply passives due to Skill Share+ (which guarantees a cat's other passive is passed down when breeding).
4) Spells are inherited.
* There is a 0.2+0.025*Stimulation chance of inheriting a spell from a cat's parents.
* Thus, at 0 stimulation, there is a 20% chance, and at 32+, inheritance is guaranteed.
* Ordinarily, there is a 50/50 chance of taking a random spell from the mom or dad.
* However, there is a 0.01*Stimulation chance of attempting to favor a parent with class spells.
* If this happens, then the game checks if only one of the parents has any class spells.
* If it does, the chance of choosing the other parent is set to 0.
* Once a parent to inherit from is chosen, one of that parent's spells is inherited at random.
* There is a 0.02+0.005*Stimulation chance of inheriting a second spell from a cat's parents.
* If this check passes, the second spell is selected the same way as the first.
5) A passive is inherited.
* There is a 0.05+0.01*Stimulation chance of inheriting a passive from a cat's parents.
* Thus at 0 stimulation, there is a 5% chance. At 95+, inheritance is guaranteed.
* Ordinarily, there is a 50/50 chance of taking a random passive from the mom or dad.
* However, there is a 0.01*Stimulation chance of attempting to favor taking a passive from a parent with class passives.
* This used to be bugged (preferred class actives), but as fixed in the 2026/02/20 patch.
* This works the same way as spell inheritance, where if only one parent has class spells, the other parent is never selected.
* Once a parent to inherit from is chosen, one of that parent's passives is inherited at random.
* SkillShare is excluded from inheritance.
6) Disorders are inherited.
* There is a flat 15% chance of inheriting a random disorder from a cat's mom, and 15% of inheriting a random disorder from a cat's dad.
* This is unaffected by any furniture stat.
7) If fewer than 2 disorders were inherited, the cat rolls to receive a birth defect disorder.
* There is a 0.02 + 0.4 * (inbreeding_coefficient - 0.2) chance of receiving a disorder as a birth defect.
* Technically, min(max(inbreeding_coefficient - 0.2, 0.0), 1.0) is multiplied by 0.4.
* Thus, all cats with fewer than 2 inherited disorders have a 2% chance of getting one as a birth defect; inbreeding scales linearly once the coefficient gets above a threshold.
8) The cat rolls to decide if it should receive birth defect parts later.
* If rand() < (1.5*inbreeding_coefficient) and inbreeding_coefficient is >0.05, then a cat will receive birth defect parts later in the process.
9) A cat's parts are inherited (note: mutations are just specific part variants).
* There is an 80% chance that all parts are inherited.
* Otherwise, a random part-set (i.e. both legs, both eyebrows, the head, etc) is selected to not be inherited, and will be randomly assigned.
* For each inherited part, either the mom's part or the dad's part is taken.
* This works like stat inheritance for preferring mutations.
* If only one of the two parents' parts is mutated, it is preferred with a (1.0 + 0.01*Stimulation) / (2.0 + 0.01*Stimulation) chance.
* Otherwise, it's a straight 50/50.
10) Parts are symmetrized.
* For parts with a left/right which must be the same, there is a 50/50 chance of replacing the left with the right or vice-versa.
11) ...something is inherited.
* I am not sure what this is. There is a 98% chance of inheriting it from the parents, with an even 50/50 split.
12) Voice is inherited.
* I haven't fully worked out what this is doing, but it seems like a 2% chance of rerolling for a new voice, and a 98% chance of somehow inheriting voice from parents.
* Note that this may be inaccurate.
13) If additional birth defects were rolled in step 8, they are now applied.
* If a cat's inbreeding coefficient is <= 0.9, it will perform one pass to apply birth defects.
* Otherwise, it will perform two passes to apply birth defects.
@bigduck-acf
Copy link

can you tell me where you saw the game files?there not such file you mentioned in the gpak file

@bigduck-acf
Copy link

can you tell me where you saw the game files?there not such file you mentioned in the gpak file

can you understand what i say?my english is not good

@SciresM
Copy link
Author

SciresM commented Feb 19, 2026

@bigduck-acf this is from reverse engineering the code. It is not in the gpak data files.

@Treerover
Copy link

How does appeal work? Is there a cap on it?

@bigduck-acf
Copy link

@bigduck-acf this is from reverse engineering the code. It is not in the gpak data files.

thank you sir

@bigduck-acf
Copy link

I noticed you even found out the paths and filenames of the source code, and you seem to be able to see the variable names inside. I can’t get any of that with Ghidra. Could you tell me how you did it?

@bigduck-acf
Copy link

Also, can you tell me how the inbreeding coefficient is calculated

@bigduck-acf
Copy link

if ((*(byte )(lVar7 + 0xbf8) >> 1 & 1) != 0) {
iVar3 = (int)
(char )(lVar7 + 0xc09);
if (
(char *)(lVar7 + 0xc09) < '\x02') {
iVar3 = 1;
}
iVar3 = iVar3 + *(char *)(lVar7 + 0xc08) * 4;
uVar4 = (ulonglong)(iVar3 + 1);
pbVar9 = *(byte **)(lVar7 + 0x10);
pbVar16 = pbVar9 + *(uint *)(lVar7 + 0xc);
if (pbVar9 != pbVar16) {
do {
if (*pbVar9 < 9) {
uVar4 = (ulonglong)(iVar3 + 0x11);
lVar5 = *(longlong *)(param_1 + 0x48);
goto LAB_1400e8cc8;
}
pbVar9 = pbVar9 + 1;
} while (pbVar9 != pbVar16);
lVar5 = *(longlong *)(param_1 + 0x48);
}
}here is the code i found that seem toimplement the inbreeding coefficient calculation could you check if it in correct

@bigduck-acf
Copy link

i dont know how did it work

@Sploder12
Copy link

Great work, thank you for your effort! This aligns with what I've found and helps put some other pieces together

@Sch1nni
Copy link

Sch1nni commented Feb 21, 2026

I'm not at the pc at the moment, but I wrote an extensive piece about breeding not realizing that you had just made this (better) research

Edited since I was very wrong lol

@SciresM
Copy link
Author

SciresM commented Feb 22, 2026

@Sch1nni If you want to compare notes, you can reach me at sciresm on discord :)

However, "room stats are heavily influenced by the number of cats in the room" <-- this is not true, as far as I can tell. I passed a night with a debugger attached to the latest patch, and the actual calculated stim-effect on e.g. inheriting an ability was not multiplied by number of cats in the room. So I think what you said is false, at least for breeding.

@yonisav
Copy link

yonisav commented Feb 22, 2026

Could you please expand on the probability of generating disorders and mutations? Specifically, nit through breeding but as an effect of the room stats

@Sinzu-dev
Copy link

Sinzu-dev commented Feb 25, 2026

HI @SciresM! I try dm you on discord but you not see reply yet. May I ask something?

@mewcodex
Copy link

Hi @SciresM, I am working on a MewGenics tool website on the personal page of this account. I wonder if you have any idea about the game's event outcome probability formula. Also do you know what attribute/status effect can influence the value of the variable bonus_basic_spell_damage in dmg formula? Thank you.

@SciresM
Copy link
Author

SciresM commented Mar 1, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment