IM.Schemes

From Intrigues Wiki
Revision as of 13:01, 4 January 2024 by Tayfunwiki (talk | contribs) (Created page with "== <code>Schemes</code> Property in IM Class == === Overview === The <code>Schemes</code> property in the IM (Intrigue Manager) class provides access to a collection of schemes that are copied from the database and active during runtime. === Description === * Property Type: <code>IEnumerable<Scheme></code> * Accessibility: Public and Static * Functionality: ** Returns an enumerable collection of <code>Scheme</code> objects. ** Lists all schemes that are currently acti...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Schemes Property in IM Class

Overview

The Schemes property in the IM (Intrigue Manager) class provides access to a collection of schemes that are copied from the database and active during runtime.

Description

  • Property Type: IEnumerable<Scheme>
  • Accessibility: Public and Static
  • Functionality:
    • Returns an enumerable collection of Scheme objects.
    • Lists all schemes that are currently active and have been instantiated from the database at runtime.
    • This collection dynamically reflects the schemes operating within the game's environment.

Usage

The Schemes property is used to access, monitor, and interact with various schemes within the game. It is essential for gameplay mechanics where schemes play a pivotal role in narrative progression, player strategy, or character interactions.

Example of Usage

public class SchemeMonitor : MonoBehaviour {
    void ListActiveSchemes() {
        var activeSchemes = IM.Schemes;

        foreach (var scheme in activeSchemes) {
            Debug.Log("Scheme Name: " + scheme.SchemeName);
            Debug.Log("Conspirator: " + scheme.Conspirator.Name);
            Debug.Log("Target: " + (scheme.Target != null ? scheme.Target.Name : "None"));
            // Additional logic to process each scheme
        }
    }
}

Description:

  • ListActiveSchemes: Iterates through the collection of active schemes, logging key details such as each scheme's name, the conspirator's name, and the target's name (if available). This method can be utilized for displaying scheme information in the UI, making strategic decisions, or other gameplay purposes.

Remarks

  • The Schemes property is a crucial asset in games where strategic planning, conspiracies, and character-driven plots are central elements.
  • Returns schemes copied from the database, not active schemes.