For what it's worth, Pyrel still has the monster indices in the data files, but it doesn't actually use them for anything, and monsters are looked up by name. It's pretty rare that you need a random monster, any monster, unique or not, from any depth -- usually you want to constrain your search somehow, which means you have to scan through the monster list to find applicable entries.
I really should start working on Pyrel again...
EDIT: the index is still helpful in Angband as a convenient way to index into the list of monster data structures, but this is more a side-effect of Angband being written in a language that doesn't have convenient hashmaps or other object-oriented features. Being able to index into a list is helpful in C; it's less vital in a higher-level language like Python which has more options for how to store information.
I really should start working on Pyrel again...
EDIT: the index is still helpful in Angband as a convenient way to index into the list of monster data structures, but this is more a side-effect of Angband being written in a language that doesn't have convenient hashmaps or other object-oriented features. Being able to index into a list is helpful in C; it's less vital in a higher-level language like Python which has more options for how to store information.
Comment