Results 1 to 11 of 11

Thread: How can I create a condition for recruiting a unit which is to upgrade a specific building?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Tiro
    Join Date
    Jun 2009
    Location
    Balearic Islands, Spain.
    Posts
    257

    Default How can I create a condition for recruiting a unit which is to upgrade a specific building?

    Hello everybody, I have created a new unit and I want to create a condition in the “export_descr_buildings.txt” file which is to upgrade a specific building in order to recruit this new unit. The building which needs to be upgraded is the blacksmith, it has to be upgraded to the armourer level in order to make the recruitment possible because the new unit has a armor level which is only possible to forge with the armourer. How can I do this, please? Thank you very much in advance.

  2. #2
    Civis
    Join Date
    Apr 2010
    Location
    France
    Posts
    130

    Default Re: How can I create a condition for recruiting a unit which is to upgrade a specific building?

    You just want to add a new building, the armourer, int he blacksmith building tree, right ?
    A guide to understand it : http://medieval2.heavengames.com/m2t...de/index.shtml
    And a tuto to add a new one : http://medieval2.heavengames.com/m2t...gs/index.shtml
    + something on armour level : http://forums.totalwar.org/vb/showth...-Work-Properly

  3. #3
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: How can I create a condition for recruiting a unit which is to upgrade a specific building?

    Simply add your unit only at the level of the armoury (and the ones after that).










  4. #4
    Tiro
    Join Date
    Jun 2009
    Location
    Balearic Islands, Spain.
    Posts
    257

    Default Re: How can I create a condition for recruiting a unit which is to upgrade a specific building?

    Well, what I want to do is to create a unit which may be recruited in the barracks and in the ones after that, but only when the armourer and the ones after that have been built in the same settlement. I don’t want to recruit the unit in the armourer, I just want to create a condition which is that the settlement needs the armourer or the ones after that in order to recruit the new unit. Any idea, please?

  5. #5
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: How can I create a condition for recruiting a unit which is to upgrade a specific building?

    then you need this requirement in your recruitment line: and building_present_min_level [building name] [building level]

    recruit_pool "unit name" 1 0.25 2 0 requires factions { faction_name, }and building_present_min_level smith armourer










  6. #6
    Tiro
    Join Date
    Jun 2009
    Location
    Balearic Islands, Spain.
    Posts
    257

    Default Re: How can I create a condition for recruiting a unit which is to upgrade a specific building?

    Ok, this is how looks the recruitment line now:

    recruit_pool "Heavy Infantry" 1 0.34 3 0 requires factions { hre, spain, france, venice, denmark, milan, norway, england, portugal, aragon, papal_states, sicily, poland, hungary, } and building_present_min_level castle_smith c_armourer

    I forgot to say that the unit must be recruited in the castle, so the building name must be “castle_smith” and the level “c_armourer”.
    Everything seems to be ok, but I can’t recruit the new unit and I don’ know why. The building tree in the campaign map says I can recruit it with the armourer condition but the truth is that I can’t. The recruiting option doesn’t appear anywhere for the new unit because the new unit card doesn’t appear on the list of recruitable units. What can I do, please?

  7. #7
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: How can I create a condition for recruiting a unit which is to upgrade a specific building?

    The recruit_pool line will have to be in all levels of the castle barracks (building castle_barracks tree).










  8. #8
    Tiro
    Join Date
    Jun 2009
    Location
    Balearic Islands, Spain.
    Posts
    257

    Default Re: How can I create a condition for recruiting a unit which is to upgrade a specific building?

    Ok, I understand it, but the new unit I have created can only be recruited in the barracks level and in the armoury level, which are only two levels of the castle_barracks building, not all the levels, and the recruit_pool line for this unit is already in those two levels, but I can’t recruit it and I don’t know why.

  9. #9
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: How can I create a condition for recruiting a unit which is to upgrade a specific building?

    Now you are starting to confuse me. Let me try to summarize what you want to do:

    1. Your new unit should be recruited in the castle barracks
    2. It should only be recruitable if a castle armory is present

    A. Have you got an castle_smith c_armourer in the castle?
    B. Did you enter the 'recruit_pool' line from post #6 in all levels of the castle_barrack line (mustering_hall garrison_quarters drill_square barracks armoury)?
    C. Keep in mind that castle_smith c_armourer is a level three building. Meaning you will only be able to build it when you have reached a certain castle size.










  10. #10
    Tiro
    Join Date
    Jun 2009
    Location
    Balearic Islands, Spain.
    Posts
    257

    Default Re: How can I create a condition for recruiting a unit which is to upgrade a specific building?

    Ok, problem fixed. The problem was that it was necessary to put the 'recruit_pool' line in the castle_smith levels too, from the c_armourer level to the c_gothic_armourer level. Now everything runs ok, thank you very much for your help.

  11. #11
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: How can I create a condition for recruiting a unit which is to upgrade a specific building?

    Hadn't thought about it that way , fairly obvious that that way would be easier. The Danes recruit some warrior monk from their churches, so why not recruit another unit from the smithy buildings?. It actually appears that the min_building_level condition might not work as a recruitment requirement.










Posting Permissions

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