Sorry for leaving this a bit unupdated,
problem itself can be fixed (for AI too, thx, but tuner won't help for them) with this temp modification
(I was not sure which line would work and left both):
function Migration(iPlayer)
--TEMP ONCE-RUN MODIFICATION
for city in player:Cities() do
local pop = city:GetPopulation()
print("city fix", city:GetName(), city:GetPopulation());
city:SetPopulation(1, true);
city:ChangePopulation(pop-1, true);
city:SetPopulation(0, true);
city:ChangePopulation(pop, true);
end
--
and another problem seem to happen when cites have no religion, line 41 from MkzReligion gived lua Errors
I'm not even sure if this works for me right now or works at all, but it gives no errors anymore
function RemoveRandomFollower(city) -- returns chosen religion id
if #rels == 0 then return -1;
local iRel = rels[Map.Rand(#rels - 1, "Emigration - Determine migrant religion") + 1].id;
Not very deep into fixing, since this may be mod compatibility problem.
(with Historical Religions Edit (BNW or GK) (v 45) or tons of other mods)
This all happens on Crusader Kings scenario map (only map, no other scenario files)
https://steamcommunity.com/sharedfiles/filedetails/?id=387391725&searchtext=
For the mod itself, it should be noticeable and interesting, but somehow it made not too much difference. Probably because i used 3 food consumption per citizen and usually no free food in cities. Or even smth in lua was not working. Or this all asks for some spice like migrants destroy improvements or carry unknown sciences.