Relative rarity isn’t much of a flaw. Percentages are more appealing, but it’s hard to tell what percentage is good. Usually you express issues relative to the current spawnrates anyway; you don’t know that, hypothetically, a 65% chance of a welder is right, you just know welders are too rare right now.
The big issues I see with the current system are these:
[ol][li]As noted, the rarity of items is shared in every location they spawn in.[/li]
[li]Your only control over how many items spawn is place_items()'s “chance” parameter, which is inadequate for a lot of purposes. You can’t try to spawn 1-2 random, rare items without having a chance of spawning eight items. You can’t try to spawn a backpack’s worth of junk without a chance that you’ll flub the first roll and spawn nothing. For the vast majority of purposes, it would be better to just spawn an exact number of items passed as a parameter, and give full control of any randomization in that regard to whatever’s calling the function.[/li]
[li]You can’t easily make a list that spawns a bunch of separate entries at once; this makes it impossible to spawn a sensible suit of clothes, or a gun and matching ammo, without an awkward hack.[/li]
[li]You can’t nest spawn lists in each other, meaning you need to redefine common components of a more specific list, such as clothing.[/li][/ol]
The last two problems are big issues for complex cases like “a dead soldier, with a random set of equipment”. In my mind, something broadly similar to this is ideal:
[ul][li]100% chance of 1 human corpse[/li]
[li]100% chance of 1 set of military clothing[/li]
[li]50% chance of 1 possibly-loaded military primary weapon and ammo[/li]
[li]25% chance of 1 possibly-loaded military side arm and ammo[/li]
[li]75% chance of 1 combat knife[/li]
[li]20% chance of 1-3 military grenades[/li]
[li]20% chance of 1-2 military medicines[/li]
[li]60% chance of 1-2 military food items[/li][/ul]
Spawning a bunch of subentries separately and nesting further lists makes this a lot easier, because you can say “I need a soldier’s uniform” or “I need a loaded rifle and maybe ammo” and cut to the more important features. The alternative is to hammer out “1 shirt, 1 pants, 1 boots, maybe a vest, maybe a helmet, blah blah blah…” every time you want to give someone a uniform. This way, you can give a dead soldier, a dead soldier zombie, and a locker in the barracks the same type of uniform easily, and it’s guaranteed to result in a coherent uniform rather than something inane.
This kind of list where you have a separate chance of spawning every item on the list is very useful, but the existing kind of raffle-style list is still better for simpler cases. If you’re spawning prescription drugs at a pharmacy, and you just want a bunch of random prescription drugs, you still want to have lists where where each entry is just “x amount of y drug, with z raffle tickets” and you just choose one entry, then probably repeat a bunch of times.
The other downside to this style is that excessive predefined detail and a dearth of random elements can make the world feel flat. You might want dead soldiers to have a low chance of carrying two rifles for whatever reason, or a spare pair of pants, or a bag of pretzels; the above list won’t do that unless you remember to add them. You can mollify the issue by adding low chances of spawning additional items with a very wide range of possible types. It’s still best to reserve this degree of structure for instances where excessive randomness is very noticeable, like the gear on a corpse; it’s acceptable to find a crate or locker holding a weird mix of junk, or a gun shop stocking weapons and ammunition that prove
These lists are the way it’s done in Bethesda Softworks RPGs; I didn’t come up with the system myself. It’s intricate, but not really moreso than necessary, and the system doesn’t need to be conveyed to the player.