Documentation for m25team.py

Warning: This documentation was generated from the comments in the source code (using progrutils.documentPyFile()), with a few tweaks, under the principle that poor documentation is better than no documentation. In case of ambiguity, please refer to the code itself.

 

Module: Team

By M25

Set up various teams and their reactions to each other (allied, enemy, ect.)

 

NOTE: Call SetDefaultTeamAlliances() to initialize the teams; this is done in InitScripts()

Use:

To setup the standard team after spawning a character:

SetDefaultTeam(char)

To create two teams of NPCs that will fight each other:

SetTeam([list of characters in one team],2)
SetTeam([list of characters in other team],3)
SetTeamsEnemy(2,3)
SetBrawler([list of all charaters on both teams])

 

Team Constants

TEAM_GOODGUYS = 1

TEAM_BADGUYS = 2

TEAM_ALWAYSHOSTILE = -1

TEAM_ENEMIES = 'enemy'

TEAM_ALLIES = 'friend'

TEAM_NEUTRAL = 'neutral'

TEAM_ANY = 'any'

TEAM_REACTION_ENEMIES = 1

TEAM_REACTION_NEUTRAL = 0

TEAM_REACTION_ALLIES = 2

 

Team Status

SetTeam(object, team)

GetTeam(object,default=TEAM_NONCOMBATANT)

SetDefaultTeam(object)

IsNonCombatant(object)

IsTeamSet(object)

MarkTeamSet(object)

 

Allies and Enemies

SetDefaultTeamAlliances()

SetTeamsAllied(team1, team2)

SetTeamsEnemy(team1, team2)

SetTeamsNeutral(team1, team2)

SetTeamsReaction(team1, team2, reaction)

Team_TranslateReaction(reaction)

GetTeamsReaction(team1, team2)

Team_GetReaction(object1, object2)

TeamsReactionOfType(object1, object2, reaction)

AreEnemies(object1, object2)

AreAllies(object1, object2)

AreNeutral(object1, object2)