Gender changes on upgrade

CivilizationAce

Warlord
Joined
Jan 17, 2017
Messages
236
I'm creating a new unit type, that like the Scout has only one person. I'd like the following:
  • To have some variety of unit appearance, including gender
  • Upgrade to the same gender
I think if the player names a female unit Jane Florence Smith and then upgrades it and gets a guy they may not be too happy.

If I could find access to unit appearance through Lua objects I might be able to do something along the lines of
  1. Catch the variations option before upgrade actually happens.
  2. Let the upgrade process.
  3. Change the variations option after the upgrade.
However, at the moment I don't have a clue whether unit appearance is even exposed to Lua.

The other thought I had was an end run around the graphics: To actually make two unit types for each one I had planned with the same name and descriptive text, one displaying as male, one female, only one available for actual construction, then catch unit creation and pick one of the two at random. TBH I'm not entirely sure that this is practical either. In particular I worry about the difference between building a unit in a city with a barracks and using code to just create one there – I'm unsure whether the experience bonus will apply in the latter case.

Both approaches seem like hard work. Anyone know which, if either, is possible please?
 
Top Bottom