Results 1 to 5 of 5

Thread: Region specific units? (Solved)

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Region specific units? (Solved)

    Is there a way to a have a unit only recruitable in one particular region? For the mod I'm working on, I have five very similar units and I want each one only recruitable in one region.. Basically so I can "name" each one a different clan and the player can "unite" the clans.

    could you code;

    recruit_pool "Irish Kerns" 1 0.5 4 0 requires factions { ireland, } and region_religion pagan 60 and {Dublin_Province}

    If that's not the way to do it, is there another way?

  2. #2
    Augustus Lucifer's Avatar Life = Like a beanstalk
    Patrician Citizen

    Join Date
    Aug 2006
    Location
    Mote of Dust
    Posts
    10,725

    Default Re: Region specific units?

    You can do this using hidden resources. At the top of the EDB you will see a line that says hidden_resources, something like this:
    Code:
    hidden_resources crusade jihad arguin horde_target no_pirates no_brigands
    
    .
    There's a maximum of 64 hidden resources. In order to make it work for 199 regions you therefore need to use resource combinations in an ID string. This can be done with 2 or 3 hidden resource indicators per region, I used 2 which requires 21 resources. So edit it to look like:
    Code:
    hidden_resources i1 i2 i3 i4 i5 i6 i7 i8 i9 i10 i11 i12 i13 i14 i15 i16 i17 i18 i19 i20 i21 crusade jihad arguin horde_target no_pirates no_brigands
    
    .
    Then you use 2-resource indicator strings to define each region. The key here is always working up, so that no combination ever re-occurs. This is an example:
    Spoiler Alert, click show to read: 

    Code:
    1-2- Pingjiang_Province
    1-3- Lin-an_Province
    1-4- Shaoxing_Province
    1-5- Tai-Zhou_Province
    1-6- Jian-Kang_Province
    1-7- Jian-Ning_Province
    1-8- Yang-Zhou_Province
    1-9- Lu-Zhou_Province
    1-10- Long-Xing_Province
    1-11- Tan-Zhou_Province
    1-12- Xiang-Yang_Province
    1-13- Jiang-Ling_Province
    1-14- Kuai-Zhou_Province
    1-15- Ba-Zhou_Province
    1-16- Xin-Yuan_Province
    1-17- Quanzhou_Province
    1-18- Chaozhou_Province
    1-19- Guang-Zhou_Province
    1-20- Jin-Jiang_Province
    1-21- Leizhou_Province
    2-3- Qiongzhou_Province
    2-4- Tong-Chuan_Province
    2-5- Chong-Qing_Province
    2-6- Chen-Zhou_Province
    2-7- Yuan-Zhou_Province
    2-8- An-Qing_Province
    2-9- Li-Zhou_Province
    2-10- Cheng-Du_Province
    2-11- Heng-Shan_Province
    2-12- Yi-Zhou_Province
    2-13- Dengzhou_Province
    2-14- Yi-Du_Province
    2-15- Ji-Nan_Province
    2-16- Dong-Ping_Province
    2-17- Xuzhou_Province
    2-18- Gui-De_Province
    2-19- Kaifeng_Province
    2-20- He-Nan_Province
    2-21- Jing-Zhao_Province
    3-4- He-Zhong_Province
    3-5- Lin-Zhao_Province
    3-6- Feng-Xiang_Province
    3-7- Ping-Liang_Province
    3-8- Qing-Yang_Province
    3-9- Ping-Yang_Province
    3-10- Da-Ming_Province
    3-11- Zhen-Ding_Province
    3-12- He-Jian_Province
    3-13- Tai-Yuan_Province
    3-14- Da-Tong_Province
    3-15- Zhongdu_Province
    3-16- Wu-Meng_Province
    3-17- Jia-Ding_Province
    3-18- Dong-Sheng_Province
    3-19- Da-Ding_Province
    3-20- Linhuang_Province
    3-21- Liao-Yang_Province
    4-5- Hui-Ning_Province
    4-6- Sogyong_Province
    4-7- Kaegyong_Province
    4-8- Namgyong_Province
    4-9- Dongyong_Province
    4-10- Kyoju_Province
    4-11- Cholla_Province
    4-12- Tonggye_Province
    4-13- Sohae_Province
    4-14- Jian-Chan_Province
    4-15- Mou-Tong_Province
    4-16- Dong-Chuan_Province
    4-17- Shi-Cheng_Province
    4-18- Lan-Na_Province
    4-19- Dali_Province
    4-20- Wei-Chu_Province
    4-21- Teng-Chong_Province
    5-6- Yong-Chang_Province
    5-7- Jing-Long_Province
    5-8- Zui-Ning_Province
    5-9- Heishui-Zhenyan_Province
    5-10- Xiping_Province
    5-11- Kara-Khoto_Province
    5-12- Xiliang_Province
    5-13- Xuanhua_Province
    5-14- Xining_Province
    5-15- Zhongxing_Province
    5-16- Xiazhou_Province
    5-17- Jingsai_Province
    5-18- Taichud-Omuk_Province
    5-19- Jalayr-Omuk_Province
    5-20- Tatar-Omuk_Province
    5-21- Mongol-Omuk_Province
    6-7- Kerait-Omuk_Province
    6-8- Naiman-Omuk_Province
    6-9- Merkit-Omuk_Province
    6-10- Qara-Qorum_Province
    6-11- Kyrgyz-Omuk_Province
    6-12- Tuvan-Omuk_Province
    6-13- Hami_Province
    6-14- Besh-Baliq_Province
    6-15- Almaliq_Province
    6-16- Emil_Province
    6-17- Khotan_Province
    6-18- Qara-Khojo_Province
    6-19- Chaqiliq_Province
    6-20- Cherchen_Province
    6-21- Jyekundo_Province
    7-8- Chamdo_Province
    7-9- Lhasa_Province
    7-10- Gyantse_Province
    7-11- Shigatse_Province
    7-12- Dartsedo_Province
    7-13- Nyingchi_Province
    7-14- Changzhug_Province
    7-15- Maizhokunggar_Province
    7-16- Golmund_Province
    7-17- Rotug_Province
    7-18- Bumthang_Province
    7-19- Thang-Long_Province
    7-20- Ha-Long_Province
    7-21- Thai-Nguyen_Province
    8-9- Ha-Giang_Province
    8-10- Son-La_Province
    8-11- Thanh-Hoa_Province
    8-12- Ha-Tinh_Province
    8-13- Nghe-An_Province
    8-14- Tra-Kieu_Province
    8-15- Indrapura_Province
    8-16- Vijaya_Province
    8-17- Kauthara_Province
    8-18- Po-Nagar_Province
    8-19- Panduranga_Province
    8-20- Angkor_Province
    8-21- Sukhothai_Province
    9-10- Muang-Sing_Province
    9-11- Phnom-Chisor_Province
    9-12- Vat-Nokor_Province
    9-13- Vat-Phu_Province
    9-14- Roy-Et_Province
    9-15- Phimai_Province
    9-16- Sikihoraphum_Province
    9-17- Vat-Banon_Province
    9-18- Kompong-Svay_Province
    9-19- Thanton_Province
    9-20- Dagon_Province
    9-21- Pegu_Province
    10-11- Pathein_Province
    10-12- Pagan_Province
    10-13- Halingyi_Province
    10-14- Takon_Province
    10-15- Vaisali_Province
    10-16- Lamphun_Province
    10-17- Phayao_Province
    10-18- Bikrampur_Province
    10-19- Gauhati_Province
    10-20- Charaideo_Province
    10-21- Kamatapur_Province
    11-12- Boli_Province
    11-13- Hailanpao_Province
    11-14- Jiamusi_Province
    11-15- Hwaju_Province
    11-16- Kagoshima_Province
    11-17- Daifuzu_Province
    11-18- Hagi_Province
    11-19- Iyo_Province
    11-20- Hamada_Province
    11-21- Aki_Province
    12-13- Owada-no-Tomari_Province
    12-14- Nara_Province
    12-15- Heian-kyo_Province
    12-16- Totomi_Province
    12-17- Miso_Province
    12-18- Echigo_Province
    12-19- Kamakura_Province
    12-20- Mito_Province
    12-21- Kozuke_Province
    13-14- Mutsu_Province
    13-15- Owari_Province
    13-16- Dewa_Province
    13-17- Sapporo_Province
    13-18- Kuwu_Province
    13-19- Liuqiu_Province
    13-20- Luzon_Province
    13-21- Obama_Province
    14-15-
    14-16-
    14-17-
    14-18-
    14-19-
    14-20-
    14-21-
    15-16-
    15-17-
    15-18-
    15-19-
    15-20-
    15-21-
    16-17-
    16-18-
    16-19-
    16-20-
    16-21-
    17-18-
    17-19-
    17-20-
    17-21-
    18-19-
    18-20-
    18-21-
    19-20-
    19-21-
    20-21- Heaven_Province


    As you can see each "id" is unique. You take each id then and put it in the hidden resources section of descr_regions.txt:
    Code:
    Jiang-Ling_Province
    	Jiang-Ling
    	song
    	Chinese_Rebels
    	199 162 177
    	i1, i13
    	5
    	1
    	religions { daoxue 64 mahayana 30 theravada 0 tengriism 0 vajrayana 0 islam 6 catholic 0 heretic 0 }
    And then you can refer to it in the EDB like so:
    Code:
    recruit_pool "Daikyu Bushi"  5	 0.5   8  0  requires factions { song, } and hidden_resource i1 and hidden_resource i13
    
    .
    You know which region it is by the presence of those two hidden resources which are only present together in that region.
    Last edited by Augustus Lucifer; September 16, 2009 at 11:13 AM.

  3. #3

    Default Re: Region specific units? (solved)

    DUDE!

    Thank you so much. This forum rules, this is exactly the info I was looking for! (bookmarked) and (solved)!

  4. #4

    Default Re: Region specific units? (Solved)

    Quote Originally Posted by Xtiaan72 View Post
    Is there a way to a have a unit only recruitable in one particular region? For the mod I'm working on, I have five very similar units and I want each one only recruitable in one region.. Basically so I can "name" each one a different clan and the player can "unite" the clans.

    could you code;

    recruit_pool "Irish Kerns" 1 0.5 4 0 requires factions { ireland, } and region_religion pagan 60 and {Dublin_Province}

    If that's not the way to do it, is there another way?
    does this work?
    Reason i ask is because of the hidden_resource limit...

  5. #5

    Default Re: Region specific units? (Solved)

    It's much later in my build but he said the limit is 64... I wonder if any mod has hit that yet. I'll post again if I get it to work but that's going to be a couple of months from now.

Posting Permissions

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