Mining/Terrain Ore Drops (Edit?)

Started by Latteralus, January 18, 2015, 04:36:21 AM

Previous topic - Next topic

Latteralus

Hey Everyone,

I looked around the forums for a while but with little results to what I'm looking for. I would like to edit the amount of Steel/Silver that I mine. It's currently set at 35, I would like to edit it to where I can mine a single rock and obtain 250 Steel/Silver for a mod I'm currently working on.

Any help is appreciated!
- Latteralus

Rikiki

Go into Mods\Core\Defs\ThingDefs\Buildings_Natural.xml.
Look for this kind of line:
<mineableYield>35</mineableYield>
You should modify 35 to 250 or whatever number you want.

Latteralus

#2
Thanks for your input, I've been able to adjust the yield of compacted steel (that I mine from a natural wall) to 100. I now run into the problem that a universal stack limit of 75 is forced so when I mine that wall I only get 75 steel as opposed to the 100 I have set.

Now I have found the stack limits for most other items but for some reason the stack limit for compacted steel is nowhere to be found. Any help is much appreciated in finding the .xml this value is in.

Thanks!

CannibarRechter

Could be hard coded. Anyway, got helps those who help themselves. In pursuit, therefore, of empowering you, please do the following:

1. Run PowerShell.exe
2. cd to your Rimworld/Mods/Core/Defs directory
3. type:

ls -recurse *.xml | sls -pattern 75

This will reveal everywhere 75 is used anywhere in (non-hard-coded) RimWorld.


CR All Mods and Tools Download Link
CR Total Texture Overhaul : Gives RimWorld a Natural Feel
CR Moddable: make RimWorld more moddable.
CR CompFX: display dynamic effects over RimWorld objects

jamaicancastle

The stack limit of steel isn't hardcoded, it's just inherited from its parent node, ResourceBase. You should be able to define a new stackLimit that will override that, just like e.g. silver does. Keep in mind that this will increase the stack limit for all steel, not just the stacks that come out of mining.

I suppose it's possible that the actual mining action itself has some kind of hardcoded limit on the number of items, as it (apparently?) does on the number of stacks (which I find odd, since most things in RW will cheerfully spill out as much of an item as you want, but hardly implausible). If that's the case a C# mod would be your only recourse.