Skip to content

osrlib.core.alignment

The three alignments, in a home importable by both characters and monsters.

Alignment lives in its own module because both character and monster data carry alignments, and the generated-data loaders import the monster models: a module the loaders import must not import character, which itself imports the loaders.

Alignment

Bases: StrEnum

The three alignments.

The wire values are lowercase — they serialize into characters and saves; changing them is a schema_version bump.

LAWFUL class-attribute instance-attribute

LAWFUL = 'lawful'

NEUTRAL class-attribute instance-attribute

NEUTRAL = 'neutral'

CHAOTIC class-attribute instance-attribute

CHAOTIC = 'chaotic'