Results 1 to 10 of 10

Thread: Problem with EDB related CTD and available units for recruitment per building

  1. #1
    4zumi's Avatar This one sparks joy
    Join Date
    Feb 2015
    Location
    HRE - Aquis Mattiacis
    Posts
    1,231

    Default Problem with EDB related CTD and available units for recruitment per building

    Hi, I stumbled over a bug while I made the beta test for my mod. Maybe someone more knowledgeable could shed a bit more light upon the issue.
    Long story short, after much trial and error, I found out that an annoying repetable 1st endturn CTD was related to an building I added.

    It is a supply building, that can be build everywhere and allows the replenishment of certain special units like order units, merchant units, in short units that can only be recruited at special places.
    I made a building, so these could be replenished (not recruited) everywhere. Something like "Unit 0 0.2 0.999 0" (you get the idea).

    I know that there is a certain limit in the EDB how many units can be trainied in a city, something like 32.

    So now to the bug I encountered.

    Campaign loaded up. Hit the end turn button, some factions rattle through. CTD without explanation and no useful trace log.

    I have had something like 80 entries (units) in the supply building. After I deleted 30 entries and got to something around 60 entires, I tested again.
    The Bug was gone and I could play as normal.

    Now I thought I was smug and put the other 30 entries onto a newly created supply building.
    It worked for the first 30 turns or so, then I encountered again a CTD with no useful log.

    I deleted the new building and the entires and the game proceeded to the next turn as normal.

    Now that I have narrowed down what causes the CTD i would need some help or knowledge about this kind of thing.

    "-Units recruitable in a given city, not counting agents: Min 0, max 32. Default usage, experimentation. Extras CTD."
    As I understood it a settlement can only provide 32 different recruitable unit types or 32 units as in "2 spearmean and 30 peasants"

    Either way it would seem to me that I have exceeded that limit by far with 60 units in the Supply Building + not counted the regular recruitable units in the city from other buildings.
    And let me tell you that I have tested the game with a 48 unit supply building for 200 turns and never encountered a ctd.
    How does a 0.999 Unit pool count then or does it count at all.

    To come to the final questions: Why do I encounter an error at exactly this point. And is there a way that I can make one ore more global working supply buildings for 80+ units?

    Thanks in advance and if you need more infos please ask.
    Proudly under the patronage of King Athelstan of the Imperial House of Hader

    Author of
    Total Vanilla Beyond mod for Medieval 2 - Kingdoms &
    Developer of
    Total Bananas mod for Medieval 2 - Kingdoms (beta)

    Steam Workshop Mods for Rome 2, Warhammer, Warhammer 2

    Discord: zumi's cookie corner
    Fighting for launch of "Cookie Friday" and "No Pants Saturday"

  2. #2
    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: Problem with EDB related CTD and available units for recruitment per building

    The 'recruitable' number is exactly that - it pertains to the number of slots that are available in the recruitment panel in the game. Replenishment should not count towards that as you argue, so I can only assume that somewhere you have a hard coded number of capability lines in the EDB, either generally or per capability.










  3. #3
    4zumi's Avatar This one sparks joy
    Join Date
    Feb 2015
    Location
    HRE - Aquis Mattiacis
    Posts
    1,231

    Default Re: Problem with EDB related CTD and available units for recruitment per building

    Thanks Gigantus,

    I have thought about it too over night and for a good measurement here is the building code for the two supply buildings.

    Spoiler Alert, click show to read: 
    building supply
    {
    levels supply
    {
    supply requires factions { northern_european, eastern_european, southern_european, greek, middle_eastern, }
    {
    capability
    {
    ;assassins_guild
    recruit_pool "Battlefield Assassins" 0 0.2 0.999 0 requires factions { hungary, }
    recruit_pool "Hashishim" 0 0.2 0.999 0 requires factions { moors, egypt, tuareg, damascus, turks, azumi, }

    ;woodsmens_guild
    recruit_pool "Sherwood Archers" 0 0.2 0.999 0 requires factions { england, }

    ;merchant guild
    recruit_pool "Merchant Cavalry Militia" 0 0.2 0.999 0 requires factions { england, scotland, ireland, france, hre, denmark, norway, spain, portugal, poland, hungary, }
    recruit_pool "Greek Militia Cavalry" 0 0.2 0.999 0 requires factions { byzantium, }

    ;wales
    recruit_pool "Teulu Skirmishers" 0 0.2 0.999 0 requires factions { northern_european, southern_european, eastern_european, }
    recruit_pool "Teulu" 0 0.2 0.999 0 requires factions { northern_european, southern_european, eastern_european, }
    recruit_pool "Mathrafal Horsemen" 0 0.2 0.999 0 requires factions { northern_european, southern_european, eastern_european, }

    recruit_pool "Rhyfelwyr" 0 0.2 0.999 0 requires factions { northern_european, southern_european, eastern_european, }
    recruit_pool "Meirionnydd Spearmen" 0 0.2 0.999 0 requires factions { northern_european, southern_european, eastern_european, }
    recruit_pool "Welsh Militiamen" 0 0.2 0.999 0 requires factions { northern_european, southern_european, eastern_european, }
    recruit_pool "Gwent Raiders" 0 0.2 0.999 0 requires factions { northern_european, southern_european, eastern_european, }

    recruit_pool "Magnelwyr" 0 0.2 0.999 0 requires factions { northern_european, southern_european, eastern_european, } and event_counter gunpowder_discovered 1
    recruit_pool "Helwyr" 0 0.2 0.999 0 requires factions { northern_european, southern_european, eastern_european, }
    recruit_pool "Welsh Skirmishers" 0 0.2 0.999 0 requires factions { northern_european, southern_european, eastern_european, }

    recruit_pool "Saethwyr" 0 0.2 0.999 0 requires factions { northern_european, southern_european, eastern_european, }
    recruit_pool "Morgannwg Spearmen" 0 0.2 0.999 0 requires factions { northern_european, southern_european, eastern_european, }


    ;religious
    recruit_pool "Knights of Santiago" 0 0.2 0.999 0 requires factions { spain, portugal, }
    recruit_pool "Santiago Sergeants" 0 0.2 0.999 0 requires factions { spain, portugal, }
    recruit_pool "Trecenezago" 0 0.2 0.999 0 requires factions { spain, portugal, }
    recruit_pool "Marshall of St. James" 0 0.2 0.999 0 requires factions { spain, portugal, }
    recruit_pool "Knights of the Reconquista" 0 0.2 0.999 0 requires factions { spain, portugal, }
    recruit_pool "Santiago Archers" 0 0.2 0.999 0 requires factions { spain, portugal, }
    recruit_pool "Knights of Calatrava" 0 0.2 0.999 0 requires factions { spain, }

    recruit_pool "Knights Templar" 0 0.2 0.999 0 requires factions { england, scotland, ireland, france, denmark, norway, milan, venice, papal_states, sicily, poland, hungary, }
    recruit_pool "Templar Confrere Knights" 0 0.2 0.999 0 requires factions { england, scotland, ireland, france, denmark, norway, milan, venice, papal_states, sicily, poland, hungary, }
    recruit_pool "Templar Sergeant" 0 0.2 0.999 0 requires factions { england, scotland, france, ireland, denmark, norway, milan, venice, papal_states, sicily, poland, hungary, }
    recruit_pool "Templar Gunners" 0 0.2 0.999 0 requires factions { england, scotland, france, ireland, denmark, norway, milan, venice, papal_states, sicily, poland, hungary, } and event_counter gunpowder_discovered 1
    recruit_pool "Templar Crossbowmen" 0 0.2 0.999 0 requires factions { england, scotland, ireland, france, denmark, norway, milan, venice, papal_states, sicily, poland, hungary, }
    recruit_pool "Marshall of the Templars" 0 0.2 0.999 0 requires factions { england, scotland, ireland, france, denmark, norway, milan, venice, papal_states, sicily, poland, hungary, }

    recruit_pool "Knights Hospitaller" 0 0.2 0.999 0 requires factions { england, scotland, ireland, france, denmark, norway, milan, venice, papal_states, sicily, poland, hungary, }
    recruit_pool "Hospitaller Sergeant" 0 0.2 0.999 0 requires factions { england, scotland, ireland, france, denmark, norway, milan, venice, papal_states, sicily, poland, hungary, }
    recruit_pool "Hospitaller Gunner" 0 0.2 0.999 0 requires factions { england, scotland, ireland, france, denmark, norway, milan, venice, papal_states, sicily, poland, hungary, } and event_counter gunpowder_discovered 1
    recruit_pool "Hospitaller Crossbowmen" 0 0.2 0.999 0 requires factions { england, scotland, ireland, france, denmark, norway, milan, venice, papal_states, sicily, poland, hungary, }
    recruit_pool "Marshall of the Hospitallers" 0 0.2 0.999 0 requires factions { england, scotland, ireland, france, denmark, norway, milan, venice, papal_states, sicily, poland, hungary, }

    recruit_pool "Dismounted Hospitaller Knights" 0 0.2 0.999 0 requires factions { england, scotland, ireland, france, denmark, norway, milan, venice, papal_states, sicily, poland, hungary, }
    recruit_pool "Hospitaller Guards" 0 0.2 0.999 0 requires factions { england, scotland, ireland, france, denmark, norway, milan, venice, papal_states, sicily, poland, hungary, }
    recruit_pool "Dismounted Templar Knights" 0 0.2 0.999 0 requires factions { england, scotland, ireland, france, denmark, norway, milan, venice, papal_states, sicily, poland, hungary, }
    recruit_pool "Dismounted Knights of Santiago" 0 0.2 0.999 0 requires factions { spain, portugal, }

    recruit_pool "Order Militia" 0 0.2 0.999 0 requires factions { hre, }
    recruit_pool "Knechten" 0 0.2 0.999 0 requires factions { hre, }
    recruit_pool "Christ Knights" 0 0.2 0.999 0 requires factions { hre, }
    recruit_pool "Clergymen" 0 0.2 0.999 0 requires factions { hre, }

    recruit_pool "Order Spearmen" 0 0.2 0.999 0 requires factions { hre, }
    recruit_pool "Merc Prussian Archers" 0 0.2 0.999 0 requires factions { hre, }

    recruit_pool "Sword Brethren" 0 0.2 0.999 0 requires factions { hre, }
    recruit_pool "Halbbruder" 0 0.2 0.999 0 requires factions { hre, }
    recruit_pool "Dismounted Halbbruder" 0 0.2 0.999 0 requires factions { hre, }
    recruit_pool "Burgher Pikemen" 0 0.2 0.999 0 requires factions { hre, }
    recruit_pool "Ritterbruder" 0 0.2 0.999 0 requires factions { hre, }
    recruit_pool "Dismounted Ritterbruder" 0 0.2 0.999 0 requires factions { hre, }
    recruit_pool "Livonian Auxiliaries" 0 0.2 0.999 0 requires factions { hre, }

    recruit_pool "Teutonic Order Hochmeister" 0 0.2 0.999 0 requires factions { hre, }

    ;merchant guild special

    recruit_pool "Patricians Company Men at Arms" 0 0.2 0.999 0 requires factions { northern_european, eastern_european, southern_european, greek, middle_eastern, }
    recruit_pool "Silk Road Guards" 0 0.2 0.999 0 requires factions { northern_european, eastern_european, southern_european, greek, middle_eastern, }


    }
    material wooden
    construction 1
    cost 800
    settlement_min city
    upgrades
    {
    }
    }
    }
    plugins
    {
    }
    }

    building great_supply
    {
    levels great_supply
    {
    great_supply requires factions { northern_european, eastern_european, southern_european, greek, middle_eastern, }
    {

    capability
    {

    ;outremer

    recruit_pool "Franciscans" 0 0.2 0.999 0 requires factions { england, scotland, ireland, france, hre, denmark, norway, spain, portugal, milan, venice, papal_states, sicily, hungary, poland, }

    recruit_pool "Dismounted Knights Of Jerusalem" 0 0.2 0.999 0 requires factions { england, scotland, ireland, france, hre, denmark, norway, spain, portugal, milan, venice, papal_states, sicily, hungary, poland, }
    recruit_pool "Knights of Jerusalem" 0 0.2 0.999 0 requires factions { england, scotland, ireland, france, hre, denmark, norway, spain, portugal, milan, venice, papal_states, sicily, hungary, poland, }

    recruit_pool "Antioch Militia" 0 0.2 0.999 0 requires factions { england, scotland, ireland, france, hre, denmark, norway, spain, portugal, milan, venice, papal_states, sicily, hungary, poland, }
    recruit_pool "Knights of Antioch" 0 0.2 0.999 0 requires factions { england, scotland, ireland, france, hre, denmark, norway, spain, portugal, milan, venice, papal_states, sicily, hungary, poland, }
    recruit_pool "Dismounted Knights of Antioch" 0 0.2 0.999 0 requires factions { england, scotland, ireland, france, hre, denmark, norway, spain, portugal, milan, venice, papal_states, sicily, hungary, poland, }

    recruit_pool "Edessan Squires" 0 0.2 0.999 0 requires factions { england, scotland, ireland, france, hre, denmark, norway, spain, portugal, milan, venice, papal_states, sicily, hungary, poland, }
    recruit_pool "Knights of Edessa" 0 0.2 0.999 0 requires factions { england, scotland, ireland, france, hre, denmark, norway, spain, portugal, milan, venice, papal_states, sicily, hungary, poland, }
    recruit_pool "Edessan Guard" 0 0.2 0.999 0 requires factions { england, scotland, ireland, france, hre, denmark, norway, spain, portugal, milan, venice, papal_states, sicily, hungary, poland, }

    recruit_pool "Tripolitan Squires" 0 0.2 0.999 0 requires factions { england, scotland, ireland, france, hre, denmark, norway, spain, portugal, milan, venice, papal_states, sicily, hungary, poland, }
    recruit_pool "Knights of Tripoli" 0 0.2 0.999 0 requires factions { england, scotland, ireland, france, hre, denmark, norway, spain, portugal, milan, venice, papal_states, sicily, hungary, poland, }

    recruit_pool "Syrian Militia" 0 0.2 0.999 0 requires factions { england, scotland, ireland, france, hre, denmark, norway, spain, portugal, milan, venice, papal_states, sicily, hungary, poland, }

    recruit_pool "Pisan and Geonese sailors" 0 0.2 0.999 0 requires factions { england, scotland, ireland, france, hre, denmark, norway, spain, portugal, milan, venice, papal_states, sicily, hungary, poland, }

    recruit_pool "Sodeer Archers" 1 0.2 0.999 0 requires factions { england, scotland, ireland, france, hre, denmark, norway, spain, portugal, milan, venice, papal_states, sicily, hungary, poland, }
    recruit_pool "Frankish Swordsmen" 1 0.2 0.999 0 requires factions { england, scotland, ireland, france, hre, denmark, norway, spain, portugal, milan, venice, papal_states, sicily, hungary, poland, }
    recruit_pool "Frankish Axemen" 1 0.2 0.999 0 requires factions { england, scotland, ireland, france, hre, denmark, norway, spain, portugal, milan, venice, papal_states, sicily, hungary, poland, }
    recruit_pool "Seljuk Auxiliary" 1 0.2 0.999 0 requires factions { england, scotland, ireland, france, hre, denmark, norway, spain, portugal, milan, venice, papal_states, sicily, hungary, poland, }

    recruit_pool "Armenians of Celicia" 0 0.2 0.999 0 requires factions { england, scotland, ireland, france, hre, denmark, norway, spain, portugal, milan, venice, papal_states, sicily, hungary, poland, }
    recruit_pool "Maronites of Lebanon" 0 0.2 0.999 0 requires factions { england, scotland, ireland, france, hre, denmark, norway, spain, portugal, milan, venice, papal_states, sicily, hungary, poland, }

    recruit_pool "Constable of Jerusalem" 0 0.2 0.999 0 requires factions { england, scotland, ireland, france, hre, denmark, norway, spain, portugal, milan, venice, papal_states, sicily, hungary, poland, }
    recruit_pool "Constable of Antioch" 0 0.2 0.999 0 requires factions { england, scotland, ireland, france, hre, denmark, norway, spain, portugal, milan, venice, papal_states, sicily, hungary, poland, }
    recruit_pool "Constable of Edessa" 0 0.2 0.999 0 requires factions { england, scotland, ireland, france, hre, denmark, norway, spain, portugal, milan, venice, papal_states, sicily, hungary, poland, }
    recruit_pool "Constable of Tripoli" 0 0.2 0.999 0 requires factions { england, scotland, ireland, france, hre, denmark, norway, spain, portugal, milan, venice, papal_states, sicily, hungary, poland, }

    recruit_pool "Canons of the Holy Sepulcher" 0 0.2 0.999 0 requires factions { england, scotland, ireland, france, hre, denmark, norway, spain, portugal, milan, venice, papal_states, sicily, hungary, poland, }

    recruit_pool "Jerusalem Sergeant" 0 0.2 0.999 0 requires factions { england, scotland, ireland, france, hre, denmark, norway, spain, portugal, milan, venice, papal_states, sicily, hungary, poland, }
    recruit_pool "Confratres of the Holy Sepulcher" 0 0.2 0.999 0 requires factions { england, scotland, ireland, france, hre, denmark, norway, spain, portugal, milan, venice, papal_states, sicily, hungary, poland, }
    recruit_pool "Canons Regular of the Holy Sepulcher" 0 0.2 0.999 0 requires factions { england, scotland, ireland, france, hre, denmark, norway, spain, portugal, milan, venice, papal_states, sicily, hungary, poland, }

    recruit_pool "Knights Lazarus" 0 0.2 0.999 0 requires factions { england, scotland, ireland, france, hre, denmark, norway, spain, portugal, milan, venice, papal_states, sicily, hungary, poland, }
    recruit_pool "Dismounted Knights Lazarus" 0 0.2 0.999 0 requires factions { england, scotland, ireland, france, hre, denmark, norway, spain, portugal, milan, venice, papal_states, sicily, hungary, poland, }

    recruit_pool "Great Cross" 0 0.2 0.999 0 requires factions { england, scotland, ireland, france, hre, denmark, norway, spain, portugal, milan, venice, papal_states, sicily, hungary, poland, }

    ;new world units

    ;recruit_pool "Conquistadores" 0 0.2 0.999 0 requires factions { spain, portugal, }
    ;recruit_pool "Dismounted Conquistadores" 0 0.2 0.999 0 requires factions { spain, portugal, }

    ;recruit_pool "Mounted Cuirassers" 0 0.2 0.999 0 requires factions { england, france, }
    ;recruit_pool "New World Cuirassers" 0 0.2 0.999 0 requires factions { england, france, }



    }
    material wooden
    construction 1
    cost 800
    settlement_min city
    upgrades
    {
    }
    }
    }
    plugins
    {
    }
    }


    There is no mistake I could see in the code itself, but I may have another clue.

    My theory is that there are 32 possible "capabilities" for recruitment (by faction) and 32 possible "capabilities" of replenishment (by faction). Because as I counted the replenishment "units" I stumbled upon a correlation. There are 29 unit England can replenish through the "Supply Building" if I add now the entries from the "Great Supply Building" (where all units are recruitable by England) the game crashes at first turn, except when I comment out every unit except 3, which brings me to the 32 replenishment units in one building.

    My mod does not have any replenishmet entries in other buildings, those in the Supply Buildings are the only ones.

    I think when the ai builds a building, that exceeds the 32 replenishment limit, the game crashes (hence the crash at first turn end, when I had all entries in one building) and in a later, when I splitted the buildings in supply and great supply, the game crashed, when both buildings are supposedly built by the ai (which complete replenishmet unit count will then exceed 32; I will have to confirm this, but it seems logical).

    And it seems I just now ran into the problem, because beforehand the holyland units and the welsh units where regionaly bound and could only be replenished in a confined area.

    If all above is the case I will have to give up my goal of replenishing every special unit everywhere.
    I think this sound about right, what do you think?
    Proudly under the patronage of King Athelstan of the Imperial House of Hader

    Author of
    Total Vanilla Beyond mod for Medieval 2 - Kingdoms &
    Developer of
    Total Bananas mod for Medieval 2 - Kingdoms (beta)

    Steam Workshop Mods for Rome 2, Warhammer, Warhammer 2

    Discord: zumi's cookie corner
    Fighting for launch of "Cookie Friday" and "No Pants Saturday"

  4. #4
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: Problem with EDB related CTD and available units for recruitment per building

    If all above is the case I will have to give up my goal of replenishing every special unit everywhere.
    Maybe you could make one building per faction, giving replenishment only to that faction's units. Would that avoid the problem? Script could auto-destroy the building when it is captured by another faction.

    Or perhaps one building per culture, if that doesn't still mean too many units per building.

  5. #5
    4zumi's Avatar This one sparks joy
    Join Date
    Feb 2015
    Location
    HRE - Aquis Mattiacis
    Posts
    1,231

    Default Re: Problem with EDB related CTD and available units for recruitment per building

    I think as far as I understood the bug, it will affect all crusading factions, because with the "holyland units" in the "great supply" building all of these factions will get over the 32 unit count.
    And it seems not to matter if they are in different buildings or not, it seems like it's a unit limit settlement count for each faction.

    So a autodestroy script or something like this would not prevent this, if there are to many units for some factions (most likely crusader) in the first place.
    But thanks for the suggestion.

    And I will have to do some testing. I just would have thought that I wasn't the only one experiencing this problem.

    I remember from my modding beginning, that I tried to make every unit from every faction replenishable everywhere with a supply building and it gave me a CTD, until I cut down the unit count. I think this was the same bug I forgot about, until now.
    Last edited by 4zumi; October 18, 2017 at 05:05 AM.
    Proudly under the patronage of King Athelstan of the Imperial House of Hader

    Author of
    Total Vanilla Beyond mod for Medieval 2 - Kingdoms &
    Developer of
    Total Bananas mod for Medieval 2 - Kingdoms (beta)

    Steam Workshop Mods for Rome 2, Warhammer, Warhammer 2

    Discord: zumi's cookie corner
    Fighting for launch of "Cookie Friday" and "No Pants Saturday"

  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: Problem with EDB related CTD and available units for recruitment per building

    Just for comparison - this is a building in EBII:

    Code:
            civlib requires factions { f_rome, } and not building_present govallied and hidden_resource achaenleague or hidden_resource anatolian or hidden_resource deuteroi or hidden_resource eastern or hidden_resource gallic or hidden_resource horde_target or hidden_resource hr_island or hidden_resource iberia or hidden_resource illyria or hidden_resource libya or hidden_resource numidia or hidden_resource punic
            {
                capability ;; 10 of instant recruitment, but with very slow refresh
                {
                    ;;; PATAVA
                    recruit_pool "celtic cavalry leuce epos"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource liburnes and hidden_resource horde_target ; Cisalpine cavalry
                    recruit_pool "italic infantry etruscan"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource liburnes and hidden_resource horde_target
                    recruit_pool "italic infantry histro venetic"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource liburnes and hidden_resource horde_target
                    recruit_pool "italic infantry umbro picenian"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource liburnes and hidden_resource horde_target
                    recruit_pool "celtic infantry iaosatae"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource liburnes and hidden_resource horde_target
                    ;;; FELSINA
                    recruit_pool "celtic cavalry leuce epos"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource liburnes and hidden_resource celtic ; Cisalpine cavalry
                    recruit_pool "italic infantry etruscan"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource liburnes and hidden_resource celtic
                    recruit_pool "celtic infantry bataroas"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource liburnes and hidden_resource celtic ; Cisalpine infantry
                    recruit_pool "celtic infantry uassoi"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource liburnes and hidden_resource celtic
                    recruit_pool "celtic infantry koxsalotoi"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource liburnes and hidden_resource celtic
                    recruit_pool "celtic infantry iaosatae"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource liburnes and hidden_resource celtic and event_counter ecCelticRiders 1 or event_counter ecCelticTwilight 1
                    ;;; LIGURIA - placeholder pool until Ligurian units are complete
                    recruit_pool "celtic cavalry leuce epos"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource gallic and not hidden_resource celtic and not hidden_resource briton  ; Cisalpine
                    recruit_pool "italic infantry etruscan"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource gallic and not hidden_resource celtic and not hidden_resource briton
                    recruit_pool "ligurian infantry swordsmen"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource gallic and not hidden_resource celtic and not hidden_resource briton
                    recruit_pool "ligurian infantry spearmen"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource gallic and not hidden_resource celtic and not hidden_resource briton
                    recruit_pool "iberian infantry balearic slingers"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource gallic and not hidden_resource celtic and not hidden_resource briton
                    ;;; GALLIC
                    recruit_pool "celtic cavalry leuce epos"  2  0.01  2  0  requires factions { f_rome, } and not event_counter ecCelticRiders 1 and not event_counter ecCelticTwilight 1 and not hidden_resource greek2 and hidden_resource celtic and hidden_resource gallic and not hidden_resource eastcelt
                    recruit_pool "celtic cavalry donno eporedoi"  1  0.01  1  0  requires factions { f_rome, } and not hidden_resource greek2 and hidden_resource celtic and hidden_resource gallic and not hidden_resource eastcelt and event_counter ecCelticRiders 1 or event_counter ecCelticTwilight 1
                    recruit_pool "celtic cavalry leuce epos"  1  0.01  1  0  requires factions { f_rome, } and not hidden_resource greek2 and hidden_resource celtic and hidden_resource gallic and not hidden_resource eastcelt and event_counter ecCelticRiders 1 or event_counter ecCelticTwilight 1
                    recruit_pool "celtic infantry bataroas"  1  0.01  1  0  requires factions { f_rome, } and not hidden_resource greek2 and hidden_resource celtic and hidden_resource gallic and not hidden_resource eastcelt
                    recruit_pool "celtic infantry botroas"  1  0.01  1  0  requires factions { f_rome, } and not hidden_resource greek2 and hidden_resource celtic and hidden_resource gallic and not hidden_resource eastcelt
                    recruit_pool "celtic infantry gaeroas"  2  0.01  2  0  requires factions { f_rome, } and not hidden_resource greek2 and hidden_resource celtic and hidden_resource gallic and not hidden_resource eastcelt
                    recruit_pool "celtic infantry uassoi"  2  0.01  2  0  requires factions { f_rome, } and not hidden_resource greek2 and hidden_resource celtic and hidden_resource gallic and not hidden_resource eastcelt
                    recruit_pool "celtic infantry koxsalotoi"  2  0.01  2  0  requires factions { f_rome, } and not hidden_resource greek2 and hidden_resource celtic and hidden_resource gallic and not hidden_resource eastcelt and not event_counter ecCelticRiders 1 and not event_counter ecCelticTwilight 1
                    recruit_pool "celtic infantry koxsalotoi"  1  0.01  1  0  requires factions { f_rome, } and not hidden_resource greek2 and hidden_resource celtic and hidden_resource gallic and not hidden_resource eastcelt and event_counter ecCelticRiders 1 or event_counter ecCelticTwilight 1
                    recruit_pool "celtic infantry iaosatae"  1  0.01  1  0  requires factions { f_rome, } and not hidden_resource greek2 and hidden_resource celtic and hidden_resource gallic and not hidden_resource eastcelt and event_counter ecCelticRiders 1 or event_counter ecCelticTwilight 1
                    ;;; MASSALIA
                    recruit_pool "celtic cavalry leuce epos"  2  0.01  2  0  requires factions { f_rome, } and not event_counter ecCelticRiders 1 and not event_counter ecCelticTwilight 1 and hidden_resource greek2 and hidden_resource celtic
                    recruit_pool "celtic cavalry donno eporedoi"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource greek2 and hidden_resource celtic and event_counter ecCelticRiders 1 or event_counter ecCelticTwilight 1
                    recruit_pool "celtic cavalry leuce epos"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource greek2 and hidden_resource celtic and event_counter ecCelticRiders 1 or event_counter ecCelticTwilight 1
                    recruit_pool "celtic infantry bataroas"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource greek2 and hidden_resource celtic
                    recruit_pool "hellenistic infantry hoplitai"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource greek2 and hidden_resource celtic
                    recruit_pool "hellenistic infantry hoplitai haploi"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource greek2 and hidden_resource celtic
                    recruit_pool "hellenistic infantry hemithorakitai"  1  0.01  1  0  requires factions { f_rome, } and not event_counter ecThorakitaiReform 1 and hidden_resource greek2 and hidden_resource celtic
                    recruit_pool "hellenistic infantry thureophoroi"  1  0.01  1  0  requires factions { f_rome, } and event_counter ecThorakitaiReform 1 and hidden_resource greek2 and hidden_resource celtic
                    recruit_pool "hellenistic infantry akontistai"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource greek2 and hidden_resource iberia or hidden_resource celtic
                    recruit_pool "celtic infantry koxsalotoi"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource greek2 and hidden_resource celtic and not event_counter ecCelticRiders 1 and not event_counter ecCelticTwilight 1
                    recruit_pool "celtic infantry koxsalotoi"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource greek2 and hidden_resource celtic and event_counter ecCelticRiders 1 or event_counter ecCelticTwilight 1
                    recruit_pool "celtic infantry iaosatae"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource greek2 and hidden_resource celtic and event_counter ecCelticRiders 1 or event_counter ecCelticTwilight 1
                    ;;; ALPINE CELTIC
                    recruit_pool "celtic cavalry leuce epos"  2  0.01  2  0  requires factions { f_rome, } and not event_counter ecCelticRiders 1 and not event_counter ecCelticTwilight 1 and hidden_resource celtic and hidden_resource gallic and hidden_resource eastcelt
                    recruit_pool "celtic cavalry boii elite"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource celtic and hidden_resource gallic and hidden_resource eastcelt and event_counter ecCelticRiders 1 or event_counter ecCelticTwilight 1
                    recruit_pool "celtic cavalry leuce epos"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource celtic and hidden_resource gallic and hidden_resource eastcelt and event_counter ecCelticRiders 1 or event_counter ecCelticTwilight 1
                    recruit_pool "celtic infantry bataroas"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource celtic and hidden_resource gallic and hidden_resource eastcelt
                    recruit_pool "celtic infantry uextias"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource celtic and hidden_resource gallic and hidden_resource eastcelt
                    recruit_pool "celtic infantry gaeroas"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource celtic and hidden_resource gallic and hidden_resource eastcelt
                    recruit_pool "celtic infantry uassoi"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource celtic and hidden_resource gallic and hidden_resource eastcelt
                    recruit_pool "celtic infantry koxsalotoi"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource celtic and hidden_resource gallic and hidden_resource eastcelt and not event_counter ecCelticRiders 1 and not event_counter ecCelticTwilight 1
                    recruit_pool "celtic infantry koxsalotoi"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource celtic and hidden_resource gallic and hidden_resource eastcelt and event_counter ecCelticRiders 1 or event_counter ecCelticTwilight 1
                    recruit_pool "celtic infantry iaosatae"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource celtic and hidden_resource gallic and hidden_resource eastcelt and event_counter ecCelticRiders 1 or event_counter ecCelticTwilight 1
                    ;;; PANNONIA/ETUNORIKOI
                    recruit_pool "celtic cavalry eponados"  2  0.01  2  0  requires factions { f_rome, } and not event_counter ecCelticRiders 1 and not event_counter ecCelticTwilight 1 and hidden_resource celtic and hidden_resource eastcelt and hidden_resource horde_target
                    recruit_pool "celtic cavalry boii elite"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource celtic and hidden_resource eastcelt and hidden_resource horde_target and event_counter ecCelticRiders 1 or event_counter ecCelticTwilight 1
                    recruit_pool "celtic cavalry eponados"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource celtic and hidden_resource eastcelt and hidden_resource horde_target and event_counter ecCelticRiders 1 or event_counter ecCelticTwilight 1
                    recruit_pool "celtic infantry bataroas"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource celtic and hidden_resource eastcelt and hidden_resource horde_target
                    recruit_pool "celtic infantry uextias"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource celtic and hidden_resource eastcelt and hidden_resource horde_target
                    recruit_pool "celtic infantry gaeroas"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource celtic and hidden_resource eastcelt and hidden_resource horde_target
                    recruit_pool "celtic infantry uassoi"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource celtic and hidden_resource eastcelt and hidden_resource horde_target
                    recruit_pool "celtic infantry koxsalotoi"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource celtic and hidden_resource eastcelt and hidden_resource horde_target and not event_counter ecCelticRiders 1 and not event_counter ecCelticTwilight 1
                    recruit_pool "celtic infantry koxsalotoi"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource celtic and hidden_resource eastcelt and hidden_resource horde_target and event_counter ecCelticRiders 1 or event_counter ecCelticTwilight 1
                    recruit_pool "celtic infantry iaosatae"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource celtic and hidden_resource eastcelt and hidden_resource horde_target and event_counter ecCelticRiders 1 or event_counter ecCelticTwilight 1
                    ;;; IBERIA
                    recruit_pool "iberian cavalry caetratii"  2  0.01  2  0  requires factions { f_rome, } and not event_counter ecScutariiEra 1 and not hidden_resource greek2 and not hidden_resource hr_c and hidden_resource iberia
                    recruit_pool "iberian cavalry scutarii"  1  0.01  1  0  requires factions { f_rome, } and event_counter ecScutariiEra 1 and not hidden_resource greek2 and not hidden_resource hr_c and hidden_resource iberia
                    recruit_pool "iberian cavalry caetratii"  1  0.01  1  0  requires factions { f_rome, } and event_counter ecScutariiEra 1 and not hidden_resource greek2 and not hidden_resource hr_c and hidden_resource iberia
                    recruit_pool "iberian infantry caetratii"  2  0.01  2  0  requires factions { f_rome, } and not hidden_resource greek2 and not hidden_resource hr_c and hidden_resource iberia and not event_counter ecScutariiEra 1
                    recruit_pool "iberian infantry caetratii"  1  0.01  1  0  requires factions { f_rome, } and not hidden_resource greek2 and not hidden_resource hr_c and hidden_resource iberia and event_counter ecScutariiEra 1
                    recruit_pool "iberian infantry scutarii swordsman"  1  0.01  1  0  requires factions { f_rome, } and not hidden_resource greek2 and not hidden_resource hr_c and hidden_resource iberia and event_counter ecScutariiEra 1
                    recruit_pool "iberian infantry caetratii spearmen"  2  0.01  2  0  requires factions { f_rome, } and not hidden_resource greek2 and not hidden_resource hr_c and hidden_resource iberia and not event_counter ecScutariiEra 1
                    recruit_pool "iberian infantry caetratii spearmen"  1  0.01  1  0  requires factions { f_rome, } and not hidden_resource greek2 and not hidden_resource hr_c and hidden_resource iberia and event_counter ecScutariiEra 1
                    recruit_pool "iberian infantry scutarii spearman"  1  0.01  1  0  requires factions { f_rome, } and not hidden_resource greek2 and not hidden_resource hr_c and hidden_resource iberia and event_counter ecScutariiEra 1
                    recruit_pool "celtiberian infantry gaesamica"  2  0.01  2  0  requires factions { f_rome, } and not hidden_resource greek2 and not hidden_resource hr_c and hidden_resource iberia
                    recruit_pool "iberian infantry iovamann"  1  0.01  1  0  requires factions { f_rome, } and not hidden_resource greek2 and not hidden_resource hr_c and hidden_resource iberia
                    recruit_pool "iberian infantry shepherd slinger"  1  0.01  1  0  requires factions { f_rome, } and not hidden_resource greek2 and not hidden_resource hr_c and hidden_resource iberia
                    ;;; EMPORION
                    recruit_pool "iberian cavalry caetratii"  2  0.01  2  0  requires factions { f_rome, } and not event_counter ecScutariiEra 1 and hidden_resource greek2 and hidden_resource iberia
                    recruit_pool "iberian cavalry scutarii"  1  0.01  1  0  requires factions { f_rome, } and event_counter ecScutariiEra 1 and hidden_resource greek2 and hidden_resource iberia
                    recruit_pool "iberian cavalry caetratii"  1  0.01  1  0  requires factions { f_rome, } and event_counter ecScutariiEra 1 and hidden_resource greek2 and hidden_resource iberia
                    recruit_pool "iberian infantry caetratii"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource greek2 and hidden_resource iberia
                    recruit_pool "hellenistic infantry hoplitai"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource greek2 and hidden_resource iberia
                    recruit_pool "hellenistic infantry hoplitai haploi"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource greek2 and hidden_resource iberia
                    recruit_pool "hellenistic infantry hemithorakitai"  1  0.01  1  0  requires factions { f_rome, } and not event_counter ecThorakitaiReform 1 and hidden_resource greek2 and hidden_resource iberia
                    recruit_pool "hellenistic infantry thureophoroi"  1  0.01  1  0  requires factions { f_rome, } and event_counter ecThorakitaiReform 1 and hidden_resource greek2 and hidden_resource iberia
                    recruit_pool "hellenistic infantry akontistai"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource greek2 and hidden_resource iberia
                    recruit_pool "iberian infantry iovamann"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource greek2 and hidden_resource iberia
                    recruit_pool "iberian infantry shepherd slinger"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource greek2 and hidden_resource iberia
                    ;;; BALEARES
                    recruit_pool "carthaginian cavalry liby phoenician"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource iberia and hidden_resource hr_c
                    recruit_pool "carthaginian infantry liby phoenician"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource iberia and hidden_resource hr_c
                    recruit_pool "iberian infantry caetratii"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource iberia and hidden_resource hr_c
                    recruit_pool "celtiberian infantry gaesamica"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource iberia and hidden_resource hr_c
                    recruit_pool "iberian infantry balearic slingers"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource iberia and hidden_resource hr_c
                    ;;; KORSIM
                    recruit_pool "italic infantry etruscan"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource hr_island and hidden_resource hr_f and hidden_resource hr_h
                    recruit_pool "ligurian infantry spearmen"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource hr_island and hidden_resource hr_f and hidden_resource hr_h
                    recruit_pool "roman infantry leves"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource hr_island and hidden_resource hr_f and hidden_resource hr_h
                    recruit_pool "iberian infantry balearic slingers"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource hr_island and hidden_resource hr_f and hidden_resource hr_h ; Ligurians
                    ;;; SHARDIN - add Shardana when done
                    recruit_pool "carthaginian cavalry liby phoenician"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource hr_island and hidden_resource hr_f and hidden_resource hr_i and not hidden_resource greek2
                    recruit_pool "carthaginian infantry liby phoenician"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource hr_island and hidden_resource hr_f and hidden_resource hr_i and not hidden_resource greek2
                    recruit_pool "roman infantry leves"  3  0.01 3  0  requires factions { f_rome, } and hidden_resource hr_island and hidden_resource hr_f and hidden_resource hr_i and not hidden_resource greek2
                    recruit_pool "iberian infantry balearic slingers"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource hr_island and hidden_resource hr_f and hidden_resource hr_i and not hidden_resource greek2 ; Ligurians
                    ;;; EASTERN SICILY
                    recruit_pool "hellenistic cavalry xystophoroi"  1  0.01  1  0  requires factions { f_rome, } and not event_counter ecThorakitaiReform 1 and hidden_resource hr_island and hidden_resource hr_a and hidden_resource greek1
                    recruit_pool "hellenistic cavalry aspidiotai hippeis"  1  0.01  1  0  requires factions { f_rome, } and event_counter ecThorakitaiReform 1 and hidden_resource hr_island and hidden_resource hr_a and hidden_resource greek1
                    recruit_pool "hellenistic cavalry hippakontistai"  2  0.01  2  0  requires factions { f_rome, } and not event_counter ecThorakitaiReform 1 and hidden_resource hr_island and hidden_resource hr_a and hidden_resource greek1
                    recruit_pool "hellenistic cavalry thureopherontes hippeis"  2  0.01  2  0  requires factions { f_rome, } and event_counter ecThorakitaiReform 1 and hidden_resource hr_island and hidden_resource hr_a and hidden_resource greek1
                    recruit_pool "italic infantry hustatus"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource hr_island and hidden_resource hr_a and hidden_resource greek1 and not hidden_resource royal_core
                    recruit_pool "hellenistic infantry hoplitai"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource hr_island and hidden_resource royal_core
                    recruit_pool "hellenistic infantry hoplitai haploi"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource hr_island and hidden_resource hr_a and hidden_resource greek1
                    recruit_pool "hellenistic infantry hemithorakitai"  1  0.01  1  0  requires factions { f_rome, } and not event_counter ecThorakitaiReform 1 and hidden_resource hr_island and hidden_resource hr_a and hidden_resource greek1
                    recruit_pool "hellenistic infantry thureophoroi"  1  0.01  1  0  requires factions { f_rome, } and event_counter ecThorakitaiReform 1 and hidden_resource hr_island and hidden_resource hr_a and hidden_resource greek1
                    recruit_pool "hellenistic infantry akontistai"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource hr_island and hidden_resource hr_a and hidden_resource greek1
                    recruit_pool "hellenistic infantry toxotai"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource hr_island and hidden_resource hr_a and hidden_resource greek1
                    recruit_pool "hellenistic infantry sphendonitai"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource hr_island and hidden_resource hr_a and hidden_resource greek1
                    ;;; WESTERN SICILY
                    recruit_pool "hellenistic cavalry hippakontistai"  2  0.01  2  0  requires factions { f_rome, } and not event_counter ecThorakitaiReform 1 and hidden_resource hr_island and hidden_resource punic
                    recruit_pool "hellenistic cavalry thureopherontes hippeis"  2  0.01  2  0  requires factions { f_rome, } and event_counter ecThorakitaiReform 1 and hidden_resource hr_island and hidden_resource punic
                    recruit_pool "carthaginian infantry liby phoenician"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource hr_island and hidden_resource punic
                    recruit_pool "hellenistic infantry hoplitai mercenary"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource hr_island and hidden_resource punic
                    recruit_pool "hellenistic infantry hoplitai haploi"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource hr_island and hidden_resource punic
                    recruit_pool "hellenistic infantry hemithorakitai"  1  0.01  1  0  requires factions { f_rome, } and not event_counter ecThorakitaiReform 1 and hidden_resource hr_island and hidden_resource punic
                    recruit_pool "hellenistic infantry thureophoroi"  1  0.01  1  0  requires factions { f_rome, } and event_counter ecThorakitaiReform 1 and hidden_resource hr_island and hidden_resource punic
                    recruit_pool "hellenistic infantry akontistai"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource hr_island and hidden_resource punic
                    recruit_pool "hellenistic infantry toxotai"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource hr_island and hidden_resource punic
                    recruit_pool "hellenistic infantry sphendonitai"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource hr_island and hidden_resource punic
                    ;;; PUNIC
                    recruit_pool "african cavalry libyan"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource punic and hidden_resource hr_d
                    recruit_pool "carthaginian infantry liby phoenician"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource punic and hidden_resource hr_d
                    recruit_pool "carthaginian infantry libyan swordsmen"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource punic and hidden_resource hr_d and event_counter ecCarthage_Reform 1
                    recruit_pool "carthaginian infantry libyan"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource punic and hidden_resource hr_d and not event_counter ecCarthage_Reform 1
                    recruit_pool "carthaginian infantry libyan"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource punic and hidden_resource hr_d and event_counter ecCarthage_Reform 1
                    recruit_pool "carthaginian infantry libyan late"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource punic and hidden_resource hr_d and event_counter ecCarthage_Reform 1
                    recruit_pool "carthaginian infantry libyan lonchophoroi"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource punic and hidden_resource hr_d
                    recruit_pool "numidian infantry archers"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource punic and hidden_resource hr_d
                    recruit_pool "african infantry slingers"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource punic and hidden_resource hr_d
                    ;;; LIBYA
                    recruit_pool "african cavalry libyan"  3  0.01  3  0  requires factions { f_rome, } and hidden_resource libya and hidden_resource hr_j
                    recruit_pool "african cavalry garamantes"  3  0.01  3  0  requires factions { f_rome, } and hidden_resource libya and hidden_resource hr_g and not hidden_resource egypt and not hidden_resource hr_j
                    recruit_pool "african infantry garamantes"  4  0.01  4  0  requires factions { f_rome, } and hidden_resource libya and hidden_resource hr_g and not hidden_resource egypt and not hidden_resource hr_j
                    recruit_pool "carthaginian infantry libyan lonchophoroi"  4  0.01  4  0  requires factions { f_rome, } and hidden_resource libya and hidden_resource hr_j or hidden_resource hr_h
                    recruit_pool "african infantry slingers"  3  0.01  3  0  requires factions { f_rome, } and not hidden_resource egypt and not hidden_resource greek1 and hidden_resource libya
                    ;;; KYRENE
                    recruit_pool "african cavalry libyan"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource libya and hidden_resource greek1
                    recruit_pool "hellenistic infantry hoplitai"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource libya and hidden_resource greek1 and not event_counter ecThorakitaiReform 1
                    recruit_pool "hellenistic infantry hoplitai"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource libya and hidden_resource greek1 and event_counter ecThorakitaiReform 1
                    recruit_pool "hellenistic infantry hoplitai haploi"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource libya and hidden_resource greek1 and not event_counter ecThorakitaiReform 1
                    recruit_pool "hellenistic infantry hoplitai haploi"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource libya and hidden_resource greek1 and event_counter ecThorakitaiReform 1
                    recruit_pool "hellenistic infantry hemithorakitai"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource libya and hidden_resource greek1 and not event_counter ecThureosReform 1
                    recruit_pool "hellenistic infantry thureophoroi"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource libya and hidden_resource greek1 and event_counter ecThureosReform 1 and not event_counter ecThorakitaiReform 1
                    recruit_pool "hellenistic infantry thureophoroi"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource libya and hidden_resource greek1 and event_counter ecThorakitaiReform 1
                    recruit_pool "carthaginian infantry libyan lonchophoroi"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource libya and hidden_resource greek1
                    recruit_pool "african infantry slingers"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource libya and hidden_resource greek1
                    ;;; NUMIDIA
                    recruit_pool "numidian cavalry nobles"  1  0.01  1  0  requires factions { f_rome, } and not hidden_resource hr_f and hidden_resource numidia
                    recruit_pool "numidian cavalry skirmishers"  2  0.01  2  0  requires factions { f_rome, } and not hidden_resource hr_f and hidden_resource numidia
                    recruit_pool "numidian infantry picked"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource hr_f and hidden_resource numidia and event_counter ecThureosReform 1 and not event_counter ecThorakitaiReform 1
                    recruit_pool "numidian infantry late"  2  0.01  2  0  requires factions { f_rome, } and not hidden_resource hr_f and hidden_resource numidia and not hidden_resource hr_j and event_counter ecThorakitaiReform 1
                    recruit_pool "numidian infantry skirmishers"  2  0.01  2  0  requires factions { f_rome, } and not hidden_resource hr_f and hidden_resource numidia
                    recruit_pool "numidian infantry archers"  2  0.01  2  0  requires factions { f_rome, } and not hidden_resource hr_f and hidden_resource numidia
                    recruit_pool "african infantry slingers"  1  0.01  1  0  requires factions { f_rome, } and not hidden_resource hr_f and hidden_resource numidia
                    ;;; MAURETANIA
                    recruit_pool "numidian cavalry nobles"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource hr_f and hidden_resource numidia
                    recruit_pool "african cavalry maures"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource hr_f and hidden_resource numidia
                    recruit_pool "numidian infantry picked"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource hr_f and hidden_resource numidia and event_counter ecThureosReform 1
                    recruit_pool "african infantry maures"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource hr_f and hidden_resource numidia
                    recruit_pool "numidian infantry skirmishers"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource hr_f and hidden_resource numidia
                    recruit_pool "african infantry slingers"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource hr_f and hidden_resource numidia
                    ;;; ILLYRIA
                    recruit_pool "illyrian cavalry hippeis"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource illyria and hidden_resource liburnes and not hidden_resource greek2
                    recruit_pool "illyrian infantry thorakitai"  1  0.01  1  0  requires factions { f_rome, } and event_counter ecThureosReform 1 and hidden_resource illyria and hidden_resource liburnes and hidden_resource hr_j  ;; Skodra only
                    recruit_pool "illyrian infantry peltophoroi"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource illyria and hidden_resource liburnes and not hidden_resource greek2
                    recruit_pool "illyrian infantry hoplitai"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource illyria and hidden_resource liburnes and not hidden_resource greek2 and not event_counter ecThureosReform 1
                    recruit_pool "illyrian infantry hoplitai"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource illyria and hidden_resource liburnes and not hidden_resource greek2 and event_counter ecThureosReform 1
                    recruit_pool "illyrian infantry thureophoroi"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource illyria and hidden_resource liburnes and not hidden_resource greek2 and not event_counter ecThureosReform 1
                    recruit_pool "illyrian infantry thureophoroi"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource illyria and hidden_resource liburnes and not hidden_resource greek2 and event_counter ecThureosReform 1
                    recruit_pool "illyrian infantry peltastai"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource illyria and hidden_resource liburnes and not hidden_resource greek2
                    recruit_pool "hellenistic infantry sphendonitai"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource illyria and hidden_resource liburnes and not hidden_resource greek2
                    ;;; EPIDAMNOS
                    recruit_pool "illyrian cavalry hippeis"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource illyria and hidden_resource greek2
                    recruit_pool "illyrian infantry peltophoroi"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource illyria and hidden_resource greek2
                    recruit_pool "hellenistic infantry hoplitai"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource illyria and hidden_resource greek2
                    recruit_pool "hellenistic infantry hoplitai haploi"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource illyria and hidden_resource greek2
                    recruit_pool "hellenistic infantry hemithorakitai"  1  0.01  1  0  requires factions { f_rome, } and not event_counter ecThureosReform 1 and hidden_resource illyria and hidden_resource greek2
                    recruit_pool "hellenistic infantry thureophoroi"  1  0.01  1  0  requires factions { f_rome, } and event_counter ecThureosReform 1 and hidden_resource illyria and hidden_resource greek2
                    recruit_pool "illyrian infantry peltastai"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource illyria and hidden_resource greek2
                    recruit_pool "hellenistic infantry sphendonitai"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource illyria and hidden_resource greek2
                    ;;; DELMATIA
                    recruit_pool "thracian cavalry hippakontistai"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource illyria and hidden_resource mixed
                    recruit_pool "celtic infantry botroas"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource illyria and hidden_resource mixed
                    recruit_pool "illyrian infantry thureophoroi"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource illyria and hidden_resource mixed
                    recruit_pool "celtic infantry uassoi"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource illyria and hidden_resource mixed
                    recruit_pool "illyrian infantry peltastai"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource illyria and hidden_resource mixed
                    recruit_pool "thracian infantry sphendonitai"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource illyria and hidden_resource mixed
                    ;;; DARDANOIA
                    recruit_pool "thracian cavalry hippakontistai"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource illyria and hidden_resource thrakia
                    recruit_pool "illyrian infantry peltophoroi"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource illyria and hidden_resource thrakia
                    recruit_pool "thracian infantry peltastai"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource illyria and hidden_resource thrakia
                    recruit_pool "illyrian infantry hoplitai"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource illyria and hidden_resource thrakia and not event_counter ecThureosReform 1
                    recruit_pool "illyrian infantry hoplitai"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource illyria and hidden_resource thrakia and event_counter ecThureosReform 1
                    recruit_pool "illyrian infantry thureophoroi"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource illyria and hidden_resource thrakia and not event_counter ecThureosReform 1
                    recruit_pool "illyrian infantry thureophoroi"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource illyria and hidden_resource thrakia and event_counter ecThureosReform 1
                    recruit_pool "thracian infantry sphendonitai"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource illyria and hidden_resource thrakia
                    ;;; HELLAS
                    recruit_pool "hellenistic cavalry thessalikoi"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource greek1 and hidden_resource deuteroi
                    recruit_pool "hellenistic cavalry hippeis"  1  0.01  1  0  requires factions { f_rome, } and not event_counter ecThorakitaiReform 1 and not hidden_resource achaenleague and hidden_resource deuteroi
                    recruit_pool "hellenistic cavalry lonchophoroi hippeis"  1  0.01  1  0  requires factions { f_rome, } and event_counter ecThorakitaiReform 1 and not hidden_resource achaenleague and hidden_resource deuteroi
                    recruit_pool "hellenistic cavalry hippeis"  1  0.01  1  0  requires factions { f_rome, } and not event_counter ecThorakitaiReform 1 and not hidden_resource deuteroi and hidden_resource achaenleague
                    recruit_pool "hellenistic cavalry lonchophoroi hippeis"  1  0.01  1  0  requires factions { f_rome, } and event_counter ecThorakitaiReform 1 and not hidden_resource deuteroi and hidden_resource achaenleague
                    recruit_pool "hellenistic cavalry hippakontistai"  2  0.01  2  0  requires factions { f_rome, } and not event_counter ecThorakitaiReform 1 and hidden_resource achaenleague or hidden_resource deuteroi
                    recruit_pool "hellenistic cavalry thureopherontes hippeis"  2  0.01  2  0  requires factions { f_rome, } and event_counter ecThorakitaiReform 1 and hidden_resource achaenleague or hidden_resource deuteroi
                    recruit_pool "hellenistic infantry deuteroi phalangitai"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource deuteroi
                    recruit_pool "hellenistic infantry hoplitai"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource achaenleague and not hidden_resource deuteroi
                    recruit_pool "hellenistic infantry hoplitai haploi"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource achaenleague or hidden_resource deuteroi
                    recruit_pool "hellenistic infantry hemithorakitai"  1  0.01  1  0  requires factions { f_rome, } and not event_counter ecThureosReform 1 and hidden_resource achaenleague or hidden_resource deuteroi
                    recruit_pool "hellenistic infantry thureophoroi"  1  0.01  1  0  requires factions { f_rome, } and event_counter ecThureosReform 1 and hidden_resource achaenleague or hidden_resource deuteroi
                    recruit_pool "hellenistic infantry akontistai"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource achaenleague or hidden_resource deuteroi
                    recruit_pool "hellenistic infantry toxotai"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource achaenleague or hidden_resource deuteroi
                    recruit_pool "hellenistic infantry sphendonitai"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource achaenleague or hidden_resource deuteroi
                    ;;; RHODOS/KRETE
                    recruit_pool "hellenistic cavalry hippakontistai"  2  0.01  2  0  requires factions { f_rome, } and not event_counter ecThorakitaiReform 1 and hidden_resource hr_island and hidden_resource hr_b and hidden_resource greek1
                    recruit_pool "hellenistic cavalry thureopherontes hippeis"  2  0.01  2  0  requires factions { f_rome, } and event_counter ecThorakitaiReform 1 and hidden_resource hr_island and hidden_resource hr_b and hidden_resource greek1
                    recruit_pool "hellenistic infantry hoplitai"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource hr_island and hidden_resource hr_b and hidden_resource greek1
                    recruit_pool "hellenistic infantry hoplitai haploi"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource hr_island and hidden_resource hr_b and hidden_resource greek1
                    recruit_pool "hellenistic infantry cretan"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource krete
                    recruit_pool "hellenistic infantry hemithorakitai"  1  0.01  1  0  requires factions { f_rome, } and not event_counter ecThureosReform 1 and hidden_resource hr_island and hidden_resource hr_g and not hidden_resource royal_core
                    recruit_pool "hellenistic infantry thureophoroi"  1  0.01  1  0  requires factions { f_rome, } and event_counter ecThureosReform 1 and hidden_resource hr_island and hidden_resource hr_g and not hidden_resource royal_core
                    recruit_pool "hellenistic infantry akontistai"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource hr_island and hidden_resource hr_b and hidden_resource greek1
                    recruit_pool "hellenistic infantry toxotai"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource hr_island and hidden_resource hr_g and not hidden_resource royal_core
                    recruit_pool "hellenistic missile cretan archers"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource krete
                    recruit_pool "hellenistic infantry sphendonitai"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource hr_island and hidden_resource hr_b and hidden_resource greek1
                    ;;; KYPROS
                    recruit_pool "hellenistic cavalry hippakontistai"  2  0.01  2  0  requires factions { f_rome, } and not event_counter ecThorakitaiReform 1 and hidden_resource hr_island and hidden_resource greek2
                    recruit_pool "hellenistic cavalry thureopherontes hippeis"  2  0.01  2  0  requires factions { f_rome, } and event_counter ecThorakitaiReform 1 and hidden_resource hr_island and hidden_resource greek2
                    recruit_pool "hellenistic infantry hoplitai"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource hr_island and hidden_resource greek2
                    recruit_pool "hellenistic infantry hoplitai haploi"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource hr_island and hidden_resource greek2
                    recruit_pool "hellenistic infantry hemithorakitai"  1  0.01  1  0  requires factions { f_rome, } and not event_counter ecThureosReform 1 and hidden_resource hr_island and hidden_resource greek2
                    recruit_pool "hellenistic infantry thureophoroi"  1  0.01  1  0  requires factions { f_rome, } and event_counter ecThureosReform 1 and hidden_resource hr_island and hidden_resource greek2
                    recruit_pool "hellenistic infantry akontistai"  2  0.01  2  0  requires factions { f_rome, } and not event_counter ecThureosReform 1 and hidden_resource hr_island and hidden_resource greek2
                    recruit_pool "hellenistic infantry akontistai"  1  0.01  1  0  requires factions { f_rome, } and event_counter ecThureosReform 1 and hidden_resource hr_island and hidden_resource greek2
                    recruit_pool "hellenistic infantry euzonoi"  1  0.01  1  0  requires factions { f_rome, } and event_counter ecThureosReform 1 and not event_counter ecThorakitaiReform 1 and hidden_resource hr_island and hidden_resource greek2
                    recruit_pool "hellenistic infantry promachoi"  1  0.01  1  0  requires factions { f_rome, } and event_counter ecThorakitaiReform 1 and hidden_resource hr_island and hidden_resource greek2
                    recruit_pool "hellenistic infantry toxotai"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource hr_island and hidden_resource greek2
                    recruit_pool "hellenistic infantry sphendonitai"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource hr_island and hidden_resource greek2
                    ;;; CENTRAL ANATOLIA
                    recruit_pool "eastern cavalry aspet hetselazor"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource anatolian and not hidden_resource greek1 and not hidden_resource lydian
                    recruit_pool "eastern cavalry nizakahar ayrudzi"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource anatolian and not hidden_resource greek1
                    recruit_pool "eastern infantry kavakaza sparabara"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource anatolian and not hidden_resource greek1 and not hidden_resource greek2 and not hidden_resource hellen2
                    recruit_pool "eastern infantry anatolikoi phyletai"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource anatolian and not hidden_resource greek1 and not hidden_resource hellen2
                    recruit_pool "eastern infantry thanvare kavakaza"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource anatolian and not hidden_resource greek1
                    ;;; COASTAL ANATOLIA
                    recruit_pool "hellenistic cavalry lydian lancers"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource lydian
                    recruit_pool "hellenistic cavalry hippeis"  1  0.01  1  0  requires factions { f_rome, } and not event_counter ecThorakitaiReform 1 and hidden_resource anatolian and hidden_resource greek1 and not hidden_resource lydian
                    recruit_pool "hellenistic cavalry lonchophoroi hippeis"  1  0.01  1  0  requires factions { f_rome, } and event_counter ecThorakitaiReform 1 and hidden_resource anatolian and hidden_resource greek1 and not hidden_resource lydian
                    recruit_pool "hellenistic cavalry hippakontistai"  2  0.01  2  0  requires factions { f_rome, } and not event_counter ecThorakitaiReform 1 and hidden_resource anatolian and hidden_resource greek1
                    recruit_pool "hellenistic cavalry thureopherontes hippeis"  2  0.01  2  0  requires factions { f_rome, } and event_counter ecThorakitaiReform 1 and hidden_resource anatolian and hidden_resource greek1
                    recruit_pool "hellenistic infantry hoplitai"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource anatolian and hidden_resource greek1 or hidden_resource greek2 or hidden_resource hellen2
                    recruit_pool "hellenistic infantry hoplitai haploi"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource anatolian and hidden_resource greek1
                    recruit_pool "hellenistic infantry hemithorakitai"  1  0.01  1  0  requires factions { f_rome, } and not event_counter ecThureosReform 1 and hidden_resource anatolian and hidden_resource greek1
                    recruit_pool "hellenistic infantry thureophoroi"  1  0.01  1  0  requires factions { f_rome, } and event_counter ecThureosReform 1 and hidden_resource anatolian and hidden_resource greek1
                    recruit_pool "hellenistic infantry pantodapoi"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource anatolian and hidden_resource greek2 or hidden_resource hellen2
                    recruit_pool "hellenistic infantry akontistai"  2  0.01  2  0  requires factions { f_rome, } and not event_counter ecThureosReform 1 and hidden_resource anatolian and hidden_resource greek1 or hidden_resource hellen2
                    recruit_pool "hellenistic infantry akontistai"  1  0.01  1  0  requires factions { f_rome, } and event_counter ecThureosReform 1 and hidden_resource anatolian and hidden_resource greek1 or hidden_resource hellen2
                    recruit_pool "hellenistic infantry euzonoi"  1  0.01  1  0  requires factions { f_rome, } and event_counter ecThureosReform 1 and hidden_resource anatolian and hidden_resource greek1
                    recruit_pool "hellenistic infantry euzonoi"  1  0.01  1  0  requires factions { f_rome, } and event_counter ecThureosReform 1 and not event_counter ecThorakitaiReform 1 and hidden_resource anatolian and hidden_resource hellen2
                    recruit_pool "hellenistic infantry promachoi"  1  0.01  1  0  requires factions { f_rome, } and event_counter ecThorakitaiReform 1 and hidden_resource anatolian and hidden_resource hellen2
                    recruit_pool "hellenistic infantry sphendonitai"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource anatolian and hidden_resource greek1
                    ;;; EASTERN
                    recruit_pool "eastern cavalry mada asabara"  1  0.01  1  0  requires factions { f_rome, } and not hidden_resource arabian and not hidden_resource hellen1 and hidden_resource eastern and hidden_resource hr_river and not hidden_resource baktria
                    recruit_pool "eastern cavalry asiatikoi hippeis"  1  0.01  1  0  requires factions { f_rome, } and not hidden_resource arabian and not hidden_resource hellen1 and hidden_resource eastern and not hidden_resource hr_river and not hidden_resource baktria
                    recruit_pool "eastern cavalry harauvatish asabara"  2  0.01  2  0  requires factions { f_rome, } and not hidden_resource arabian and not hidden_resource hellen1 and hidden_resource eastern and not hidden_resource baktria and hidden_resource hr_c
                    recruit_pool "eastern cavalry asiatikoi hippakontistai"  2  0.01  2  0  requires factions { f_rome, } and not hidden_resource arabian and not hidden_resource hellen1 and hidden_resource eastern and not hidden_resource baktria and not hidden_resource hr_c
                    recruit_pool "hellenistic infantry pantodapoi"  2  0.01  2  0  requires factions { f_rome, } and not hidden_resource arabian and not hidden_resource daha and hidden_resource eastern and not hidden_resource baktria
                    recruit_pool "eastern infantry tabargane eranshahr"  2  0.01 2  0  requires factions { f_rome, } and not hidden_resource arabian and not hidden_resource hellen1 and hidden_resource eastern and not hidden_resource baktria and not hidden_resource hr_river
                    recruit_pool "eastern infantry babylonian"  2  0.01 2  0  requires factions { f_rome, } and not hidden_resource arabian and not hidden_resource hellen1 and hidden_resource eastern and not hidden_resource baktria and hidden_resource hr_river
                    recruit_pool "eastern infantry nizagan eranshahr"  1  0.01  1  0  requires factions { f_rome, } and not hidden_resource arabian and not hidden_resource hellen1 and hidden_resource eastern and not hidden_resource baktria and not hidden_resource hr_c
                    recruit_pool "eastern infantry nizagan bakhtrish"  1  0.01  1  0  requires factions { f_rome, } and not hidden_resource arabian and not hidden_resource daha and hidden_resource eastern and not hidden_resource baktria and hidden_resource hr_c
                    recruit_pool "eastern infantry skirmisher"  1  0.01  1  0  requires factions { f_rome, } and not hidden_resource arabian and not hidden_resource daha and hidden_resource eastern and not hidden_resource baktria
                    recruit_pool "eastern infantry verkhana kofyaren"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource hr_b and hidden_resource hr_g and hidden_resource hr_i and hidden_resource hr_j
                    recruit_pool "eastern infantry slinger"  1  0.01  1  0  requires factions { f_rome, } and not hidden_resource arabian and not hidden_resource daha and hidden_resource eastern and not hidden_resource baktria
                    recruit_pool "eastern infantry archer"  1  0.01  1  0  requires factions { f_rome, } and not hidden_resource arabian and not hidden_resource daha and hidden_resource eastern and hidden_resource satrapy and not hidden_resource hr_g and not hidden_resource hellen1 and not hidden_resource hr_e and not hidden_resource baktria
                    ;;; ANTIOCHEIA
                    recruit_pool "hellenistic cavalry xystophoroi"  1  0.01  1  0  requires factions { f_rome, } and not event_counter ecThorakitaiReform 1 and hidden_resource eastern and hidden_resource hellen1
                    recruit_pool "hellenistic cavalry aspidiotai hippeis"  1  0.01  1  0  requires factions { f_rome, } and event_counter ecThorakitaiReform 1 and hidden_resource eastern and hidden_resource hellen1
                    recruit_pool "hellenistic cavalry hippakontistai"  2  0.01  2  0  requires factions { f_rome, } and not event_counter ecThorakitaiReform 1 and hidden_resource eastern and hidden_resource hellen1
                    recruit_pool "hellenistic cavalry thureopherontes hippeis"  2  0.01  2  0  requires factions { f_rome, } and event_counter ecThorakitaiReform 1 and hidden_resource eastern and hidden_resource hellen1
                    recruit_pool "hellenistic infantry hoplitai"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource eastern and hidden_resource hellen1
                    recruit_pool "hellenistic infantry hoplitai haploi"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource eastern and hidden_resource hellen1
                    recruit_pool "hellenistic infantry hemithorakitai"  1  0.01  1  0  requires factions { f_rome, } and not event_counter ecThureosReform 1 and hidden_resource eastern and hidden_resource hellen1
                    recruit_pool "hellenistic infantry thureophoroi"  1  0.01  1  0  requires factions { f_rome, } and event_counter ecThureosReform 1 and hidden_resource eastern and hidden_resource hellen1
                    ;;; CHARACENE
                    recruit_pool "eastern cavalry asiatikoi hippeis"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource eastern and hidden_resource arabian
                    recruit_pool "eastern cavalry asiatikoi hippakontistai"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource eastern and hidden_resource arabian
                    recruit_pool "arabian cavalry bedouin"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource eastern and hidden_resource arabian
                    recruit_pool "eastern infantry babylonian"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource eastern and hidden_resource arabian
                    recruit_pool "hellenistic infantry pantodapoi"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource eastern and hidden_resource arabian
                    recruit_pool "eastern infantry tabargane eranshahr"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource eastern and hidden_resource arabian
                    recruit_pool "arabian east infantry"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource eastern and hidden_resource arabian
                    recruit_pool "arabian missile arab slingers"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource eastern and hidden_resource arabian
                    ;;; IOUDAIA
                    recruit_pool "arabian cavalry bedouin"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource ioudaioi and hidden_resource hellen2
                    recruit_pool "hellenistic infantry ioudaioi taxeis"  2  0.01  2  0  requires factions { f_rome, } and not hidden_resource hellen1 and hidden_resource ioudaioi
                    recruit_pool "hellenistic infantry pantodapoi"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource ioudaioi and hidden_resource hellen2
                    recruit_pool "arabian infantry nabatean spearmen"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource ioudaioi and hidden_resource hellen2
                    recruit_pool "arabian infantry bedouin archers"  1  0.01  1  0  requires factions { f_rome, } and hidden_resource ioudaioi and hidden_resource hellen2
                    recruit_pool "eastern infantry slinger"  2  0.01  2  0  requires factions { f_rome, } and hidden_resource ioudaioi and hidden_resource hellen2
                    agent diplomat  1  requires factions { f_rome, } and not event_counter diplomat_limit 1
                    agent_limit diplomat 1
                    recruitment_cost_bonus_naval bonus 1
                    happiness_bonus bonus 2 requires factions { f_rome, }
                    recruitment_slots 2 requires factions { f_rome, }
                    free_upkeep bonus 3 requires factions { f_rome, }
                    farming_level bonus -2 requires factions { f_rome, }
                }
    Tons of conditions so at any given time there is a 'only' a handful of units recruitable from it. Which would confirm that it's the actual recruitment possible in any settlement that causes the crash if it exceeds the given number.
    Last edited by Gigantus; October 18, 2017 at 05:11 AM.










  7. #7
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: Problem with EDB related CTD and available units for recruitment per building

    If it is a hardcoded limit then you could split the units into two buildings: one buildable only in cities, the other only in castles. It's no longer a "replenishing every special unit everywhere" but at least it's a "replenishing every special unit somewhere in the realm".

    I mean a city and castle variant of the supply building, and likewise for the great_supply. Or as they are but supply only in cities and great_supply only in castles, or whatever.

  8. #8
    4zumi's Avatar This one sparks joy
    Join Date
    Feb 2015
    Location
    HRE - Aquis Mattiacis
    Posts
    1,231

    Default Re: Problem with EDB related CTD and available units for recruitment per building

    Thank you both.
    Withwnar I strongly consider your suggestion as it makes a lot of sense.

    Anyways, I have done some testing and this is an officially weird bug.
    I gave England fully developed Jerusalem and Acre, as they have the highest recruitable unit density in the endgame du to special units only available in the levant.
    I counted 36 recruitable units in Jerusalem. (So four more than there should be), not counting the replenishment only units, which I do not see ingame (but for England something like 29 in the Supply Building and 19 in the Great supply building.

    After a lot of testing I commented bit by bit the units in the great supply (levant specific units) out, to the point where i did not get a ctd anymore.
    Then it got weird. The CTD seemed related to specific units, because I activated a unit formerly commented out again and I did not get a CTD, but let the other specific unit commented out.
    Doing this I was able to activate some more units without a CTD.

    I have still no idea what causes the CTD and the first time I encountered it it could not possible be related to a levant only unit, as it was on the first turn and no catholic faction was near the levant.

    I found a workaround by deleting certain units from the great supply, that where not needed there and making my own lore up so that all jerusalem units which I can not activate have to stay there...

    As I said I still consider Withwnars solution, but I will test it now further and keep the "regional" troops.

    It may have to do with a hardcoded limit which I am not aware of, or not.

    If someone has another suggestion, you are welcome to tell me. If I finally find out what defnitively causes this ctd I will post it here.
    Proudly under the patronage of King Athelstan of the Imperial House of Hader

    Author of
    Total Vanilla Beyond mod for Medieval 2 - Kingdoms &
    Developer of
    Total Bananas mod for Medieval 2 - Kingdoms (beta)

    Steam Workshop Mods for Rome 2, Warhammer, Warhammer 2

    Discord: zumi's cookie corner
    Fighting for launch of "Cookie Friday" and "No Pants Saturday"

  9. #9

    Default Re: Problem with EDB related CTD and available units for recruitment per building

    It might have something to do with this, post 90?
    http://www.twcenter.net/forums/showt...fix-them/page5

    Therefore you would need to reduce recruitments slots per buildings?

  10. #10
    4zumi's Avatar This one sparks joy
    Join Date
    Feb 2015
    Location
    HRE - Aquis Mattiacis
    Posts
    1,231

    Default Re: Problem with EDB related CTD and available units for recruitment per building

    Thank you so much selv,

    this could be very well what plagued me.

    Spoiler Alert, click show to read: 
    Not sure if these have been covered anywhere, but here are a few additional causes of CTD:

    -If more than 32 recruit_pool + agent entries come into effect for one building in a given turn, the game will CTD with no clues or traces in the logs as to what occured.
    Sometimes the crash occurs when a building is constructed at the end of turn, or when the culture increases at the end of turn, or when a relevant building is in a queue and you hit the settlement details button, or if you right click on the building before constructing it, or while it is in the building queue. Changes in values for event counters can also tip you over the 32 limit if you're not careful.
    A building can indirectly allow more than 32 recruit_pool entries without causing a crash. By this I mean it is a prerequisite for more than 32 recruit_pool entries spread over 2 or more other buildings. E.g. stable can have 20 entries that require "Blacksmith" building, and Archery range can have 20 entries that require "Blacksmith" building and no crash will occur.

    -Another hardcoded limit seems to be for 64 active recruit_pool entries of 64 different units for a single given settlement at a single given moment in time. There can be more than 64 recruit pool entries for a settlement, but not all active at once: e.g. if an event counter turns off the 64th and turns on the 65th, thus there are still only 64 active at once. There can be more than 64 different unit recruit pool entries for a single faction in the game active at one time, but not in one settlement. And there can be more than 64 active recruit pool entries in one settlement at one time, IF there are still only 64 different units named by the entries (that is, one unit type has multiple recruit_pool entries from one or more buildings). Naval unit recruit_pools do count. Mercenary recruit_pools are not relevant. Agent recruitment lines do NOT count towards the total in this case, unlike the case mentioned above. Unit support recruit_pools of "0 0.00 0 0" do count towards the total and will cause a crash if they bring you over the 64 limit.

    -Having more than 10 "Affects" lines per trigger in the EDCT will cause CTDs without any indication of the problem in the log. 12 or more cause an immediate crash. 11 can cause a crash between turns if the trigger is tested when a general is created (presumably any of the four methods but comingofage was not tested). Presumably 11 will cause crashes on other events but this has not been tested.

    -GeneralPrisonersRansomedCaptor causes a CTD when it fires if used for an ancillary.


    I think it is the second limit with the 64 entities in a settlement. This would align with my test findings too.
    This leaves me with two choices. Withnwar's suggestion of splitting the Supply lines up to castle and city, or reducing the entries and keeping it more regional. I tend to lean into the second direction.

    But thanks again for finding this post, I will put it to good use.
    Proudly under the patronage of King Athelstan of the Imperial House of Hader

    Author of
    Total Vanilla Beyond mod for Medieval 2 - Kingdoms &
    Developer of
    Total Bananas mod for Medieval 2 - Kingdoms (beta)

    Steam Workshop Mods for Rome 2, Warhammer, Warhammer 2

    Discord: zumi's cookie corner
    Fighting for launch of "Cookie Friday" and "No Pants Saturday"

Posting Permissions

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