@
Knasp
Thanks, a lot of good suggestions, I like them.
The idea of conscription using the stocked equipment and the city population has made redondant the ability to buy units that I wanted to reimplement (with units construction representing the standing army in all cases, yes), and mercenaries are the perfect replacement.
As that ability (buying unit) would be a "project" represented by a "fake" building made available on context (like what will be used for conscription), so this doesn't require particular AI coding (but I still need to code the conditions of course...)
Saving units is possible, yes, to a point. I mean the mode already save extra data for units (composition in personnel - materiel - equipment - food - etc..., and a few other things, including turn created and HP), so the code is already here, it's just a matter of adding new entries in the table saved (conscription/contract turn, disbanded at turn, experience & promotions)
But on the technical side I've already tried to lower the data in that table because its serialization (done 2-3 times each turn before "save game" events) in end game on large map could take a few seconds, as it was generating a string of more than a million caracters... In the current code, I'm cleaning it from dead units to prevent this, still there is a limit to what can be kept in it, but eventually I could use an archive table less accessed for disbanded units (and another one for dead units in case we want to access stats - I know some people love end-game stats like which unit had made the more kills, best in offense, defense, etc... Yep, I'm one of them)
So short answer: yes, saving units is possible, part of their attributes are already saved by the mod.
I also like the idea of a "pool of mercenaries", if I had to expand it a bit I'll consider mercenary armies, ie not just single unit (well, initially single units in early eras, then hiring "armies" of 2-5 units until the era where standing armies become the standard)
Barbarian units could also somehow be linked to mercenaries (roaming and looting the map when not under contract), if we can make less agressive barbarian units (ie non-suicidal)
Quick summary, please correct me if I've forgotten something:
Standing Army : unit construction in city, from "personnel" reserve and equipment stock - medium upkeep cost, no auto-disbanding (I need to think about the opportunity to create an "officer" reserve, something I'm pondering since R.E.D. WWII)
Conscription: construction of a one-turn "building-project" spawning unit(s), mostly from "lower class" population, unit type dependant of population classes and available equipment, % from each classes could change with policies, low upkeep, (low) turn limit before disbanding
Mercenaries: buying a "building-project" spawning unit(s), unit type dependant of nearby civilizations context (or/and the mercenary group history), no resources required, high upkeep cost, (medium) turn limit before disbanding
Now, do you think that you could try to include that information somehow in the units table ? Eventually with an estimation/guess of the number of "personnel" required in an "unit" ?
For reference, we'll use division-sized units in latest eras, (ie 5,000 to 10,000 personnel in an "Infantry Divison" units), but lower values for the first units (50-100 for example in a "Hunting Party" ?)
We'll need some kind of progression on which the general balance of the mod will be based (production, growth, ...)
And propositions for unit's "organization" names (could/should change based on the civilization ethnicity ?) are welcome