PersonalityType - Ellpeck/TinyLifeExampleMod Wiki

Tiny Life


PersonalityType Class

A personality type is a trait that a Person can have.
Each personality type is meant to influence the person's behavior and abilities slightly in a certain way.

public class PersonalityType

Inheritance System.Object 🡒 PersonalityType


PersonalityType.PersonalityType(string, TextureRegion, PersonalityType[]) Constructor

Creates a new personality type with the given name

public PersonalityType(string name, MLEM.Textures.TextureRegion texture, params TinyLife.PersonalityType[] disallowedOthers);


name System.String
The name of this personality type

texture MLEM.Textures.TextureRegion
The icon texture for this personality type

disallowedOthers PersonalityType[]
A set of personality types that cannot be applied together with this one


PersonalityType.AmountPerPerson Field

The amount of personality types that each Person can have

public const int AmountPerPerson = 2;

Field Value


PersonalityType.DisallowedOthers Field

A set of personality types that cannot be applied together with this one

public readonly PersonalityType[] DisallowedOthers;

Field Value


PersonalityType.Name Field

The name of this personality type.
As this is used for Types, this name needs to be unique across all installed mods.

public readonly string Name;

Field Value


PersonalityType.Texture Field

The icon texture for this personality type

public readonly TextureRegion Texture;

Field Value


PersonalityType.Types Field

A registry of all of the personality types in the game.
Use Register(PersonalityType) to register custom personality types.

public static readonly IDictionary<string,PersonalityType> Types;

Field Value



PersonalityType.BoostedSkills Property

A flag of SkillCategory values that represent the skills that are boosted by this personality type.
This value only has an effect if BoostedSkillsModifier is set as well.

public TinyLife.Skills.SkillCategory BoostedSkills { get; set; }

Property Value


PersonalityType.BoostedSkillsModifier Property

The amount that the BoostedSkills are boosted by.
If this value is set to 0.1, for example, any skill gain will be multiplied by 1 + 0.1 (= 1.1).

public float BoostedSkillsModifier { get; set; }

Property Value



PersonalityType.Register(PersonalityType) Method

Registers this personality type to the Types registry

public static TinyLife.PersonalityType Register(TinyLife.PersonalityType type);


type PersonalityType
The personality type to register


The personality type, for chaining