TinyLifeExampleMod/Api/TinyLife/Skills/SkillType.md

2.9 KiB

SkillType

Namespace: TinyLife > Skills

Assembly: Tiny Life.dll

Summary

A skill is an ability that a TinyLife.Objects.Person can have which influences their behavior in some way. The SkillType class contains underlying data for a TinyLife.Skills.Skill instance, like its name and maximum level.

Constructors

Name Summary
SkillType ( String, TextureRegion, Int32, SkillCategory ) Creates a new skill type with the given settings

Fields

Type Name Summary
SkillCategory Categories The TinyLife.Skills.SkillCategory combined flag that this skill type has. The skill categories it has are used to determine skill gain from things like the TinyLife.PersonalityType.Creative personality type.
Int32 MaxLevel The maximum level that this skill can reach. Most skills should default to 5 or 10 for consistency.
String Name The name of this skill type
TextureRegion Texture The texture region of this skill type's icon

Methods

Return Name Summary
Quality GetRandomQuality ( Person, Random, Boolean, Boolean ) Returns a semi-randomly generated TinyLife.Skills.Quality for the given TinyLife.Objects.Person based on their level of this skill. The higher the skill level is, the more likely it is for higher qualities to be returned.

Static Fields

Type Name Summary
SkillType Charisma
SkillType Cooking
SkillType Humor
SkillType Painting
SkillType Programming
SkillType Repair
IDictionary<String, SkillType> Types A registry of all skill types that exist in the game and mods. Use TinyLife.Skills.SkillType.Register(TinyLife.Skills.SkillType) to register custom skill types.

Static Methods

Return Name Summary
SkillType Register ( SkillType ) Registers a new TinyLife.Skills.SkillType to the TinyLife.Skills.SkillType.Types registry