A unique identifier distinguishes an enemy type from other types and stays fixed even when its array index changes. Keep it unchanged so saved data can still identify the enemy after the balance data is reordered. section 10.6
A practical compatibility workflow:
- Assign each enemy a unique value, such as “Big Zombie” or a numeric string. One format uses nine digits: three for faction, three for class, and three incremented linearly. section 10.6
- Save the identifier with the game data. On load, use it to find the enemy’s current index and update the saved data if the index has moved. section 10.6
- Use a dictionary to map saved indices to objects during loading, keeping dictionary lookups out of the gameplay loop. section 10.8
Figure 10.21 By saving the unique identifier in the game data, we can update indices as needed. When the vampire is added at index 1, and the zombie is moved to index 2, we can update the data accordingly.

Shows how a saved identifier lets the game update an enemy’s index when the balance data changes. section 10.6









