Is your feature request related to a problem? Please describe.
We currently have a number of zombies that should have functionally identical stats, but slightly different loot drops and potentially different tileset sprites. The simplest example for this is zombie scientists. They should have a different look, they should drop some different stuff (like a lab coat), and potentially maybe have different butchery results (CBM retrieval), but otherwise they should have the same attributes as a regular zombie.
This is becoming cluttery when we want thematically appropriate zombies for a location and have to add a new type of zombie. Moreover, it means if we want zombies like scientists to evolve, they need to either lose their unique features, or have an entire evolution line drawn up.
Describe the solution you'd like
I propose a new flag, "subtypes". Subtypes is similar in a lot of ways to copy-from, but has different heritability and spawning rules.
Usage example:
{
"id": "mon_zombie",
"type": "MONSTER",
"name": "zombie",
"subtypes": [ "scientist", "collegestudent", "business" ],
Each subtype in the array functions as a suffix and automatically generates a new monster id for the new type, so this creates mon_zombie_scientist, mon_zombie_collegestudent, and mon_zombie_business. These IDs can have their drop lists defined as usual and get icons as usual but are otherwise the same as mon_zombie. It should also be possible to make a further entry for mon_zombie_scientist, if desired, and enter a new "name" and "description" for it, and even slightly varied stats just as with copy-from. If not defined, the game should just assume it uses the master value. Again the difference here between subtype and copy-from is evolution: if a mon_zombie_scientist evolves into a mon_zombie_acid_scientist, it may or may not have some new name and description info for the new type, or just appear in all ways to be a mon_zombie_acid except that it drops a labcoat and has a labcoat on in the graphic.
As part of this, we make it so that evolved zombies inherit their drops from whatever they evolved from, so a mon_zombie_collegestudent that evolves to acid form becomes a mon_zombie_acid_collegestudent, which uses the drop tables for mon_zombie_collegestudent. I am not sure if there is any case where we'd want to change drops in any other ways after evolving - it's possible drops would be reduced as gear was destroyed, I'm not sure the best way to handle this, though. Maybe each evolution level damages its gear a bit more, potentially destroying it? It makes sense that a hulk might have damaged its clothing when it evolved.
In monstergroups definitions, we should be allowed to specify either subtype whitelists with relative weights, or subtype blacklists. This allows us to fine-tune what kinds of zombies appear in a map area, so that we can make zombie college students and professors appear on a campus, construction workers on a job site, and scientists in a lab.
Usage example:
{
"type": "monstergroup",
"name": "GROUP_ZOMBIE",
"default": "mon_zombie",
"monsters": [
{ "monster": "mon_zombie", "freq": 1, "subtype_blacklist": [ "scientist" ] },
{
"type": "monstergroup",
"name": "GROUP_ZOMBIE_LAB",
"default": "mon_zombie",
"monsters": [
{ "monster": "mon_zombie", "freq": 1, "subtype_whitelist": [ [ "scientist", 10 ], "business", "officeworker" ] },
Describe alternatives you've considered
It would be possible to do something like this with copy-from and some inheriting, but I don't think copy-from is really intended for this and it potentially serves a different purpose.
Additional context
This would allow a lot more flavour to where you wander, and finer tuning of zombie types, but also some more interesting ways of conveying lore. We could put looter and rioter zombies into the streets, families with their kids geared to flee the cities wandering around the roadblocks on the way out, and more. It could be a very powerful storytelling element.
Inventories
It's been pointed out by @ymber that much of this could be handled by giving all monsters inventories, as in https://github.com/CleverRaven/Cataclysm-DDA/issues/31957, which would also solve the problem of re-risen zombies coming back naked. I think the two features would mesh very well and are not exclusive, since the core of this concept is in spawning locations and visual representation.
See also #31957.
I am going to close this issue even though it's still a thing we want, because I think it should be rewritten as monster inventories instead.
Most helpful comment
See also #31957.