Results 1 to 20 of 25

Thread: how the slave faction recruits its units

Hybrid View

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

    Default how the slave faction recruits its units

    I`ve come across an unexpected thing in this regard and I thought it`s worth to point it out for those who might not have noticed it until now.

    Apparently the slave faction will recruit units that have the slave ownership in EDU even if it does not have recruiting lines for them in EDB. It doesn`t even matter that it has no ownership for the barracks producing those units either.

    This is very disappointing for mods such as RTR 6 where the slave faction has access(via the core/governmental buildings) to special aor units with lower upkeep, in an effort to protect the slave faction from bankrupting itself through the army costs. The problem is that in a mod like RTR 6 there are also regular units(with normal upkeep) available on an aor system(specific to certain regions) that are also available as mercenaries in descr_mercenaries. The good part of that is that this way you(and the AI) can train/retrain the mercenaries. The downside is that they need to have the mercenary_unit attribute and afaik the slave ownership. Which suddenly makes them available to the slave faction who for whatever reason will buy these too.

    EDIT:
    The conclusions reached bellow:

    1. the "requires factions { slave, }" code for EDB is not used by the slave faction.
    2. the slave faction is actually substituting itself to the other factions based on the sub_faction tag its garrison has in descr_strat.
    3. based on this substitution the slave faction will construct the buildings that would normally be available to the regular factions.
    4. it will also recruit the units that would normally be available to the substituted faction on the condition that these units also have slave for ownership in EDU. And it will also respect the hidden resources and other building/recruiting conditionals from EDB that would apply to the faction it`s substituting.
    Last edited by florin80; May 14, 2009 at 11:05 AM.

  2. #2

    Default Re: how the slave faction recruits its units

    Take a look at this thread :

    http://www.twcenter.net/forums/showthread.php?t=183510

    Seems like you're also busy with rebeles

  3. #3

    Default Re: how the slave faction recruits its units

    I know that thread ever since it was created. It doesn`t really help in any way. I`ve been told about the theory that the slave faction recruits units based on the culture tag from descr_regions, but I have my reservations. In RTR 6 the aor units I was talking about above have the ownership of all cultures(besides the slave ownership) because they are intended to be recruited pretty much by all factions who control a certain region. And they also have different EDU names than those of the vanilla units. As such, how in the world will the engine differentiate between briton and german units? It can`t since all aor units, be it britons or germans have the same ownership of all possible cultures(and by implication all possible factions). Which would mean that in the cities which I have kept under observation all kind of units would have spawned. But no, the only units recruited by the rebels in those settlements were greek. Because those regions had the aor_greek hidden resource in descr_regions and because those aor greek units were recruitable by the other factions through their faction specific barracks(which, again, lack any slave ownership, be it for the building or for the recruiting lines). As a matter of fact I have only seen the rebels there recruit units that would have been available to the regular factions if they would have held the settlement. For example: no stables or practice range - no cavalry or skirmisher units. No militia barracks - no elite hoplites. Of course, I have not run a huge amount of tests to be 100% sure and by now given my experience I`m not gonna make any absolute statement.
    Last edited by florin80; May 12, 2009 at 12:42 PM.

  4. #4
    makanyane's Avatar Praeses
    Content Emeritus

    Join Date
    Feb 2006
    Posts
    9,093
    Blog Entries
    1

    Default Re: how the slave faction recruits its units

    Quote Originally Posted by florin80 View Post
    I`ve been told about the theory that the slave faction recruits units based on the culture tag from descr_regions, but I have my reservations.
    Yup, I found that if a settlement started off slave owned what determined which units it could build was the 'sub_faction ...' of that the starting garrison used in descr_strat - if a slave garrison was present it totally overruled any default faction creator setting for the region.

    not quite so sure how it works from settlement that starts faction owned though... did test at one stage will try and see if I can dig up results... If you can get mod to let you in to play as slave you can tell quite easily - building browser doesn't show up properly but the buildings and units that are actually available show up.

  5. #5

    Default Re: how the slave faction recruits its units

    Quote Originally Posted by makanyane View Post
    Yup, I found that if a settlement started off slave owned what determined which units it could build was the 'sub_faction ...' of that the starting garrison used in descr_strat - if a slave garrison was present it totally overruled any default faction creator setting for the region.
    Still, one of my biggest questions is: how does the ai choose those units? For once it`s pretty clear that they need to have the slave ownership in EDU. But is there anything else it takes into account? Like the coownership? In Squid`s example: roman. Because I`m not sure how the engine decides which units are greek or whatever. I repeat myself, the units recruited in the two settlements I`ve kept under observation(in a few tests) which started as rebels(slave)only recruited greek units, even though their ownership looks like this:
    Code:
    ownership        barbarian, carthaginian, eastern, egyptian, greek, roman, slave
    AND many aor units of other ethnicity have the same. Still, no persian units for example ever appeared in Syracuse. Not yet at least. And to top it, no cavalry or skirmisher units in these settlements that didn`t have stables and practice range. The two settlements indeed have the greek_citites in descr_strat and descr_regions and their garrisons have sub_faction greek_citites, but how does the game know which are the greek units?
    Last edited by florin80; May 13, 2009 at 02:55 PM.

  6. #6
    makanyane's Avatar Praeses
    Content Emeritus

    Join Date
    Feb 2006
    Posts
    9,093
    Blog Entries
    1

    Default Re: how the slave faction recruits its units

    the other factor is the EDB recruitment line - if the settlement rebels consider themselves greek_cities, they'll recruit whatever the greek_cities could in that settlement (via EDB) so long as it also has slave ownership in EDU

  7. #7
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

    Join Date
    Feb 2007
    Location
    Frozen waste lands of the north
    Posts
    17,751
    Blog Entries
    3

    Default Re: how the slave faction recruits its units

    I'll add another wrinkle into the this. There's an error with RS1.5 that showed up in the following situation. A region controlled at game start by carthage, but with the roman faction as both creator and owner (as per descr_strat/descr_regions), the settlement rebelled from carthage, but rather than recruiting carthaginian units, it recruited a roman unit, attempting to usng the slave texture line. I know the unit was using the slave texture line, because the line doesn't exit and causes a CTD and also it looks for the slave version of the unit card/unit info card.
    Under the patronage of Roman_Man#3, Patron of Ishan
    Click for my tools and tutorials
    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -----Albert Einstein

  8. #8

    Default Re: how the slave faction recruits its units

    Did the unit you`ve mentioned have slave for ownership too or just roman? And was its name(type) inherited from vanilla or a new one?
    Also, was there a building present from which the romans would have been able to recruit that unit themselves if they would have had the settlement or was it beyond the available buildings?

  9. #9
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

    Join Date
    Feb 2007
    Location
    Frozen waste lands of the north
    Posts
    17,751
    Blog Entries
    3

    Default Re: how the slave faction recruits its units

    It has slave ownership, which I think it was why it was trying to use the slave texture line, and is inherited from vanilla.
    Under the patronage of Roman_Man#3, Patron of Ishan
    Click for my tools and tutorials
    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -----Albert Einstein

  10. #10
    Halie Satanus's Avatar Emperor of ice cream
    Join Date
    Nov 2005
    Location
    London
    Posts
    19,971
    Blog Entries
    1

    Default Re: how the slave faction recruits its units

    but how does the game know which are the greek units?
    Their hairy backs?.

    sorry couldn't resist.

  11. #11
    dvk901's Avatar Consummatum est
    Patrician

    Join Date
    Mar 2006
    Location
    Michigan
    Posts
    20,984

    Default Re: how the slave faction recruits its units

    Giving a unit you only want the 'Slaves' to recruit can be accomplished only (as far as I know), by sharing that units ownership with another faction. The 'slave only' units in RTW Vanilla didn't work as recruitable units...they were specific to a 'revolts' and spawning only.

    As I shared with Florin80, in originally setting up the recruitment for RS2....I had put all of the units I wanted the 'slave' faction to recruit in the original RTW barracks system they were to share with the other two "Free People' factions.....they couldn't recruit any of them. Not even the ones they shared with the other two factions that used it (thrace, britons). The reason was that were supposed to recruit the same units in a DIFFERENT AOR. This never works. The Slave faction only recruits units that they:

    a) share with another faction\s
    b) in the same AOR as that\those factions
    c) in the same barracks as those factions

    I proved this in RS2 by NOT giving the Slave faction ownership of any barracks in EDB.txt.......even though they shared dozens of units with other factions, they couldn't recruit anything.
    I then gave them ownership of all of the factional barracks, and all of their units appeared as recruitable when I entered their campaign. In the building browser, all of the barracks were listed, but you had to go thru each one to see what one was the one they needed....which was of course the 'faction_creator's' barracks.

    There isn't a single line in EDB.txt referring to any of their units specifically....they can recruit them simply 'because' the faction they share them with can, and in exactly the same places\AORs.

    As far as our friend who posted the mod about 'rebels\brigands'....I understand the 'spawning' in RTW, controlled by the tribe name entry in descr_rebel_factions.txt\descr_regions.txt and the units you list under it, but I've always been a bit 'fuzzy' on the whole rebellion issue. My take on this is that Mods with very strict AOR's inadvertantly deny the Slave faction a unit to recruit in a specific region because they don't have a shared ownership unit they can recruit in that region that belongs to the faction creator....and of course, if the barracks is damaged it's useless anyway.

    Flroin80 told me that the 'slaves' can recruit a unit unique to them in a 'core' building, but I've never tried that. I just don't think it's possible, however, to prevent the slave faction from recruiting a 'unique' unit that you want only all other factions to have and not them (slaves) if it has the 'mercenary_unit' attribute, and\or is listed in descr_mercenaries.txt. That doesn't mean it's 'impossible'. I was thinking about this since Florin80 asked, and I 'think' the way you could do this would be to create a 'pseudo-merc'...or as I call them, and 'all_faction mercenary'.

    In RS2, because of Tone's creative and often insanely complicated way of using DMB slots, I had to create these 'all-faction-mercenaries' because we filled up the recruitment cues of a number of factions to a point where there was no room for these\any more units. I HAD to make them mercenaries somehow. So I gave all factions a texture and sprite (slaves also), and put the unit in descr_mercenaries.txt. Works fine....they don't have the atrribute, and you have to put all the cards in each faction's indicidual folders, but other than that you'd never know the difference.

    Using this idea, perhaps you could have what you want to be a 'recruitable AOR\merc' factional unit that the slaves can't recruit by giving all factions a texture and sprite 'except' the slaves...don't put it in descr_mercenaries.txt, and don't give it the 'mercenary_unit' attribute? It's a little more 'bother' in coding and fiddling...but it would work.

    Creator of: "Ecce, Roma Surrectum....Behold, Rome Arises!"
    R.I.P. My Beloved Father

  12. #12

    Default Re: how the slave faction recruits its units

    Quote Originally Posted by dvk901 View Post
    I proved this in RS2 by NOT giving the Slave faction ownership of any barracks in EDB.txt.......even though they shared dozens of units with other factions, they couldn't recruit anything.
    I`m sorry, but this part I can`t confirm. In fact I will infirm. All my tests were done with an EDB where the barracks are faction specific and none of them had slave for ownership(or a culture that might include the slave faction). Yet they did recruit those units. They even built the germans barracks to which they had no ownership.
    My take on this is that Mods with very strict AOR's inadvertantly deny the Slave faction a unit to recruit in a specific region because they don't have a shared ownership unit they can recruit in that region that belongs to the faction creator....
    That wasn`t my case since all aor units are recruitable by any regular faction and they also share the ownership with the slaves.
    Flroin80 told me that the 'slaves' can recruit a unit unique to them in a 'core' building, but I've never tried that.
    Unless I remember wrong they did do it as long as the codding mentioned no ownership for the recruting line. I`d need to try again to be sure I remember it right though so it`s best to disregard it. It certainly seems wrong considering what we`ve found afterwords.

    Quote Originally Posted by dvk901 View Post
    This is what I have been missing...it's the sub_faction statement used for the region in descr_strat.
    No, it is the one used by the garrison. As in:
    character sub_faction macedon, Krateuas, general, age 20, , x 139, y 78
    It takes priority over the culture and faction_creator of the region.
    Last edited by florin80; May 13, 2009 at 07:56 PM.

  13. #13
    dvk901's Avatar Consummatum est
    Patrician

    Join Date
    Mar 2006
    Location
    Michigan
    Posts
    20,984

    Default Re: how the slave faction recruits its units

    Quote Originally Posted by florin80 View Post
    I`m sorry, but this part I can`t confirm. In fact I will infirm. All my tests were done with an EDB where the barracks are faction specific and none of them had slave for ownership(or a culture that might include the slave faction). Yet they did recruit those units. They even built the germans barracks to which they had no ownership.

    That wasn`t my case since all aor units are recruitable by any regular faction and they also share the ownership with the slaves.

    Unless I remember wrong they did do it as long as the codding mentioned no ownership for the recruting line. I`d need to try again to be sure I remember it right though so it`s best to disregard it. It certainly seems wrong considering what we`ve found afterwords.


    No, it is the one used by the garrison. As in:
    character sub_faction macedon, Krateuas, general, age 20, , x 139, y 78
    It takes priority over the culture and faction_creator of the region.
    Well, I saw it with my own 'beadies', so I know for a fact this happens in RS2. But you've peaked my interst with this german barracks being built by the slaves even though they don't own it in EDB. Could you check and see if the faction creator of that settlement is the 'germans'? I'm beginning to wonder if the faction creator and 'sub_faction' in DS have to be the same for that to happen in a given region the slaves own.

    Creator of: "Ecce, Roma Surrectum....Behold, Rome Arises!"
    R.I.P. My Beloved Father

  14. #14
    dvk901's Avatar Consummatum est
    Patrician

    Join Date
    Mar 2006
    Location
    Michigan
    Posts
    20,984

    Default Re: how the slave faction recruits its units

    Never mind Florin, I figured it out. If the 'faction_creator' of the settlement is the same as the 'sub_faction' listed in descr_strat.txt that starts in that settlement, the Slaves can build anything that faction can build; they can recruit any unit they share with that faction. This is a lifesaver for me to finally figure this out. Thanks again for the pointers.

    Creator of: "Ecce, Roma Surrectum....Behold, Rome Arises!"
    R.I.P. My Beloved Father

  15. #15

    Default Re: how the slave faction recruits its units

    Generally a long post beats its purpose. It`s the case of my above one. I had noted there that the region had germans in ds and dr and that the garrison was sub_faction germans. Now, I have checked the descr_strat both before and after the test. There were no barracks there(the auxilia phase is part of the barracks trees in rtr 6). In the campaign I moved a spy and investigated the settlement. They were not recruiting anything and there was no barracks. And after a few turns when I was close to give up I`ve noticed the appearence of an auxilia phase1 which rose interest. I`ve waited a few more turns and promtply I saw the building had been upgraded to auxilia phase2. From the next turn the new units started coming. Again, there is no slave ownership in EDB for that building:
    Code:
    building barracks_germans
    {
        levels auxilia_phase1 auxilia_phase2 auxilia_phase3 muster_field  
        {
    
            auxilia_phase1 requires factions { germans, } 
            {
                capability
                { 
                    trade_base_income_bonus bonus 4 requires factions { germans, }
                }
                construction  4
                cost  500
               settlement_min village
                upgrades
                {
                    auxilia_phase2
                }
            }
            auxilia_phase2 requires factions { germans, } 
            {
                capability
                {
    And this is the settlement in ds:
    Code:
    settlement
    {
    	level town
    	region Aestii
    
    	year_founded 0
    	population 1900
    	plan_set default_set
    	faction_creator germans
    	building
    	{
    		type core_building governors_house
    	}
    	building
    	{
    		type defenses wooden_pallisade
    	}
    }
    and this is the picture of the barracks constructed by the rebels:

    Game starts in 280 BC, the two barracks take 10 turns to be constructed and the last three clubmen were recruited there. I think they`ve wasted a couple turns, but none the less they`ve systematically realized their goal.
    EDIT: looking at the picture I now realize they`ve also built a temple building. That probably explains the missing turns.

  16. #16
    MasterOfNone's Avatar RTW Modder 2004-2015
    Join Date
    May 2005
    Location
    England
    Posts
    16,707

    Default Re: how the slave faction recruits its units

    Slaves do not require being listed in EDB. I think that is irrelevant?
    "One of the most sophisticated Total War mods ever developed..."
    The Fourth Age: Total War - The Dominion of Men

  17. #17
    dvk901's Avatar Consummatum est
    Patrician

    Join Date
    Mar 2006
    Location
    Michigan
    Posts
    20,984

    Default Re: how the slave faction recruits its units

    Thank you Florin.

    Creator of: "Ecce, Roma Surrectum....Behold, Rome Arises!"
    R.I.P. My Beloved Father

  18. #18
    Kylan271's Avatar Domesticus
    Join Date
    Jul 2007
    Location
    Vietnam
    Posts
    2,232

    Default Re: how the slave faction recruits its units

    Oh gewd I was trying to solve this puzzle also,but looks like you guys figured it???? An easier test is to 'unlock' the rebel faction in desc_strat and make playable and clown around with 'process_cq' on settlements+add_population+add_money to get max settlement and see what is actually recruitable????

    I am currently redoing TE Mod factions and have to consider darn slaves,lol. This helps heaps.

    As for Tones crazy way of adding units,hmmm does he have a tutorial to make use of DMB better?????


  19. #19

    Default Re: how the slave faction recruits its units

    Does this affect other effects (i.e. tax bonuses, happiness bonus, etc.)? What I mean is, do the slaves ignore such effects coded for them and use the ones coded for the sub-factions?

    Expand your borders, a mod based on XGM 5.

  20. #20
    Kylan271's Avatar Domesticus
    Join Date
    Jul 2007
    Location
    Vietnam
    Posts
    2,232

    Default Re: how the slave faction recruits its units

    Have some probs figuring mine...rolling the eyes..

    I have found a missing Slave owned province in TE Gold: Dayuan in desc_strat,but it is on map with buildings and slave faction builds and creates units as per usual,so what gives????? It is Tochari rebel owned-default Scythia. Sorry for a tossed salad but seems even if no settlement listed the rebel owner builds as per faction default..aghhhhhhhhhhh. Lusted where are you????

    Oh update,crazy!!!! Just found it...The province names don't match,it is Dayuan on map,but "Tocharia" in desc_strat-Slave settlements..ohhhhhh,something to watch out for in Mods or vanilla??? God knows what else is 'renamed' differently in text from map???
    Last edited by Kylan271; August 02, 2009 at 01:45 AM.


Posting Permissions

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