4.70 star(s) 62 Votes

Grumlydude

Newbie
Mar 15, 2023
18
16
Sluttiness is handled a bit differently in the code compared to love and obedience (idk why). It can be referenced two ways, but only one of them can actually be changed in .rpy scripts (see spoiler 1).
This is because Pyhton has no restriction of visibility for properties/fields of an object. All properties are "public" like in Javascript for example.
As a workaround, devs use a commonly accepted syntax to describe a property that should only be used inside of an object ("private"). Those "private" properties are beginning with one or two underscore. For those two reasons you can see the internal value using ._sluttiness

In our case, when you want to show a calculated value based on the inner value, you define a method to show what you want. This is why you also have access to this value using .sluttiness syntax. But you cannot modify it because it's a "getter" method and not a real property.
Python:
    @property
    def sluttiness(self) -> int:
        return max(min(self._sluttiness + sum(amount for (amount, _) in self.situational_sluttiness.values()), 100), 0)
This last one is taking account of situational sluttiness (like "I don't like cheating on my husbnad!" or "I'm so happy") and is minmaxed to 0-100
 
Last edited:
  • Like
Reactions: rb813 and slick97
4.70 star(s) 62 Votes