Looking for: Apply a -X% reduction to dropped items.

Started by AnActualDuck, May 25, 2020, 05:39:01 PM

Previous topic - Next topic

AnActualDuck

To specify; if you down an enemy and they drop a weapon it'll get a -X% (I'd choose 60%, but I'd bet a mod would have a slider for that) to it's condition. I would also like to be able to anything worn that, upon death, would receive a -X% to condition. Ideally a threshold % could also be applied so that the items don't go below a certain % when dropped.

For example, if you set the threshold of 10% and the reduction on death to 60%, if an enemy dies with armor at 60% it will only drop it to 10% instead of 0%.

What I'm looking to accomplish is using the profitable weapons mod but without the looted modifier it has. I'm also interested in getting rid of the corpse modifier from looted clothing. This way they both retain their appropriate values for sale. Just doesn't make sense to me that weapons have such a huge value loss and also how merchants would even know where if clothing came off a corpse. The % decrease for dropped/death items would just help to mitigate the potential profits from a raid. It would also remove the mood debuff for wearing a dead man's apparel but at the exchange of all looted apparel being tattered. This is just what personally makes sense to me.

So, my long winded explanation out of the way, have a bullet point of what I'm looking for:
- Decrease the condition of items dropped by downed pawns
- Decrease the condition of apparel worn by a pawn at death
- Does not effect stripped clothing from living pawns
- A minimum possible condition for dropped items and corpse apparel
- Sliders to adjust each of these to personal preferences
- Ability to specify which pawns would be effected (Colonist, Friendly, Hostile)

If you know of a mod like this and can point me in the right direction I'd appreciate it!

RawCode

and what exactly not working for you, what exact issues you have?

it's obviously c# only modification, did you performed any research about code flow on pawn death?
probably you had checked how game put "dirty" flag on items when someone die with said items on?

AnActualDuck

What? I'm asking if a mod exists not how to make a mod. I am not interested in coding or making mods, I just want to know if something exists that lets me cause a reduction to condition for items that were dropped by enemies