Unit Naming with spies

NotSoGood

Emperor
Joined
Jan 25, 2009
Messages
1,077
Location
Finland
I got this error when I trained a spy. I have added a unit combat for them (super spies mod) and to me it seems like unitnaming doesn't like it. :)
Code:
Traceback (most recent call last):
  File "BugEventManager", line 361, in _handleDefaultEvent
  File "UnitNameEventManager", line 240, in onUnitBuilt
  File "UnitNameEventManager", line 444, in getUnitNameConvFromIniFile
  File "BugCore", line 147, in get
  File "BugCore", line 118, in _getOption
ConfigError: Option UnitNaming__Combat_SPY not found in mod UnitNaming
Personally, I do not think spies should be named at all. Atleast not in my mod. They are kinda mysterious or something. Could someone give me a short description how the unit naming works and how hard would it be to leave spies outside the unit naming?
BTW, how does it handle units with no unitcombat?

How I understand how it works, is that UnitNameEventManager is the key here. And possibly, class BuildUnitName onUnitBuilt calls the unit name generator, is that right? So if I add an isSpy check there it should ignore spies completely?
 
For each UnitCombatType that you add you need to add a matching <option> to Config / Unit Naming.xml. Copy one of the existing ones; it should be easy but if you get stuck post again.
 
Man! This easy operation solved a problem I've had for ages with Python exceptions popping up when I build my new type of Hero Units. Thanks!
 
Top Bottom