Scarcity

Started by Famous Shoes, March 15, 2015, 11:07:59 PM

Previous topic - Next topic

Famous Shoes

I'd like to make apparel appear on pawns, including the starting colonists, but only rarely. Now, the obvious approach to this would be to set apparel/commonality in the ThingDef fairly low. But, that doesn't seem to do the trick. Values of 100 or 0.01 produce the same results (everyone and their dog is wearing it.) Moreover, looking at Core, I see that even fairly rare items have the same commonality as common ones, e.g., power armor.

So, the question is, can we make apparel appear rarely or is that just not supported yet?

Note most of the apparel in question (Battle Rattle rucks, holsters, etc.) is on the shell layer, and there doesn't seem to be much for that layer so I think the ThingStuffPair randomization may be working as programmed, just not as one would hope for.

RemingtonRyder

What you can do is to copy or alter an existing pawn definition and, for example, remove the existing apparel tags. Instead, manually define the gear you want them to have using the apparelRequired tag - this is used so that some raiders always spawn in with a personal shield, but you can adapt it for this purpose.

You can also set their gear quality and health here, and the money they have to spend on apparel.

Then, if you defined a new pawn, you add them to a FactionDef.

Famous Shoes

Thanks, to maintain compatibility with other mods, I guess I'll have to look into injecting changes to the pawn defs at runtime. Seems a long road to travel just to keep every single pawn from spawning with a shoulder holster. Ces't la alpha.