1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Emigration

Discussion in 'Civ5 - Mod Components' started by killmeplease, Oct 6, 2010.

  1. killmeplease

    killmeplease Mk Z on Steam

    Joined:
    Nov 22, 2007
    Messages:
    2,794
    Location:
    Samara
    use fire tuner console,
    try looping the players' cities and setpopulation(getpopulation, true)
     
  2. Cvv

    Cvv Chieftain

    Joined:
    Mar 9, 2013
    Messages:
    56
    Location:
    Rus
    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.
     
  3. killmeplease

    killmeplease Mk Z on Steam

    Joined:
    Nov 22, 2007
    Messages:
    2,794
    Location:
    Samara
    yeah 2+ food surplus is required for immigration
     
  4. pintocat

    pintocat Warlord

    Joined:
    Oct 11, 2010
    Messages:
    133
    Could you maybe make a patch to show the UI in city view for EUI rather than just hiding the emigration UI? :deal:
     
  5. killmeplease

    killmeplease Mk Z on Steam

    Joined:
    Nov 22, 2007
    Messages:
    2,794
    Location:
    Samara
    I had a hard time modding the BNW city view not sure i will have patience to do the same for EUI and i'm not familiar with EUI at all. but if someone wants to do this i'll happily include this option into the mod :)
     
  6. ifLaMaster

    ifLaMaster Chieftain

    Joined:
    Jan 21, 2015
    Messages:
    24
  7. JimmyJump

    JimmyJump Chieftain

    Joined:
    Jul 18, 2013
    Messages:
    91
    Gender:
    Male
    Location:
    Port of Antwerp
    Been using this mod for ages (well, a couple of years) and like it very much. However, the mod has a predeliction for sending migrants to cities that have recently added buildings that elliminate unemployment, which bugs me a touch. I had 8 unemployed citizens in my Capital (Brussels; playing with a mod that adds Belgium as a civ) and added a few buildings in a row (bank, factory and some such) and had no more unemployed civilians but right after several civs had migrants that all moved to Brussels and I was back to 8 unemployed folks after two turns... :( Happens everytime when having high population (over 50) in a city and adding buildings that need 'scientists' to operate the lot.
     

Share This Page