Ludeon Forums

RimWorld => Mods => Topic started by: Shurp on November 21, 2015, 07:07:56 PM

Title: What did I do wrong?
Post by: Shurp on November 21, 2015, 07:07:56 PM
I tried to create a simple mod, but it failed miserably.  I wanted to increase the number of weapons the Combat Supplier brings.  So I created a mod with only two files, About.xml and TraderKinds.xml.  In TraderKinds.xml all I did was change the min/max values, for example:

<li Class="StockGenerator_WeaponsRanged">
<countRange>
<min>8</min>
<max>16</max>
</countRange>
</li>

But nothing happened when the combat supplier showed up, still the usual list of a handful of items.  What did I do wrong?
Title: Re: What did I do wrong?
Post by: Toggle on November 21, 2015, 07:39:51 PM
You need to copy the base if there is one, then just copy the entire combat supplier chunk of xml and change the values, and copy the end tag. Then it should work

Edit: I had time anyways so here's the traderkinds xml.

[attachment deleted due to age]
Title: Re: What did I do wrong?
Post by: RawCode on November 21, 2015, 09:24:39 PM
https://msdn.microsoft.com/en-us/library/ms173149.aspx

read that article and you will be fine next time.
Title: Re: What did I do wrong?
Post by: Shurp on November 21, 2015, 10:35:19 PM
OK, I'm confused.  My TraderKinds.xml has the *entire* file.  I copied the whole thing, but edited certain values.

My mod directory doesn't have to have any other files in it, does it?

When Rimworld loads my version it will cause the original version to be ignored, right?
Title: Re: What did I do wrong?
Post by: Toggle on November 21, 2015, 10:47:59 PM
Quote from: Shurp on November 21, 2015, 10:35:19 PM
OK, I'm confused.  My TraderKinds.xml has the *entire* file.  I copied the whole thing, but edited certain values.

My mod directory doesn't have to have any other files in it, does it?

When Rimworld loads my version it will cause the original version to be ignored, right?

Oh, you 1. Enabled it in the mod list, and 2. Made a folder called "About" for the about.xml, right? If you did both, it's strange if it doesn't work. And yeah, it overwrites the original version depending on the mod order.

Title: Re: What did I do wrong?
Post by: Shurp on November 21, 2015, 11:21:15 PM
I think I found the problem.  I originally put the file in the Defs folder.  But I discovered there's a TraderKindDefs subfolder that it probably belongs in.  Damn Rimworld is picky!

*edit* -- yup, that did it, I had the file in the wrong directory.  Once I put it in the right place Rimworld picked it up and ran with it.