Results 1 to 8 of 8

Thread: >>>>> Team Project: Recruitment <<<<<

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Augustus Lucifer's Avatar Life = Like a beanstalk
    Patrician Citizen

    Join Date
    Aug 2006
    Location
    Mote of Dust
    Posts
    10,725

    Default >>>>> Team Project: Recruitment <<<<<

    Purpose

    To fully define the aspects of the recruitment system in All Under Heaven. This includes a system for determining recruitment pool stats, the buildings used in recruiting and their properties, an area of recruitment system, and military upgrade decisions.

    Goals
    • Recruitment Pools
      • Starting Pool Formula
      • Replenish Rate Formula
      • Max Units Formula
      • Unit Experience Formula
      • Modifiers
    • Military Buildings
      • Complexes
        • Properties
      • Bases
        • Properties
    • AOR
      • Unit Rules
      • Region Rules
    • Decisions


    Sub-Projects

    To be expanded upon.

    Notes

    - This will be expanded upon in the near future, just wanted to get the thread posted.

    - (Idea) 15 Trees, 1 per faction for complexes(exc. Ghurid, Challenge, Scripting, Slave), 1 set of bases. Include 'blank building slots' which act to kill all bonuses of that building tree so the player has to destroy them. Must still make it worthwhile for the AI to capture. Need to cope with hotseat.

    - (AOR) Ties into Unit Allocation. Must experiment with ways to utilize same-edu-slot units without breaking custom battles.

  2. #2
    Augustus Lucifer's Avatar Life = Like a beanstalk
    Patrician Citizen

    Join Date
    Aug 2006
    Location
    Mote of Dust
    Posts
    10,725

    Default Re: >>>>> Team Project: Recruitment <<<<<

    I think the building trees can be cut back down to three, 1 complex, 1 base, 1 AI-complex, just a matter of determining how event counter impact recruitment pools, going to have to live with inheriting structures. The AI-complex needs to only be active and buildable for non-player factions. It should have slightly faster replenishment rates, not be separated into complexes/bases and be able to recruit all faction troops + AOR in captured regions, and be hinterland_ so the player can't destroy the AI complex.

    Also need to experiment with SettlementSelected and SettlementPanelOpen to insure they work as they seem to and don't cause a bunch of lag.

  3. #3
    Augustus Lucifer's Avatar Life = Like a beanstalk
    Patrician Citizen

    Join Date
    Aug 2006
    Location
    Mote of Dust
    Posts
    10,725

    Default Re: >>>>> Team Project: Recruitment <<<<<

    Oh man! Tears of joy if this condition works as it seems to!

    It would be absolutely perfect for our Military Base system among other things, since it enables me to null the base if it wasn't created by the player(ie. doesn't include their military conventions, which is what bases represent as an extension of central command), thus forcing the player to build up new base infrastructure rather than get to re-use an intangible element of a settlement they've captured. This will be so awesome if it works!

  4. #4

    Default Re: >>>>> Team Project: Recruitment <<<<<

    excellent news, glad you're making progress with this.

  5. #5
    Augustus Lucifer's Avatar Life = Like a beanstalk
    Patrician Citizen

    Join Date
    Aug 2006
    Location
    Mote of Dust
    Posts
    10,725

    Default Re: >>>>> Team Project: Recruitment <<<<<

    Okay so I had some success with that condition combined with some scripting. It works as it is intended to work, in a roundabout fashion. The accompanying script is rather large, so I've relegated it to the hotseat script to be expanded upon later, as its main caveat is support for the concept of Military Bases built by other factions. If anyone's interested here's the script for that for two settlements, plus the needed EDB entries:
    Spoiler Alert, click show to read: 

    Code:
    ;;;;;
    ;;;;; Military Base Limitations
    ;;;;;
    
    declare_counter xuzhou_base_upgrade
    declare_counter shaoxing_base_upgrade
    
    set_counter xuzhou_base_upgrade 0
    set_counter shaoxing_base_upgrade 0
    
    ; Works with AND without named_character
    monitor_event GeneralCaptureSettlement SettlementName Xuzhou
    		and SettlementBuildingExists >= military_base_1
    	set_counter xuzhou_base_upgrade 0
    	set_event_counter upg_Military_Base 0
    end_monitor
    monitor_event GeneralCaptureSettlement SettlementName Shaoxing
    		and SettlementBuildingExists >= military_base_1
    	set_counter shaoxing_base_upgrade 0
    	set_event_counter upg_Military_Base 0
    end_monitor
    
    ; It's possible the base was recaptured or some other snafu
    monitor_event UnitTrained SettlementName Xuzhou
    		and I_CompareCounter xuzhou_base_upgrade == 0
    	set_counter xuzhou_base_upgrade 1
    end_monitor
    monitor_event UnitTrained SettlementName Shaoxing
    		and I_CompareCounter shaoxing_base_upgrade == 0
    	set_counter shaoxing_base_upgrade 1
    end_monitor
    
    ; Covers all other scenarios, since player has to rebuild base
    monitor_event BuildingCompleted SettlementBuildingFinished = military_base_1
    		and SettlementName Xuzhou
    	set_counter xuzhou_base_upgrade 1
    end_monitor
    monitor_event BuildingCompleted SettlementBuildingFinished = military_base_1
    		and SettlementName Shaoxing
    	set_counter shaoxing_base_upgrade 1
    end_monitor
    
    ; Allows upgrading of base based on roundabout way of determining if base is player culture
    monitor_event SetttlementPanelOpened FactionIsLocal
    
    	if I_SettlementSelected Xuzhou
    	 if I_CompareCounter xuzhou_base_upgrade == 1
    		set_event_counter upg_Military_Base 1
    	 end_if
    	 if I_CompareCounter xuzhou_base_upgrade == 0
    		set_event_counter upg_Military_Base 0
    	 end_if
    	end_if
    	if I_SettlementSelected Shaoxing
    	 if I_CompareCounter shaoxing_base_upgrade == 1
    		set_event_counter upg_Military_Base 1
    	 end_if
    	 if I_CompareCounter shaoxing_base_upgrade == 0
    		set_event_counter upg_Military_Base 0
    	 end_if
    	end_if
    	
    end_monitor
    
    ; Allows upgrading of base based on roundabout way of determining if base is player culture
    monitor_event SettlementSelected FactionIsLocal
    
    	if I_SettlementSelected Xuzhou
    	 if I_CompareCounter xuzhou_base_upgrade == 1
    		set_event_counter upg_Military_Base 1
    	 end_if
    	 if I_CompareCounter xuzhou_base_upgrade == 0
    		set_event_counter upg_Military_Base 0
    	 end_if
    	end_if
    	if I_SettlementSelected Shaoxing
    	 if I_CompareCounter shaoxing_base_upgrade == 1
    		set_event_counter upg_Military_Base 1
    	 end_if
    	 if I_CompareCounter shaoxing_base_upgrade == 0
    		set_event_counter upg_Military_Base 0
    	 end_if
    	end_if
    	
    end_monitor
    EDB
    Code:
    			capability
    			{
    				recruitment_slots x requires factions { song, } and building_factions { song, }
    				;etc for each faction
    			}
    
    			upgrades
    			{
    				military_base_x requires event_counter upg_Military_Base 1
    			}


    For single-player I think we should opt for a more direct approach. By not having the AI build bases in the same way the player does, we remove the need for disallowing recruitment from foreign bases. This sort of ties into a simplicity philosophy for the AI as well, because the AI doesn't understand the system the same way a player would.

    Making the AI just recruit all units from the complexes in single-player seems like the most ideal possibility. So, a couple questions for people.

    1) Are you fine with the AI recruiting all units from complexes and not using bases?

    2) Do you think the AI needs to be restricted by regional AOR in a similar way as the player? Or should they be allowed to recruit faction units from conquered regions? Or, further, should they be able to recruit faction units but not recruit most AOR units?

    I also want to know what people think about how the player faction should be considering provinces a 'home' province.

    1) Predefined - This method determines home provinces at the start, and full faction roster can only be built in those home provinces throughout the game. Home provinces can include not currently owned regions, but would not be changed throughout the game. Non-home provinces use the bases setup to recruit some faction units and some regional units.

    2) Fluid - This method starts with some home regions, and uses some manner of how long a region has been owned (in turns) to make captured regions eventually become home regions, and home regions that have been captured eventually lose home region status. More complex than the former, obviously. Non-home provinces use the bases setup to recruit some faction units and some regional units.

    3) Hybrid - Mostly predefined regions but with some regions that could become home regions given certain actions or events.

    Option #1 is pretty straightforward, it combines the traditional AOR notions of a preset 'home' region with the addition of faction doctrines.

    Option #2 has numerous complications. Notably I'm not sure how hard it would be to implement, though I'm fairly sure I could implement it. Also the time it takes to fully incorporate a region, in terms of years, may not fall within the scope of our mod which only lasts for 100 years. If it takes 25+ years (100 turns) for a province to become 'home', that's a conservative estimate on the short side of how long it takes to incorporate a region, and would probably have negligible gameplay effects. If it's any less than that (15-20) it stands to be potentially unrealistic, less than that (under 10) and it invalidates the bases system almost entirely, and more than that (over 25) it has more and more negligible effects on gameplay.

    Option #3 might have some complications but probably not as many as #2, it would depend on what method is used to verify a 'home' region and how that can be altered mid-game seamlessly. Adding them is not necessarily hard if buildings are used.
    Last edited by Augustus Lucifer; October 09, 2009 at 08:05 AM.

  6. #6

    Default Re: >>>>> Team Project: Recruitment <<<<<

    For the AI I'd guess we'd want to opt for applying AOR rules to them as well. This would be more realisitic.

    For the home provinces: this one is more difficult. I am tempted to go for option 1, as many factions had "home regions" that they won't start by owning, but historically controlled (thinking mostly of the Song). Then again, there were factions that territory was mostly areas of not traditionally occupied by their rulers (i.e the Jurchens would only have one or two "home regions" in the NE). I was thinking of possibly viewing recruitment through the medium of ethnicity, but things like this befuddle my mind rather quickly.

    Just for clarification when you state for option1)
    full faction roster can only be built in those home provinces throughout the game
    there will still be units only recruitable in certain regions, right ? This is particularly important for capitals so if the capital moves, will recruitment also change ?

  7. #7
    Augustus Lucifer's Avatar Life = Like a beanstalk
    Patrician Citizen

    Join Date
    Aug 2006
    Location
    Mote of Dust
    Posts
    10,725

    Default Re: >>>>> Team Project: Recruitment <<<<<

    Quote Originally Posted by Yelü Dashi View Post
    For the home provinces: this one is more difficult. I am tempted to go for option 1, as many factions had "home regions" that they won't start by owning, but historically controlled (thinking mostly of the Song). Then again, there were factions that territory was mostly areas of not traditionally occupied by their rulers (i.e the Jurchens would only have one or two "home regions" in the NE). I was thinking of possibly viewing recruitment through the medium of ethnicity, but things like this befuddle my mind rather quickly.

    Just for clarification when you state for option1) there will still be units only recruitable in certain regions, right ? This is particularly important for capitals so if the capital moves, will recruitment also change ?
    Additional restrictions for certain regions can be applied on top of the basic recruiting. The basic idea is every unit has a 'region' and some units have a 'faction'. In home regions, military complexes recruit all units assigned as that 'faction' and 'region'. In non-home regions, military complexes recruit 'region' units from that specific region only -- so a Song Military Complex in Mongolia only recruits mongol AOR -- and Military Bases supplement the regional roster with 'faction' units, symbolizing various factors including but not limited to the migration of homeland populaces, effective supply chains, and military doctrines used in drawing up traditional units.

    Example(using the same region, two different factions, and the different buildings):

    Song Dynasty Military Complex (Lvl 7) in Tanzhou (home region) might recruit:

    Dao Militia (Faction)
    Spear Militia (Faction)
    Nu Militia (Faction)
    Zhu Huoqiang Militia (Faction)
    Tu Huo Qiang Militia (Faction)
    Xiang Bowmen (Faction)
    Light Cavalry (Faction)
    Armored Cavalry (Faction)
    and any other faction units
    Bandit Spearman (Region)1
    Lulin Archer (Region)1
    Lulin Brave (Region)1
    Shan Wang Infantry (Region)1
    and any other region units

    Song Dynasty Military Base is non-existent. Bases are not required in home provinces since home-province complexes do everything a base does and more.

    Jin Dynasty Military Complex (Lvl 7) in Tanzhou, same region, (not home region) might recruit:

    Xiang Bowmen (Song AOR Shared)
    Tu Huo Qiang Militia (Song AOR Shared)
    and any other AOR units
    Bandit Spearman (Region)1
    Lulin Archer (Region)1
    Lulin Brave (Region)1
    Shan Wang Infantry (Region)1
    and any other region units

    Jin Military Base (Lvl 3) in Tanzhou, same region, (not home region) might recruit:

    Alixi (Faction)2
    Zhengjun("Regulars") (Faction)2
    Tiefutu("Iron Pagodas") (Faction)2
    Zirongjun (Faction)2
    Hezha Longxiang Qibing (Faction)2
    Hezha Hu Bubing (Faction)2
    Jiujun (Faction)2

    1 Examples of purely regional units which wouldn't be on any faction's direct home roster, taken from this post.

    2 Example Jin Roster taken from the wiki.

    As explained in the Unit Slots Distribution thread:
    130 unit slots allocated to AOR Units enables 10 of the 20 units from each faction(exc. Minamoto/Ghurid) to be available as AOR units on the campaign map in their home regions to all factions who conquer those regions. This excludes elite units which should only be available to the home faction. The specific units available as AOR can be chosen on a faction by faction basis.
    That's what is meant by "Song AOR Shared" whereas "Region" means a unit like those listed above that are more conscripted than faction-aligned. The number 10 is probably higher than necessary, it can be increased and decreased as necessary especially to make room for new regional units that don't also double as faction units. Each shared AOR unit requires an additional EDU entry so it can still show up in custom battles for the home faction, unless we decide to force players to switch EDUs to play custom battles, which isn't unreasonable but our current unit production rate doesn't seem to necessitate it yet. The # will probably go down though and the Regional one go up I'd imagine.

    Things like event counters for policy or technology, regional resources, etc. act on top of that to apply further restrictions or allowances. So for Mongols we can still say they can't recruit certain units unless they own certain regions, all of that acts on top of the basic. We can still change the way this works fundamentally as well, that's why this thread is here. A dialogue on such matters needs to surface sooner than later though.

    As for capitals, that is extremely tricky business. I spent a few hours trying to write a script to track capital, and failed miserably. I couldn't even get it to let me know I was for certain at my current capital in a manner that would be otherwise applicable. The game doesn't give any commands at all about capitals, it doesn't have an EDB condition for them, it doesn't have a scripting event or condition for them of any usability, and it doesn't treat them in any appreciable way. The only thing with an inkling of usability is the DistanceCapital condition and that is what I've not been able to use in any manner that would accurately report a result and clean up after itself(it involves the spawning of hundreds of agents next to cities potentially, all with some distinct feature).
    Last edited by Augustus Lucifer; October 09, 2009 at 10:48 AM.

  8. #8
    Augustus Lucifer's Avatar Life = Like a beanstalk
    Patrician Citizen

    Join Date
    Aug 2006
    Location
    Mote of Dust
    Posts
    10,725

    Default Re: >>>>> Team Project: Recruitment <<<<<

    Just wanted to throw this out there for consideration.

    It should be pretty simple to separate 'Single Player Campaign' from 'Custom Battle / Multiplayer' in terms of running the mod. What I mean by this is switching out some files like the EDU which are hard to tailor to both via a prompt before starting the game. I'm no stud programmer but I'm sure I could come up with something, given enough time to cross-reference and head bash.

    This enables us to get rid of the notion of an 'AOR slot' altogether. For the single-player campaign every faction would own every unit for simplicity sake(with the exception of bodyguards, because these are handled differently). Then we could choose which can recruit which and where in the EDB as normal with recruit pools. Then in the multiplayer/custom we can make sure only the Song own Song units, Jin own Jin units, etc.

    What that does is removes some of the convolution from the file, since we don't have to allocate essentially empty unit slots that are a duplicate in order to function with an AOR system and still have custom battles.

    The only downside I'm aware of is a player has to exit out and back in, in order to switch from a single-player campaign to a custom battle or vice versa. This isn't really much of a downside though in my eyes to counterbalance the utility. Still, I want to know if people think this is something we should do before I make a quick implementation with batch files and then go searching for a proper GUI.

Posting Permissions

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