Mechanoid Weapon Harvesting

Started by kahlzun, July 17, 2015, 10:33:51 AM

Previous topic - Next topic

kahlzun

Hi all! I am putting together a mod with the intention of harvesting weapons from fallen mechanoids.
So far I have bills to pull Scyther Blades and Charge Lances from Scyther corpses, and I am beginning to look at Centipedes.
The issue with Centipedes is they can spawn with a variety of weapons (as opposed to the Scyther's fixed arsenal). I read somewhere that corpses keep a pawn inside themselves listing all the specifics of the character, and was wondering if there was a way, in xml, to pull the data from a dead Centipede, and generate the weapon as part of a bill? Or are we getting into dll territory?

Alternatively, is there a way to assign a probability table to a bill's result? If i match the Centipede's weapon equip probability, that would probably work too.
Look for me on the KSP forums!
Rimworld. The game where getting a cannibal psychopath with bloodlust is a good thing.

Tynan

The issue is the weapon doesn't even exist when you want to harvest it. It's <destroyOnDrop> so when the centipede goes down he 'drops' it and it vanishes forever.

I'll just say now that this would be tricky and would definitely require DLL work.
Tynan Sylvester - @TynanSylvester - Tynan's Blog

Saularian

Or you could do something lazy (like me) and overwrite the <destroyOnDrop> and don't need the hassle of harvesting the weapons  ;)