Family.MemberCount

From Intrigues Wiki

MemberCount Property in Family Class

Overview

The MemberCount property in the Family class is a convenient way to obtain the total number of individuals in a particular family. This property is essential in games where the size of a family can influence various aspects like social status, resources, or family-based quests and challenges.

Property Definition

public int MemberCount => members.Count;

Description

  • Property Type: int
  • Access: Read-only
  • Functionality: Retrieves the total number of members in the family.

Usage

This property can be used to quickly assess the size of a family, which can be a crucial factor in gameplay. For instance, a larger family might have more influence or resources, or specific missions might require interacting with families of a certain size.

Example of Usage

public class FamilySizeCheck : MonoBehaviour {
    void Start() {
        Family playerFamily = IM.Player.Family;
        if (playerFamily != null) {
            Debug.Log($"Number of members in player's family: {playerFamily.MemberCount}");
        }
    }
}

Description

  • The example above demonstrates how to determine and display the number of members in the player's family.
  • Knowing the size of the family can be important for various gameplay elements, like inheritance division, family feuds, or alliances.

Remarks

  • The MemberCount property is useful for creating gameplay mechanics that are sensitive to family size and dynamics.
  • It can help in balancing game scenarios where family size plays a role in the distribution of resources, power, or responsibilities.