Removing Steel Ruins

Started by KerbinFiber, May 05, 2020, 03:50:19 PM

Previous topic - Next topic

KerbinFiber

I'm relatively new to modding Rimworld and have used the following patch to remove Steel ruins from generating.


    <li Class="PatchOperationRemove">
        <xpath>/Defs/ThingDef[defName="Steel"]/stuffProps/categories</xpath>
    </li>


(I trimmed off the Operation/operations tags since there's another operation unrelated.)

While it successfully completes and does, in fact, remove the ruins, there's a somewhat obscure warning, not error, that shows up on the console when the game is loaded.


Config error in Villager: Cheapest weapon with one of my weaponTags costs 135.4 but weaponMoney min is 65, so could end up weaponless.

Config error in Tribal_Warrior: Cheapest weapon with one of my weaponTags costs 335 but weaponMoney min is 150, so could end up weaponless.

Config error in Tribal_Berserker: Cheapest weapon with one of my weaponTags costs 530 but weaponMoney min is 300, so could end up weaponless.

Config error in Tribal_ChiefMelee: Cheapest weapon with one of my weaponTags costs 530 but weaponMoney min is 500, so could end up weaponless.



From my knowledge of playing Rimworld, I can only assume it's due to the fact that I'm not just removing the ruins, but the whole idea of making any building from steel, which is affect the price of tools since a steel knife doesn't exist anymore.

So I've come here to see the best remedy for this or even a better alternative.

KerbinFiber

I'd still like to know other alternatives to this, however, when I added Iron into the game and set Iron to be able to be made into walls/items with a similar price, the warnings went away.

KerbinFiber

Just realized that Steel variants of workbenches and items don't exist anymore, so I guess it's still a problem until I get the game to not generate steel ruins

LWM

Do you have any idea how ruins are generated in the game?

KerbinFiber

After looking through all of the ScatterRuins classes, I think I found the part where the code grabs all of the materials that it can use.

public static SurfaceType GetSurfaceType(this IntVec3 c, Map map)
{
if (!c.InBounds(map))
{
return SurfaceType.None;
}
List<Thing> thingList = c.GetThingList(map);
for (int i = 0; i < thingList.Count; i++)
{
if (thingList[i].def.surfaceType != SurfaceType.None)
{
return thingList[i].def.surfaceType;
}
}
return SurfaceType.None;

Kaelen Mosar

get KV configurable maps

and maybe KV def editor