Custom Enum Types

Float Enum

Float Enum Base

class CommonEnumFloatBase(val)

Bases: float

An inheritable class to turn properties into float enums.

Int

class CommonInt

Bases: Int

An inheritable class that inherits from the vanilla Sims 4 enum.Int class so you don’t have to.

Int Enum

Int Enum Base

class CommonEnumIntBase(val)

Bases: int

An inheritable class to turn properties into integer enums.

Warning

This class is obsolete, please inherit from CommonInt instead.

Int Flags

class CommonIntFlags

Bases: IntFlags

An inheritable class that inherits from the vanilla Sims 4 enum.IntFlags class so you don’t have to.

Object Enum

Object Enum Base

class CommonEnumObjectBase(val)

Bases: object

An inheritable class to turn properties of the class into object enums.

String Enum

String Enum Base

class CommonEnumStringBase(val)

Bases: str

An inheritable class to turn properties into string enums.

Versioned Int

Versioned Int Flags

Versioned Values Mixin

class CommonVersionedValuesMixin

Bases: object

A mixin that provides versioning for values.

classmethod convert_obsolete_value(value)

Convert an obsolete value to its new equivalent, if there is one.

Return type:

CommonVersionedValuesMixin

classmethod get_obsolete_values()

Retrieve a set of values considered as obsolete.

Return type:

Set[CommonVersionedValuesMixin]

classmethod get_version()

The version of the enum. If this changes, it means values have changed and should be updated.

Return type:

str

classmethod is_obsolete_value(value)

Determine if a value is considered to be obsolete.

Return type:

bool