Results 1 to 5 of 5

Thread: Warhammer III and regional recruitments

  1. #1
    Steph's Avatar Maréchal de France
    Patrician Artifex

    Join Date
    Apr 2010
    Location
    Pont de l'Arn, France
    Posts
    9,155

    Default Warhammer III and regional recruitments

    In Warhammer II, there was some leftover from Rome II, with unit_resource that could a requirement for a unit, and given to a region. Rome II used that for Auxiliary. That's what I used in SWO-RD to have regional recruitment. For exemple, Barracks in Altdorf would grant Reikland spearmen, and in Middenheim it's Middenland spearmen. Regional units have their own name and graphics (colours, shield heraldry, banner), their own global cap. So once you have recruited all the Reikland spearmen your current levels of barracks allow, if you want more you need to upgrade the barracks, or build more in other settlements in the same region. If you still want more spearmen, then you need to get control of Middenland to recruit Middenland spearmen.

    Problem: CA completly removed these unit_resource in Warhammer III.

    I tested two possible solutions to implement Regional Recruitments in Warhammer III, and I'd like to discuss these options here with you (if anyone is still reading this forum).

    The regional building way
    - Requires editing the map, so each region becomes "unique" (like when it has a landmark)
    - Several copies of the recruitment buildings are made, each attached to specific regions. For exemple, Reikland regions can build the Reikland barracks, Middenland Region the Middenland barracks. Outside of the Empire, like in Bretonnia, then the generic Barracks are still available.
    - Units have a global caps, increased by buildings.

    Pro
    - Recruitment works as usual: recruiting a unit can take several turns, you have a limited number of slots... You can see the units in the building browser, etc.
    - Since we have different version of the building, it would be possible to have slightly different effects
    - And it's also possible to give regional units to the garrison
    - The cap is given by building, will appear in tooltips, and maybe easier to understand
    Con
    - Requires map editing, so not compatible with other big mods. I could base it on standard mod, like Mixu's future unlocker.
    - And since it's map editing, it requires the AssemblyKit.
    - May create some issues, mostly if a tech has a building as a requirement, as you may not have the proper variant of the building.
    - Since the very basic units, such as spearmen, are tied to primary settlement, not a recruitment building, it means I also need to make copies of the main settlement.

    The scripted mercernary way
    - I can give a resource pool to a province, by script. Units are recruited via the mercenary pannel, with something like "4 Reikland spearmen, 3 Reikland Halberdiers, 2 Reikland Empire Knight, 1 Reikland Reiksguard, 1 Reikland Demigryph, 2 Reiklands Mortar, 1 Riekland Volley Gun..."
    - Due to a bug in the function available in the script, it is not possible to have the normal replenishment pool, with for example "you need 4 turns to have a Steam Tank". If I do that, going to next turn the Steam Tank still needs 4 turns! And so you can never build it. This also mean that if I give a max of 4 spearmen, you recruit 2, and you expect to fill the pool with 1 new spearmen every turn until you reach 4 again, it won't work.
    - So I have two options:
    -- I manually handle the replenishment pool in my script, and give new units to the pool every X turns (this work, but it requires a lot of relatively complex scripting).
    -- Or I "reset" the pool every turn, with a minimum of one unit. It means you could potentially recruit a Steam Tank every turn if you want.

    Whatever the solution, the script will count how many buildings of the different levels you have in a province to set up the limits.
    For exemple, if you have one barracks level 3, you could get 3 spearmen, 2 halberdiers and 1 greatsword every turn.

    This will be updated at the beginning of each turn (since keeping track of deleted, captured, sabotaged, etc. building dynamically) would be even more complex.

    And this is paired with a global cap, also updated via script at the start of turn.

    So even if you could recruit a Steam Tank every turn, the cap could be 1 for the building at the maximum level, and so practically the Steam Tank will appear on the mercenary pannel only if you currently have none.

    I could make a smarter script, that could add a % of units every turn.
    For exemple, have an internal counter for Spearmen Recruit (for exemple 0.2 / barracks), and Spearmen Pool Max (for exemple 1 / barracks), and Spearmen Global Max (2 /barracks). If you have 4 barracks, the Spearmen recruit is 0.8 at first turn. Not enough to add a spearmen. Turn 2, it becomes 1.6, I can add a new Spearmen to the pool (and recruit becomes 0.6). Turn 3, internal recruit becomes 1.4, I add a new Spearmen to the pool, etc.

    Pro
    - Doesn't require editing the map. Much less compatibility issues. Could be done immediately, doesn't require the AssemlyKit.
    - Doesn't require additional building, so easier to do for the db part.
    Con
    - No specific buildings, so no regional bonus for units, and no regional garrison.
    - Regional units are recruited via the mercenary pannel, so they are built immediately, and you don't have a fixed number of slots every turn, this may unbalance the game. If you have a lot of cash, and two lords in the region, you could recruit 38 units and two full armies in one turn. Even if there is a global cap for the regional units, suppose you have your army completly destroyed, if you have cash you could rebuild all immediately.

    Personnal opinion

    The mercenary solution may seem a good one because it's more compatible and can be done without the Assembly Kit. But the script would be much more complex, and I'm afraid it would completly unbalance the game due to the immediate and non limited recruitment.

    So I think the building solution is probably the best.

    What do you think of these solutions? Other ideas?
    Last edited by Steph; May 22, 2022 at 11:34 PM.

  2. #2
    Steph's Avatar Maréchal de France
    Patrician Artifex

    Join Date
    Apr 2010
    Location
    Pont de l'Arn, France
    Posts
    9,155

    Default Re: Warhammer III and regional recruitments

    I may have a much more elegant solution.

    For each unit, I make one generic copy (identical to vanilla), and several regional copies.

    The building allows recruiting the generic unit (the only one shown in the building browser, or in your recruitment pannel).


    But in the UnitTrained pannel, I checked what units are created, and where.
    - If the unit is in a specific region, I replace the unit with the regional copy.
    - If not, I replace the generic unit with the vanilla unit. Why? Because the UnitRemove function would delete the first occurence found, including a unit with experience that could have been there for sometime. So these generic units would be there ONLY has a temporary unit for recruitment.

    Two problems:
    - What about unit cap? The idea here is that if the global cap for a regional unit is reached, then I replace the recruited unit with a generic one instead. But in that case, how to handle a cap for the generic units? I could have one, but it means that if you have a cap of 10 generic units, and 10 regional units, but have only 2 regional units and 9 generic, you could only recruit 1 more generic (converted later to regional), but you won't be able to get 8 more regional units. Sor maybe generic units should not be capped?
    - I'm not sure if I can easily grant experience to the new unit. And I'm not sure if effects from lord or local building would apply

  3. #3
    Alwyn's Avatar Frothy Goodness
    Content Director Patrician Citizen

    Join Date
    Feb 2014
    Location
    United Kingdom
    Posts
    11,172

    Default Re: Warhammer III and regional recruitments

    As you said, the building solution sounds like the better option - as you said, the mercenary solution would unbalance the game. Your more elegant solution sounds even better, if you can solve the problems.

  4. #4
    Steph's Avatar Maréchal de France
    Patrician Artifex

    Join Date
    Apr 2010
    Location
    Pont de l'Arn, France
    Posts
    9,155

    Default Re: Warhammer III and regional recruitments

    Progress

    I can identify a unit is a temporary unit, and where it is recruited. Next step: replace the unit text and icon by the correct one

    Note: the unit is already replaced in the map after recruitement, I'm working on the recruitment UI

  5. #5
    Steph's Avatar Maréchal de France
    Patrician Artifex

    Join Date
    Apr 2010
    Location
    Pont de l'Arn, France
    Posts
    9,155

    Default Re: Warhammer III and regional recruitments

    and now with local name and icon


Posting Permissions

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