Skip to content

Parties

PartyBase

.ItemRoster
.MemberRoster
.PrisonRoster

.IsSettlement
.IsMobileParty

.Settlement
.MobileParty

Settlement

PartyBase Settlement.Party

MobileParty

Our party:

MobileParty.MainParty

PartyBase MobileParty.Party

.ItemRoster
.MemberRoster

Count members

TroopRoster

MobileParty.MainParty.MemberRoster.TotalManCount

.TotalRegulars
.TotalWoundedRegulars
.TotalWoundedHeroes
.TotalHeroes
.TotalWounded
.TotalManCount
.TotalHealthyCount
.TotalHealthyCount

Morale

Get:

MobileParty.MainParty.Morale
MobileParty.MainParty.RecentEventsMorale

Set:

MobileParty.MainParty.RecentEventsMorale += 10;

Get party Companions

for (int i = 0; i < MobileParty.MainParty.MemberRoster.Count; i++)
{
    CharacterObject characterAtIndex = Hero.MainHero.PartyBelongedTo.MemberRoster.GetCharacterAtIndex(i);
    if (characterAtIndex.HeroObject != null && characterAtIndex.HeroObject != Hero.MainHero)
    {
        Hero hero = characterAtIndex.HeroObject;
        // do smthg with the hero (companion)
    }
}

Get effective party role heroes

party.EffectiveEngineer
party.EffectiveQuartermaster
party.EffectiveScout
party.EffectiveSurgeon

Add hero to a party

AddCompanionAction.Apply()

Destroy

DestroyPartyAction

Don't use MobileParty.RemoveParty()