#2

11th Aug 2026 at 5:12 PM
Last edited by Blueybre : 11th Aug 2026 at
9:42 PM.
Posts: 557
Thanks: 3143 in 24 Posts
14 Achievements
The likelihood for the "mammal" (as the womrat is internally called) to bite you is actually not a likelihood at all. There is no random roll in place here.
As per "Interaction - Play" from the group 0x7F6195DA, which contains everything relating to the "mammal cage", the function you found is indeed called. It's also used for the bird cage, but not for the toy dog pen, even though it uses the same semiglobals and is also a "contained pet". Here's what it does exactly:
The cage's current "dirty level" (which can be any value between 0 and 100 and increases by 25 per day) is divided by 3 and made negative,
then the pet's current hunger level is added (which can be any value between 0 and 100 and decreases by 5 per hour).
This becomes the pet's current mood which is put in Temp 0.
If Temp 0 is lower than 35, then it will bite the Sim guaranteed.
At the very best (cage has been recently cleaned and the womrat has been just fed), the result will be +100.
At the very worst (cage is visibly dirty and the womrat is starving), the result will be -33.
If the cage is dirty and the womrat is full, it will still be happy enough (result is +67).
If you'd like to change this value to make a bite happen quicker or slower, you'll want to change line 0x1B (27) in the Interaction - Play BHAV and raise or lower the value.
If you want to add a chance for the womrat to bite you, instead of making it guaranteed below a certain mood, you'll need to add a random roll after the mood check. That extra line of code is inevitable here.
You will also need to either edit the "Tuning - Play" (or any other) BCON to include a biting chance, or hard-code said biting chance into the BHAV.
The bite itself is afterwards played out in the animation "a2o-petMammal-play-stop2" - that's in line 0x15 (21), with the respective object animation occurring one line before that.