In Progress Tavern with no Location Character

Users who are viewing this thread

Version number
e1.5.8
Branch
Beta
Modded/unmodded
Yes, but I removed mods.
If saving the game when in the Settlement (Town) Menu, TavernEmployees or GameHost won't be spawned every time I load this save and visit the tavern directly (without exiting the town and entering again).

I suppose that this issue is caused by conditional statement in TavernEmployeesCampaignBehavior and BoardGameCampaignBehavior.
C#:
private void OnGameLoaded(CampaignGameStarter campaignGameStarter)
{
    if (Settlement.CurrentSettlement != null && Settlement.CurrentSettlement.IsTown && LocationComplex.Current != null)
    {
        this.AddTavernEmployees(Settlement.CurrentSettlement);
    }
}
LocationComplex.Current is always NULL in the Settlement Menu, so blocks mentioned above will never be executed.
What's more, OnSettlementEntered() won't be triggered if MainParty have been in this Settlement, and therefore Location Characters in Tavern are not added into the list.
C#:
public void OnSettlementEntered(MobileParty mobileParty, Settlement settlement, Hero hero)
{
    if (mobileParty != MobileParty.MainParty)
    {
        return;
    }
    if (settlement.LocationComplex != null && settlement.IsTown)
    {
        this.AddTavernEmployees(settlement);
    }
}
 
Back
Top Bottom