Changing items from pod drops (from killing mechanoids solved)

Started by Noobshock, October 22, 2014, 06:03:42 AM

Previous topic - Next topic

Noobshock

Now for pod drops I'm looking into the dll and it looks like a pretty convoluted process to generate these stacks of random stuff, not sure I understand enough of how it works to adventure myself changing it, but any advice is welcome.

When it comes to drops from mechanoids, I just don't know where to look. Is that DLL or can I find it in the core defs?

Shinzy

#1
in ThingDefs -> Races_Mechanoid

there's line for
    <killedLeavings>
      <Metal>50</Metal>
    </killedLeavings>

but this is 100% drop chance which I think you wanted to be rare

Though you could go the route of 'dissecting' the item from unconcious mechanoid
similar to how Scyther's protrusion blades work
This would require some work to add the item, the recipe on centipede (can also be found on the Races_Mechanoid) and maybe something else is needed

just throwing some ideas =P

Edit: For how drop pods work I think EdB has most knowledge having made the prepare carefully mod in which you can adjust those
you might wanan ask him for pointers
Edit2: Minami mite know something about them aswell

Rikiki

I think Noobshock is looking for some info about mechanoid attacking via drop pods (instead of just coming from 1 border like raiders).

You may want to have a look at the refugee pod crash event:

  • Class: IncidentWorker_RefugeePodCrash
  • Function: TryExecute

It defines the specific drop pod content and lauches it. :)

JuliaEllie

You might want to take a look at Rimworld.DropPodUtility you can drop either DropPods with a DropPodInfo saveable declared or drop a DropPods with the List<Thing> which could be anyThing. D-d-d-d-drop the Pod wup wup wup.

Noobshock

Quote from: Shinzy on October 22, 2014, 06:15:23 AM
in ThingDefs -> Races_Mechanoid

there's line for
    <killedLeavings>
      <Metal>50</Metal>
    </killedLeavings>

but this is 100% drop chance which I think you wanted to be rare

Though you could go the route of 'dissecting' the item from unconcious mechanoid
similar to how Scyther's protrusion blades work
This would require some work to add the item, the recipe on centipede (can also be found on the Races_Mechanoid) and maybe something else is needed

There's really no way to have a straightforward drop table with % chances?

Shinzy

Quote from: Noobshock on October 22, 2014, 10:24:31 AMThere's really no way to have a straightforward drop table with % chances?

Not through XML to my knowledge
the best way to get something being rare with ease is to have traders carry it
any item under the items category is extremely rare =P

Matthiasagreen

#6
*person with no modder experience cutting in*

In previous alphas, didn't mechs with machine guns only sometimes drop the gun? Wouldn't that kinda be the same thing?
Hi, my name is Matthias and I am a Rimworld Addict. It has been five seconds since my last fix...

Noobshock

Quote from: Shinzy on October 22, 2014, 10:51:42 AM
Not through XML to my knowledge
the best way to get something being rare with ease is to have traders carry it

Yeah I already have the traders modded, so that's taken care of. I wish I could have a few extras as drops / pod crashes though. Oh well, if someone comes along with a good idea on those, I'm all ears.

Shinzy

Quote from: Noobshock on October 22, 2014, 12:23:06 PM
Quote from: Shinzy on October 22, 2014, 10:51:42 AM
Not through XML to my knowledge
the best way to get something being rare with ease is to have traders carry it

Yeah I already have the traders modded, so that's taken care of. I wish I could have a few extras as drops / pod crashes though. Oh well, if someone comes along with a good idea on those, I'm all ears.

As far as I'm aware all the items that are marked as 'carried by trader'
can crash from pods aswell

I had a bit of an hex-cell incident in my own mod in.. alpha 5 I think? I had intended them only to be harvestable from power armors, well what do you know! first 30 minutes of my test playthrough with the mod, pod crash lands near my base carrying like 7 stacks of them
ruined my entire carefully constructed "these ain't gna be too easy to obtain!" system ::)

Noobshock

any idea if it scales with the quantity the traders carry?

Noobshock

Ok so the drops from Mechanoids are easily solved with what you find in PawnKindDefs/Pawnkind_Mercenary.xml

Namely the <inventoryOptions> <subOptionsChooseOne> and <choiceChance> clauses.

Now all that's left to clarify is how exactly crashed pod contents are generated, which I'd still appreciate any clarification on as ILSpying on the code is not cutting it for me :/