Functions

Follower Common

Functions to interact and manipulate followers (mercenaries/slaves). More...


Detailed Description

Functions to interact and manipulate followers (mercenaries/slaves).

Include follower_common_h.fos for usage.

Functions

bool IsMerc (Critter& follower)
bool IsFollowing (Critter& critter)
 Check if a follower is in follow mode (either automatic or manual).
bool IsOwnersFollower (Critter& owner, Critter& critter)
 Check if a follower belongs to a specific owner.
uint GetPartyPoints (uint FollowerType)
uint GetNumberOfType (Critter& player, uint FollowerType)
uint GetNumberOfCompanions (Critter& player)
uint GetNumberOfMercs (Critter& player)
uint GetPartyPointsMax (Critter& player)
uint GetPartyPointsUsed (Critter& player)
bool CanHaveMoreFollowers (Critter& player, uint FollowerType)
 Check if a player can have any more followers in his global slots.
CritterGetFollowersOwner (Critter& critter)
bool RightDistance (Critter& follower, Critter& owner)
bool HasFollowerOfBaseType (Critter& owner, uint basetype)
CritterGetFollowerByBaseType (Critter& owner, uint basetype)
bool RemoveFollowerByBaseType (Critter& owner, uint basetype)
int GetNumberOfFollowingFollowersOfPlayer (Critter& player)
 Retrieve the number of followers that a player has in active following mode (automatic or manual) on the same map as him/her.
int GetNumberOfFollowersOfPlayer (Critter& player)
 Returns how many followers of any type a player has.
uint GetSlaveTypes (Critter& player)
void ClearFollowersEnemy (Critter& player, Critter& target)
void AddFollowersEnemy (Critter& player, Critter& target)
uint NumberOfFollowersOnMap (Map@ map)
 Returns the number of followers, regardless of owner on the map.
uint GetFollowerType (Critter& critter)
bool DisbandFollower (Critter& player, Critter& cr, bool reset)
 Critter is no longer follower a follower.
bool AddToFollowerlist (Critter& master, Critter& follower)
 Assign follower's id to the list of followers.
bool MakeFollower (Critter& critter, uint type, string& script, uint dialogid, Critter& owner, bool FreeBarter)
 Makes the critter a follower to the specified owner.
CritterLocateFollowerByType (IMerc@ merc, Critter& owner)
CritterLocateFollowerByID (uint id, Critter& owner)
int GetFollowers (Critter& player, Map@ map, array< Critter@>& followers)
int GetFollowers (Critter& player, Map@ map, array< Critter@>& followers, bool OnlyIsSeen)
int GetFollowers (Critter& player, bool all, array< Critter@>& followers)
 Retrieves followers belonging to player.
uint CountFollowers (Critter& player, bool all)
 Counts the followers, either all or 'active' (following) ones.
uint CountFollowers (Critter& player, Map@ map)
 Counts the followers on a specific map.

Function Documentation

bool IsMerc ( Critter follower  ) 
bool IsFollowing ( Critter critter  ) 

Check if a follower is in follow mode (either automatic or manual).

bool IsOwnersFollower ( Critter owner,
Critter critter 
)

Check if a follower belongs to a specific owner.

Parameters:
owner The proposed owner.
critter The follower.
Remarks:
If critter is not a follower, false will be returned.
uint GetPartyPoints ( uint  FollowerType  ) 
uint GetNumberOfType ( Critter player,
uint  FollowerType 
)
uint GetNumberOfCompanions ( Critter player  ) 
uint GetNumberOfMercs ( Critter player  ) 
uint GetPartyPointsMax ( Critter player  ) 
uint GetPartyPointsUsed ( Critter player  ) 
bool CanHaveMoreFollowers ( Critter player,
uint  FollowerType 
)

Check if a player can have any more followers in his global slots.

Parameters:
player Target player.
FollowerType Check if a follower with this type can join the party.
Remarks:
There's a maximum of 25 slots, in practice however, maximum is lower.
Critter@ GetFollowersOwner ( Critter critter  ) 
Remarks:
If critter is not a follower, a null handle will be returned.
bool RightDistance ( Critter follower,
Critter owner 
)
bool HasFollowerOfBaseType ( Critter owner,
uint  basetype 
)
Critter@ GetFollowerByBaseType ( Critter owner,
uint  basetype 
)
bool RemoveFollowerByBaseType ( Critter owner,
uint  basetype 
)
int GetNumberOfFollowingFollowersOfPlayer ( Critter player  ) 

Retrieve the number of followers that a player has in active following mode (automatic or manual) on the same map as him/her.

int GetNumberOfFollowersOfPlayer ( Critter player  ) 

Returns how many followers of any type a player has.

This only includes how many the player has, regardless of where they are, as long as their corpses have not decayed.

uint GetSlaveTypes ( Critter player  ) 
void ClearFollowersEnemy ( Critter player,
Critter target 
)
void AddFollowersEnemy ( Critter player,
Critter target 
)
uint NumberOfFollowersOnMap ( Map map  ) 

Returns the number of followers, regardless of owner on the map.

uint GetFollowerType ( Critter critter  ) 
bool DisbandFollower ( Critter player,
Critter cr,
bool  reset 
)

Critter is no longer follower a follower.

Removes the follower from a follower slot and assigns a neutral dialog.

Returns:
If successfully disbanded, true, otherwise false.
bool AddToFollowerlist ( Critter master,
Critter follower 
)

Assign follower's id to the list of followers.

bool MakeFollower ( Critter critter,
uint  type,
string script,
uint  dialogid,
Critter owner,
bool  FreeBarter 
)

Makes the critter a follower to the specified owner.

Critter@ LocateFollowerByType ( IMerc merc,
Critter owner 
)
Critter@ LocateFollowerByID ( uint  id,
Critter owner 
)
int GetFollowers ( Critter player,
Map map,
array< Critter@>&  followers 
)
int GetFollowers ( Critter player,
Map map,
array< Critter@>&  followers,
bool  OnlyIsSeen 
)
int GetFollowers ( Critter player,
bool  all,
array< Critter@>&  followers 
)

Retrieves followers belonging to player.

Parameters:
all if true, then all followers are put in table, if false then only the active ones.
followers Array to hold the retrieved followers.
Returns:
Number of followers found.
uint CountFollowers ( Critter player,
bool  all 
)

Counts the followers, either all or 'active' (following) ones.

uint CountFollowers ( Critter player,
Map map 
)

Counts the followers on a specific map.

Returns:
Number of followers on the specific map belonging to player