Results 1 to 19 of 19

Thread: Allowing retraining without allowing recruitment

  1. #1
    Relentless Bughunter Senior Member FactionHeir's Avatar
    Join Date
    Dec 2006
    Location
    London, UK
    Posts
    8,115

    Default Allowing retraining without allowing recruitment

    Hello.

    I thought I had this figured out, but it seems that it doesn't quite work, so what I would like to know is, how I can make certain units retrainable by a certain building without at the same time making them recruitable by that building.

    Example:
    Crusader sergeants can only be recruited while on crusade and cannot be retrained even when you are on crusade and stopping inside a settlement.

    What I want to do is make every region able to retrain crusader sergeants via a certain building (wall) even when not on crusade, but at the same time not allow the training of crusader sergeants from that building.

    What I did:
    Code:
    large_stone_wall city requires factions { northern_european, mesoamerican, middle_eastern, eastern_european, greek, southern_european, slave, } 
            {
                capability
                {
                    recruit_pool "Conquistadores"  1   0.4   3  1  requires factions { slave, spain, portugal, }  and hidden_resource america
                    recruit_pool "Papal Guard"  1   0.4   3  0  requires factions { papal_states, } 
                    recruit_pool "Dismounted Conquistadores"  1   0.4   3  1  requires factions { slave, spain, portugal, }  and hidden_resource america
                    recruit_pool "Town Militia"  1   0.2   2  0  requires factions { slave, england, scotland, france, hre, denmark, spain, portugal, } 
                    recruit_pool "Italian Militia"  1   0.1   1  0  requires factions { slave, milan, venice, papal_states, sicily, } 
                    recruit_pool "EE Town Militia"  1   0.1   1  0  requires factions { slave, poland, hungary, } 
                    recruit_pool "SE Town Militia"  1   0.1   1  0  requires factions { slave, byzantium, } 
                    recruit_pool "ME Town Militia"  1   0.1   1  0  requires factions { slave, moors, turks, mongols, timurids, } 
                    recruit_pool "Mongol Horse Archers"  1   0.2   2  0  requires factions { mongols, } 
                    recruit_pool "Crusader Knights"  0   0.000001   0.999  0  requires factions { northern_european, southern_european, poland, hungary, } 
                    recruit_pool "Crusader Sergeants"  0   0.000001   0.999  0  requires factions { northern_european, southern_european, poland, hungary, } 
                    recruit_pool "Great Cross"  0   0.000001   0.999  0  requires factions { northern_european, southern_european, poland, hungary, } 
                    recruit_pool "Flagellants"  0   0.000001   0.999  0  requires factions { northern_european, southern_european, poland, hungary, } 
                    recruit_pool "Pilgrims"  0   0.000001   0.999  0  requires factions { northern_european, southern_european, poland, hungary, } 
                    recruit_pool "Religious Fanatics"  0   0.000001   0.999  0  requires factions { northern_european, southern_european, poland, hungary, } 
                    recruit_pool "Ghazis"  0   0.000001   0.999  0  requires factions { middle_eastern, } 
                    recruit_pool "Mutatawwi'a"  0   0.000001   0.999  0  requires factions { middle_eastern, } 
                    wall_level 3
                    tower_level 1
                    gate_strength 2
                    free_upkeep bonus 5
                    happiness_bonus bonus 2
                    recruitment_slots 3
                }
                material stone
                construction  3 
                cost  4800 
                settlement_min city
                upgrades
                {
                    huge_stone_wall
                }
            }
    Using this, I still cannot retrain them, even when starting a new game (switch works fine btw) and having flagged them properly in the unit file and edited out normans and saxons in the sm_factions file.

    Any pointers?
    Want gunpowder, mongols, and timurids to appear when YOU do?
    Playing on a different timescale and never get to see the new world or just wanting to change your timescale?
    Click here to read the solution
    Annoyed at laggy battles? Check this thread out for your performance needs
    Got low fps during siege battles in particular? This tutorial is for you
    Want to play M2TW as a Vanilla experience minus many annoying bugs? Get VanillaMod Visit the forum Readme
    Need improved and faster 2H animations? Download this! (included in VanillaMod 0.93)

  2. #2

    Default Re: Allowing retraining without allowing recruitment

    I think you can make the unit pool not a whole number e.g 0.5. So they never have enough men for a whole unit but can replace losses.
    It's not a map.

  3. #3
    Relentless Bughunter Senior Member FactionHeir's Avatar
    Join Date
    Dec 2006
    Location
    London, UK
    Posts
    8,115

    Default Re: Allowing retraining without allowing recruitment

    Tried that:

    Code:
                    recruit_pool "Crusader Knights"  0.5   0.5   0.999  0  requires factions { northern_european, southern_european, poland, hungary, } 
                    recruit_pool "Crusader Sergeants"  0.5   0.5   0.999  0  requires factions { northern_european, southern_european, poland, hungary, } 
                    recruit_pool "Great Cross"  0.5   0.5   0.999  0  requires factions { northern_european, southern_european, poland, hungary, } 
                    recruit_pool "Flagellants"  0.5   0.5   0.999  0  requires factions { northern_european, southern_european, poland, hungary, } 
                    recruit_pool "Pilgrims"  0.5   0.5   0.999  0  requires factions { northern_european, southern_european, poland, hungary, } 
                    recruit_pool "Religious Fanatics"  0   0.5   0.999  0  requires factions { northern_european, southern_european, poland, hungary, } 
                    recruit_pool "Ghazis"  0.5   0.5   0.999  0  requires factions { middle_eastern, } 
                    recruit_pool "Mutatawwi'a"  0.5   0.5   0.999  0  requires factions { middle_eastern, }
    Unfortunately it is still not working though...
    Want gunpowder, mongols, and timurids to appear when YOU do?
    Playing on a different timescale and never get to see the new world or just wanting to change your timescale?
    Click here to read the solution
    Annoyed at laggy battles? Check this thread out for your performance needs
    Got low fps during siege battles in particular? This tutorial is for you
    Want to play M2TW as a Vanilla experience minus many annoying bugs? Get VanillaMod Visit the forum Readme
    Need improved and faster 2H animations? Download this! (included in VanillaMod 0.93)

  4. #4

    Default Re: Allowing retraining without allowing recruitment

    Try giving them a starting and growth of 0.9 as well.

    Have you edited the descr_campaign_db.xml?

    It should work though I've not tested it myself yet. I know with
    <retraining_slots uint="0.5"/>
    it is posible to retrain units when that same unit is not yet available for recruitment.

  5. #5
    Relentless Bughunter Senior Member FactionHeir's Avatar
    Join Date
    Dec 2006
    Location
    London, UK
    Posts
    8,115

    Default Re: Allowing retraining without allowing recruitment

    The former wouldn't help I think, as I tested for around 20 turns including building the structure.

    The latter I'll have a go at when I get back. Would you recommend descr_recruitment.xml to be changed in line as well?
    Want gunpowder, mongols, and timurids to appear when YOU do?
    Playing on a different timescale and never get to see the new world or just wanting to change your timescale?
    Click here to read the solution
    Annoyed at laggy battles? Check this thread out for your performance needs
    Got low fps during siege battles in particular? This tutorial is for you
    Want to play M2TW as a Vanilla experience minus many annoying bugs? Get VanillaMod Visit the forum Readme
    Need improved and faster 2H animations? Download this! (included in VanillaMod 0.93)

  6. #6

    Default Re: Allowing retraining without allowing recruitment

    I'll look into it, the way it seems a unit should be re-trainable if it is 0.9 available. I've not seen descr_recruitment.xml do much of anything, but it's cirtainly worth a try.

  7. #7

    Default Re: Allowing retraining without allowing recruitment

    Works like a dream. No need to edit descr_unit nor descr_recruitment.
    Quote Originally Posted by descr_campaign_db.xml
    <root>
    <recruitment>
    <recruitment_slots uint="1"/>
    <retraining_slots uint="0.5"/>
    <deplenish_pools_with_caps bool="false"/>
    <clear_pools_with_caps bool="false"/>
    <add_initial_with_caps bool="true"/>
    <add_disband_no_caps bool="true"/>
    <force_clamp_to_max bool="false"/>
    <deplenish_multiplier float="0.9"/>
    <deplenish_offset float="-0.2"/>
    <percentage_pool_reduction_lost uint="10"/>
    <percentage_pool_reduction_occupy uint="20"/>
    <percentage_pool_reduction_sack uint="45"/>
    <percentage_pool_reduction_exterminate uint="100"/>
    <max_agents_per_turn uint="1"/>
    </recruitment>
    Quote Originally Posted by export_descr_buildings.txt
    recruit_pool "Crusader Sergeants" 0.9 0.9 0.999 0 requires factions { papal_states, }
    on all wall's, and voala, the Pope can retrain crusader sergeants from turn one, but can still only recruit them normally.

  8. #8
    Relentless Bughunter Senior Member FactionHeir's Avatar
    Join Date
    Dec 2006
    Location
    London, UK
    Posts
    8,115

    Default Re: Allowing retraining without allowing recruitment

    Great, thanks I'll try it out in a minute and post back!
    Want gunpowder, mongols, and timurids to appear when YOU do?
    Playing on a different timescale and never get to see the new world or just wanting to change your timescale?
    Click here to read the solution
    Annoyed at laggy battles? Check this thread out for your performance needs
    Got low fps during siege battles in particular? This tutorial is for you
    Want to play M2TW as a Vanilla experience minus many annoying bugs? Get VanillaMod Visit the forum Readme
    Need improved and faster 2H animations? Download this! (included in VanillaMod 0.93)

  9. #9
    Relentless Bughunter Senior Member FactionHeir's Avatar
    Join Date
    Dec 2006
    Location
    London, UK
    Posts
    8,115

    Default Re: Allowing retraining without allowing recruitment

    Tried it exactly as you post except for the faction lines and doesn't seem to work

    I'll try again this time using single factions rather than cultures.
    Want gunpowder, mongols, and timurids to appear when YOU do?
    Playing on a different timescale and never get to see the new world or just wanting to change your timescale?
    Click here to read the solution
    Annoyed at laggy battles? Check this thread out for your performance needs
    Got low fps during siege battles in particular? This tutorial is for you
    Want to play M2TW as a Vanilla experience minus many annoying bugs? Get VanillaMod Visit the forum Readme
    Need improved and faster 2H animations? Download this! (included in VanillaMod 0.93)

  10. #10
    Relentless Bughunter Senior Member FactionHeir's Avatar
    Join Date
    Dec 2006
    Location
    London, UK
    Posts
    8,115

    Default Re: Allowing retraining without allowing recruitment

    Nope, still doesn't work, neither in a new game (france) nor in a saved game (turkey), even after playing 3 turns each with requirements all met...

    I'll keep checking
    Want gunpowder, mongols, and timurids to appear when YOU do?
    Playing on a different timescale and never get to see the new world or just wanting to change your timescale?
    Click here to read the solution
    Annoyed at laggy battles? Check this thread out for your performance needs
    Got low fps during siege battles in particular? This tutorial is for you
    Want to play M2TW as a Vanilla experience minus many annoying bugs? Get VanillaMod Visit the forum Readme
    Need improved and faster 2H animations? Download this! (included in VanillaMod 0.93)

  11. #11

    Default Re: Allowing retraining without allowing recruitment

    Strange, worked perfect for me using 1.2 what version are you using?

    Just to confirm I edited;
    Quote Originally Posted by export_descr_buildings.txt
    recruit_pool "Crusader Sergeants" 0.9 0.9 0.999 0 requires factions { papal_states, northern_european, }
    Tried France and England still worked golden.

  12. #12
    Relentless Bughunter Senior Member FactionHeir's Avatar
    Join Date
    Dec 2006
    Location
    London, UK
    Posts
    8,115

    Default Re: Allowing retraining without allowing recruitment

    Using Version 1.3 without Kingdoms. Switch works fine.

    Which building did you put yours under? I even tried putting it on all city and castle walls.
    Want gunpowder, mongols, and timurids to appear when YOU do?
    Playing on a different timescale and never get to see the new world or just wanting to change your timescale?
    Click here to read the solution
    Annoyed at laggy battles? Check this thread out for your performance needs
    Got low fps during siege battles in particular? This tutorial is for you
    Want to play M2TW as a Vanilla experience minus many annoying bugs? Get VanillaMod Visit the forum Readme
    Need improved and faster 2H animations? Download this! (included in VanillaMod 0.93)

  13. #13

    Default Re: Allowing retraining without allowing recruitment

    All city walls.

    I cant imagine 1.3 would be causing the problem, all I can say is double-check your descr_campaign_db.xml

    I've double checked all the files in my experiments mod and have found nothing elts that it could be. Here's the seltments and crusades parts of my descr_campaign_db.xml, maybe there's something in there I'm missing.
    <settlement>
    <sack_money_modifier float="0.4"/>
    <exterminate_money_modifier float="0.5"/>
    <chiv_spf_modifier float="1.0"/>
    <chiv_sof_modifier float="1.0"/>
    <dread_sof_modifier float="-1.0"/>
    <piety_cor_sif_modifier float="1.0"/>
    <piety_admin_sif_modifier float="1.0"/>
    <port_to_port_mp_min float="100.0"/>
    <heresy_unrest_modifier float="35.0"/>
    <religion_unrest_modifier float="15.0"/>
    <siege_gear_required_for_city_level string="huge_city"/>
    <siege_gear_required_for_castle_level string="moot_and_bailey"/>
    <no_towers_only_for_city_level string="huge_city"/>
    <no_towers_only_for_castle_level string="moot_and_bailey"/>
    <min_turn_keep_rebel_garrison int="25"/>
    </settlement>
    <crusades>
    <required_jihad_piety int="4"/>
    <max_disband_progress float="10.0"/>
    <near_target_no_disband_distance float="10.0"/>
    <disband_progress_window float="3"/>
    <crusade_called_start_turn float="20"/>
    <jihad_called_start_turn float="20"/>
    <movement_points_modifier float="2.0"/>
    </crusades>
    I am using unmoded;
    descr_mercenaries.txt
    descr_recruitment.xml
    descr_settlement_mechanics.xml
    and
    export_descr_unit.txt

    I cant think of any other files that may influence this.

  14. #14
    Relentless Bughunter Senior Member FactionHeir's Avatar
    Join Date
    Dec 2006
    Location
    London, UK
    Posts
    8,115

    Default Re: Allowing retraining without allowing recruitment

    Tried exactly what you posted to no avail, including getting a fresh db copy editing only to 0.5 and a fresh EDU copy.

    Can you confirm that when you say you are able to retrain, that the unit you retrain actually is trained back to full strength, rather than getting only a weapons upgrade or experience upgrade?
    Want gunpowder, mongols, and timurids to appear when YOU do?
    Playing on a different timescale and never get to see the new world or just wanting to change your timescale?
    Click here to read the solution
    Annoyed at laggy battles? Check this thread out for your performance needs
    Got low fps during siege battles in particular? This tutorial is for you
    Want to play M2TW as a Vanilla experience minus many annoying bugs? Get VanillaMod Visit the forum Readme
    Need improved and faster 2H animations? Download this! (included in VanillaMod 0.93)

  15. #15

    Default Re: Allowing retraining without allowing recruitment

    Yes, back to full strength. I thought of that too...

    I did give the factions a starting unit in the strat, I'm doing some experiment work today, so I'll check to make sure that's not the only reason I can re-train them.

  16. #16
    Relentless Bughunter Senior Member FactionHeir's Avatar
    Join Date
    Dec 2006
    Location
    London, UK
    Posts
    8,115

    Default Re: Allowing retraining without allowing recruitment

    What I did was either:
    Start a new game as catholic, move_character near the pope, bribe the pope o perfect, declare a crusade, join forces and hire a regiment of sergeants/knights. Attack a friendly catholic stack with the crusading general's stack (first removing form crusade status of course, and needs some microing to get it to work right). Then in battle, auto_win defender and resolve. Try to retrain battered units in the town they fled to -> cannot retrain due to no units available. End turn. Try again next next -> still cannot retrain. Repeat cycle for 5 turns and still not able.

    With old save:
    Already have several battered (between 15-45 soldiers (Ghazi/Mutatawwi'a) in a max 48 regiment) in several cities/castles. Cannot retrain. End turn several times and still cannot.
    Want gunpowder, mongols, and timurids to appear when YOU do?
    Playing on a different timescale and never get to see the new world or just wanting to change your timescale?
    Click here to read the solution
    Annoyed at laggy battles? Check this thread out for your performance needs
    Got low fps during siege battles in particular? This tutorial is for you
    Want to play M2TW as a Vanilla experience minus many annoying bugs? Get VanillaMod Visit the forum Readme
    Need improved and faster 2H animations? Download this! (included in VanillaMod 0.93)

  17. #17

    Default Re: Allowing retraining without allowing recruitment

    Have you tried adding a line to the merc pool i.e having a crusader sergeant unit line with a replenishment rate but without a whole number of units available and without the "crusading" condition.

    Remember now having some merc units start with a faction in the strat file that i couldn't retrain so maybe it's a weird merc unit thing.
    It's not a map.

  18. #18
    Relentless Bughunter Senior Member FactionHeir's Avatar
    Join Date
    Dec 2006
    Location
    London, UK
    Posts
    8,115

    Default Re: Allowing retraining without allowing recruitment

    Good point, will try that when I get back! I think that should do actually. Thanks
    Want gunpowder, mongols, and timurids to appear when YOU do?
    Playing on a different timescale and never get to see the new world or just wanting to change your timescale?
    Click here to read the solution
    Annoyed at laggy battles? Check this thread out for your performance needs
    Got low fps during siege battles in particular? This tutorial is for you
    Want to play M2TW as a Vanilla experience minus many annoying bugs? Get VanillaMod Visit the forum Readme
    Need improved and faster 2H animations? Download this! (included in VanillaMod 0.93)

  19. #19
    Relentless Bughunter Senior Member FactionHeir's Avatar
    Join Date
    Dec 2006
    Location
    London, UK
    Posts
    8,115

    Default Re: Allowing retraining without allowing recruitment

    Tried it but no success:

    Code:
    	unit Pilgrims			exp 0 cost 50 replenish 0.4 - 0.5 max 0.999 initial 0.5 religions { catholic }
    	unit Crusader Knights		exp 0 cost 400 replenish 0.4 - 0.5 max 0.999 initial 0.5 religions { catholic }
    	unit Crusader Sergeants		exp 0 cost 220 replenish 0.4 - 0.5 max 0.999 initial 0.5 religions { catholic }
    	unit Flagellants		exp 0 cost 150 replenish 0.4 - 0.5 max 0.999 initial 0.5 religions { catholic }
    	unit Religious Fanatics		exp 0 cost 110 replenish 0.4 - 0.5 max 0.999 initial 0.5 religions { catholic }
    	unit Great Cross		exp 1 cost 500 replenish 0.4 - 0.5 max 0.999 initial 0.5 religions { catholic }
    	unit Ghazis			exp 0 cost 190 replenish 0.6 - 0.7 max 0.999 initial 0.5 religions { islam }
    	unit Mutatawwi'a		exp 0 cost 100 replenish 0.6 - 0.7 max 0.999 initial 0.5 religions { islam }
    Added these lines for each region listed in the descr_mercenaries.txt and started a new game as Hungary, calling a crusade and attacking the rebel village nearby with auto_win defender.
    Couldn't retrain any of the crusader mercs both during and after the crusade and not after 10 turns still.

    The only difference between my code and the default is the cost of the mercenaries, but that shouldn't make a difference, should it? I'm thinking that doing so just creates a second unit pool in the merc pool that is slightly higher priced and available to noncrusading factions too.
    Want gunpowder, mongols, and timurids to appear when YOU do?
    Playing on a different timescale and never get to see the new world or just wanting to change your timescale?
    Click here to read the solution
    Annoyed at laggy battles? Check this thread out for your performance needs
    Got low fps during siege battles in particular? This tutorial is for you
    Want to play M2TW as a Vanilla experience minus many annoying bugs? Get VanillaMod Visit the forum Readme
    Need improved and faster 2H animations? Download this! (included in VanillaMod 0.93)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO