Keep in mind the last version of the game I played was 0.2.49 (I think it was the last free version?), so if something was fixed or changed about this in the meantime my information is going to be outdated, but from taking a look at the code here's the situation:Hello guys, can you give me in depth details on how this bug came to be? I need to replicate the conditions for it to be properly quashed.
any images of the bug, save file you can share for the conditions will definitely help.
Thanks in advance.
While I don't know the exact details of how it works, you guys use a function to randomly select an event among a list of viable ones, which I think are defined by conditions on the event itself and a list of files the function can look at (so when looking for village events it can only look at the "village_encounter" files to look for an event), also I believe this random function only lets any event happen once and then they become ineligible.
So, with villages, it seems you guys wanted to have 2 models of randomness, the player could get a unique random full event as soon as they reached the village (unscrupulous_noble, swamp_coven, a_friendly_dinner, a_cheating_elder, the_dragons_path), or they could get the generic village encounter (village_general) and then a random follow-up event based on the players's choice (occupy_ev, destroy_ev, trade_ev, village_trade_offer_slave_instead, village_trade_other_trader, the old hero event variants).
The issue is, the follow-up events don't seem to be specially guarded from the random function over the full ones, they can be chosen to play without the generic village encounter playing first, and most of the rewards are handled by the choice done during the generic village encounter event (since quite a few of the follow-up events are just for flavor). So essentially, the player can reach a village and then it will play an event saying Rowan conquered/destroyed/traded with a village (without the player's input), but it won't change anything in the game's logic, Rowan won't receive more money, income from villages won't be increased, slaves won't be acquired, etc.
Without touching the random event selector function you guys are using, I think the fix would be to separate all follow-up events from the full ones into different files, this should stop the "empty conquests" from happening. Another concern is that I believe that the generic village encounter can only be called once by the random event selector, don't know if that's something that can be easily disabled in the function's parameters, if not and you guys don't want to rework the event selector, then you guys might need to implement the randomness outside of the selector for this in particular.
Also some events just have TODOs on their code, but I figure these aren't worth pointing out and will be handled when you guys do a big "spring cleaning" on the game's code.