+ Reply to Thread
Results 1 to 8 of 8

Thread: Internal Migration Target Modding

  1. #1

    Question Internal Migration Target Modding

    I just started using APD and as far as i can tell most stuff works way more logical than vanilla. But i need some tweaking about internal migration in my country.

    Here is what i need to know. I have lots of unemployed craftsman and i want them to migrate to my unstuffed provinces quickly. Right now some of them migrates to unrelated provinces to their jobs. And rest of them stays put. I tried tweaking "poptypes/craftsman". But i got stuck and dont know what to do.

    I'm guessing the below is what i need to work with.

    I tried changing values of

    modifier = {
    factor = 1.5 (to 10 and then 0.1)
    state_scope = { has_factories = yes }
    NOT = { unemployment_by_type = { value = 0.01 type = craftsmen } } (to 0.00001)
    }

    I couldnt see any difference though.

    Here is the full craftsman.txt code

    ---------------------------------------------------

    migration_target =
    {
    factor = 1
    modifier = {
    factor = 2
    has_pop_culture = THIS
    }
    modifier = {
    factor = 0.5
    state_scope = { is_slave = yes }
    }
    modifier = {
    factor = 2
    this = { religion = jewish }
    is_core = ISR
    }
    modifier = {
    factor = 2
    this = { religion = mormon }
    is_core = DES
    }
    modifier = {
    factor = 0.5
    is_core = IRE
    THIS = { NOT = { culture = irish } }
    }
    modifier = {
    factor = 1.2
    has_pop_religion = THIS
    }
    modifier = {
    factor = 0.5
    is_overseas = yes
    }
    modifier = {
    factor = 1.1
    any_core = { is_primary_culture = THIS }
    }
    modifier = {
    factor = 0.5
    NOT = { any_core = { is_primary_culture = THIS } }
    owner = {
    any_owned_province = { any_core = { is_primary_culture = THIS } }
    }
    }
    modifier = {
    factor = 1.5
    state_scope = { has_factories = yes }
    NOT = { unemployment_by_type = { value = 0.01 type = craftsmen } }
    }
    modifier = {
    factor = 0
    has_pop_type = labourers
    unemployment_by_type = { value = 0.01 type = labourers }
    state_scope = { has_factories = no }
    }
    modifier = {
    factor = 2.0
    has_pop_type = labourers
    NOT = { unemployment_by_type = { value = 0.01 type = labourers } }
    state_scope = { has_factories = no }
    }
    modifier = {
    factor = 0
    has_pop_type = farmers
    unemployment_by_type = { value = 0.01 type = farmers }
    state_scope = { has_factories = no }
    }
    modifier = {
    factor = 2.0
    has_pop_type = farmers
    NOT = { unemployment_by_type = { value = 0.01 type = farmers } }
    state_scope = { has_factories = no }
    }
    modifier = {
    factor = 1.05
    is_coastal = yes
    }
    modifier = {
    factor = 0.3
    terrain = mountain
    }
    modifier = {
    factor = 1.05
    poor_strata_everyday_needs = 0.5
    }
    modifier = {
    factor = 1.05
    poor_strata_everyday_needs = 0.55
    }
    modifier = {
    factor = 1.05
    poor_strata_everyday_needs = 0.65
    }
    modifier = {
    factor = 1.05
    poor_strata_everyday_needs = 0.75
    }
    modifier = {
    factor = 1.05
    poor_strata_everyday_needs = 0.85
    }
    modifier = {
    factor = 1.2
    poor_strata_everyday_needs = 1
    }
    modifier = {
    factor = 0
    not = { poor_strata_life_needs = 0.25 }
    }
    modifier = {
    factor = 0
    not = { poor_strata_life_needs = 0.5 }
    }
    modifier = {
    factor = 0.5
    not = { poor_strata_life_needs = 0.75 }
    }
    modifier = {
    factor = 0.5
    not = { poor_strata_life_needs = 1 }
    }
    modifier = {
    factor = 1.5
    poor_strata_luxury_needs = 0.25
    }
    modifier = {
    factor = 1.5
    poor_strata_luxury_needs = 0.5
    }
    modifier = {
    factor = 1.5
    poor_strata_luxury_needs = 0.75
    }
    modifier = {
    factor = 1.5
    poor_strata_luxury_needs = 1
    }
    modifier = {
    factor = 0.1
    terrain = desert
    }
    modifier = {
    factor = 0.3
    terrain = marsh
    }
    modifier = {
    factor = 0.1
    terrain = arctic
    }
    modifier = {
    factor = 1.1
    terrain = farmlands
    }
    modifier = {
    factor = 1.05
    terrain = woods
    }
    modifier = {
    factor = 0.7
    terrain = forest
    }
    modifier = {
    factor = 0.5
    NOT = { life_rating = 15 }
    }
    modifier = {
    factor = 0.6
    life_rating = 15
    NOT = { life_rating = 20 }
    }
    modifier = {
    factor = 0.7
    life_rating = 20
    NOT = { life_rating = 25 }
    }
    modifier = {
    factor = 0.8
    life_rating = 25
    NOT = { life_rating = 30 }
    }
    modifier = {
    factor = 0.9
    life_rating = 30
    NOT = { life_rating = 35 }
    }
    modifier = {
    factor = 1.5
    life_rating = 40
    NOT = { life_rating = 45 }
    }
    modifier = {
    factor = 2.0
    life_rating = 45
    NOT = { life_rating = 50 }
    }
    modifier = {
    factor = 2.5
    life_rating = 50
    }
    }

  2. #2
    You're only changing the weighting of the provinces - and also breaking code, too. If you're looking to change the RATE at which craftsmen move around, you have to increase the rate at which everyone moves... which will murder your performance.
    For every subtle and complicated question, there is a simple and straightforward answer, which is wrong.

    Creator of PDM:PoD for Heart of Darkness: http://forum.paradoxplaza.com/forum/...ownload-thread
    Aaaaaaaaaaaaaaaaaaaand Creator of '1792' for March of the Eagles: http://forum.paradoxplaza.com/forum/...69074-1792-mod

  3. #3
    Quote Originally Posted by Naselus View Post
    You're only changing the weighting of the provinces.
    Yes. This is exactly what i want to do. I want them to move to provinces where factories are understaffed. Of course there are more variables. But i want understaffed factories to be their first priority when moving around. Anyway i can do that without breaking the code?
    Last edited by serhatbalik; 21-07-2012 at 18:42.

  4. #4
    Quote Originally Posted by serhatbalik View Post
    Yes. This is exactly what i want to do. I want them to move to provinces where factories are understaffed. Of course there are more variables. But i want understaffed factories to be their first priority when moving around. Anyway i can do that without breaking the code?
    Just change the Factor number to a larger number. Don't change anything else - in the example you posted, you set it so that any unemployment over 0.001% prevented the factor firing - which is an impossible number, and so probably shafted the whole table
    For every subtle and complicated question, there is a simple and straightforward answer, which is wrong.

    Creator of PDM:PoD for Heart of Darkness: http://forum.paradoxplaza.com/forum/...ownload-thread
    Aaaaaaaaaaaaaaaaaaaand Creator of '1792' for March of the Eagles: http://forum.paradoxplaza.com/forum/...69074-1792-mod

  5. #5
    I'll try that. Thanks a lot. One more question and i'll no longer bother you

    I'm guessing there is no way that we can check if factories are full or not (http://forum.paradoxplaza.com/forum/...work_available)

    The closest thing i can think of is changing unemployment value from 0.00001 to 0. So if there is 0 unemployed craftsman in the region they will think that there is an available work there. Since i'm not altering migration rate in the long run every region with fully staffed factories will have at least 1 unemployed craftsman and others will migrate to only regions that have zero unemployment. Is my logic right?

    And i can change unemployment value to 0 right? I'm asking this because i never saw any modifier with 0 value.
    Last edited by serhatbalik; 21-07-2012 at 21:51.

  6. #6
    Quote Originally Posted by serhatbalik View Post
    I'll try that. Thanks a lot. One more question and i'll no longer bother you

    I'm guessing there is no way that we can check if factories are full or not (http://forum.paradoxplaza.com/forum/...work_available)

    The closest thing i can think of is changing unemployment value from 0.00001 to 0. So if there is 0 unemployed craftsman in the region they will think that there is an available work there. Since i'm not altering migration rate in the long run every region with fully staffed factories will have at least 1 unemployed craftsman and others will migrate to understaffed factories. Is my logic right?

    And i can change unemployment value to 0 right? I'm asking this because i never saw any modifier with 0 value.
    The modifier you're altering already does exactly what you're trying to do - it attracts POPS to states which have factories and less than 1% unemployed craftsmen in.
    For every subtle and complicated question, there is a simple and straightforward answer, which is wrong.

    Creator of PDM:PoD for Heart of Darkness: http://forum.paradoxplaza.com/forum/...ownload-thread
    Aaaaaaaaaaaaaaaaaaaand Creator of '1792' for March of the Eagles: http://forum.paradoxplaza.com/forum/...69074-1792-mod

  7. #7
    Can i change

    unemployment_by_type = { value = 0.01 type = craftsmen }

    to

    unemployment_by_type = { value = 0 type = craftsmen } ?? Similar modifiers like these have always some kind of number but not zero. I can do that right?

  8. #8
    Nevermind. If i increase factor number by a large margin then changing unemployed value to 0 will probably will make them migrate even if they have jobs i guess Thanks a lot for the help!

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts