Is iUnit stable through game save/load?

Pazyryk

Deity
Joined
Jun 13, 2008
Messages
3,584
I know it is usually. But I keep seeing bugs in my mod that would be most easily explained by iUnit changing at some point. Possibly but not necessarily at game save/load.

In tests it seem to persist and to be constant with embark/disembark. But I wonder if there is some special circumstance where it changes for some reason. (I'm not expecting it to persist through upgrade... I know that is really a new unit...)
 
CvUnit::m_iID - which is what is returned by GetID() - is part of the unit's data persisted into the save game file, so yes, it's stable across save/load
 
...grrr. I was hoping someone would say "iUnit changes when ... x ... happens". Otherwise the fault must be in my Lua somewhere.
 
Top Bottom