Results 1 to 10 of 10

Thread: Modification to recruitment processes

Hybrid View

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

    Default Modification to recruitment processes

    I decided to try something different for recruiting units in a city. Here is a town watch:

    Spoiler Alert, click show to read: 
    recruit_pool "Spear Militia" 1 0.7 2 0 requires factions { england, scotland, france, hre, denmark, spain, portugal, } and not event_counter first_blast_furnace 1
    recruit_pool "EE Spear Militia" 1 0.7 2 0 requires factions { poland, hungary, } and not event_counter first_blast_furnace 1
    recruit_pool "Italian Spear Militia" 1 0.7 2 0 requires factions { milan, venice, papal_states, sicily, } and not event_counter first_blast_furnace 1
    recruit_pool "Bill Militia" 1 0.7 2 0 requires factions { england, } and event_counter first_blast_furnace 1 and not event_counter malleus_maleficarum 1
    recruit_pool "Swordstaff Militia" 1 0.7 2 0 requires factions { denmark, } and event_counter first_blast_furnace 1 and not event_counter malleus_maleficarum 1
    recruit_pool "Partisan Militia" 1 0.7 2 0 requires factions { france, } and event_counter first_blast_furnace 1 and not event_counter malleus_maleficarum 1
    recruit_pool "Scots Pike Militia" 1 0.7 2 0 requires factions { scotland, } and event_counter first_blast_furnace 1 and not event_counter malleus_maleficarum 1
    recruit_pool "Heavy Bill Militia" 1 0.7 2 0 requires factions { england, } and event_counter malleus_maleficarum 1
    recruit_pool "Pike Militia" 1 0.7 2 0 requires factions { france, hre, spain, portugal, milan, venice, papal_states, sicily, } and event_counter first_blast_furnace 1
    recruit_pool "Halberd Militia" 1 0.7 2 0 requires factions { hre, papal_states, sicily, poland, hungary, } and event_counter first_blast_furnace 1
    recruit_pool "Swordsmen Militia" 1 0.7 2 0 requires factions { spain, portugal, } and event_counter malleus_maleficarum 1
    recruit_pool "Dismounted Conquistadores" 1 0.7 2 0 requires factions { spain, portugal, } and hidden_resource america
    recruit_pool "Heavy Pike Militia" 1 0.7 2 0 requires factions { scotland, } and event_counter malleus_maleficarum 1
    recruit_pool "Archer Militia" 1 0.7 2 0 requires factions { england, } and not event_counter malleus_maleficarum 1
    recruit_pool "Crossbow Militia" 1 0.7 2 0 requires factions { france, hre, denmark, spain, portugal, } and not event_counter malleus_maleficarum 1
    recruit_pool "EE Crossbow Militia" 1 0.7 2 0 requires factions { poland, } and not event_counter malleus_maleficarum 1
    recruit_pool "Pavise Crossbow Militia" 1 0.7 2 0 requires factions { venice, papal_states, sicily, hungary, } and not event_counter malleus_maleficarum 1
    recruit_pool "Genoese Crossbow Militia" 1 0.7 2 0 requires factions { milan, } and not event_counter malleus_maleficarum 1
    recruit_pool "Hand Gunners" 1 0.7 2 0 requires factions { hre, denmark, poland, papal_states, sicily, } and event_counter gunpowder_discovered 1 and building_present_min_level academic alchemists_lab and not event_counter battle_of_pavia 1
    recruit_pool "Arquebusiers" 1 0.7 2 0 requires factions { england, france, hre, denmark, spain, milan, venice, papal_states, sicily, poland, hungary, } and event_counter gunpowder_discovered 1 and building_present_min_level academic alchemists_lab
    recruit_pool "Portuguese Arquebusiers" 1 0.7 2 0 requires factions { portugal, } and event_counter gunpowder_discovered 1 and building_present_min_level academic alchemists_lab
    recruit_pool "Musketeers" 1 0.7 2 0 requires factions { spain, portugal, milan, venice, } and event_counter gunpowder_discovered 1 and building_present_min_level academic alchemists_lab
    recruit_pool "Italian Cavalry Militia" 1 0.7 2 0 requires factions { milan, venice, } and event_counter first_blast_furnace 1
    recruit_pool "EE Archer Militia" 1 0.5 4 0 requires factions { russia, }
    recruit_pool "SE Town Militia" 1 0.5 4 0 requires factions { byzantium, }
    recruit_pool "ME Town Militia" 1 0.5 4 0 requires factions { moors, turks, mongols, timurids, }
    recruit_pool "ME Archer Militia" 1 0.5 4 0 requires factions { egypt, }
    recruit_pool "Pikemen" 1 0.7 2 0 requires factions { france, } and event_counter first_printing_press 1
    recruit_pool "Aventuros" 1 0.7 2 0 requires factions { portugal, } and event_counter first_printing_press 1


    The Catholic faction units will have successively improved recruitment pools with each building upgrade. Russia, Byzantium and the Middle Eastern factions are as vanilla. I decided to do this because I do not like battles in 1600 between crossbow militia and arquebusiers - that just seems ridiculous. Basing all unit recruitment on event_counters should fix this.

    The problem is, I start up a new campaign, and it does not give me any problems until I right-click select a building, and then I get a CTD with a generic "Medieval 2: Total War encountered an unspecified error and will now exit" message. Have I made an error here, or is there a limit to the size of the export_descr_building? I do not have any problems with recruiting units from the city barracks, and I can construct them. But I get an error on right clicking on them, from all factions.
    Last edited by rebelyell2006; October 31, 2009 at 12:11 AM. Reason: getting my tags mixed up

  2. #2

    Default Re: Modification to recruitment processes

    This problem is most likely to do with the building's description. I'd check that all the prerequisite buildings have descriptions in the data/text/export_buildings.txt.

    Another cause is that this is a building that the faction cannot have so when you try to access the description the mod crashes.
    Morning Sun (adds Korea and China to the Shogun 2 map)
    http://www.twcenter.net/forums/forum...28-Morning-Sun

    Expanded Japan mod (97 new regions and 101 new factions)
    http://www.twcenter.net/forums/showt...ew-factions%29

    How to split a region in TWS2
    http://www.twcenter.net/forums/showt...split-a-region

    Eras Total Conquest 2.3 (12 campaigns from 970-1547)

  3. #3

    Default Re: Modification to recruitment processes

    I have not changed the building itself, I only changed the units that can be recruited. It is just the city Barracks. Which is why I am quite confused.

  4. #4
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,770

    Default Re: Modification to recruitment processes

    *delete
    Last edited by Taiji; October 31, 2009 at 06:24 PM.

  5. #5

    Default Re: Modification to recruitment processes

    And now I have discovered that the Siege buildings cannot be built. And it is now crashing to desktop in the Rebel AI turn. I have no idea what is going on here. If someone has the time to look it over, I have uploaded my export_descr_building.txt file, as I am certain I have made some mistake that is probably very obvious that I have missed.
    Last edited by rebelyell2006; December 13, 2009 at 04:38 AM.

  6. #6
    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: Modification to recruitment processes

    If it just happens with the barracks then it might have to do the number of levels and their conversions. Put that shouldn't cause the crash in my opinion.

    Your best bet is still to upload a copy of the log. It sometimes gives an indication in these cases at what stage the program crashed.










  7. #7

    Default Re: Modification to recruitment processes

    OK, here is the log.

    EDIT:

    There are a few benefits to the game not working properly. The AI does not spam their armies with catapults, and since the game takes forever to shut down, I can just select a city barracks and it CTDs automatically. However the armies do tend to spam their armies with crossbow units now.
    Last edited by rebelyell2006; December 13, 2009 at 04:38 AM.

  8. #8
    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: Modification to recruitment processes

    Log doesn't give a clue.
    I suggest to use a backup of the descr_strat and then add\modify the entries in small batches and tes. that way you will have a better idea what might trigger the crash.










  9. #9

    Default Re: Modification to recruitment processes

    I have rolled back what I know I have done up to this current issue. I've returned the city barracks to the vanilla. I have not returned the entire file back to vanilla, because I have added tercio and landschneckt buildings a few months back that have not given me issue. I am no longer CTD when I select the barracks in game, however the Siege and Castle_Siege buildings still do not show up as options in game. I have included an event_counter restriction on the Siege and Castle_Siege buildings. Could this restriction be messing up the entire building? And can units have a "building_present_min_level" restriction?


    EDIT:

    I found one of the problems. "and building_present_min_level academic alchemists_lab " cannot be used for units. That has fixed the CTD problem, but I have yet to figure out why the Siege buildings are not recruitable.
    Last edited by rebelyell2006; November 07, 2009 at 01:13 AM.

  10. #10
    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: Modification to recruitment processes

    I have included an event_counter restriction on the Siege and Castle_Siege buildings. Could this restriction be messing up the entire building?
    If the first building in line has a restriction that is not fulfilled, then all following buildings of that branch will not be able to be build.
    And can units have a "building_present_min_level" restriction?
    That should be a viable restriction. Can't build merchants in the market if there is no port for instance.










Posting Permissions

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