Interface IMyFaction
Describes faction (mods interface)
Namespace: VRage.Game.ModAPI
Assembly: VRage.Game.dll
Syntax
public interface IMyFaction
Properties
AcceptHumans
Gets if faction accepts players
Declaration
bool AcceptHumans { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
AutoAcceptMember
Gets if faction automatically accept new members
Declaration
bool AutoAcceptMember { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
AutoAcceptPeace
Gets if faction automatically accept peace from other factions
Declaration
bool AutoAcceptPeace { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
CustomColor
Gets faction icon background color
Declaration
Vector3 CustomColor { get; }
Property Value
Type | Description |
---|---|
Vector3 |
Description
Gets faction description
Declaration
string Description { get; }
Property Value
Type | Description |
---|---|
System.String |
FactionIcon
Gets faction icon
Declaration
Nullable<MyStringId> FactionIcon { get; }
Property Value
Type | Description |
---|---|
System.Nullable<MyStringId> |
FactionId
Gets faction id
Declaration
long FactionId { get; }
Property Value
Type | Description |
---|---|
System.Int64 |
FactionType
Gets faction type: Pirate, Miner ...
Declaration
MyFactionTypes FactionType { get; }
Property Value
Type | Description |
---|---|
MyFactionTypes |
FounderId
IdentityId of founder of faction
Declaration
long FounderId { get; }
Property Value
Type | Description |
---|---|
System.Int64 |
IconColor
Gets faction icon color
Declaration
Vector3 IconColor { get; }
Property Value
Type | Description |
---|---|
Vector3 |
JoinRequests
Gets all faction join requests.
Declaration
DictionaryReader<long, MyFactionMember> JoinRequests { get; }
Property Value
Type | Description |
---|---|
DictionaryReader<System.Int64, MyFactionMember> |
Members
Gets all members (founder, leaders also) of faction.
Declaration
DictionaryReader<long, MyFactionMember> Members { get; }
Property Value
Type | Description |
---|---|
DictionaryReader<System.Int64, MyFactionMember> |
Name
Gets faction name
Declaration
string Name { get; }
Property Value
Type | Description |
---|---|
System.String |
ObjectivePercentageCompleted
Gets or sets percentage of completed objective. Used in Uranium Heist scenario
Declaration
float ObjectivePercentageCompleted { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
PrivateInfo
Gets faction private info
Declaration
string PrivateInfo { get; }
Property Value
Type | Description |
---|---|
System.String |
Score
Gets or sets score of faction. Used in Uranium Heist scenario
Declaration
int Score { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Tag
Gets faction tag
Declaration
string Tag { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
GetBalanceShortString()
Gets balance of an account associated with faction. Format is 'BALANCE CURRENCYSHORTNAME'.
Declaration
string GetBalanceShortString()
Returns
Type | Description |
---|---|
System.String | Current balance of the account in form of formatted string. If Banking System does not exist method returns null. |
HasLastMember()
Returns if faction has last member
Declaration
bool HasLastMember()
Returns
Type | Description |
---|---|
System.Boolean | True if faction has last member |
IsEnemy(Int64)
Returns if player with provided playerId is enemy to faction
Declaration
bool IsEnemy(long playerId)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | playerId | Player IdentityId |
Returns
Type | Description |
---|---|
System.Boolean | True if player is enemy to faction |
IsEveryoneNpc()
Returns if faction has no humans
Declaration
bool IsEveryoneNpc()
Returns
Type | Description |
---|---|
System.Boolean | True if faction has no humans |
IsFounder(Int64)
Returns if player with provided playerId is founder of faction
Declaration
bool IsFounder(long playerId)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | playerId | Player IdentityId |
Returns
Type | Description |
---|---|
System.Boolean | True if player is founder of faction |
IsFriendly(Int64)
Returns if player with provided playerId is friendly to faction
Declaration
bool IsFriendly(long playerId)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | playerId | Player IdentityId |
Returns
Type | Description |
---|---|
System.Boolean | True if player is friendly to faction |
IsLeader(Int64)
Returns if player with provided playerId is faction leader
Declaration
bool IsLeader(long playerId)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | playerId | Player IdentityId |
Returns
Type | Description |
---|---|
System.Boolean | True if player is faction leader |
IsMember(Int64)
Returns if player with provided playerId is faction member
Declaration
bool IsMember(long playerId)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | playerId | Player IdentityId |
Returns
Type | Description |
---|---|
System.Boolean | True if player is faction leader |
IsNeutral(Int64)
Returns if player with provided playerId is neutral to faction
Declaration
bool IsNeutral(long playerId)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | playerId | Player IdentityId |
Returns
Type | Description |
---|---|
System.Boolean | True if player is neutral to faction |
RequestChangeBalance(Int64)
Changes the balance of the account of this faction by given amount. Sends a message to server with the request.
Declaration
void RequestChangeBalance(long amount)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | amount | Amount by which to change te balance. |
TryGetBalanceInfo(out Int64)
Gets balance of an account associated with faction.
Declaration
bool TryGetBalanceInfo(out long balance)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | balance | Returns current balance of the account. (If called on client, can return delayed value, as changes to balace have to be synchronized first) |
Returns
Type | Description |
---|---|
System.Boolean | True if account was found. Otherwise false. |