Recruit exile Clans

If you liked this item, please rate it up on Steam Workshop page.

Author: abc

Last revision: 25 Aug, 2024 at 10:30 UTC

File size: 7.31 KB

On Steam Workshop

Description:
Recruit exiled clans after their country are destroyed
recruit their clans by having dialogue with their clan leader

2024/8/25 update :exclude mercenary& rebel clans

High compatibility,can run on 1.1.5-1.2.X. can be install/uninstall in the playthrough

comment bugs below.

give a like if you think this is helpful

————————Key Code below————————————
private void JoinChat(CampaignGameStarter starter)
{
starter.AddPlayerLine("Dialog_Join1", "hero_main_options", "Dialog_Join1", "{=Dialog_Join1}Join my Kingdom,It’s the only way for your clan to survive.", new ConversationSentence.OnConditionDelegate(this.checkcondition2), null, 100, null, null);
starter.AddDialogLine("Dialog_Join2", "Dialog_Join1", "close_window", "{=Dialog_Join2}OK.", null, new ConversationSentence.OnConsequenceDelegate(this.joinkingdom1), 100, null);
}
private bool checkcondition2()
{
Clan clan3 = Hero.OneToOneConversationHero.Clan;
if (clan3 == null)
{
return false;
}
else
{
bool flag1 = clan3.Kingdom == null;
Clan clan2 = Hero.MainHero.Clan;
bool flag2 = clan2.Kingdom != null;
bool flag3 = Hero.OneToOneConversationHero.IsClanLeader == true;
bool flag4 = clan3.IsRebelClan || clan3.IsClanTypeMercenary == true;// 2024/8/25 added this line
if (flag1 && flag2 && flag3 && !flag4)
{
return true;
}
else return false;
}
}
private void joinkingdom1()
{
Clan clan2 = Hero.MainHero;.Clan;
Kingdom kingdom2;
kingdom2 = ((clan2 != null) ? clan2.Kingdom : null);
Kingdom playerKingdom = kingdom2;
Clan clan = Hero.OneToOneConversationHero.Clan;
ChangeKingdomAction.ApplyByJoinToKingdom(clan, playerKingdom, true);
ChangeRelationAction.ApplyPlayerRelation(Hero.OneToOneConversationHero,30,true,true);
}
}