View Single Post
  #53  
Old April 9th, 2012, 10:42 AM

elmokki elmokki is offline
Second Lieutenant
 
Join Date: Aug 2008
Posts: 408
Thanks: 11
Thanked 209 Times in 57 Posts
elmokki is on a distinguished road
Default Re: UnitGen - Random nations with procedural sprites!

Well, normal troops are right now generated so that nation gets 3 or 4 different weapons and 2 or 3 different armors and every single combination is generated for infantry. For archers 1-2 weapons are generated and two armor variants for each weapon are generated. Cavalry is a bit different, nations get 1-3 mounts and then they get: lance cavalry or onehanded cavalry depending on a dice roll, two handed cavalry if possible (basically only if there's a great axe available actually), and a light lance cavalry. The program tries to generate cav versions for each armor, but it also depends on the available mounts. If there isn't a heavy mount then there just simply isn't a full plate cavalry unit. Obviously when a race just doesn't get some role, it won't be generated. Abysians don't get ranged, chariots or cavalry, lizards don't get cavalry and flying races don't get cavalry or chariots.

So basically you're looking at potentially like 20-24 units we're thinning the herd down from. The thinning algorithm first decides the roster size in all different areas (cav/chariot/ranged/infantry) and then starts thinning the units. Generally it always tries removing a whole tier of armor from that role first, if that is too much it tries removing one weapon type and if everything else fails it removes a random single unit. I do agree that I should probably make it chance based so that it at least sometimes - actually might be a good idea to have it do it pretty often - prioritizes removing a random unit.

I would, however, like to note that troop rosters in the game are relatively monotonous already. Many nations get very similiar units with minor changes, and it's okay. It's obvious people won't in general recruit more than 3 or 4 different unit types at most. Even then in some cases it allows a tactical choice (naginata vs katana vs no-dashi is at the very least tougher than mace vs spear vs broad sword), even though that choice is an once per choice and varies between players, not between turns in a single game (or well, naginata is 4 more damage than katana, but the pricinple stays).

The commander generation in all it's simplicity right now is picking existing troops so that all the special tags (like flying, stealthy, amphibious, 50% chance of sacred to be guaranteed to be a com) are filled if possible. I agree it could use some 80 leadership commanders, more diverse naming - especially the sacred commander version of let's say Death Templar should probably be something like Death Lord - and both commanders and priests should have magic occasionally. It isn't exactly a high priority though since unless a commander (I'm mostly looking at sacred commanders) is thugworthy or has an useful special trait (flying for that hoburg hawk cavalry or stealthy for stealthy troops) it just won't be recruited almost at all.

You can already change many of the probabilities for the program. You can't influence mage setups (1, 2 or 3 primary mages) or the path patterns they get (one path at 3, one path at 2 and one random is more common than let's say two paths at 2 and 2 linked randoms). You also can't influence the cav-chariot-archer-infantry ratio. What you can, however, influence is the probability of appearance for different sorts of magic weapons for sacreds, different sorts of special features for mages, sacreds and priests, and different sorts of gear for every single unit generated. Oh yeah, also general nation traits (both stuff shared by all units of primary race and stuff like blood sacrifice) and the probability of different pretender chassises appearing are modifiable.
__________________
UnitGen - randomly generated nations with randomly generated sprites
http://forum.shrapnelgames.com/showthread.php?t=48341
Reply With Quote