This thread is for technical exchanges: if you want to ask me how I did something, or propose way to add new things to the game, this is the place to discuss it.
Inititial question :
Steph, how complex is it to set up separate pools of generic generals (Austrian, British etc) for each faction's recruitment?
CA managed to do something very special... They have a system of "random fixed list"...
In the recruitment pool, the next general is random. But the portrait is not.
They have in the startpos a kind of "list of index", which is hardcoded for each faction. Britain could have for example 5 9 23 45 89... and France 36 72 2 45 63... It means that the first general added to the British pool will always have the portrait n 5, whatever the actual name of the generals (why CA did not include a "portrait path" in the db for each named general is beyond me). So there's to my knowledge no way to attach a portrait to a future general in the pool. Only pre placed general, or the 3 in the starting pool, can have a specific portrait.
The problem with CA approach is that this list of index is not editable in the normal startpos editor (it's part of data which is shown as "binary"). So Husser made me a simple startpos with one his tool just for this part.
To make it simple, I have a kind of templates, with 20 generals in the pool for each faction (named 01 to 20). And then it's just a matter of having 20 generic portrait, different enough from one faction to another.
To sum up: not very difficult provided you have the generic list ready to copy/paste to each faction in the startpos.