Instance Utilities

Buff Utils

class BBBuffUtils

Bases: object

Utilities for managing Buffs.

classmethod load_buff_by_guid(buff)

Load a Buff by its GUID

Parameters:

buff (int) – The GUID of the Buff to load.

Returns:

The loaded Buff or None if not found.

Return type:

Buff or None

Component Utils

class BBComponentUtils

Bases: object

Utilities for manipulating components.

classmethod add_component(component_container, component_type, return_type=Component)

Add a component to something.

Parameters:
  • component_container (ComponentContainer) – The thing to add a component to.

  • component_type (BBComponentType) – The type of component being added.

  • return_type (Type[BBExpectedReturnType], optional) – The type of the return value.

Returns:

The added component from the object.

Return type:

BBExpectedReturnType or None

classmethod get_component(component_container, component_type, return_type=Component)

Get a component from something.

Parameters:
  • component_container (ComponentContainer) – The thing to retrieve a component from.

  • component_type (BBComponentType) – The type of component being retrieved.

  • return_type (Type[BBExpectedReturnType], optional) – The type of the return value.

Returns:

The component from the object.

Return type:

BBExpectedReturnType or None

Interaction Utils

class BBInteractionUtils

Bases: object

Utilities for manipulating interactions.

classmethod get_interaction_short_name(interaction)

Retrieve the Short Name of an Interaction.

Parameters:

interaction (Interaction) – An instance of an interaction.

Returns:

The short name of an interaction or None if a problem occurs.

Return type:

Union[str, None]

classmethod is_immediate_super_interaction(interaction)

Check if an interaction is an instance of ImmediateSuperInteraction.

Parameters:

interaction (Interaction) – The interaction to check.

Returns:

True, if the interaction is an instance of ImmediateSuperInteraction. False, if not.

Return type:

bool

classmethod is_mixer_interaction(interaction)

Check if an interaction is an instance of MixerInteraction.

Note

SocialMixerInteraction are also considered to be MixerInteraction.

Parameters:

interaction (Interaction) – The interaction to check.

Returns:

True, if the interaction is an instance of MixerInteraction. False, if not.

Return type:

bool

classmethod is_social_mixer_interaction(interaction)

Check if an interaction is an instance of SocialMixerInteraction.

Parameters:

interaction (Interaction) – The interaction to check.

Returns:

True, if the interaction is an instance of SocialMixerInteraction. False, if not.

Return type:

bool

classmethod is_social_super_interaction(interaction)

Check if an interaction is an instance of SocialSuperInteraction.

Parameters:

interaction (Interaction) – The interaction to check.

Returns:

True, if the interaction is an instance of SocialSuperInteraction. False, if not.

Return type:

bool

classmethod is_super_interaction(interaction)

Check if an interaction is an instance of SuperInteraction.

Note

SocialSuperInteractions and ImmediateSuperInteraction are also considered to be SuperInteraction.

Parameters:

interaction (Interaction) – The interaction to check.

Returns:

True, if the interaction is an instance of SuperInteraction. False, if not.

Return type:

bool

classmethod load_interaction_by_guid(interaction)

Load an interaction by its GUID

Parameters:

interaction (int) – The GUID of the interaction to load.

Returns:

The loaded interaction or None if not found.

Return type:

Interaction or None

classmethod to_interaction_guid(interaction_identifier)

Convert an interaction identifier to a GUID.

Parameters:

interaction_identifier (Union[int, Interaction]) – The identifier or instance of an Interaction.

Returns:

The GUID of the Interaction or None, if the Interaction does not have a GUID.

Return type:

Union[int, None]

Instance Utils

Situation Utils

class BBSituationUtils

Bases: object

Utilities for managing Situations.

classmethod get_situation_guid(situation)

Get the GUID of a Situation.

Parameters:

situation (Situation) – A situation.

Returns:

The GUID of the Situation or -1 if not found.

Return type:

int

classmethod get_situation_job_name(situation_job)

Get the Tuning name of a Situation Job.

Parameters:

situation_job (SituationJob) – A situation job.

Returns:

The tuning name of the situation or “No Situation Job Name” if not found.

Return type:

str

classmethod get_situation_name(situation)

Get the Tuning name of a situation.

Parameters:

situation (Situation) – A situation.

Returns:

The tuning name of the situation or “No Situation Name” if not found.

Return type:

str

classmethod get_situation_role_name(situation_role)

Get the Tuning name of a Situation Role.

Parameters:

situation_role (RoleState) – A situation role.

Returns:

The tuning name of the situation or “No Situation Role Name” if not found.

Return type:

str

classmethod load_situation_by_guid(situation)

load_trait_by_guid(situation)

Load a Situation by its GUID

Parameters:

situation (int) – The GUID of the Situation to load.

Returns:

The loaded Situation or None if not found.

Return type:

Situation or None

Statistic Utils

Trait Utils

class BBTraitUtils

Bases: object

Utilities for managing Traits.

classmethod get_trait_guid(trait)

Get the GUID of a trait.

Parameters:

trait (Trait) – A Trait.

Returns:

The GUID of a Trait or -1 if not found.

Return type:

int

classmethod get_trait_name(trait)

Get the name of a Trait.

Parameters:

trait (Trait) – A Trait.

Returns:

The name of the trait or ‘No Trait Name’ if not found.

Return type:

str

classmethod load_trait_by_guid(trait)

Load a Trait by its GUID

Parameters:

trait (int) – The GUID of the Trait to load.

Returns:

The loaded Trait or None if not found.

Return type:

Trait or None