AI INFLUENCE — UPDATE 4.0.2
New:
Arena training — new troop training system at town arenas. Arena masters put your troops through intensive sparring: troops gain XP for 8 hours of training. You can train only your own party, only a companion's troops (if they're in town), or all clan parties at once. Cost depends on troop tier (base rate ~12 denars, cheaper in own settlements). Some fighters may get injuries from sparring. 72-hour cooldown after training. During tournaments the arena is busy — training unavailable. Can be toggled in MCM settings («Arena Training»).
Fixed:
Medicine XP on hero recovery — fixed XP multiplier (was 10× too low), so the surgeon got barely noticeable XP for recovering lords or companions.
Lords now receive medicine XP on personal recovery — previously XP was awarded only to the party surgeon. If a lord is the patient (not the surgeon), they now additionally receive 50% of standard XP as experience from surviving illness. Works for player, AI lords, and companions.
Medicine XP increased for disease treatment.
Diplomacy: fixed bug where an accepted trade agreement was repeatedly shown as «pending response» in a new event. Cause — response check (alreadyResponded) only looked in active events (allActiveEvents), but cleanup had already cleared KingdomStatements of the completed event. Responses are now also searched in DiplomaticStatementsStorage, where acceptance is preserved regardless of event lifecycle.
Diplomacy: added reject_territory action for rejecting territory transfer demands. Previously AI could only accept (transfer_territory) but not reject — territory demands accumulated in PENDING PROPOSALS and hung indefinitely. Now demand_territory can be answered with either transfer_territory (accept) or reject_territory (reject); in both cases the proposal is closed.
Diplomacy: fixed territory transfer and quarantine with multiple actions. When AI returned multiple actions with settlement_id comma-separated (e.g. "castle_EN9,town_EN2"), the full string was passed to each action instead of splitting by index. TransferSettlementById then looked for a settlement with compound ID and found nothing — territory transfer failed silently, quarantine couldn't find settlement. Bug present in 4 action execution points: HandleKingdomStatement, two immediate action paths for AI statements, and PublishPlayerStatement. All four now split settlement_id by commas and each settlement-using action (transfer_territory, reject_territory, demand_territory, quarantine_settlement) gets its ID by index — same as target_kingdom_id. Also fixed handling of internal actions (quarantine_settlement, expel_clan) in immediate paths — they could be skipped when target_kingdom_id was absent.
NPC Initiative: fixed missing relation change on first AI response. GenerateNeutralInitiativeResponse now processes the tone field from AI response and sets PendingRelationChange (positive/negative), which is applied when «View NPC response» is clicked — same as standard dialog.
NPC Initiative: fixed notification sound timing. Previously sound played when «NPC wants to talk» window appeared; now plays only when AI response is ready (at end of GenerateNeutralInitiativeResponse).
NPC Initiative (neutral and hostile): fixed TTS await. Previously TryPlayTTS was called fire-and-forget, so «NPC ready to respond» notification and sound appeared immediately without waiting for TTS audio generation. Now uses await PrepareAsync — same pattern as regular dialog: TTS is generated and saved first, then notification and sound play.
NPC Initiative (hostile): added missing relation changes based on tone and notification sound — same as neutral initiative.
Quests: events (RecentEvents) with player participation now reach quest target NPCs (target_npc_ids / completer_npc_id) regardless of distance — same as for quest giver. Allows target NPC to correctly verify quest completion on player visit.
Quests: events (RecentEvents) are no longer removed when RecentEventsLifetimeDays expires while NPC has an active quest (as giver or target/completer). After quest completion or failure, standard age filter is applied to accumulated events. Event count limit (MaxRecentEvents) always applies.
Quests: fixed crash (NullReferenceException in GetQuestsRelatedToSettlement) when AI quest giver died or was removed while quest remained active. Vanilla UI tried to access QuestGiver for quest icon on settlement — crashing every frame. Fix includes 4 protection layers: (1) Harmony Finalizer on GetQuestsRelatedToSettlement suppresses NullReferenceException, (2) OnHeroKilled auto-fails AI quests on giver death and removes dead heroes from TrackedObjects, (3) SyncQuestsWithGameState on save load finds and fails quests with dead/null giver, (4) InitializeQuestOnGameLoad marks such quests for deferred cleanup.
Messengers/Letters: the dialog description field (message send window) now shows the NPC's most recent message regardless of source. Previously only direct dialog was considered — NPC letters in response to player's messenger and NPC initiative messages via messenger were ignored, and the window showed old direct dialog text.
Diseases: troop immunity strengthened. Base immunity cap raised from 35% to 50% (now same as heroes). Added binary immunity check — troops can now fully block infection per tick (previously immunity only reduced infected count, never fully blocked). With Medicine 300 surgeon and severity 1, total effective troop protection ~75%.
Александр Карасик
Кажется, это обновление
Apr 01 15:48
Sel Und Irae
Cough, Add more sub tiers.
Apr 04 17:50