Parties
PartyBase
Settlement
MobileParty
Our party:
PartyBase MobileParty.Party
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()