Finding a Power armor helmet in the code

I’m trying to figure out where power armor helmet’s can be found.

I have looked at the code. If I’m reading it right, they only appear in caves, rat caves, and spider basements.

The Item Groups “rare” and “military” contain power armor helmets. But I can’t find anywhere that place_loot actually references those groups outside of the above mentioned. Part of it is GitHub’s terrible search engine. Google doesn’t like searching it either.

Anybody know? I really just want to know where the answers are in the code. I don’t need anecdotal evidence.

I’ve found power armor helmets in the places you mentioned (minus the caves - I don’t bother with those), plus scientist and soldier corpses (the map tiles with dead guys, ID cards, and the occasional zombie of the type, amoebic bloc, and/or mi-go), and I’m pretty sure I found a helmet in a lab barracks, but only once or twice ever.

The helmets are crazy rare. It’s kinda silly, actually.

I actually found a normal power armor helmet once ON A FREAKING SIDEWALK.

No corpses, nothing like that. Just a power armor helmet sitting there. Don’t know if it was some kind of nice bug with item spawn or something.

It is part of the house spawn.

In particular, it was probably the sidewalk of a wasp house - sorry, I left that out of my list earlier. Those are like spider basements - as best I can tell, ANY item that exists in the game has a chance to spawn.

So just houses.

Is it just special houses? basements?

Code dive as requested, there are three entries in data/json/itemgroups/main.json and one in data/json/item_groups.json
The three in main.json are adding them to the rare items list, the entry in item_groups.json adds the basic one to the military items list.

The vault item group has all three power armor types, but no helmets, that’s a bug.

The mil_armor and mil_armor_torso groups have power armor, but no helmets, probably a bug.

Diving a level down, let’s look at here these spawn.
“rare” is spawned in:
The “military fight scene” special with a bunch of military corpses.
The “science group scene”, same as above.
Wasp houses (If things spawn on the sidewalk, that’s a “bug”).
Spider basements (both varieties)
Survivor cave
Rat cave

'military" spawns in… whoops that’s a spoiler:

Barracks in labs.

Also in helicopter crashes.

As for groups where armor currently spawns without helmets:
mil_armor spawns in:
Armory of the military outpost
Supplydrop special.

Barracks in the lab

Bio operator drops.

Vault list spawns in the vault, go figure.

See https://github.com/CleverRaven/Cataclysm-DDA/pull/20260, added helmets to match suit drops.

My hero!

In particular, it was probably the sidewalk of a wasp house - sorry, I left that out of my list earlier. Those are like spider basements - as best I can tell, ANY item that exists in the game has a chance to spawn.[/quote]

That’s strange then. I don’t recall seeing any wasps in the vicinity. Ditto with those wax walls.